projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
574715d
)
softpipe: setup machine->Face without a conditional
author
Brian Paul
<brianp@vmware.com>
Mon, 30 Nov 2009 16:21:49 +0000
(09:21 -0700)
committer
Brian Paul
<brianp@vmware.com>
Tue, 1 Dec 2009 19:25:13 +0000
(12:25 -0700)
src/gallium/drivers/softpipe/sp_fs_exec.c
patch
|
blob
|
history
diff --git
a/src/gallium/drivers/softpipe/sp_fs_exec.c
b/src/gallium/drivers/softpipe/sp_fs_exec.c
index a8999ed34794db88cf8eef71a9f70d930066a9ff..27fa126b7c391e5e8e77e34b74af414b804c9206 100644
(file)
--- a/
src/gallium/drivers/softpipe/sp_fs_exec.c
+++ b/
src/gallium/drivers/softpipe/sp_fs_exec.c
@@
-127,11
+127,8
@@
exec_run( const struct sp_fragment_shader *base,
(float)quad->input.x0, (float)quad->input.y0,
&machine->QuadPos);
- if (quad->input.facing) {
- machine->Face = -1.0f;
- } else {
- machine->Face = 1.0f;
- }
+ /* convert 0 to 1.0 and 1 to -1.0 */
+ machine->Face = (float) (quad->input.facing * -2 + 1);
quad->inout.mask &= tgsi_exec_machine_run( machine );
if (quad->inout.mask == 0)