i965: Don't do vector splitting for ir_var_system_value
authorAnuj Phogat <anuj.phogat@gmail.com>
Tue, 22 Oct 2013 19:00:11 +0000 (12:00 -0700)
committerAnuj Phogat <anuj.phogat@gmail.com>
Fri, 1 Nov 2013 23:01:48 +0000 (16:01 -0700)
This is required while adding builtin system value vec{2, 3, 4}
variables. For example:
(declare (sys) vec2 gl_SamplePosition)

Without this patch above glsl ir splits in to:
(declare (temporary) float gl_SamplePosition_x)
(declare (temporary) float gl_SamplePosition_y)

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/mesa/drivers/dri/i965/brw_fs_vector_splitting.cpp

index eb7851ba56754a0eb63f0beb1c6d9ea3b349f2d4..6284b59023456794b4c6490e67df154b806d2dcd 100644 (file)
@@ -111,6 +111,7 @@ ir_vector_reference_visitor::get_variable_entry(ir_variable *var)
    case ir_var_uniform:
    case ir_var_shader_in:
    case ir_var_shader_out:
+   case ir_var_system_value:
    case ir_var_function_in:
    case ir_var_function_out:
    case ir_var_function_inout: