Mesa (main): nir: Set src_components = -1 for image intrinsic deref sources
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Jul 20 23:35:10 UTC 2021
Module: Mesa
Branch: main
Commit: 0b57272af8dc4d44fc7f026e203a6d836a5cfdd6
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=0b57272af8dc4d44fc7f026e203a6d836a5cfdd6
Author: Jason Ekstrand <jason at jlekstrand.net>
Date: Mon Jul 12 10:03:59 2021 -0500
nir: Set src_components = -1 for image intrinsic deref sources
Semantically, -1 means "Unknown; don't validate" but it's really only
used for derefs because they often need to be flexible. We don't really
need that flexibility for image intrinsics but this makes it more
consistent. More immediately useful is that this gives us the ability
to tell _deref forms of these intrinsics apart from the lowered ones.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11849>
---
src/compiler/nir/nir_intrinsics.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/compiler/nir/nir_intrinsics.py b/src/compiler/nir/nir_intrinsics.py
index 6adbc0bf79b..20a0197e9bc 100644
--- a/src/compiler/nir/nir_intrinsics.py
+++ b/src/compiler/nir/nir_intrinsics.py
@@ -561,7 +561,7 @@ atomic3("atomic_counter_comp_swap")
# either one or two additional scalar arguments with the same meaning as in
# the ARB_shader_image_load_store specification.
def image(name, src_comp=[], extra_indices=[], **kwargs):
- intrinsic("image_deref_" + name, src_comp=[1] + src_comp,
+ intrinsic("image_deref_" + name, src_comp=[-1] + src_comp,
indices=[IMAGE_DIM, IMAGE_ARRAY, ACCESS] + extra_indices, **kwargs)
intrinsic("image_" + name, src_comp=[1] + src_comp,
indices=[IMAGE_DIM, IMAGE_ARRAY, FORMAT, ACCESS] + extra_indices, **kwargs)
More information about the mesa-commit
mailing list