Use the correct cbuffer binding for HLSL SM 4.0-5.0

This commit is contained in:
James Ross-Gowan 2017-09-07 23:50:43 +10:00
parent 9b04443808
commit fdbf794a67

View File

@ -1690,7 +1690,7 @@ string CompilerHLSL::to_resource_binding(const SPIRVariable &var)
space = "u"; // UAV space = "u"; // UAV
else if (has_decoration(type.self, DecorationBlock)) else if (has_decoration(type.self, DecorationBlock))
{ {
if (options.shader_model >= 51) if (options.shader_model >= 40)
space = "b"; // Constant buffers space = "b"; // Constant buffers
else else
space = "c"; // Constant buffers space = "c"; // Constant buffers
@ -1698,7 +1698,7 @@ string CompilerHLSL::to_resource_binding(const SPIRVariable &var)
} }
else if (storage == StorageClassPushConstant) else if (storage == StorageClassPushConstant)
{ {
if (options.shader_model >= 51) if (options.shader_model >= 40)
space = "b"; // Constant buffers space = "b"; // Constant buffers
else else
space = "c"; // Constant buffers space = "c"; // Constant buffers