=?UTF-8?Q?Stefan=20D=C3=B6singer=20?=: wined3d: Remove WINED3D_CT_PALETTED_CK.
Alexandre Julliard
julliard at winehq.org
Wed May 14 15:39:06 CDT 2014
Module: wine
Branch: master
Commit: bfb5be0f4b93aa36044847d8d930ec6224d5fc99
URL: http://source.winehq.org/git/wine.git/?a=commit;h=bfb5be0f4b93aa36044847d8d930ec6224d5fc99
Author: Stefan Dösinger <stefan at codeweavers.com>
Date: Tue May 13 16:21:50 2014 +0200
wined3d: Remove WINED3D_CT_PALETTED_CK.
There's no difference between WINED3D_CT_PALETTED_CK and
WINED3D_CT_PALETTED with the palette index in the alpha channel.
---
dlls/wined3d/arb_program_shader.c | 3 +--
dlls/wined3d/surface.c | 10 +++-------
dlls/wined3d/wined3d_private.h | 3 +--
3 files changed, 5 insertions(+), 11 deletions(-)
diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c
index 653298a..195c3ae 100644
--- a/dlls/wined3d/arb_program_shader.c
+++ b/dlls/wined3d/arb_program_shader.c
@@ -7282,9 +7282,8 @@ static void upload_palette(const struct wined3d_surface *surface, struct wined3d
struct wined3d_device *device = surface->resource.device;
const struct wined3d_gl_info *gl_info = context->gl_info;
struct arbfp_blit_priv *priv = device->blit_priv;
- BOOL colorkey = !!(surface->container->color_key_flags & WINEDDSD_CKSRCBLT);
- d3dfmt_p8_init_palette(surface, table, colorkey);
+ d3dfmt_p8_init_palette(surface, table);
if (!priv->palette_texture)
gl_info->gl_ops.gl.p_glGenTextures(1, &priv->palette_texture);
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 0e71de0..e0ba375 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -1725,10 +1725,7 @@ static HRESULT d3dfmt_get_conv(const struct wined3d_surface *surface, BOOL need_
format->glInternal = GL_RGBA;
format->glType = GL_UNSIGNED_BYTE;
format->conv_byte_count = 4;
- if (colorkey_active)
- *conversion_type = WINED3D_CT_PALETTED_CK;
- else
- *conversion_type = WINED3D_CT_PALETTED;
+ *conversion_type = WINED3D_CT_PALETTED;
}
break;
@@ -3426,7 +3423,7 @@ static BOOL color_in_range(const struct wined3d_color_key *color_key, DWORD colo
&& color <= color_key->color_space_high_value;
}
-void d3dfmt_p8_init_palette(const struct wined3d_surface *surface, BYTE table[256][4], BOOL colorkey)
+void d3dfmt_p8_init_palette(const struct wined3d_surface *surface, BYTE table[256][4])
{
const struct wined3d_palette *pal = surface->palette;
unsigned int i;
@@ -3475,12 +3472,11 @@ static HRESULT d3dfmt_convert_surface(const BYTE *src, BYTE *dst, UINT pitch, UI
}
case WINED3D_CT_PALETTED:
- case WINED3D_CT_PALETTED_CK:
{
BYTE table[256][4];
unsigned int x, y;
- d3dfmt_p8_init_palette(surface, table, (conversion_type == WINED3D_CT_PALETTED_CK));
+ d3dfmt_p8_init_palette(surface, table);
for (y = 0; y < height; y++)
{
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index f7b5c57..9233148 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2341,7 +2341,6 @@ enum wined3d_conversion_type
{
WINED3D_CT_NONE,
WINED3D_CT_PALETTED,
- WINED3D_CT_PALETTED_CK,
WINED3D_CT_CK_565,
WINED3D_CT_CK_5551,
WINED3D_CT_CK_RGB24,
@@ -2349,7 +2348,7 @@ enum wined3d_conversion_type
WINED3D_CT_CK_ARGB32,
};
-void d3dfmt_p8_init_palette(const struct wined3d_surface *surface, BYTE table[256][4], BOOL colorkey) DECLSPEC_HIDDEN;
+void d3dfmt_p8_init_palette(const struct wined3d_surface *surface, BYTE table[256][4]) DECLSPEC_HIDDEN;
struct wined3d_sampler
{
More information about the wine-cvs
mailing list