diff options
author | Jason Ekstrand <[email protected]> | 2016-02-06 09:05:10 -0800 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2016-02-09 15:00:17 -0800 |
commit | ee85014b90af1d94d637ec763a803479e9bac5dc (patch) | |
tree | 91a7aea9be51e8c18b18f40f237175e9471e0d41 /src/compiler/nir/nir.h | |
parent | 3f421849945d763b3e477ceb1c726c2dbed3bafd (diff) |
nir/tex_instr: Rename sampler to texture
We're about to separate the two concepts. When we do, the sampler will
become optional. Doing a rename first makes the separation a bit more
safe because drivers that depend on GLSL or TGSI behaviour will be fine to
just use the texture index all the time.
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/compiler/nir/nir.h')
-rw-r--r-- | src/compiler/nir/nir.h | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h index 16203af9cfb..48dda99a949 100644 --- a/src/compiler/nir/nir.h +++ b/src/compiler/nir/nir.h @@ -965,7 +965,7 @@ typedef enum { nir_tex_src_ms_index, /* MSAA sample index */ nir_tex_src_ddx, nir_tex_src_ddy, - nir_tex_src_sampler_offset, /* < dynamically uniform indirect offset */ + nir_tex_src_texture_offset, /* < dynamically uniform indirect offset */ nir_num_tex_src_types } nir_tex_src_type; @@ -1015,17 +1015,17 @@ typedef struct { /* gather component selector */ unsigned component : 2; - /** The sampler index + /** The texture index * - * If this texture instruction has a nir_tex_src_sampler_offset source, - * then the sampler index is given by sampler_index + sampler_offset. + * If this texture instruction has a nir_tex_src_texture_offset source, + * then the texture index is given by texture_index + texture_offset. */ - unsigned sampler_index; + unsigned texture_index; - /** The size of the sampler array or 0 if it's not an array */ - unsigned sampler_array_size; + /** The size of the texture array or 0 if it's not an array */ + unsigned texture_array_size; - nir_deref_var *sampler; /* if this is NULL, use sampler_index instead */ + nir_deref_var *texture; /* if this is NULL, use texture_index instead */ } nir_tex_instr; static inline unsigned @@ -2091,15 +2091,15 @@ typedef struct nir_lower_tex_options { unsigned saturate_t; unsigned saturate_r; - /* Bitmask of samplers that need swizzling. + /* Bitmask of textures that need swizzling. * - * If (swizzle_result & (1 << sampler_index)), then the swizzle in - * swizzles[sampler_index] is applied to the result of the texturing + * If (swizzle_result & (1 << texture_index)), then the swizzle in + * swizzles[texture_index] is applied to the result of the texturing * operation. */ unsigned swizzle_result; - /* A swizzle for each sampler. Values 0-3 represent x, y, z, or w swizzles + /* A swizzle for each texture. Values 0-3 represent x, y, z, or w swizzles * while 4 and 5 represent 0 and 1 respectively. */ uint8_t swizzles[32][4]; |