Skip to content

Commit db4c1ac

Browse files
committed
Don't attempt to change bindless texture filter type
This doesn't work and generates an error for every image: Warn: DEBUG_TYPE_ERROR: severity: high msg: GL_INVALID_OPERATION error generated. Texture is immutable.
1 parent b2ab630 commit db4c1ac

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/engine/renderer/tr_image.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,12 @@ void GL_TextureMode( const char *string )
111111
gl_filter_min = modes[ i ].minimize;
112112
gl_filter_max = modes[ i ].maximize;
113113

114+
if ( glConfig2.usingBindlessTextures && !tr.images.empty() )
115+
{
116+
Log::Notice( "Changing filter type of existing bindless textures requires a restart" );
117+
return;
118+
}
119+
114120
// change all the existing mipmap texture objects
115121
for ( image_t *image : tr.images )
116122
{
@@ -127,11 +133,6 @@ void GL_TextureMode( const char *string )
127133
{
128134
glTexParameterf( image->type, GL_TEXTURE_MAX_ANISOTROPY_EXT, glConfig2.textureAnisotropy );
129135
}
130-
131-
// Getting bindless handle makes the texture immutable, so generate it again because we used glTexParameter*
132-
if ( glConfig2.usingBindlessTextures ) {
133-
image->texture->GenBindlessHandle();
134-
}
135136
}
136137
}
137138
}

0 commit comments

Comments
 (0)