Phil Costin : wined3d: Add gamma linerization support for D3DFMT_A4R4G4B4.

Alexandre Julliard julliard at wine.codeweavers.com
Wed Jun 13 06:14:01 CDT 2007


Module: wine
Branch: master
Commit: 2256e06de3493e4c0de3b9e49a28308d364f37b1
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=2256e06de3493e4c0de3b9e49a28308d364f37b1

Author: Phil Costin <philcostin at hotmail.com>
Date:   Tue Jun 12 18:41:58 2007 +0000

wined3d: Add gamma linerization support for D3DFMT_A4R4G4B4.

---

 dlls/wined3d/directx.c |    1 +
 dlls/wined3d/utils.c   |    2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
index 07e0dbe..2abbeb6 100644
--- a/dlls/wined3d/directx.c
+++ b/dlls/wined3d/directx.c
@@ -1692,6 +1692,7 @@ static HRESULT WINAPI IWineD3DImpl_CheckDeviceFormat(IWineD3D *iface, UINT Adapt
         switch (CheckFormat) {
             case WINED3DFMT_A8R8G8B8:
             case WINED3DFMT_X8R8G8B8:
+            case WINED3DFMT_A4R4G4B4:
             case WINED3DFMT_L8:
             case WINED3DFMT_A8L8:
             case WINED3DFMT_DXT1:
diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c
index 2718420..d592bc4 100644
--- a/dlls/wined3d/utils.c
+++ b/dlls/wined3d/utils.c
@@ -66,7 +66,7 @@ static const PixelFormatDesc formats[] = {
     {WINED3DFMT_R5G6B5      ,0x0        ,0x0000F800 ,0x000007e0 ,0x0000001f ,2      ,FALSE      ,GL_RGB5                          ,GL_RGB5                              ,GL_RGB  ,GL_UNSIGNED_SHORT_5_6_5    },
     {WINED3DFMT_X1R5G5B5    ,0x0        ,0x00007c00 ,0x000003e0 ,0x0000001f ,2      ,FALSE      ,GL_RGB5_A1                       ,GL_RGB5_A1                        ,GL_BGRA ,GL_UNSIGNED_SHORT_1_5_5_5_REV },
     {WINED3DFMT_A1R5G5B5    ,0x00008000 ,0x00007c00 ,0x000003e0 ,0x0000001f ,2      ,FALSE      ,GL_RGB5_A1                       ,GL_RGB5_A1                        ,GL_BGRA ,GL_UNSIGNED_SHORT_1_5_5_5_REV },
-    {WINED3DFMT_A4R4G4B4    ,0x0000f000 ,0x00000f00 ,0x000000f0 ,0x0000000f ,2      ,FALSE      ,GL_RGBA4                         ,GL_RGBA4                          ,GL_BGRA ,GL_UNSIGNED_SHORT_4_4_4_4_REV },
+    {WINED3DFMT_A4R4G4B4    ,0x0000f000 ,0x00000f00 ,0x000000f0 ,0x0000000f ,2      ,FALSE      ,GL_RGBA4                         ,GL_SRGB8_ALPHA8_EXT               ,GL_BGRA ,GL_UNSIGNED_SHORT_4_4_4_4_REV },
     {WINED3DFMT_R3G3B2      ,0x0        ,0x000000e0 ,0x0000001c ,0x00000003 ,1      ,FALSE      ,GL_R3_G3_B2                      ,GL_R3_G3_B2                          ,GL_RGB  ,GL_UNSIGNED_BYTE_2_3_3_REV },
     {WINED3DFMT_A8          ,0x000000ff ,0x0        ,0x0        ,0x0        ,1      ,FALSE      ,GL_ALPHA8                        ,GL_ALPHA8                              ,GL_ALPHA ,GL_UNSIGNED_BYTE        },
     {WINED3DFMT_A8R3G3B2    ,0x0000ff00 ,0x000000e0 ,0x0000001c ,0x00000003 ,2      ,FALSE      ,0                                ,0                                      ,0       ,0                        },




More information about the wine-cvs mailing list