Mesa (staging/21.2): nir/lower_samplers_as_deref: rewrite more image intrinsics
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Oct 27 21:53:15 UTC 2021
Module: Mesa
Branch: staging/21.2
Commit: d2176e7ee69cab976da4b8cbd52eea735d8387f5
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d2176e7ee69cab976da4b8cbd52eea735d8387f5
Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date: Fri Oct 22 14:04:45 2021 -0400
nir/lower_samplers_as_deref: rewrite more image intrinsics
"I think we want to lower them."
-Jason "And I do know how the pass works" Ekstrand
fixes #5540
cc: mesa-stable
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13489>
(cherry picked from commit b0c40bc9054404c1b0e42516b72d6d9d070a4c10)
---
.pick_status.json | 2 +-
src/compiler/glsl/gl_nir_lower_samplers_as_deref.c | 6 +++++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/.pick_status.json b/.pick_status.json
index 51e73a0f871..85bea29eb1c 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -139,7 +139,7 @@
"description": "nir/lower_samplers_as_deref: rewrite more image intrinsics",
"nominated": true,
"nomination_type": 0,
- "resolution": 0,
+ "resolution": 1,
"main_sha": null,
"because_sha": null
},
diff --git a/src/compiler/glsl/gl_nir_lower_samplers_as_deref.c b/src/compiler/glsl/gl_nir_lower_samplers_as_deref.c
index 26a74cf761e..af8f4ec80a3 100644
--- a/src/compiler/glsl/gl_nir_lower_samplers_as_deref.c
+++ b/src/compiler/glsl/gl_nir_lower_samplers_as_deref.c
@@ -296,7 +296,8 @@ lower_intrinsic(nir_intrinsic_instr *instr,
instr->intrinsic == nir_intrinsic_image_deref_atomic_exchange ||
instr->intrinsic == nir_intrinsic_image_deref_atomic_comp_swap ||
instr->intrinsic == nir_intrinsic_image_deref_atomic_fadd ||
- instr->intrinsic == nir_intrinsic_image_deref_size) {
+ instr->intrinsic == nir_intrinsic_image_deref_size ||
+ instr->intrinsic == nir_intrinsic_image_deref_samples) {
b->cursor = nir_before_instr(&instr->instr);
nir_deref_instr *deref =
@@ -311,6 +312,9 @@ lower_intrinsic(nir_intrinsic_instr *instr,
nir_src_for_ssa(&deref->dest.ssa));
return true;
}
+ if (instr->intrinsic == nir_intrinsic_image_deref_order ||
+ instr->intrinsic == nir_intrinsic_image_deref_format)
+ unreachable("how did you even manage this?");
return false;
}
More information about the mesa-commit
mailing list