Module: wine Branch: master Commit: 1fc3522163bbd02f0409c39815b6959c9c769af9 URL: https://gitlab.winehq.org/wine/wine/-/commit/1fc3522163bbd02f0409c39815b6959...
Author: Elizabeth Figura zfigura@codeweavers.com Date: Wed Mar 20 15:37:21 2024 -0500
wined3d: Remove no longer used support for rectangle textures.
---
dlls/wined3d/glsl_shader.c | 7 ------- dlls/wined3d/resource.c | 1 - dlls/wined3d/texture.c | 17 ++--------------- dlls/wined3d/utils.c | 9 --------- dlls/wined3d/wined3d_private.h | 7 +++---- 5 files changed, 5 insertions(+), 36 deletions(-)
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index d249f14bc8a..f3ac9e1095c 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -9841,9 +9841,6 @@ static GLuint shader_glsl_generate_ffp_fragment_shader(struct shader_glsl_priv * case WINED3D_GL_RES_TYPE_TEX_CUBE: sampler_type = "Cube"; break; - case WINED3D_GL_RES_TYPE_TEX_RECT: - sampler_type = "2DRect"; - break; default: FIXME("Unhandled sampler type %#x.\n", settings->op[stage].tex_type); sampler_type = NULL; @@ -9984,10 +9981,6 @@ static GLuint shader_glsl_generate_ffp_fragment_shader(struct shader_glsl_priv * texture_function = "textureCube"; coord_mask = "xyz"; break; - case WINED3D_GL_RES_TYPE_TEX_RECT: - texture_function = "texture2DRect"; - coord_mask = "xy"; - break; default: FIXME("Unhandled texture type %#x.\n", settings->op[stage].tex_type); texture_function = ""; diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c index e336e0048e0..b0537ffd305 100644 --- a/dlls/wined3d/resource.c +++ b/dlls/wined3d/resource.c @@ -75,7 +75,6 @@ HRESULT resource_init(struct wined3d_resource *resource, struct wined3d_device * {WINED3D_RTYPE_BUFFER, 0, WINED3D_GL_RES_TYPE_BUFFER}, {WINED3D_RTYPE_TEXTURE_1D, 0, WINED3D_GL_RES_TYPE_TEX_1D}, {WINED3D_RTYPE_TEXTURE_2D, 0, WINED3D_GL_RES_TYPE_TEX_2D}, - {WINED3D_RTYPE_TEXTURE_2D, 0, WINED3D_GL_RES_TYPE_TEX_RECT}, {WINED3D_RTYPE_TEXTURE_2D, 0, WINED3D_GL_RES_TYPE_RB}, {WINED3D_RTYPE_TEXTURE_2D, WINED3DUSAGE_LEGACY_CUBEMAP, WINED3D_GL_RES_TYPE_TEX_CUBE}, {WINED3D_RTYPE_TEXTURE_3D, 0, WINED3D_GL_RES_TYPE_TEX_3D}, diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c index d1b24b4dc2e..bbf8a8bc249 100644 --- a/dlls/wined3d/texture.c +++ b/dlls/wined3d/texture.c @@ -3855,18 +3855,8 @@ static HRESULT wined3d_texture_init(struct wined3d_texture *texture, const struc wined3d_texture_dirty_region_add(texture, i, NULL); }
- /* Precalculated scaling for 'faked' non power of two texture coords. */ - if (texture->resource.gl_type == WINED3D_GL_RES_TYPE_TEX_RECT) - { - texture->pow2_matrix[0] = (float)desc->width; - texture->pow2_matrix[5] = (float)desc->height; - texture->flags &= ~WINED3D_TEXTURE_POW2_MAT_IDENT; - } - else - { - texture->pow2_matrix[0] = 1.0f; - texture->pow2_matrix[5] = 1.0f; - } + texture->pow2_matrix[0] = 1.0f; + texture->pow2_matrix[5] = 1.0f; texture->pow2_matrix[10] = 1.0f; texture->pow2_matrix[15] = 1.0f; TRACE("x scale %.8e, y scale %.8e.\n", texture->pow2_matrix[0], texture->pow2_matrix[5]); @@ -4233,9 +4223,6 @@ HRESULT wined3d_texture_gl_init(struct wined3d_texture_gl *texture_gl, struct wi flags, device, parent, parent_ops, &texture_gl[1], &texture_gl_ops))) return hr;
- if (texture_gl->t.resource.gl_type == WINED3D_GL_RES_TYPE_TEX_RECT) - texture_gl->target = GL_TEXTURE_RECTANGLE_ARB; - if (texture_gl->target == GL_TEXTURE_2D_MULTISAMPLE_ARRAY || texture_gl->target == GL_TEXTURE_2D_MULTISAMPLE) texture_gl->t.flags &= ~WINED3D_TEXTURE_DOWNLOADABLE;
diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c index c0695762795..25cb992d021 100644 --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c @@ -2235,8 +2235,6 @@ static GLenum wined3d_gl_type_to_enum(enum wined3d_gl_resource_type type) return GL_TEXTURE_3D; case WINED3D_GL_RES_TYPE_TEX_CUBE: return GL_TEXTURE_CUBE_MAP_ARB; - case WINED3D_GL_RES_TYPE_TEX_RECT: - return GL_TEXTURE_RECTANGLE_ARB; case WINED3D_GL_RES_TYPE_BUFFER: return GL_TEXTURE_2D; /* TODO: GL_TEXTURE_BUFFER. */ case WINED3D_GL_RES_TYPE_RB: @@ -2255,7 +2253,6 @@ static void delete_fbo_attachment(const struct wined3d_gl_info *gl_info, { case WINED3D_GL_RES_TYPE_TEX_1D: case WINED3D_GL_RES_TYPE_TEX_2D: - case WINED3D_GL_RES_TYPE_TEX_RECT: case WINED3D_GL_RES_TYPE_TEX_3D: case WINED3D_GL_RES_TYPE_TEX_CUBE: gl_info->gl_ops.gl.p_glDeleteTextures(1, &object); @@ -2296,7 +2293,6 @@ static void create_and_bind_fbo_attachment(const struct wined3d_gl_info *gl_info break;
case WINED3D_GL_RES_TYPE_TEX_2D: - case WINED3D_GL_RES_TYPE_TEX_RECT: gl_info->gl_ops.gl.p_glGenTextures(1, object); gl_info->gl_ops.gl.p_glBindTexture(wined3d_gl_type_to_enum(d3d_type), *object); gl_info->gl_ops.gl.p_glTexImage2D(wined3d_gl_type_to_enum(d3d_type), 0, internal, 16, 16, 0, @@ -2658,7 +2654,6 @@ static void check_fbo_compat(struct wined3d_caps_gl_ctx *ctx, struct wined3d_for
case WINED3D_GL_RES_TYPE_TEX_2D: case WINED3D_GL_RES_TYPE_TEX_3D: - case WINED3D_GL_RES_TYPE_TEX_RECT: /* Rebinding texture to workaround a fglrx bug. */ gl_info->gl_ops.gl.p_glBindTexture(wined3d_gl_type_to_enum(type), object); gl_info->gl_ops.gl.p_glGetTexImage(wined3d_gl_type_to_enum(type), 0, GL_BGRA, @@ -3132,7 +3127,6 @@ static void query_internal_format(struct wined3d_adapter *adapter, format->f.caps[WINED3D_GL_RES_TYPE_TEX_2D] &= ~WINED3D_FORMAT_CAP_TEXTURE; format->f.caps[WINED3D_GL_RES_TYPE_TEX_3D] &= ~WINED3D_FORMAT_CAP_TEXTURE; format->f.caps[WINED3D_GL_RES_TYPE_TEX_CUBE] &= ~WINED3D_FORMAT_CAP_TEXTURE; - format->f.caps[WINED3D_GL_RES_TYPE_TEX_RECT] &= ~WINED3D_FORMAT_CAP_TEXTURE; }
query_view_class(format); @@ -3223,9 +3217,6 @@ static BOOL init_format_texture_info(struct wined3d_adapter *adapter, struct win if (gl_info->supported[ARB_TEXTURE_CUBE_MAP]) format->f.caps[WINED3D_GL_RES_TYPE_TEX_CUBE] |= format_texture_info[i].caps | WINED3D_FORMAT_CAP_BLIT;
- if (gl_info->supported[ARB_TEXTURE_RECTANGLE]) - format->f.caps[WINED3D_GL_RES_TYPE_TEX_RECT] |= format_texture_info[i].caps | WINED3D_FORMAT_CAP_BLIT; - format->f.caps[WINED3D_GL_RES_TYPE_RB] |= format_texture_info[i].caps | WINED3D_FORMAT_CAP_BLIT; format->f.caps[WINED3D_GL_RES_TYPE_RB] &= ~WINED3D_FORMAT_CAP_TEXTURE;
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index de4b2108365..431ccff6316 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -1437,10 +1437,9 @@ enum wined3d_gl_resource_type WINED3D_GL_RES_TYPE_TEX_2D = 1, WINED3D_GL_RES_TYPE_TEX_3D = 2, WINED3D_GL_RES_TYPE_TEX_CUBE = 3, - WINED3D_GL_RES_TYPE_TEX_RECT = 4, - WINED3D_GL_RES_TYPE_BUFFER = 5, - WINED3D_GL_RES_TYPE_RB = 6, - WINED3D_GL_RES_TYPE_COUNT = 7, + WINED3D_GL_RES_TYPE_BUFFER = 4, + WINED3D_GL_RES_TYPE_RB = 5, + WINED3D_GL_RES_TYPE_COUNT = 6, };
enum wined3d_vertex_processing_mode