[PATCH 4/5] wined3d: Use GL_ALPHA8 for WINED3DFMT_P8_UINT surfaces.

Stefan Dösinger stefan at codeweavers.com
Tue May 13 09:21:52 CDT 2014


This is enough for everything except the front buffer in cases where
ARB_fragment_program is not supported. This case is currently handled by
d3dfmt_get_conv.

GL_LUMINANCE8 would give us the correct result when blitting from P8 to
RGB, but I don't want to use a legacy format for this special case. If
needed, we can handle this in the blitter if shaders are available, and
via LUMINANCE8 otherwise - in this case we don't bother about core
contexts anyway.
---
 dlls/wined3d/utils.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c
index c077567..6a27920 100644
--- a/dlls/wined3d/utils.c
+++ b/dlls/wined3d/utils.c
@@ -740,7 +740,7 @@ static const struct wined3d_format_texture_info format_texture_info[] =
             | WINED3DFMT_FLAG_VTF,
             ARB_TEXTURE_FLOAT,          NULL},
     /* Palettized formats */
-    {WINED3DFMT_P8_UINT,                GL_RGBA,                          GL_RGBA,                                0,
+    {WINED3DFMT_P8_UINT,                GL_ALPHA8,                        GL_ALPHA8,                              0,
             GL_ALPHA,                   GL_UNSIGNED_BYTE,                 0,
             0,
             0,                          NULL},
-- 
1.8.5.5




More information about the wine-patches mailing list