diff options
author | Jason Ekstrand <[email protected]> | 2014-11-25 21:36:25 -0800 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2015-01-15 07:19:02 -0800 |
commit | 829aa98320fcd529407d16991b476b71af017479 (patch) | |
tree | 5ff603507c7cded684a6ee460126b64c1e02f112 /src/glsl/nir/nir.h | |
parent | 4f8230e247a222314ab124e348482628adb5af32 (diff) |
nir: Use an integer index for specifying structure fields
Previously, we used a string name. It was nice for translating out of GLSL
IR (which also does that) but cumbersome the rest of the time.
Reviewed-by: Connor Abbott <[email protected]>
Diffstat (limited to 'src/glsl/nir/nir.h')
-rw-r--r-- | src/glsl/nir/nir.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/glsl/nir/nir.h b/src/glsl/nir/nir.h index a9a77f395f3..e977159584f 100644 --- a/src/glsl/nir/nir.h +++ b/src/glsl/nir/nir.h @@ -650,7 +650,7 @@ typedef struct { typedef struct { nir_deref deref; - const char *elem; + unsigned index; } nir_deref_struct; #define nir_deref_as_var(_deref) exec_node_data(nir_deref_var, _deref, deref) @@ -1292,7 +1292,7 @@ nir_ssa_undef_instr *nir_ssa_undef_instr_create(void *mem_ctx); nir_deref_var *nir_deref_var_create(void *mem_ctx, nir_variable *var); nir_deref_array *nir_deref_array_create(void *mem_ctx); -nir_deref_struct *nir_deref_struct_create(void *mem_ctx, const char *field); +nir_deref_struct *nir_deref_struct_create(void *mem_ctx, unsigned field_index); nir_deref *nir_copy_deref(void *mem_ctx, nir_deref *deref); |