mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 07:28:11 +02:00
spirv/nir: Fix some texture opcode asserts
We can't get an lod with txf_ms and SPIR-V considers textureGrad to be an
explicit-LOD texturing instruction.
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Cc: "12.0" <mesa-dev@lists.freedesktop.org>
(cherry picked from commit 2ddefd03b7)
This commit is contained in:
parent
bb4195ca26
commit
c07386e2c8
1 changed files with 2 additions and 2 deletions
|
|
@ -1444,12 +1444,12 @@ vtn_handle_texture(struct vtn_builder *b, SpvOp opcode,
|
|||
|
||||
if (operands & SpvImageOperandsLodMask) {
|
||||
assert(texop == nir_texop_txl || texop == nir_texop_txf ||
|
||||
texop == nir_texop_txf_ms || texop == nir_texop_txs);
|
||||
texop == nir_texop_txs);
|
||||
(*p++) = vtn_tex_src(b, w[idx++], nir_tex_src_lod);
|
||||
}
|
||||
|
||||
if (operands & SpvImageOperandsGradMask) {
|
||||
assert(texop == nir_texop_tex);
|
||||
assert(texop == nir_texop_txl);
|
||||
texop = nir_texop_txd;
|
||||
(*p++) = vtn_tex_src(b, w[idx++], nir_tex_src_ddx);
|
||||
(*p++) = vtn_tex_src(b, w[idx++], nir_tex_src_ddy);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue