mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-02 05:48:07 +02:00
nir/spirv: tg4 requires a sampler
Gather operations in both GLSL and SPIR-V require a sampler. Fixes
gathers returning garbage when using separate texture/samplers (on AMD,
was using an invalid sampler descriptor).
Signed-off-by: Alex Smith <asmith@feralinteractive.com>
Cc: "17.2 17.3" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
(cherry picked from commit 4122d00846)
This commit is contained in:
parent
ce1a2a25d3
commit
c9c818ad5e
2 changed files with 1 additions and 2 deletions
|
|
@ -1214,7 +1214,6 @@ typedef struct {
|
|||
* - nir_texop_txf_ms
|
||||
* - nir_texop_txs
|
||||
* - nir_texop_lod
|
||||
* - nir_texop_tg4
|
||||
* - nir_texop_query_levels
|
||||
* - nir_texop_texture_samples
|
||||
* - nir_texop_samples_identical
|
||||
|
|
|
|||
|
|
@ -1755,6 +1755,7 @@ vtn_handle_texture(struct vtn_builder *b, SpvOp opcode,
|
|||
case nir_texop_txb:
|
||||
case nir_texop_txl:
|
||||
case nir_texop_txd:
|
||||
case nir_texop_tg4:
|
||||
/* These operations require a sampler */
|
||||
instr->sampler = nir_deref_var_clone(sampler, instr);
|
||||
break;
|
||||
|
|
@ -1762,7 +1763,6 @@ vtn_handle_texture(struct vtn_builder *b, SpvOp opcode,
|
|||
case nir_texop_txf_ms:
|
||||
case nir_texop_txs:
|
||||
case nir_texop_lod:
|
||||
case nir_texop_tg4:
|
||||
case nir_texop_query_levels:
|
||||
case nir_texop_texture_samples:
|
||||
case nir_texop_samples_identical:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue