Mesa (master): aco: fix 1D textureGrad() on GFX9

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Apr 15 11:05:34 UTC 2020


Module: Mesa
Branch: master
Commit: c818b5c089914f5d3e0d233ab531571c4d5ec13c
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=c818b5c089914f5d3e0d233ab531571c4d5ec13c

Author: Rhys Perry <pendingchaos02 at gmail.com>
Date:   Tue Apr 14 15:15:02 2020 +0100

aco: fix 1D textureGrad() on GFX9

Signed-off-by: Rhys Perry <pendingchaos02 at gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Fixes: 6f718edcedd ('aco: simplify gathering of MIMG address components')
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4550>

---

 src/amd/compiler/aco_instruction_selection.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/amd/compiler/aco_instruction_selection.cpp b/src/amd/compiler/aco_instruction_selection.cpp
index 61a2d994d84..2acb4e822a3 100644
--- a/src/amd/compiler/aco_instruction_selection.cpp
+++ b/src/amd/compiler/aco_instruction_selection.cpp
@@ -8458,7 +8458,7 @@ void visit_tex(isel_context *ctx, nir_tex_instr *instr)
       if (instr->sampler_dim == GLSL_SAMPLER_DIM_1D && ctx->options->chip_class == GFX9) {
          assert(has_ddx && has_ddy && ddx.size() == 1 && ddy.size() == 1);
          Temp zero = bld.copy(bld.def(v1), Operand(0u));
-         derivs = {ddy, zero, ddy, zero};
+         derivs = {ddx, zero, ddy, zero};
       } else {
          for (unsigned i = 0; has_ddx && i < ddx.size(); i++)
             derivs.emplace_back(emit_extract_vector(ctx, ddx, i, v1));



More information about the mesa-commit mailing list