mesa: remove StripTextureBorder option.

Always make this true.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14261>
This commit is contained in:
Dave Airlie 2021-12-20 10:55:57 +10:00 committed by Marge Bot
parent 424941f0e4
commit d17f45df1a
3 changed files with 2 additions and 18 deletions

View file

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

View file

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

View file

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