From c8fb700f2b01b577402910ecd09594ee2570872d Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Mon, 7 Nov 2011 13:46:36 +0000 Subject: radeon: fix 3-coordinate swtcl emission This fixes mipmap generation on swtcl rv100. Signed-off-by: Dave Airlie --- src/mesa/drivers/dri/radeon/radeon_swtcl.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src') diff --git a/src/mesa/drivers/dri/radeon/radeon_swtcl.c b/src/mesa/drivers/dri/radeon/radeon_swtcl.c index ff3506b2259..3cda09d67ff 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, -- cgit v1.2.3