summaryrefslogtreecommitdiff
path: root/src/mesa
diff options
context:
space:
mode:
authorNicolai Hähnle <nhaehnle@gmail.com>2009-07-25 00:50:53 +0200
committerNicolai Hähnle <nhaehnle@gmail.com>2009-07-27 22:51:37 +0200
commitd6a304800b2385740f3b90efab45564e1e6203b2 (patch)
treeeb4ebcfa84932f2b3b70cbdbea9a8eb5063c2a9f /src/mesa
parent05a51f4b3dfa32c73b85b26254bf9ee270eb6be2 (diff)
r300: Remove ugly PSIZ hack
Instead of setting Sourced, we simply force writemasks to begin with. Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/r300/compiler/r3xx_vertprog.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/mesa/drivers/dri/r300/compiler/r3xx_vertprog.c b/src/mesa/drivers/dri/r300/compiler/r3xx_vertprog.c
index c05b488645..14dd36354d 100644
--- a/src/mesa/drivers/dri/r300/compiler/r3xx_vertprog.c
+++ b/src/mesa/drivers/dri/r300/compiler/r3xx_vertprog.c
@@ -607,12 +607,8 @@ static void nqssadceInit(struct nqssadce_state* s)
int i;
for(i = 0; i < VERT_RESULT_MAX; ++i) {
- if (compiler->RequiredOutputs & (1 << i)) {
- if (i != VERT_RESULT_PSIZ)
- s->Outputs[i].Sourced = WRITEMASK_XYZW;
- else
- s->Outputs[i].Sourced = WRITEMASK_X; /* ugly hack! */
- }
+ if (compiler->RequiredOutputs & (1 << i))
+ s->Outputs[i].Sourced = WRITEMASK_XYZW;
}
}
@@ -631,6 +627,8 @@ void r3xx_compile_vertex_program(struct r300_vertex_program_compiler* compiler)
rc_mesa_to_rc_program(&compiler->Base, compiler->program);
compiler->program = 0;
+ rc_move_output(&compiler->Base, VERT_RESULT_PSIZ, VERT_RESULT_PSIZ, WRITEMASK_X);
+
if (compiler->state.WPosAttr != FRAG_ATTRIB_MAX) {
rc_copy_output(&compiler->Base,
VERT_RESULT_HPOS,