attempt #3: this patch fixes several texture bugs with the demos of OGRE.
License: LGPL ChangeLog: 2006-02-08 Christoph Frick rid@zefix.tv - dlls/wined3d/utils.c support for WINED3DFMT_A8B8G8R8
The patch looks more like repeated code to me.
FMT_TO_STR(WINED3DFMT_A8B8G8R8); then add a second FMT_TO_STR(WINED3DFMT_A8B8G8R8);
Doesn't make sense for me. Same for the other changes in this diff.
Karsten
-----Ursprüngliche Nachricht----- Von: wine-devel-bounces@winehq.org [mailto:wine-devel-bounces@winehq.org] Im Auftrag von Christoph Frick Gesendet: Mittwoch, 8. Februar 2006 13:32 An: wine-patches@winehq.org; wine-devel@winehq.org Betreff: [wined3d] support for WINED3DFMT_A8B8G8R8 Wichtigkeit: Hoch
attempt #3: this patch fixes several texture bugs with the demos of OGRE.
License: LGPL ChangeLog: 2006-02-08 Christoph Frick rid@zefix.tv
- dlls/wined3d/utils.c
support for WINED3DFMT_A8B8G8R8
-- cu
Index: dlls/wined3d/utils.c
RCS file: /home/wine/wine/dlls/wined3d/utils.c,v retrieving revision 1.18 diff -u -r1.18 utils.c --- dlls/wined3d/utils.c 23 Nov 2005 19:29:20 -0000 1.18 +++ dlls/wined3d/utils.c 8 Feb 2006 12:23:00 -0000 @@ -35,6 +35,7 @@ FMT_TO_STR(WINED3DFMT_UNKNOWN); FMT_TO_STR(WINED3DFMT_R8G8B8); FMT_TO_STR(WINED3DFMT_A8R8G8B8);
- FMT_TO_STR(WINED3DFMT_A8B8G8R8); FMT_TO_STR(WINED3DFMT_X8R8G8B8); FMT_TO_STR(WINED3DFMT_R5G6B5); FMT_TO_STR(WINED3DFMT_X1R5G5B5);
@@ -1611,6 +1612,7 @@ case WINED3DFMT_A4R4G4B4: retVal = GL_RGBA4; break; case WINED3DFMT_X4R4G4B4: retVal = GL_RGB4; break; case WINED3DFMT_A8R8G8B8: retVal = GL_RGBA8; break;
case WINED3DFMT_A8B8G8R8: retVal = GL_RGBA8; break; case WINED3DFMT_A2R10G10B10: retVal = GL_RGBA8; break; case WINED3DFMT_X8R8G8B8: retVal = GL_RGB; break; /* to see */
@@ -1676,6 +1678,7 @@ case WINED3DFMT_A4R4G4B4: retVal = GL_BGRA; break; case WINED3DFMT_X4R4G4B4: retVal = GL_BGRA; break; case WINED3DFMT_A8R8G8B8: retVal = GL_BGRA; break;
case WINED3DFMT_A8B8G8R8: retVal = GL_RGBA; break; case WINED3DFMT_A2R10G10B10: retVal = GL_BGRA; break; case WINED3DFMT_X8R8G8B8: retVal = GL_BGRA; break; /* to see */
@@ -1738,6 +1741,7 @@ case WINED3DFMT_A4R4G4B4: retVal = GL_UNSIGNED_SHORT_4_4_4_4_REV; break; case WINED3DFMT_X4R4G4B4: retVal = GL_UNSIGNED_SHORT_4_4_4_4_REV; break; case WINED3DFMT_A8R8G8B8: retVal = GL_UNSIGNED_INT_8_8_8_8_REV; break;
case WINED3DFMT_A8B8G8R8: retVal =
GL_UNSIGNED_INT_8_8_8_8_REV; break; case WINED3DFMT_A2R10G10B10: retVal = GL_UNSIGNED_INT_2_10_10_10_REV; break; case WINED3DFMT_X8R8G8B8: retVal = GL_UNSIGNED_INT_8_8_8_8_REV; break; /* to see */ @@ -1781,6 +1785,7 @@ case WINED3DFMT_A4R4G4B4: retVal = 2; break; case WINED3DFMT_X4R4G4B4: retVal = 2; break; case WINED3DFMT_A8R8G8B8: retVal = 4; break;
- case WINED3DFMT_A8B8G8R8: retVal = 4; break; case WINED3DFMT_A2R10G10B10: retVal = 4; break; case WINED3DFMT_X8R8G8B8: retVal = 4; break; /* Paletted */
On 08/02/06, Karsten Elfenbein elfe-mail@elfe.mine.nu wrote:
The patch looks more like repeated code to me.
FMT_TO_STR(WINED3DFMT_A8B8G8R8); then add a second FMT_TO_STR(WINED3DFMT_A8B8G8R8);
Doesn't make sense for me. Same for the other changes in this diff.
Karsten
Unless I'm misunderstanding your comment, that's not what the patch does. There are already cases for WINED3DFMT_A8R8G8B8, the patch adds cases for WINED3DFMT_A8B8G8R8. I suppose the R and the B look rather similar.
On Wed, Feb 08, 2006 at 08:11:47PM -0400, H. Verbeet wrote:
FMT_TO_STR(WINED3DFMT_A8B8G8R8); then add a second FMT_TO_STR(WINED3DFMT_A8B8G8R8); Doesn't make sense for me. Same for the other changes in this diff.
Unless I'm misunderstanding your comment, that's not what the patch does. There are already cases for WINED3DFMT_A8R8G8B8, the patch adds cases for WINED3DFMT_A8B8G8R8. I suppose the R and the B look rather similar.
even without doing any further explanation: this patch cant be duplication because gcc handles duplicate case values as an error.
but you are right - thats exactly what it does (note the reversed order: RGB vs BGR). without this patch there are fallbacks for RGB, 4byte, and so on - so there is no actual breakage code-wise. BUT without this patch running the ``smoke'' and ``grass'' demo show heavily distorted textures. the ogre-logo used in every demo is distorted too. this patch fix this behaviour. i doubt that many other games have similar problems, because ogre is designed to work with ogl and d3d and would therefore deal with textures in both flavours and the demos may not be written by the same author and the textures may not all be of the same format or source.