mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 17:30:12 +01:00
spirv: Check that only one offset is defined as Image Operand
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
This commit is contained in:
parent
d27b853c08
commit
c7d8fe2f0d
1 changed files with 6 additions and 0 deletions
|
|
@ -2438,6 +2438,12 @@ vtn_handle_texture(struct vtn_builder *b, SpvOp opcode,
|
|||
(*p++) = vtn_tex_src(b, w[idx++], nir_tex_src_ddy);
|
||||
}
|
||||
|
||||
vtn_fail_if(util_bitcount(operands & (SpvImageOperandsConstOffsetsMask |
|
||||
SpvImageOperandsOffsetMask |
|
||||
SpvImageOperandsConstOffsetMask)) > 1,
|
||||
"At most one of the ConstOffset, Offset, and ConstOffsets "
|
||||
"image operands can be used on a given instruction.");
|
||||
|
||||
if (operands & SpvImageOperandsOffsetMask ||
|
||||
operands & SpvImageOperandsConstOffsetMask)
|
||||
(*p++) = vtn_tex_src(b, w[idx++], nir_tex_src_offset);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue