Fix compilation warnings

This commit is contained in:
Wojtek Figat
2025-01-12 20:30:43 +01:00
parent 54869f1da0
commit e75d7ad257
2 changed files with 3 additions and 3 deletions

View File

@@ -1473,7 +1473,7 @@ static PixelFormatSampler PixelFormatSamplers[] =
{
uint32 data[4];
Platform::MemoryCopy(data, ptr, sizeof(data));
return Float4(data[0], data[1], data[2], data[3]);
return Float4((float)data[0], (float)data[1], (float)data[2], (float)data[3]);
},
[](void* ptr, const Float4& value)
{
@@ -1488,7 +1488,7 @@ static PixelFormatSampler PixelFormatSamplers[] =
{
int32 data[4];
Platform::MemoryCopy(data, ptr, sizeof(data));
return Float4(data[0], data[1], data[2], data[3]);
return Float4((float)data[0], (float)data[1], (float)data[2], (float)data[3]);
},
[](void* ptr, const Float4& value)
{

View File

@@ -304,7 +304,7 @@ VkPipeline GPUPipelineStateVulkan::GetState(RenderPassVulkan* renderPass, GPUVer
// Create object
auto depthWrite = _descDepthStencil.depthWriteEnable;
_descDepthStencil.depthWriteEnable &= renderPass->CanDepthWrite;
_descDepthStencil.depthWriteEnable &= renderPass->CanDepthWrite ? 1 : 0;
const VkResult result = vkCreateGraphicsPipelines(_device->Device, _device->PipelineCache, 1, &_desc, nullptr, &pipeline);
_descDepthStencil.depthWriteEnable = depthWrite;
LOG_VULKAN_RESULT(result);