Merge pull request #332 from KhronosGroup/pr-325-fixup
Fixups for PR #325
This commit is contained in:
commit
2a8b964847
@ -6,7 +6,7 @@ struct CBO_1
|
||||
float4 d;
|
||||
};
|
||||
|
||||
ConstantBuffer<CBO_1> cbo[2][4] : register(b4);
|
||||
ConstantBuffer<CBO_1> cbo[2][4] : register(b4, space0);
|
||||
cbuffer push
|
||||
{
|
||||
float4 PushMe_a : packoffset(c0);
|
||||
|
@ -2052,7 +2052,12 @@ string CompilerHLSL::to_resource_binding(const SPIRVariable &var)
|
||||
if (!space)
|
||||
return "";
|
||||
|
||||
return join(" : register(", space, get_decoration(var.self, DecorationBinding), ")");
|
||||
// shader model 5.1 supports space
|
||||
if (options.shader_model >= 51)
|
||||
return join(" : register(", space, get_decoration(var.self, DecorationBinding), ", space",
|
||||
get_decoration(var.self, DecorationDescriptorSet), ")");
|
||||
else
|
||||
return join(" : register(", space, get_decoration(var.self, DecorationBinding), ")");
|
||||
}
|
||||
|
||||
string CompilerHLSL::to_resource_binding_sampler(const SPIRVariable &var)
|
||||
@ -2060,7 +2065,12 @@ string CompilerHLSL::to_resource_binding_sampler(const SPIRVariable &var)
|
||||
// For combined image samplers.
|
||||
if (!has_decoration(var.self, DecorationBinding))
|
||||
return "";
|
||||
return join(" : register(s", get_decoration(var.self, DecorationBinding), ")");
|
||||
|
||||
if (options.shader_model >= 51)
|
||||
return join(" : register(s", get_decoration(var.self, DecorationBinding), ", space",
|
||||
get_decoration(var.self, DecorationDescriptorSet), ")");
|
||||
else
|
||||
return join(" : register(s", get_decoration(var.self, DecorationBinding), ")");
|
||||
}
|
||||
|
||||
void CompilerHLSL::emit_modern_uniform(const SPIRVariable &var)
|
||||
|
Loading…
Reference in New Issue
Block a user