Mesa (staging/20.0): aco: fix 1D textureGrad() on GFX9

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Apr 15 18:08:49 UTC 2020


Module: Mesa
Branch: staging/20.0
Commit: 88f89f7a109f95abf9b48584cae4ca2773cdc2ee
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=88f89f7a109f95abf9b48584cae4ca2773cdc2ee

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>
(cherry picked from commit c818b5c089914f5d3e0d233ab531571c4d5ec13c)

---

 .pick_status.json                              | 2 +-
 src/amd/compiler/aco_instruction_selection.cpp | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index fe5938d2d2e..7816f86dca5 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -139,7 +139,7 @@
         "description": "aco: fix 1D textureGrad() on GFX9",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "master_sha": null,
         "because_sha": "6f718edcedd713beb547cda48aa8dc63a0af4c35"
     },
diff --git a/src/amd/compiler/aco_instruction_selection.cpp b/src/amd/compiler/aco_instruction_selection.cpp
index f6ebb72e950..e9514345266 100644
--- a/src/amd/compiler/aco_instruction_selection.cpp
+++ b/src/amd/compiler/aco_instruction_selection.cpp
@@ -7220,7 +7220,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 && ddy.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