From ee5417bca883d82d618e1c0b65011940253555dd Mon Sep 17 00:00:00 2001 From: Rune Peterson Date: Mon, 12 Feb 2007 00:24:36 +0100 Subject: 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[]. --- src/mesa/drivers/dri/r300/r300_context.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/mesa/drivers/dri/r300/r300_context.h') diff --git a/src/mesa/drivers/dri/r300/r300_context.h b/src/mesa/drivers/dri/r300/r300_context.h index 02f8e9107d..b140235159 100644 --- a/src/mesa/drivers/dri/r300/r300_context.h +++ b/src/mesa/drivers/dri/r300/r300_context.h @@ -729,6 +729,11 @@ struct r300_fragment_program { GLboolean params_uptodate; int max_temp_idx; + + /* the index of the sin constant is stored here */ + GLint const_sin; + + GLuint optimization; }; #define R300_MAX_AOS_ARRAYS 16 -- cgit v1.2.3