Skip to content

Commit 8b38420

Browse files
committed
ShaderCompiler: Use shaderc_glsl_infer_from_source for default
As -1 is not shaderc_shader_kind, use the default one as shaderc_glsl_infer_from_source. Conversion issue.
1 parent c68e87a commit 8b38420

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

common/libs/VkCodecUtils/VulkanShaderCompiler.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ static shaderc_shader_kind getShadercShaderType(VkShaderStageFlagBits type)
4242
default:
4343
std::cerr << "VulkanShaderCompiler: " << "invalid VKShaderStageFlagBits" << "type = " << type;
4444
}
45-
return static_cast<shaderc_shader_kind>(-1);
45+
return shaderc_glsl_infer_from_source;
4646
}
4747

4848
VulkanShaderCompiler::VulkanShaderCompiler()
@@ -108,7 +108,7 @@ VkShaderModule VulkanShaderCompiler::BuildShaderFromFile(const char *fileName,
108108

109109
if (is.is_open()) {
110110

111-
size_t size = is.tellg();
111+
size_t size = (size_t)is.tellg();
112112
is.seekg(0, std::ios::beg);
113113
char* shaderCode = new char[size];
114114
is.read(shaderCode, size);

0 commit comments

Comments
 (0)