rpms/xorg-x11-drv-ati/F-11 radeon-6.12.2-fix-rs690-clamp.patch, 1.2, 1.3 xorg-x11-drv-ati.spec, 1.182, 1.183

Dave Airlie airlied at fedoraproject.org
Tue Apr 28 03:27:38 UTC 2009


Author: airlied

Update of /cvs/pkgs/rpms/xorg-x11-drv-ati/F-11
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv22248

Modified Files:
	radeon-6.12.2-fix-rs690-clamp.patch xorg-x11-drv-ati.spec 
Log Message:
* Tue Apr 28 2009 Dave Airlie <airlied at redhat.com> 6.12.2-8
- restrict texture coords to 0.0->1.0 explicitly.


radeon-6.12.2-fix-rs690-clamp.patch:

Index: radeon-6.12.2-fix-rs690-clamp.patch
===================================================================
RCS file: /cvs/pkgs/rpms/xorg-x11-drv-ati/F-11/radeon-6.12.2-fix-rs690-clamp.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -p -r1.2 -r1.3
--- radeon-6.12.2-fix-rs690-clamp.patch	24 Apr 2009 05:59:20 -0000	1.2
+++ radeon-6.12.2-fix-rs690-clamp.patch	28 Apr 2009 03:27:38 -0000	1.3
@@ -1,64 +1,78 @@
+commit 8338385cd94b35f54b25cf2576890159f8dd9f71
+Author: Dave Airlie <airlied at redhat.com>
+Date:   Tue Apr 28 13:20:55 2009 +1000
+
+    radeon: rs690 texture fetch unit seems insane.
+    
+    If we don't clamp the texture coordinates explicity here,
+    the rs690 texture unit seems to do fetches from arbitary memory
+    locations no matter what clamp is set.
+
 diff --git a/src/radeon_exa_render.c b/src/radeon_exa_render.c
-index ca46505..7f3c93a 100644
+index ca46505..51f5b5d 100644
 --- a/src/radeon_exa_render.c
 +++ b/src/radeon_exa_render.c
-@@ -1278,23 +1278,28 @@ static Bool FUNC_NAME(R300TextureSetup)(PicturePtr pPict, PixmapPtr pPix,
- 	    else
- 		txfilter |= R300_TX_CLAMP_T(R300_TX_CLAMP_CLAMP_GL);
+@@ -2200,9 +2200,17 @@ static Bool FUNC_NAME(R300PrepareComposite)(int op, PicturePtr pSrcPicture,
+ do {								\
+     OUT_RING_F(_dstX);						\
+     OUT_RING_F(_dstY);						\
++    if (_srcX > 1.0) OUT_RING_F(1.0); else                  \
++    if (_srcX < 0.0) OUT_RING_F(0.0); else                  \
+     OUT_RING_F(_srcX);						\
++    if (_srcY > 1.0) OUT_RING_F(1.0); else                  \
++    if (_srcY < 0.0) OUT_RING_F(0.0); else                  \
+     OUT_RING_F(_srcY);						\
++    if (_maskX > 1.0) OUT_RING_F(1.0); else                  \
++    if (_maskX < 0.0) OUT_RING_F(0.0); else                  \
+     OUT_RING_F(_maskX);						\
++    if (_maskY > 1.0) OUT_RING_F(1.0); else                  \
++    if (_maskY < 0.0) OUT_RING_F(0.0); else                  \
+     OUT_RING_F(_maskY);						\
+ } while (0)
  
-+	    txfilter |= R300_TX_CLAMP_R(R300_TX_CLAMP_CLAMP_GL);
- 	    break;
- 	case RepeatPad:
- 	    txfilter |= R300_TX_CLAMP_S(R300_TX_CLAMP_CLAMP_LAST) |
--		        R300_TX_CLAMP_T(R300_TX_CLAMP_CLAMP_LAST);
-+		        R300_TX_CLAMP_T(R300_TX_CLAMP_CLAMP_LAST) |
-+		        R300_TX_CLAMP_R(R300_TX_CLAMP_CLAMP_LAST);
- 	    break;
- 	case RepeatReflect:
- 	    txfilter |= R300_TX_CLAMP_S(R300_TX_CLAMP_MIRROR) |
-+		        R300_TX_CLAMP_T(R300_TX_CLAMP_MIRROR) |
- 		        R300_TX_CLAMP_T(R300_TX_CLAMP_MIRROR);
- 	    break;
- 	case RepeatNone:
- 	    txfilter |= R300_TX_CLAMP_S(R300_TX_CLAMP_CLAMP_GL) |
--		        R300_TX_CLAMP_T(R300_TX_CLAMP_CLAMP_GL);
-+		        R300_TX_CLAMP_T(R300_TX_CLAMP_CLAMP_GL) |
-+		        R300_TX_CLAMP_R(R300_TX_CLAMP_CLAMP_GL);
- 	    break;
- 	}
-     } else
- 	txfilter |= R300_TX_CLAMP_S(R300_TX_CLAMP_CLAMP_GL) |
--	            R300_TX_CLAMP_T(R300_TX_CLAMP_CLAMP_GL);
-+	            R300_TX_CLAMP_T(R300_TX_CLAMP_CLAMP_GL) |
-+	            R300_TX_CLAMP_R(R300_TX_CLAMP_CLAMP_GL);
+@@ -2210,7 +2218,11 @@ do {								\
+ do {								\
+     OUT_RING_F(_dstX);						\
+     OUT_RING_F(_dstY);						\
++    if (_srcX > 1.0) OUT_RING_F(1.0); else                  \
++    if (_srcX < 0.0) OUT_RING_F(0.0); else                  \
+     OUT_RING_F(_srcX);						\
++    if (_srcY > 1.0) OUT_RING_F(1.0); else                  \
++    if (_srcY < 0.0) OUT_RING_F(0.0); else                  \
+     OUT_RING_F(_srcY);						\
+ } while (0)
  
-     switch (pPict->filter) {
-     case PictFilterNearest:
 diff --git a/src/radeon_textured_videofuncs.c b/src/radeon_textured_videofuncs.c
-index 852f4ac..0fbb364 100644
+index 852f4ac..e1d0b5a 100644
 --- a/src/radeon_textured_videofuncs.c
 +++ b/src/radeon_textured_videofuncs.c
-@@ -263,6 +263,7 @@ FUNC_NAME(RADEONDisplayTexturedVideo)(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv
+@@ -51,9 +51,17 @@
+ do {									\
+     OUT_RING_F(_dstX);						\
+     OUT_RING_F(_dstY);						\
++    if (_srcX > 1.0) OUT_RING_F(1.0); else                  \
++    if (_srcX < 0.0) OUT_RING_F(0.0); else                  \
+     OUT_RING_F(_srcX);						\
++    if (_srcY > 1.0) OUT_RING_F(1.0); else                  \
++    if (_srcY < 0.0) OUT_RING_F(0.0); else                  \
+     OUT_RING_F(_srcY);						\
++    if (_maskX > 1.0) OUT_RING_F(1.0); else                  \
++    if (_maskX < 0.0) OUT_RING_F(0.0); else                  \
+     OUT_RING_F(_maskX);						\
++    if (_maskY > 1.0) OUT_RING_F(1.0); else                  \
++    if (_maskY < 0.0) OUT_RING_F(0.0); else                  \
+     OUT_RING_F(_maskY);						\
+ } while (0)
  
- 	txfilter = (R300_TX_CLAMP_S(R300_TX_CLAMP_CLAMP_LAST) |
- 		    R300_TX_CLAMP_T(R300_TX_CLAMP_CLAMP_LAST) |
-+		    R300_TX_CLAMP_R(R300_TX_CLAMP_CLAMP_BORDER) |
- 		    R300_TX_MAG_FILTER_LINEAR |
- 		    R300_TX_MIN_FILTER_LINEAR |
- 		    (0 << R300_TX_ID_SHIFT));
-@@ -299,6 +300,7 @@ FUNC_NAME(RADEONDisplayTexturedVideo)(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv
- 	    txpitch -= 1;
- 	    txfilter = (R300_TX_CLAMP_S(R300_TX_CLAMP_CLAMP_LAST) |
- 		        R300_TX_CLAMP_T(R300_TX_CLAMP_CLAMP_LAST) |
-+		        R300_TX_CLAMP_R(R300_TX_CLAMP_CLAMP_BORDER) |
- 			R300_TX_MIN_FILTER_LINEAR |
- 			R300_TX_MAG_FILTER_LINEAR);
+@@ -61,7 +69,11 @@ do {									\
+ do {								\
+     OUT_RING_F(_dstX);						\
+     OUT_RING_F(_dstY);						\
++    if (_srcX > 1.0) OUT_RING_F(1.0); else                  \
++    if (_srcX < 0.0) OUT_RING_F(0.0); else                  \
+     OUT_RING_F(_srcX);						\
++    if (_srcY > 1.0) OUT_RING_F(1.0); else                  \
++    if (_srcY < 0.0) OUT_RING_F(0.0); else                  \
+     OUT_RING_F(_srcY);						\
+ } while (0)
  
-@@ -334,6 +336,7 @@ FUNC_NAME(RADEONDisplayTexturedVideo)(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv
- 		/* Tex filter */
- 		txfilter = (R300_TX_CLAMP_S(R300_TX_CLAMP_WRAP) |
- 			    R300_TX_CLAMP_T(R300_TX_CLAMP_WRAP) |
-+			    R300_TX_CLAMP_R(R300_TX_CLAMP_CLAMP_BORDER) |
- 			    R300_TX_MIN_FILTER_NEAREST |
- 			    R300_TX_MAG_FILTER_NEAREST |
- 			    (1 << R300_TX_ID_SHIFT));


Index: xorg-x11-drv-ati.spec
===================================================================
RCS file: /cvs/pkgs/rpms/xorg-x11-drv-ati/F-11/xorg-x11-drv-ati.spec,v
retrieving revision 1.182
retrieving revision 1.183
diff -u -p -r1.182 -r1.183
--- xorg-x11-drv-ati.spec	27 Apr 2009 01:25:03 -0000	1.182
+++ xorg-x11-drv-ati.spec	28 Apr 2009 03:27:38 -0000	1.183
@@ -5,7 +5,7 @@
 Summary:   Xorg X11 ati video driver
 Name:      xorg-x11-drv-ati
 Version:   6.12.2
-Release:   7%{?dist}
+Release:   8%{?dist}
 URL:       http://www.x.org
 License:   MIT
 Group:     User Interface/X Hardware Support
@@ -18,7 +18,7 @@ Patch1:     radeon-modeset.patch
 Patch6:     radeon-6.9.0-bgnr-enable.patch
 Patch7:	    radeon-6.12.1-r600-fb-size.patch
 Patch8:	    radeon-6.12.2-kms-gamma.patch
-#Patch9:     radeon-6.12.2-fix-rs690-clamp.patch
+Patch9:     radeon-6.12.2-fix-rs690-clamp.patch
 Patch10:    radeon-6.12.2-fix-xv-warning.patch
 
 ExcludeArch: s390 s390x
@@ -46,7 +46,7 @@ X.Org X11 ati video driver.
 %patch7 -p1 -b .r600-fb-size
 # don't do this yet, kernel will oops if you do
 #patch8 -p1 -b .kms-gamma
-#patch9 -p1 -b .rs690clamp
+%patch9 -p1 -b .rs690clamp
 %patch10 -p1 -b .fix-xvwarn
 
 %build
@@ -79,6 +79,9 @@ rm -rf $RPM_BUILD_ROOT
 %{_mandir}/man4/radeon.4*
 
 %changelog
+* Tue Apr 28 2009 Dave Airlie <airlied at redhat.com> 6.12.2-8
+- restrict texture coords to 0.0->1.0 explicitly.
+
 * Mon Apr 27 2009 Dave Airlie <airlied at redhat.com> 6.12.2-7
 - revert rs690 fixes for now until we can research properly
 - fix xv warning




More information about the fedora-extras-commits mailing list