Browse Source

Fixed warnings.

Branimir Karadžić 4 years ago
parent
commit
a923b86aab
2 changed files with 4 additions and 4 deletions
  1. 1 1
      tools/shaderc/shaderc_hlsl.cpp
  2. 3 3
      tools/shaderc/shaderc_spirv.cpp

+ 1 - 1
tools/shaderc/shaderc_hlsl.cpp

@@ -479,7 +479,7 @@ namespace bgfx { namespace hlsl
 								un.type = uniformType;
 								un.type = uniformType;
 								un.num = uint8_t(constDesc.Elements);
 								un.num = uint8_t(constDesc.Elements);
 								un.regIndex = uint16_t(varDesc.StartOffset);
 								un.regIndex = uint16_t(varDesc.StartOffset);
-								un.regCount = bx::alignUp(varDesc.Size, 16) / 16;
+								un.regCount = uint16_t(bx::alignUp(varDesc.Size, 16) / 16);
 								_uniforms.push_back(un);
 								_uniforms.push_back(un);
 
 
 								BX_TRACE("\t%s, %d, size %d, flags 0x%08x, %d (used)"
 								BX_TRACE("\t%s, %d, size %d, flags 0x%08x, %d (used)"

+ 3 - 3
tools/shaderc/shaderc_spirv.cpp

@@ -766,7 +766,7 @@ namespace bgfx { namespace spirv
 						un.texDimension = textureDimensionToId(SpirvDimToTextureViewDimension(imageType.dim, imageType.arrayed) );
 						un.texDimension = textureDimensionToId(SpirvDimToTextureViewDimension(imageType.dim, imageType.arrayed) );
 						un.texFormat = uint16_t(s_textureFormats[imageType.format]);
 						un.texFormat = uint16_t(s_textureFormats[imageType.format]);
 
 
-						un.regIndex = binding_index;
+						un.regIndex = uint16_t(binding_index);
 						un.regCount = 0; // unused
 						un.regCount = 0; // unused
 
 
 						uniforms.push_back(un);
 						uniforms.push_back(un);
@@ -795,7 +795,7 @@ namespace bgfx { namespace spirv
 						un.texDimension = textureDimensionToId(SpirvDimToTextureViewDimension(imageType.dim, imageType.arrayed) );
 						un.texDimension = textureDimensionToId(SpirvDimToTextureViewDimension(imageType.dim, imageType.arrayed) );
 						un.texFormat = uint16_t(s_textureFormats[imageType.format]);
 						un.texFormat = uint16_t(s_textureFormats[imageType.format]);
 
 
-						un.regIndex = binding_index;
+						un.regIndex = uint16_t(binding_index);
 						un.regCount = descriptorTypeToId(DescriptorType::StorageImage);
 						un.regCount = descriptorTypeToId(DescriptorType::StorageImage);
 
 
 						uniforms.push_back(un);
 						uniforms.push_back(un);
@@ -817,7 +817,7 @@ namespace bgfx { namespace spirv
 						un.name = name;
 						un.name = name;
 						un.type = type;
 						un.type = type;
 						un.num = 0;
 						un.num = 0;
-						un.regIndex = binding_index;
+						un.regIndex = uint16_t(binding_index);
 						un.regCount = descriptorTypeToId(DescriptorType::StorageBuffer);
 						un.regCount = descriptorTypeToId(DescriptorType::StorageBuffer);
 
 
 						uniforms.push_back(un);
 						uniforms.push_back(un);