From 22e6dc387039e79f6d1435ae8b7422a6514d5d10 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 18 Mar 2010 13:02:53 -0600 Subject: gallivm/llvmpipe: added lp_rast_shader_inputs::facing and pass through The triangle rasterizer sets this field to indicate front/back-facing. It gets passed into the generated fragment code as another parameter. Used now for stencil front/back selection but will also be used for fragment shaders in general (see TGSI_SEMANTIC_FACE). With this commit two-sided stenciling mostly works but there's still a bug or two... --- src/gallium/drivers/llvmpipe/lp_rast.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/gallium/drivers/llvmpipe/lp_rast.h') diff --git a/src/gallium/drivers/llvmpipe/lp_rast.h b/src/gallium/drivers/llvmpipe/lp_rast.h index 303f6e3f7e..ae838f3fbe 100644 --- a/src/gallium/drivers/llvmpipe/lp_rast.h +++ b/src/gallium/drivers/llvmpipe/lp_rast.h @@ -82,6 +82,8 @@ struct lp_rast_state { * These pointers point into the bin data buffer. */ struct lp_rast_shader_inputs { + float facing; /** Positive for front-facing, negative for back-facing */ + float (*a0)[4]; float (*dadx)[4]; float (*dady)[4]; -- cgit v1.2.3