From d17f45df1a666c28e38482e89377a1aba040fcbe Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Mon, 20 Dec 2021 10:55:57 +1000 Subject: [PATCH] mesa: remove StripTextureBorder option. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Always make this true. Reviewed-by: Kenneth Graunke Reviewed-by: Marek Olšák Part-of: --- src/mesa/main/mtypes.h | 14 -------------- src/mesa/main/teximage.c | 4 ++-- src/mesa/state_tracker/st_extensions.c | 2 -- 3 files changed, 2 insertions(+), 18 deletions(-) diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 3f9c8b7c245..91b38d90715 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -4083,20 +4083,6 @@ struct gl_constants /* GL_ARB_blend_func_extended */ GLuint MaxDualSourceDrawBuffers; - /** - * Whether the implementation strips out and ignores texture borders. - * - * Many GPU hardware implementations don't support rendering with texture - * borders and mipmapped textures. (Note: not static border color, but the - * old 1-pixel border around each edge). Implementations then have to do - * slow fallbacks to be correct, or just ignore the border and be fast but - * wrong. Setting the flag strips the border off of TexImage calls, - * providing "fast but wrong" at significantly reduced driver complexity. - * - * Texture borders are deprecated in GL 3.0. - **/ - GLboolean StripTextureBorder; - /** * For drivers which can do a better job at eliminating unused uniforms * than the GLSL compiler. diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index 52a1abd1701..2d0f6d4fc57 100644 --- a/src/mesa/main/teximage.c +++ b/src/mesa/main/teximage.c @@ -3125,7 +3125,7 @@ teximage(struct gl_context *ctx, GLboolean compressed, GLuint dims, * reliable but slightly incorrect hardware rendering instead of * rarely-tested software fallback rendering. */ - if (border && ctx->Const.StripTextureBorder) { + if (border) { strip_texture_border(target, &width, &height, &depth, unpack, &unpack_no_border); border = 0; @@ -4377,7 +4377,7 @@ copyteximage(struct gl_context *ctx, GLuint dims, struct gl_texture_object *texO return; } - if (border && ctx->Const.StripTextureBorder) { + if (border) { x += border; width -= border * 2; if (dims == 2) { diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c index 0bbf5200fb9..04f531094ef 100644 --- a/src/mesa/state_tracker/st_extensions.c +++ b/src/mesa/state_tracker/st_extensions.c @@ -486,8 +486,6 @@ void st_init_limits(struct pipe_screen *screen, temp = screen->get_param(screen, PIPE_CAP_MAX_VERTEX_ELEMENT_SRC_OFFSET); c->MaxVertexAttribRelativeOffset = MIN2(0xffff, temp); - c->StripTextureBorder = GL_TRUE; - c->GLSLSkipStrictMaxUniformLimitCheck = screen->get_param(screen, PIPE_CAP_TGSI_CAN_COMPACT_CONSTANTS);