diff options
author | Eric Anholt <eric@anholt.net> | 2014-03-25 16:57:08 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2014-04-15 15:26:19 -0700 |
commit | de6b24253b2b5a85c8bc1f1acfe94adae5d46553 (patch) | |
tree | 392d7bf158677d7a0ee5f2169de6579e67a484e3 | |
parent | f8831ecf5731f045a4c04158ffeede3295cd7ef3 (diff) |
i965/fs: Allow brw_fs_vector_splitting on shader outputs.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs_vector_splitting.cpp | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs_vector_splitting.cpp b/src/mesa/drivers/dri/i965/brw_fs_vector_splitting.cpp index a9125cad8f9..bf940c4473f 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_vector_splitting.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_vector_splitting.cpp @@ -107,7 +107,6 @@ ir_vector_reference_visitor::get_variable_entry(ir_variable *var) switch (var->data.mode) { 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: @@ -372,8 +371,19 @@ brw_do_vector_splitting(exec_list *instructions) entry->var->name, "xyzw"[i]); - entry->components[i] = new(entry->mem_ctx) ir_variable(type, name, - ir_var_temporary); + ir_variable *new_var; + + if (entry->var->data.mode == ir_var_shader_out) { + new_var = entry->var->clone(entry->mem_ctx, NULL); + new_var->type = type; + new_var->name = ralloc_strdup(new_var, name); + new_var->data.location_frac = i; + } else { + new_var = new(entry->mem_ctx) ir_variable(type, name, + ir_var_temporary); + } + + entry->components[i] = new_var; entry->var->insert_before(entry->components[i]); } |