diff options
author | Zack Rusin <[email protected]> | 2013-05-24 16:39:59 -0400 |
---|---|---|
committer | Zack Rusin <[email protected]> | 2013-05-25 09:49:20 -0400 |
commit | 4b5595b38b3884531624fab6def7c604e92d0914 (patch) | |
tree | 6f41585cff8e0cdd4243dae71cc296a50991ca04 /src/gallium/drivers/softpipe | |
parent | 97b8ae429ec64003e258764db12ea69d4e978f6d (diff) |
draw: fixup draw_find_shader_output
draw_find_shader_output like most of the code in draw used to
depend on position always being at output slot 0. which meant
that any other attribute being at 0 could signify an error.
unfortunately position can be at any of the output slots, thus
other attributes can occupy slot 0 and we need to mark the ones
which were not found by something else. This commit changes
draw_find_shader_output so that it returns -1 if it can't
find the given attribute and adjust the code that depended
on it returning >0 whenever it correctly found an attrib.
Signed-off-by: Zack Rusin <[email protected]>
Reviewed-by: José Fonseca<[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Reviewed-by: Roland Scheidegger <[email protected]>
Diffstat (limited to 'src/gallium/drivers/softpipe')
-rw-r--r-- | src/gallium/drivers/softpipe/sp_state_derived.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/softpipe/sp_state_derived.c b/src/gallium/drivers/softpipe/sp_state_derived.c index 85fd47d5879..93cd38ee7a4 100644 --- a/src/gallium/drivers/softpipe/sp_state_derived.c +++ b/src/gallium/drivers/softpipe/sp_state_derived.c @@ -137,7 +137,7 @@ softpipe_get_vertex_info(struct softpipe_context *softpipe) softpipe->psize_slot = draw_find_shader_output(softpipe->draw, TGSI_SEMANTIC_PSIZE, 0); - if (softpipe->psize_slot > 0) { + if (softpipe->psize_slot >= 0) { draw_emit_vertex_attr(vinfo, EMIT_4F, INTERP_CONSTANT, softpipe->psize_slot); } |