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 <cwabbott0@gmail.com>
This commit is contained in:
Jason Ekstrand
2014-11-25 21:36:25 -08:00
parent 4f8230e247
commit 829aa98320
9 changed files with 74 additions and 82 deletions

View File

@@ -275,7 +275,7 @@ validate_deref_chain(nir_deref *deref, validate_state *state)
case nir_deref_type_struct:
assert(deref->type ==
glsl_get_struct_field(parent->type,
nir_deref_as_struct(deref)->elem));
nir_deref_as_struct(deref)->index));
break;
case nir_deref_type_var: