summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/i965/brw_pipe_shader.c
diff options
context:
space:
mode:
authorKeith Whitwell <keithw@vmware.com>2009-11-10 18:07:11 -0800
committerKeith Whitwell <keithw@vmware.com>2009-11-11 18:51:58 -0800
commit2f54d02d205468a840b35a3554f2ad8ffc31ec9c (patch)
treeac443da5e09a40acf67fa83905f6494e82685207 /src/gallium/drivers/i965/brw_pipe_shader.c
parent0c547d63c497f06c38f7a3c000e478bdcf2594b6 (diff)
i965g: consult fs inputs when laying out vs output regs
Vertex shader now emits just the FS inputs, in the positions and order expected by the fragment shader. This means potentially regenerating the vertex shader to match different fragment shader's input layouts.
Diffstat (limited to 'src/gallium/drivers/i965/brw_pipe_shader.c')
-rw-r--r--src/gallium/drivers/i965/brw_pipe_shader.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/drivers/i965/brw_pipe_shader.c b/src/gallium/drivers/i965/brw_pipe_shader.c
index 44f9ad6f9c..7febf9e0c2 100644
--- a/src/gallium/drivers/i965/brw_pipe_shader.c
+++ b/src/gallium/drivers/i965/brw_pipe_shader.c
@@ -96,6 +96,12 @@ static void *brw_create_fs_state( struct pipe_context *pipe,
tgsi_scan_shader(fs->tokens, &fs->info);
+ fs->signature.nr_inputs = fs->info.num_inputs;
+ for (i = 0; i < fs->info.num_inputs; i++) {
+ fs->signature.input[i].semantic = fs->info.input_semantic_name[i];
+ fs->signature.input[i].semantic_index = fs->info.input_semantic_index[i];
+ }
+
for (i = 0; i < fs->info.num_inputs; i++)
if (fs->info.input_semantic_name[i] == TGSI_SEMANTIC_POSITION)
fs->uses_depth = 1;