aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/r300/r300_fragprog.h
diff options
context:
space:
mode:
authorRune Peterson <[email protected]>2007-02-12 00:24:36 +0100
committerJerome Glisse <[email protected]>2007-02-12 00:24:36 +0100
commitee5417bca883d82d618e1c0b65011940253555dd (patch)
tree44964a8506f4dabbf5c077a0ff53c11d2f53d410 /src/mesa/drivers/dri/r300/r300_fragprog.h
parent3bacb68c70e4a0813bf944061a97e727cbd89c43 (diff)
r300: Add proper support for sin/cos instruction in fragment program
Getting proper SIN and COS wasn't as easy as it appeared. I had to make make some changes to the fragment program code. general FP changes: - support HHH swizzle for vector instructions. - don't copy a source to a temp when it is not XYZW swizzled, but combine the two and have the swizzle resolve any issues. (saves temps/instructions with more elaborate shader code) - fix overflow in cnstv[].
Diffstat (limited to 'src/mesa/drivers/dri/r300/r300_fragprog.h')
-rw-r--r--src/mesa/drivers/dri/r300/r300_fragprog.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_fragprog.h b/src/mesa/drivers/dri/r300/r300_fragprog.h
index b0cebe60bb0..73986abc3cc 100644
--- a/src/mesa/drivers/dri/r300/r300_fragprog.h
+++ b/src/mesa/drivers/dri/r300/r300_fragprog.h
@@ -112,8 +112,11 @@ typedef struct r300_fragment_program_swizzle {
((0 | SRC_CONST) << R300_FPI3_SRC1A_SHIFT) | \
((0 | SRC_CONST) << R300_FPI3_SRC2A_SHIFT))
+#define DRI_CONF_FP_OPTIMIZATION_SPEED 0
+#define DRI_CONF_FP_OPTIMIZATION_QUALITY 1
+
struct r300_fragment_program;
-extern void r300_translate_fragment_shader(struct r300_fragment_program *rp);
+extern void r300_translate_fragment_shader(r300ContextPtr r300, struct r300_fragment_program *rp);
#endif