diff options
author | Mike Blumenkrantz <michael.blumenkrantz@gmail.com> | 2021-10-22 14:04:45 -0400 |
---|---|---|
committer | Eric Engestrom <eric@engestrom.ch> | 2021-10-27 19:58:10 +0100 |
commit | 627659b6aff023b74dba80682542711631b594e7 (patch) | |
tree | c8397ee9c95d6665db55b5d79f5caa8fbe424e8f | |
parent | b4506d1cc240a893576c5c046ea7773365754956 (diff) |
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@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13489>
(cherry picked from commit b0c40bc9054404c1b0e42516b72d6d9d070a4c10)
-rw-r--r-- | .pick_status.json | 2 | ||||
-rw-r--r-- | 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 6417feff873..6015da2a3d0 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -121,7 +121,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 ddd9697fe52..5ea08a9dc1c 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; } |