wined3d: Remove no longer used support for rectangle textures.

This commit is contained in:
Elizabeth Figura 2024-03-20 15:37:21 -05:00 committed by Alexandre Julliard
parent 62523c7899
commit 1fc3522163
5 changed files with 5 additions and 36 deletions

View file

@ -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 = "";

View file

@ -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},

View file

@ -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;

View file

@ -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;

View file

@ -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