From: Elizabeth Figura zfigura@codeweavers.com
--- dlls/wined3d/adapter_gl.c | 8 ------- dlls/wined3d/glsl_shader.c | 1 - dlls/wined3d/texture.c | 38 ---------------------------------- dlls/wined3d/wined3d_private.h | 1 - 4 files changed, 48 deletions(-)
diff --git a/dlls/wined3d/adapter_gl.c b/dlls/wined3d/adapter_gl.c index 59c85df5a9a..8e2e8f9a359 100644 --- a/dlls/wined3d/adapter_gl.c +++ b/dlls/wined3d/adapter_gl.c @@ -5225,14 +5225,6 @@ static BOOL wined3d_adapter_gl_init(struct wined3d_adapter_gl *adapter_gl,
wined3d_adapter_gl_init_d3d_info(adapter_gl, wined3d_creation_flags);
- if (!adapter_gl->a.d3d_info.ffp_fragment_caps.color_key) - { - /* We do not want to deal with re-creating immutable texture storage - * for colour-keying emulation. */ - WARN("Disabling ARB_texture_storage because fragment pipe doesn't support colour-keying.\n"); - gl_info->supported[ARB_TEXTURE_STORAGE] = FALSE; - } - if (!wined3d_driver_info_init(driver_info, caps_gl_ctx.gpu_description, adapter_gl->a.d3d_info.feature_level, caps_gl_ctx.vram_bytes, 0)) { diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index f23a31516c4..a0cc7126b3e 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -12132,7 +12132,6 @@ static void glsl_fragment_pipe_get_caps(const struct wined3d_adapter *adapter, s const struct wined3d_gl_info *gl_info = &wined3d_adapter_gl_const(adapter)->gl_info;
memset(caps, 0, sizeof(*caps)); - caps->color_key = true; caps->PrimitiveMiscCaps = WINED3DPMISCCAPS_TSSARGTEMP | WINED3DPMISCCAPS_PERSTAGECONSTANT; caps->TextureOpCaps = WINED3DTEXOPCAPS_DISABLE diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c index 86e4b603663..688dc35de98 100644 --- a/dlls/wined3d/texture.c +++ b/dlls/wined3d/texture.c @@ -1658,18 +1658,11 @@ struct wined3d_resource * CDECL wined3d_texture_get_resource(struct wined3d_text return &texture->resource; }
-static BOOL color_key_equal(const struct wined3d_color_key *c1, struct wined3d_color_key *c2) -{ - return c1->color_space_low_value == c2->color_space_low_value - && c1->color_space_high_value == c2->color_space_high_value; -} - /* Context activation is done by the caller */ void wined3d_texture_load(struct wined3d_texture *texture, struct wined3d_context *context, BOOL srgb) { UINT sub_count = texture->level_count * texture->layer_count; - const struct wined3d_d3d_info *d3d_info = context->d3d_info; DWORD flag; UINT i;
@@ -1683,26 +1676,6 @@ void wined3d_texture_load(struct wined3d_texture *texture, else flag = WINED3D_TEXTURE_RGB_VALID;
- if (!d3d_info->ffp_fragment_caps.color_key - && (!(texture->async.flags & WINED3D_TEXTURE_ASYNC_COLOR_KEY) - != !(texture->async.color_key_flags & WINED3D_CKEY_SRC_BLT) - || (texture->async.flags & WINED3D_TEXTURE_ASYNC_COLOR_KEY - && !color_key_equal(&texture->async.gl_color_key, &texture->async.src_blt_color_key)))) - { - unsigned int i; - - TRACE("Reloading because of color key value change.\n"); - for (i = 0; i < sub_count; i++) - { - if (!wined3d_texture_load_location(texture, i, context, texture->resource.map_binding)) - ERR("Failed to load location %s.\n", wined3d_debug_location(texture->resource.map_binding)); - else - wined3d_texture_invalidate_location(texture, i, ~texture->resource.map_binding); - } - - texture->async.gl_color_key = texture->async.src_blt_color_key; - } - if (texture->flags & flag) { TRACE("Texture %p not dirty, nothing to do.\n", texture); @@ -2051,7 +2024,6 @@ void wined3d_texture_gl_prepare_texture(struct wined3d_texture_gl *texture_gl, struct wined3d_context_gl *context_gl, BOOL srgb) { DWORD alloc_flag = srgb ? WINED3D_TEXTURE_SRGB_ALLOCATED : WINED3D_TEXTURE_RGB_ALLOCATED; - const struct wined3d_d3d_info *d3d_info = context_gl->c.d3d_info; const struct wined3d_gl_info *gl_info = context_gl->gl_info; struct wined3d_resource *resource = &texture_gl->t.resource; const struct wined3d_device *device = resource->device; @@ -2063,16 +2035,6 @@ void wined3d_texture_gl_prepare_texture(struct wined3d_texture_gl *texture_gl, TRACE("texture_gl %p, context_gl %p, srgb %d, format %s.\n", texture_gl, context_gl, srgb, debug_d3dformat(format->id));
- if (!d3d_info->ffp_fragment_caps.color_key - && !(texture_gl->t.async.flags & WINED3D_TEXTURE_ASYNC_COLOR_KEY) - != !(texture_gl->t.async.color_key_flags & WINED3D_CKEY_SRC_BLT)) - { - wined3d_texture_force_reload(&texture_gl->t); - - if (texture_gl->t.async.color_key_flags & WINED3D_CKEY_SRC_BLT) - texture_gl->t.async.flags |= WINED3D_TEXTURE_ASYNC_COLOR_KEY; - } - if (texture_gl->t.flags & alloc_flag) return;
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 2f5318adfc1..cb67dfaf93a 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -197,7 +197,6 @@ struct fragment_caps unsigned int TextureOpCaps; unsigned int max_blend_stages; unsigned int max_textures; - bool color_key; };
struct wined3d_d3d_limits