aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlejandro PiƱeiro <apinheiro@igalia.com>2020-10-28 12:59:24 +0100
committerMarge Bot <eric+marge@anholt.net>2020-11-14 15:59:02 +0000
commit5169dfd1fdeb8dee2f621b45ca73093b88f0296d (patch)
tree2431c81dbb52bccc39d19d5c6b30cd1d7791372d
parentf7b122728d5e015bbd706505e60600a864b43ea7 (diff)
downloadexternal_mesa3d-5169dfd1fdeb8dee2f621b45ca73093b88f0296d.tar.gz
external_mesa3d-5169dfd1fdeb8dee2f621b45ca73093b88f0296d.tar.bz2
external_mesa3d-5169dfd1fdeb8dee2f621b45ca73093b88f0296d.zip
nir/lower_tex: clarify nir_lower_tex_options indexing
This doesn't matter too much on OpenGL as texture id and sampler id are the same, but become relevant if using the lowering for Vulkan. Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7545>
-rw-r--r--src/compiler/nir/nir.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h
index 7cf6a85eefe..397e4f0a41a 100644
--- a/src/compiler/nir/nir.h
+++ b/src/compiler/nir/nir.h
@@ -4739,10 +4739,16 @@ typedef struct nir_lower_tex_options {
/* A swizzle for each texture. Values 0-3 represent x, y, z, or w swizzles
* while 4 and 5 represent 0 and 1 respectively.
+ *
+ * Indexed by texture-id.
*/
uint8_t swizzles[32][4];
- /* Can be used to scale sampled values in range required by the format. */
+ /* Can be used to scale sampled values in range required by the
+ * format.
+ *
+ * Indexed by texture-id.
+ */
float scale_factors[32];
/**
@@ -4828,6 +4834,11 @@ typedef struct nir_lower_tex_options {
*/
bool lower_tg4_offsets;
+ /**
+ * To lower packed sampler return formats.
+ *
+ * Indexed by sampler-id.
+ */
enum nir_lower_tex_packing lower_tex_packing[32];
} nir_lower_tex_options;