Module: wine Branch: master Commit: acc893c5cf52fde43b90e6001d9a1cf8f4944c48 URL: http://source.winehq.org/git/wine.git/?a=commit;h=acc893c5cf52fde43b90e6001d...
Author: Stefan Dösinger stefan@codeweavers.com Date: Thu Aug 21 13:47:41 2008 -0500
wined3d: Handle projected+bump mapped textures in atifs.
---
dlls/wined3d/ati_fragment_shader.c | 11 ++++++++--- 1 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/dlls/wined3d/ati_fragment_shader.c b/dlls/wined3d/ati_fragment_shader.c index 667a95c..7707a2a 100644 --- a/dlls/wined3d/ati_fragment_shader.c +++ b/dlls/wined3d/ati_fragment_shader.c @@ -312,11 +312,16 @@ static GLuint gen_ati_shader(struct texture_stage_op op[MAX_TEXTURES], WineD3D_G GL_EXTCALL(glSampleMapATI(GL_REG_0_ATI + stage, GL_TEXTURE0_ARB + stage, GL_SWIZZLE_STR_ATI)); - TRACE("glPassTexCoordATI(GL_REG_%d_ATI, GL_TEXTURE_%d_ARB, GL_SWIZZLE_STR_ATI)\n", - stage + 1, stage + 1); + if(op[stage + 1].projected == proj_none) { + swizzle = GL_SWIZZLE_STR_ATI; + } else { + swizzle = GL_SWIZZLE_STQ_DQ_ATI; + } + TRACE("glPassTexCoordATI(GL_REG_%d_ATI, GL_TEXTURE_%d_ARB, %s)\n", + stage + 1, stage + 1, debug_swizzle(swizzle)); GL_EXTCALL(glPassTexCoordATI(GL_REG_0_ATI + stage + 1, GL_TEXTURE0_ARB + stage + 1, - GL_SWIZZLE_STR_ATI)); + swizzle));
/* We need GL_REG_5_ATI as a temporary register to swizzle the bump matrix. So we run into * issues if we're bump mapping on stage 4 or 5