ac/nir: adjust an assertion for D16 on GFX6-GFX7
[mesa.git] / src / amd / llvm / ac_llvm_build.c
index ef4e79c85f0e8e8dcbb9a210c484b5d6d6bceb6f..69b1deaa8b275597ded358c78b076e43c29bb343 100644 (file)
@@ -1315,7 +1315,8 @@ ac_build_buffer_load_common(struct ac_llvm_context *ctx,
        char name[256], type_name[8];
 
        /* D16 is only supported on gfx8+ */
-       assert((channel_type != ctx->f16 && channel_type != ctx->i16) ||
+       assert(!use_format ||
+              (channel_type != ctx->f16 && channel_type != ctx->i16) ||
               ctx->chip_class >= GFX8);
 
        LLVMTypeRef type = func > 1 ? LLVMVectorType(channel_type, func) : channel_type;