Fix shader model 2/3 texture sampling

This commit is contained in:
Robert Konrad 2017-05-31 16:53:43 +02:00
parent 90966d50f5
commit 111a30a7d8

View File

@ -1398,7 +1398,13 @@ void CompilerHLSL::emit_texture_op(const Instruction &i)
expr += texop;
expr += "(";
if (op != OpImageFetch && (options.shader_model >= 40))
if (options.shader_model < 40)
{
if (combined_image)
SPIRV_CROSS_THROW("Separate images/samplers are not supported in HLSL shader model 2/3.");
expr += to_expression(img);
}
else if (op != OpImageFetch)
{
string sampler_expr;
if (combined_image)