summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2016-07-20 20:57:37 -0700
committerJason Ekstrand <[email protected]>2016-07-22 16:48:54 -0700
commit34a39e91bac2c2f12389cded943019b79c7a9a06 (patch)
tree7cdd62d86b5826698a3d2053064826fe1a9d3407
parent67b7d876e429f13de874df447c67f47d2890f71a (diff)
spirv/nir: Don't increment coord_components for array lod queries
For lod query instructions, we really don't care whether or not the sampler is an array type because that doesn't factor into the LOD. Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Cc: "12.0" <[email protected]>
-rw-r--r--src/compiler/spirv/spirv_to_nir.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/spirv/spirv_to_nir.c b/src/compiler/spirv/spirv_to_nir.c
index b1bb48be577..6654f5f7c6d 100644
--- a/src/compiler/spirv/spirv_to_nir.c
+++ b/src/compiler/spirv/spirv_to_nir.c
@@ -1511,7 +1511,7 @@ vtn_handle_texture(struct vtn_builder *b, SpvOp opcode,
assert("Invalid sampler type");
}
- if (instr->is_array)
+ if (instr->is_array && instr->op != nir_texop_lod)
instr->coord_components++;
} else {
instr->coord_components = 0;