summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2010-07-13 06:38:30 +0200
committerMarek Olšák <[email protected]>2010-07-13 15:06:22 +0200
commitb5fc699b1e1b446260ce9ddb5f2d9fa96361b100 (patch)
treeda2d202f599b794284af08b450dabc953162652e /src/mesa/drivers/dri
parentc4066b78c0aad41c199eb27157538c2ec9ab5bfd (diff)
r300/compiler: emulate SIN/COS/SCS in r3xx-r4xx vertex shaders
Despite the docs, the corresponding hardware instructions are r5xx-only.
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r--src/mesa/drivers/dri/r300/compiler/r3xx_vertprog.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/r300/compiler/r3xx_vertprog.c b/src/mesa/drivers/dri/r300/compiler/r3xx_vertprog.c
index bd8d63246a2..276f4cb6b67 100644
--- a/src/mesa/drivers/dri/r300/compiler/r3xx_vertprog.c
+++ b/src/mesa/drivers/dri/r300/compiler/r3xx_vertprog.c
@@ -619,12 +619,18 @@ void r3xx_compile_vertex_program(struct r300_vertex_program_compiler* compiler)
debug_program_log(compiler, "after emulate branches");
- {
+ if (compiler->Base.is_r500) {
struct radeon_program_transformation transformations[] = {
{ &r300_transform_vertex_alu, 0 },
{ &r300_transform_trig_scale_vertex, 0 }
};
radeonLocalTransform(&compiler->Base, 2, transformations);
+ } else {
+ struct radeon_program_transformation transformations[] = {
+ { &r300_transform_vertex_alu, 0 },
+ { &radeonTransformTrigSimple, 0 }
+ };
+ radeonLocalTransform(&compiler->Base, 2, transformations);
}
debug_program_log(compiler, "after native rewrite");