diff options
author | Jason Ekstrand <[email protected]> | 2017-09-14 19:52:38 -0700 |
---|---|---|
committer | Jordan Justen <[email protected]> | 2017-10-20 12:49:17 -0700 |
commit | 59fb59ad54d368683d5cc3b149f021452bddc05f (patch) | |
tree | 734e742be190df8ae7a19a975c59ba7eeeded6eb /src/compiler/glsl/glsl_to_nir.cpp | |
parent | 341529dbee5c2b17fdcb7990484a383459bed305 (diff) |
nir: Get rid of nir_shader::stage
It's redundant with nir_shader::info::stage.
Acked-by: Timothy Arceri <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Reviewed-by: Jordan Justen <[email protected]>
Diffstat (limited to 'src/compiler/glsl/glsl_to_nir.cpp')
-rw-r--r-- | src/compiler/glsl/glsl_to_nir.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/compiler/glsl/glsl_to_nir.cpp b/src/compiler/glsl/glsl_to_nir.cpp index 5e9544f51b1..63694fd41f4 100644 --- a/src/compiler/glsl/glsl_to_nir.cpp +++ b/src/compiler/glsl/glsl_to_nir.cpp @@ -163,7 +163,7 @@ glsl_to_nir(const struct gl_shader_program *shader_prog, * two locations. For instance, if we have in the IR code a dvec3 attr0 in * location 0 and vec4 attr1 in location 1, in NIR attr0 will use * locations/slots 0 and 1, and attr1 will use location/slot 2 */ - if (shader->stage == MESA_SHADER_VERTEX) + if (shader->info.stage == MESA_SHADER_VERTEX) nir_remap_attributes(shader); shader->info.name = ralloc_asprintf(shader, "GLSL%d", shader_prog->Name); @@ -341,12 +341,12 @@ nir_visitor::visit(ir_variable *ir) break; case ir_var_shader_in: - if (shader->stage == MESA_SHADER_FRAGMENT && + if (shader->info.stage == MESA_SHADER_FRAGMENT && ir->data.location == VARYING_SLOT_FACE) { /* For whatever reason, GLSL IR makes gl_FrontFacing an input */ var->data.location = SYSTEM_VALUE_FRONT_FACE; var->data.mode = nir_var_system_value; - } else if (shader->stage == MESA_SHADER_GEOMETRY && + } else if (shader->info.stage == MESA_SHADER_GEOMETRY && ir->data.location == VARYING_SLOT_PRIMITIVE_ID) { /* For whatever reason, GLSL IR makes gl_PrimitiveIDIn an input */ var->data.location = SYSTEM_VALUE_PRIMITIVE_ID; @@ -354,7 +354,7 @@ nir_visitor::visit(ir_variable *ir) } else { var->data.mode = nir_var_shader_in; - if (shader->stage == MESA_SHADER_TESS_EVAL && + if (shader->info.stage == MESA_SHADER_TESS_EVAL && (ir->data.location == VARYING_SLOT_TESS_LEVEL_INNER || ir->data.location == VARYING_SLOT_TESS_LEVEL_OUTER)) { var->data.compact = ir->type->without_array()->is_scalar(); @@ -372,7 +372,7 @@ nir_visitor::visit(ir_variable *ir) case ir_var_shader_out: var->data.mode = nir_var_shader_out; - if (shader->stage == MESA_SHADER_TESS_CTRL && + if (shader->info.stage == MESA_SHADER_TESS_CTRL && (ir->data.location == VARYING_SLOT_TESS_LEVEL_INNER || ir->data.location == VARYING_SLOT_TESS_LEVEL_OUTER)) { var->data.compact = ir->type->without_array()->is_scalar(); |