Check for SM < 6.7

This commit is contained in:
Ravbug 2023-02-02 12:42:17 -05:00
parent 459fa67937
commit 36691f902c

View File

@ -3494,9 +3494,9 @@ void CompilerHLSL::emit_texture_op(const Instruction &i, bool sparse)
else
{
auto &imgformat = get<SPIRType>(imgtype.image.type);
if (imgformat.basetype != SPIRType::Float)
if (hlsl_options.shader_model < 67 && imgformat.basetype != SPIRType::Float)
{
SPIRV_CROSS_THROW("Sampling non-float textures is not supported in HLSL.");
SPIRV_CROSS_THROW("Sampling non-float textures is not supported in HLSL SM < 6.7.");
}
if (hlsl_options.shader_model >= 40)