diff options
author | Jason Ekstrand <[email protected]> | 2015-01-09 20:01:13 -0800 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2015-01-15 07:20:24 -0800 |
commit | 4aa6162f6ecf96c7400c17c310eba0cfd0f5e083 (patch) | |
tree | bf3038964219161441349f7881224dc733a937fe /src/glsl/nir/nir_validate.c | |
parent | dcb1acdea00a8f2c29777ff4078832df9d5b40ce (diff) |
nir/tex_instr: Add a nir_tex_src struct and dynamically allocate the src array
This solves a number of problems. First is the ability to change the
number of sources that a texture instruction has. Second, it solves the
delema that may occur if a texture instruction has more than 4 sources.
Reviewed-by: Connor Abbott <[email protected]>
Diffstat (limited to 'src/glsl/nir/nir_validate.c')
-rw-r--r-- | src/glsl/nir/nir_validate.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/glsl/nir/nir_validate.c b/src/glsl/nir/nir_validate.c index d2ce021196e..0d267baa21f 100644 --- a/src/glsl/nir/nir_validate.c +++ b/src/glsl/nir/nir_validate.c @@ -381,13 +381,13 @@ validate_tex_instr(nir_tex_instr *instr, validate_state *state) { validate_dest(&instr->dest, state); - bool src_type_seen[nir_num_texinput_types]; - for (unsigned i = 0; i < nir_num_texinput_types; i++) + bool src_type_seen[nir_num_tex_src_types]; + for (unsigned i = 0; i < nir_num_tex_src_types; i++) src_type_seen[i] = false; for (unsigned i = 0; i < instr->num_srcs; i++) { - assert(!src_type_seen[instr->src_type[i]]); - src_type_seen[instr->src_type[i]] = true; + assert(!src_type_seen[instr->src[i].src_type]); + src_type_seen[instr->src[i].src_type] = true; validate_src(&instr->src[i], state); } |