ac/llvm: ignore g16 if the image opcode doesn't use derivatives

g16 is irrelevant in this case.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19198>
This commit is contained in:
Rhys Perry
2022-10-19 18:34:12 +01:00
committed by Marge Bot
parent c492779924
commit 8c716525cf

View File

@@ -2139,7 +2139,7 @@ LLVMValueRef ac_build_image_opcode(struct ac_llvm_context *ctx, struct ac_image_
a->opcode != ac_image_atomic_cmpswap && a->opcode != ac_image_get_lod &&
a->opcode != ac_image_get_resinfo));
assert(!a->a16 || ctx->gfx_level >= GFX9);
assert(a->g16 == a->a16 || ctx->gfx_level >= GFX10);
assert(!a->derivs[0] || a->g16 == a->a16 || ctx->gfx_level >= GFX10);
assert(!a->offset ||
ac_get_elem_bits(ctx, LLVMTypeOf(a->offset)) == 32);