summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/svga/svga_tgsi_insn.c
diff options
context:
space:
mode:
authorKeith Whitwell <keithw@vmware.com>2010-05-14 13:04:42 +0100
committerKeith Whitwell <keithw@vmware.com>2010-05-14 13:04:42 +0100
commit0bd1cbcd0d28dbadfb0c3e1f8b048a18b56bc72c (patch)
treeb5e83bf73e7fa711579bc3a2e2d0578d3b1c9e11 /src/gallium/drivers/svga/svga_tgsi_insn.c
parentfc4d1b9ba965f26c504e6f5fea12e2bac2d71d72 (diff)
gallium: convert rasterizer state to use gl-style front/back concepts
Use front/back instead of cw/ccw throughout. Also, use offset_point/line/fill instead of offset_cw/ccw. Brings gallium representation of this state into line with its main user, and also what turns out to be the most common hardware representation. This fixes a long-standing bias in the interface towards the architecture of the software rasterizer.
Diffstat (limited to 'src/gallium/drivers/svga/svga_tgsi_insn.c')
-rw-r--r--src/gallium/drivers/svga/svga_tgsi_insn.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/gallium/drivers/svga/svga_tgsi_insn.c b/src/gallium/drivers/svga/svga_tgsi_insn.c
index 7d7024c4a7..67e1f22a70 100644
--- a/src/gallium/drivers/svga/svga_tgsi_insn.c
+++ b/src/gallium/drivers/svga/svga_tgsi_insn.c
@@ -2588,10 +2588,10 @@ static boolean emit_light_twoside( struct svga_shader_emitter *emit )
if_token = inst_token( SVGA3DOP_IFC );
- if (emit->key.fkey.front_cw)
- if_token.control = SVGA3DOPCOMP_GT;
- else
+ if (emit->key.fkey.front_ccw)
if_token.control = SVGA3DOPCOMP_LT;
+ else
+ if_token.control = SVGA3DOPCOMP_GT;
zero = scalar(zero, TGSI_SWIZZLE_X);
@@ -2639,12 +2639,12 @@ static boolean emit_frontface( struct svga_shader_emitter *emit )
temp = dst_register( SVGA3DREG_TEMP,
emit->nr_hw_temp++ );
- if (emit->key.fkey.front_cw) {
- pass = scalar( zero, TGSI_SWIZZLE_W );
- fail = scalar( zero, TGSI_SWIZZLE_X );
- } else {
+ if (emit->key.fkey.front_ccw) {
pass = scalar( zero, TGSI_SWIZZLE_X );
fail = scalar( zero, TGSI_SWIZZLE_W );
+ } else {
+ pass = scalar( zero, TGSI_SWIZZLE_W );
+ fail = scalar( zero, TGSI_SWIZZLE_X );
}
if (!emit_conditional(emit, PIPE_FUNC_GREATER,