Hi,
this patch fixes fragment programs where input modifier (negate or abs) was
used for texture instruction - r300 hw doesn't support it, so add MOV inst
with necessary modifiers before the tex inst.
It fixes failing piglit/fp-kil test.
Maciej Cencora
From bb5720c542928a96d66bfc384cb310d090d8a939 Mon Sep 17 00:00:00 2001
From: Maciej Cencora <[email protected]>
Date: Tue, 21 Apr 2009 01:55:06 +0200
Subject: [PATCH] r300: r300 hw doesn't support any input modifiers in tex insts
---
src/mesa/drivers/dri/r300/r300_fragprog_swizzle.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/src/mesa/drivers/dri/r300/r300_fragprog_swizzle.c b/src/mesa/drivers/dri/r300/r300_fragprog_swizzle.c
index 6f0d733..fc9d855 100644
--- a/src/mesa/drivers/dri/r300/r300_fragprog_swizzle.c
+++ b/src/mesa/drivers/dri/r300/r300_fragprog_swizzle.c
@@ -100,8 +100,7 @@ GLboolean r300FPIsNativeSwizzle(GLuint opcode, struct prog_src_register reg)
opcode == OPCODE_TXP) {
int j;
- if (reg.Abs || (reg.Negate != NEGATE_XYZW &&
- reg.Negate != NEGATE_NONE))
+ if (reg.Abs || reg.Negate)
return GL_FALSE;
for(j = 0; j < 4; ++j) {
--
1.5.6.3
------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today.
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
Mesa3d-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev