aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2016-10-17 11:14:10 -0700
committerKenneth Graunke <[email protected]>2016-11-22 00:29:24 -0800
commitf182e5eafc31ebc7c140e9a369d5f747948733ae (patch)
tree9449b617c8e14d3ddb5b5cb697f8bcc3c8791848 /src/mesa/drivers/dri/i965/brw_vec4_nir.cpp
parentb63f7671a3eafa4ab293a13f45f58837bd840a46 (diff)
i965/vec4: Handle component qualifiers on non-generic varyings.
ARB_enhanced_layouts only requires component qualifier support for generic varyings, so this is all the vec4 backend knew how to handle. This patch extends the backend to handle it for all varyings, so we can use store_output intrinsics with a component set for things like clip/cull distances. We may want to use that for other VUE header fields in the future as well. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_vec4_nir.cpp')
-rw-r--r--src/mesa/drivers/dri/i965/brw_vec4_nir.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp b/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp
index fc4eb3ac1d7..0d54907cadf 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp
@@ -416,14 +416,9 @@ vec4_visitor::nir_emit_intrinsic(nir_intrinsic_instr *instr)
src = get_nir_src(instr->src[0], BRW_REGISTER_TYPE_F,
instr->num_components);
- if (varying >= VARYING_SLOT_VAR0) {
- unsigned c = nir_intrinsic_component(instr);
- unsigned v = varying - VARYING_SLOT_VAR0;
- output_generic_reg[v][c] = dst_reg(src);
- output_generic_num_components[v][c] = instr->num_components;
- } else {
- output_reg[varying] = dst_reg(src);
- }
+ unsigned c = nir_intrinsic_component(instr);
+ output_reg[varying][c] = dst_reg(src);
+ output_num_components[varying][c] = instr->num_components;
break;
}