Mesa (radeon-rewrite): radeon: move YUV on first texunit check after hw state is setup
Dave Airlie
airlied at kemper.freedesktop.org
Tue Feb 17 00:29:43 UTC 2009
Module: Mesa
Branch: radeon-rewrite
Commit: 7a1dbcabf3f2599c90665e7fdbdba8698528841a
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=7a1dbcabf3f2599c90665e7fdbdba8698528841a
Author: Dave Airlie <airlied at redhat.com>
Date: Tue Feb 17 10:26:33 2009 +1000
radeon: move YUV on first texunit check after hw state is setup
---
src/mesa/drivers/dri/radeon/radeon_texstate.c | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/src/mesa/drivers/dri/radeon/radeon_texstate.c b/src/mesa/drivers/dri/radeon/radeon_texstate.c
index 1aa5f98..0dc3557 100644
--- a/src/mesa/drivers/dri/radeon/radeon_texstate.c
+++ b/src/mesa/drivers/dri/radeon/radeon_texstate.c
@@ -985,15 +985,14 @@ static GLboolean radeon_validate_texture(GLcontext *ctx, struct gl_texture_objec
if (!radeon_validate_texture_miptree(ctx, texObj))
return GL_FALSE;
- /* yuv conversion only works in first unit */
- if (unit != 0 && (t->pp_txfilter & RADEON_YUV_TO_RGB))
- return GL_FALSE;
-
-
ret = setup_hardware_state(rmesa, t, unit);
if (ret == GL_FALSE)
return GL_FALSE;
+ /* yuv conversion only works in first unit */
+ if (unit != 0 && (t->pp_txfilter & RADEON_YUV_TO_RGB))
+ return GL_FALSE;
+
RADEON_STATECHANGE( rmesa, ctx );
rmesa->hw.ctx.cmd[CTX_PP_CNTL] |=
(RADEON_TEX_0_ENABLE | RADEON_TEX_BLEND_0_ENABLE) << unit;
More information about the mesa-commit
mailing list