Mesa (master): r300/compiler: emulate SIN/COS/ SCS in r3xx-r4xx vertex shaders
Marek Olšák
mareko at kemper.freedesktop.org
Tue Jul 13 13:11:40 UTC 2010
Module: Mesa
Branch: master
Commit: b5fc699b1e1b446260ce9ddb5f2d9fa96361b100
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=b5fc699b1e1b446260ce9ddb5f2d9fa96361b100
Author: Marek Olšák <maraeo at gmail.com>
Date: Tue Jul 13 06:38:30 2010 +0200
r300/compiler: emulate SIN/COS/SCS in r3xx-r4xx vertex shaders
Despite the docs, the corresponding hardware instructions are r5xx-only.
---
src/mesa/drivers/dri/r300/compiler/r3xx_vertprog.c | 8 +++++++-
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 bd8d632..276f4cb 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");
More information about the mesa-commit
mailing list