softpipe: draw_find_shader_output returns -1 on invalid outputs
authorZack Rusin <zackr@vmware.com>
Thu, 30 May 2013 21:01:19 +0000 (17:01 -0400)
committerZack Rusin <zackr@vmware.com>
Thu, 30 May 2013 23:54:25 +0000 (19:54 -0400)
It was changed from 0 to allow shader outputs at 0 that are
different from position.

Signed-off-by: Zack Rusin <zackr@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/gallium/drivers/softpipe/sp_state_derived.c

index 93cd38ee7a48a336dd37d6c85cb24c7c1ee97c81..61153494c5b0b219de9fbc2163bf9a307a7ee218 100644 (file)
@@ -127,7 +127,7 @@ softpipe_get_vertex_info(struct softpipe_context *softpipe)
          src = draw_find_shader_output(softpipe->draw,
                                        fsInfo->input_semantic_name[i],
                                        fsInfo->input_semantic_index[i]);
-        if (fsInfo->input_semantic_name[i] == TGSI_SEMANTIC_COLOR && src == 0)
+        if (fsInfo->input_semantic_name[i] == TGSI_SEMANTIC_COLOR && src == -1)
           /* try and find a bcolor */
           src = draw_find_shader_output(softpipe->draw,
                                         TGSI_SEMANTIC_BCOLOR, fsInfo->input_semantic_index[i]);