Support array textures in HLSL

This commit is contained in:
Robert Konrad 2017-04-24 10:02:03 +02:00
parent 7d8be83cb3
commit 434d9b8803

View File

@ -1438,7 +1438,8 @@ void CompilerHLSL::emit_uniform(const SPIRVariable &var)
case DimSubpassData:
SPIRV_CROSS_THROW("Buffer texture support is not yet implemented for HLSL"); // TODO
}
statement("Texture", dim, "<", type_to_glsl(imagetype), "4> ", to_name(var.self), ";");
string arrayed = type.image.arrayed ? "Array" : "";
statement("Texture", dim, arrayed, "<", type_to_glsl(imagetype), "4> ", to_name(var.self), ";");
if (type.image.depth)
statement("SamplerComparisonState _", to_name(var.self), "_sampler;");
else