Mesa (main): mesa: remove StripTextureBorder option.
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Dec 23 19:35:09 UTC 2021
Module: Mesa
Branch: main
Commit: d17f45df1a666c28e38482e89377a1aba040fcbe
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d17f45df1a666c28e38482e89377a1aba040fcbe
Author: Dave Airlie <airlied at redhat.com>
Date: Mon Dec 20 10:55:57 2021 +1000
mesa: remove StripTextureBorder option.
Always make this true.
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14261>
---
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);
More information about the mesa-commit
mailing list