summaryrefslogtreecommitdiff
path: root/src/glsl/nir/nir.h
diff options
context:
space:
mode:
authorJason Ekstrand <jason.ekstrand@intel.com>2014-12-05 14:46:24 -0800
committerJason Ekstrand <jason.ekstrand@intel.com>2015-01-15 07:20:21 -0800
commit62ac0ee804027d1a1fa9864e03428ced7bd8510a (patch)
treef9b48046395fac7f300f21bc94fa743abd37c305 /src/glsl/nir/nir.h
parent534d145e5ea039d57833395a36eed90721f6b272 (diff)
nir/tex_instr: Rename the indirect source type and add an array size
In particular, we rename nir_tex_src_sampler_index to _sampler_offset and add a sampler_array_size field to nir_tex_instr. This way we can pass the size of sampler arrays through to backends even after removing the variable information and, with it, the type. Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Diffstat (limited to 'src/glsl/nir/nir.h')
-rw-r--r--src/glsl/nir/nir.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/glsl/nir/nir.h b/src/glsl/nir/nir.h
index ecd174a88a..fe1f9a8682 100644
--- a/src/glsl/nir/nir.h
+++ b/src/glsl/nir/nir.h
@@ -793,7 +793,7 @@ typedef enum {
nir_tex_src_ms_index, /* MSAA sample index */
nir_tex_src_ddx,
nir_tex_src_ddy,
- nir_tex_src_sampler_index, /* < dynamically uniform indirect index */
+ nir_tex_src_sampler_offset, /* < dynamically uniform indirect offset */
nir_num_texinput_types
} nir_texinput_type;
@@ -838,7 +838,16 @@ typedef struct {
/* gather component selector */
unsigned component : 2;
+ /** The sampler index
+ *
+ * If this texture instruction has a nir_tex_src_sampler_offset source,
+ * then the sampler index is given by sampler_index + sampler_offset.
+ */
unsigned sampler_index;
+
+ /** The size of the sampler array or 0 if it's not an array */
+ unsigned sampler_array_size;
+
nir_deref_var *sampler; /* if this is NULL, use sampler_index instead */
} nir_tex_instr;