From d6b3a193d4d525c5048ebf793e6a63fd98f92d64 Mon Sep 17 00:00:00 2001 From: Zack Rusin Date: Wed, 31 Jul 2013 07:34:49 -0400 Subject: draw: inject frontface info into wireframe outputs Draw module can decompose primitives into wireframe models, which is a fancy word for 'lines', unfortunately that decomposition means that we weren't able to preserve the original front-face info which could be derived from the original primitives (lines don't have a 'face'). To fix it allow draw module to inject a fake face semantic into outputs from which the backends can figure out the original frontfacing info of the primitives. Signed-off-by: Zack Rusin Reviewed-by: Roland Scheidegger Reviewed-by: Jose Fonseca --- src/gallium/drivers/svga/svga_swtnl_state.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/gallium/drivers/svga') diff --git a/src/gallium/drivers/svga/svga_swtnl_state.c b/src/gallium/drivers/svga/svga_swtnl_state.c index d744f18ee72..d60af3fb834 100644 --- a/src/gallium/drivers/svga/svga_swtnl_state.c +++ b/src/gallium/drivers/svga/svga_swtnl_state.c @@ -162,6 +162,7 @@ svga_swtnl_update_vdecl( struct svga_context *svga ) memset(vinfo, 0, sizeof(*vinfo)); memset(vdecl, 0, sizeof(vdecl)); + draw_prepare_shader_outputs(draw); /* always add position */ src = draw_find_shader_output(draw, TGSI_SEMANTIC_POSITION, 0); draw_emit_vertex_attr(vinfo, EMIT_4F, INTERP_LINEAR, src); -- cgit v1.2.3