aboutsummaryrefslogtreecommitdiffstats
path: root/src/intel/compiler/brw_vec4_vs_visitor.cpp
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2017-05-03 17:40:54 -0700
committerJason Ekstrand <[email protected]>2017-05-09 15:08:06 -0700
commit0d5f89cdc376445c46f4aa1ae126286cbaebde2b (patch)
tree0b43282df7fd51ae678d938772b1a39c9c43e0a5 /src/intel/compiler/brw_vec4_vs_visitor.cpp
parent80aa6e9d325b4784b7391cf24f1b0c291514f37b (diff)
i965/vec4: Use NIR remapping for VS attributes
The NIR pass already handles remapping system values to attributes for us so we delete the system value code as part of the conversion. We also change nir_lower_vs_inputs to take an explicit inputs_read bitmask and pass in the inputs_read from prog_data instead from pulling it out of NIR. This is because the version in prog_data may get EDGEFLAG added to it on some old platforms. Reviewed-by: Alejandro PiƱeiro <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/intel/compiler/brw_vec4_vs_visitor.cpp')
-rw-r--r--src/intel/compiler/brw_vec4_vs_visitor.cpp31
1 files changed, 2 insertions, 29 deletions
diff --git a/src/intel/compiler/brw_vec4_vs_visitor.cpp b/src/intel/compiler/brw_vec4_vs_visitor.cpp
index 2a19788c954..7edf6ba1cc3 100644
--- a/src/intel/compiler/brw_vec4_vs_visitor.cpp
+++ b/src/intel/compiler/brw_vec4_vs_visitor.cpp
@@ -36,35 +36,8 @@ vec4_vs_visitor::emit_prolog()
dst_reg *
vec4_vs_visitor::make_reg_for_system_value(int location)
{
- /* VertexID is stored by the VF as the last vertex element, but
- * we don't represent it with a flag in inputs_read, so we call
- * it VERT_ATTRIB_MAX, which setup_attributes() picks up on.
- */
- dst_reg *reg = new(mem_ctx) dst_reg(ATTR, VERT_ATTRIB_MAX);
-
- switch (location) {
- case SYSTEM_VALUE_BASE_VERTEX:
- reg->writemask = WRITEMASK_X;
- break;
- case SYSTEM_VALUE_BASE_INSTANCE:
- reg->writemask = WRITEMASK_Y;
- break;
- case SYSTEM_VALUE_VERTEX_ID:
- case SYSTEM_VALUE_VERTEX_ID_ZERO_BASE:
- reg->writemask = WRITEMASK_Z;
- break;
- case SYSTEM_VALUE_INSTANCE_ID:
- reg->writemask = WRITEMASK_W;
- break;
- case SYSTEM_VALUE_DRAW_ID:
- reg = new(mem_ctx) dst_reg(ATTR, VERT_ATTRIB_MAX + 1);
- reg->writemask = WRITEMASK_X;
- break;
- default:
- unreachable("not reached");
- }
-
- return reg;
+ unreachable("not reached");
+ return NULL;
}