Mesa (master): radeon: fix 3-coordinate swtcl emission

Dave Airlie airlied at kemper.freedesktop.org
Thu Nov 10 15:53:23 UTC 2011


Module: Mesa
Branch: master
Commit: c8fb700f2b01b577402910ecd09594ee2570872d
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=c8fb700f2b01b577402910ecd09594ee2570872d

Author: Dave Airlie <airlied at redhat.com>
Date:   Mon Nov  7 13:46:36 2011 +0000

radeon: fix 3-coordinate swtcl emission

This fixes mipmap generation on swtcl rv100.

Signed-off-by: Dave Airlie <airlied at redhat.com>

---

 src/mesa/drivers/dri/radeon/radeon_swtcl.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/src/mesa/drivers/dri/radeon/radeon_swtcl.c b/src/mesa/drivers/dri/radeon/radeon_swtcl.c
index ff3506b..3cda09d 100644
--- a/src/mesa/drivers/dri/radeon/radeon_swtcl.c
+++ b/src/mesa/drivers/dri/radeon/radeon_swtcl.c
@@ -190,6 +190,14 @@ static void radeonSetVertexFormat( struct gl_context *ctx )
 			  radeon_cp_vc_frmts[i][0] );
 	       break;
 	    case 3:
+	       if (ctx->Texture.Unit[i]._ReallyEnabled & (TEXTURE_CUBE_BIT) ) {
+	           EMIT_ATTR( _TNL_ATTRIB_TEX0+i, EMIT_3F,
+			      radeon_cp_vc_frmts[i][1] );
+               } else {
+	           EMIT_ATTR( _TNL_ATTRIB_TEX0+i, EMIT_2F,
+			      radeon_cp_vc_frmts[i][0] );
+               }
+               break;
 	    case 4:
 	       if (ctx->Texture.Unit[i]._ReallyEnabled & (TEXTURE_CUBE_BIT) ) {
 		  EMIT_ATTR( _TNL_ATTRIB_TEX0+i, EMIT_3F,




More information about the mesa-commit mailing list