<div dir="ltr">Reviewed-by: Bas Nieuwenhuizen <<a href="mailto:bas@basnieuwenhuizen.nl">bas@basnieuwenhuizen.nl</a>></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Feb 26, 2018 at 2:05 PM, Samuel Pitoiset <span dir="ltr"><<a href="mailto:samuel.pitoiset@gmail.com" target="_blank">samuel.pitoiset@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">It's basically just the opposite, and it only makes sense to<br>
round the layer for 2D texture arrays.<br>
<br>
v2: - add SUBPASS<br>
<br>
Signed-off-by: Samuel Pitoiset <<a href="mailto:samuel.pitoiset@gmail.com">samuel.pitoiset@gmail.com</a>><br>
---<br>
src/amd/common/ac_nir_to_llvm.<wbr>c | 8 +++++---<br>
1 file changed, 5 insertions(+), 3 deletions(-)<br>
<br>
diff --git a/src/amd/common/ac_nir_to_<wbr>llvm.c b/src/amd/common/ac_nir_to_<wbr>llvm.c<br>
index 2c5a6e6cf6..b6392ae380 100644<br>
--- a/src/amd/common/ac_nir_to_<wbr>llvm.c<br>
+++ b/src/amd/common/ac_nir_to_<wbr>llvm.c<br>
@@ -5082,9 +5082,11 @@ static void visit_tex(struct ac_nir_context *ctx, nir_tex_instr *instr)<br>
address[count++] = coords[1];<br>
}<br>
if (instr->coord_components > 2) {<br>
- /* This seems like a bit of a hack - but it passes Vulkan CTS with it */<br>
- if (instr->sampler_dim != GLSL_SAMPLER_DIM_3D &&<br>
- instr->sampler_dim != GLSL_SAMPLER_DIM_CUBE &&<br>
+ if ((instr->sampler_dim == GLSL_SAMPLER_DIM_2D ||<br>
+ instr->sampler_dim == GLSL_SAMPLER_DIM_MS ||<br>
+ instr->sampler_dim == GLSL_SAMPLER_DIM_SUBPASS ||<br>
+ instr->sampler_dim == GLSL_SAMPLER_DIM_SUBPASS_MS) &&<br>
+ instr->is_array &&<br>
instr->op != nir_texop_txf) {<br>
coords[2] = apply_round_slice(&ctx->ac, coords[2]);<br>
}<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.16.2<br>
<br>
______________________________<wbr>_________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/mesa-dev</a><br>
</font></span></blockquote></div><br></div>