ref: gl: more maybe unused stuff

This commit is contained in:
Alibek Omarov
2026-05-13 11:12:33 +05:00
parent 50f7f3bb87
commit 5e70995989
2 changed files with 13 additions and 15 deletions

View File

@@ -922,8 +922,8 @@ static void GL_TextureImageRAW( gl_texture_t *tex, GLint side, GLint level, GLin
static void GL_TextureImageCompressed( gl_texture_t *tex, GLint side, GLint level, GLint width, GLint height, GLint depth, size_t size, const void *data )
{
GLuint cubeTarget = GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB;
qboolean subImage = FBitSet( tex->flags, TF_IMG_UPLOADED );
GLuint cubeTarget MAYBE_UNUSED = GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB;
qboolean subImage MAYBE_UNUSED = FBitSet( tex->flags, TF_IMG_UPLOADED );
Assert( tex != NULL );

View File

@@ -200,14 +200,14 @@ static const dllfunc_t multitexturefuncs[] =
{ GL_CALL( glClientActiveTextureARB ) },
};
static const dllfunc_t texture3dextfuncs[] =
static const dllfunc_t texture3dextfuncs[] MAYBE_UNUSED =
{
{ GL_CALL( glTexImage3D ) },
{ GL_CALL( glTexSubImage3D ) },
{ GL_CALL( glCopyTexSubImage3D ) },
};
static const dllfunc_t texturecompressionfuncs[] =
static const dllfunc_t texturecompressionfuncs[] MAYBE_UNUSED =
{
{ GL_CALL( glCompressedTexImage3DARB ) },
{ GL_CALL( glCompressedTexImage2DARB ) },
@@ -232,17 +232,17 @@ static const dllfunc_t vbofuncs[] =
{ GL_CALL( glBufferSubDataARB ) },
};
static const dllfunc_t multisampletexfuncs[] =
static const dllfunc_t multisampletexfuncs[] MAYBE_UNUSED =
{
{ GL_CALL(glTexImage2DMultisample) },
};
static const dllfunc_t drawrangeelementsfuncs[] =
static const dllfunc_t drawrangeelementsfuncs[] MAYBE_UNUSED =
{
{ GL_CALL( glDrawRangeElements ) },
};
static const dllfunc_t drawrangeelementsextfuncs[] =
static const dllfunc_t drawrangeelementsextfuncs[] MAYBE_UNUSED =
{
{ GL_CALL( glDrawRangeElementsEXT ) },
};
@@ -271,7 +271,7 @@ static const dllfunc_t bufferstoragefuncs[] =
{ GL_CALL( glBufferStorage ) },
};
static const dllfunc_t shaderobjectsfuncs[] =
static const dllfunc_t shaderobjectsfuncs[] MAYBE_UNUSED =
{
{ GL_CALL( glDeleteObjectARB ) },
{ GL_CALL( glGetHandleARB ) },
@@ -472,18 +472,16 @@ GL_CheckExtension
*/
static qboolean GL_CheckExtension( const char *name, const dllfunc_t *funcs, size_t num_funcs, const char *cvarname, int r_ext, float minver )
{
size_t i;
cvar_t *parm = NULL;
const char *extensions_string;
char desc[MAX_VA_STRING];
float glver = (float)glConfig.version_major + glConfig.version_minor / 10.0f;
const float glver = (float)glConfig.version_major + glConfig.version_minor / 10.0f;
gEngfuncs.Con_Reportf( "%s: %s ", __func__, name );
GL_SetExtension( r_ext, true );
cvar_t *parm = NULL;
if( cvarname )
{
// system config disable extensions
char desc[MAX_VA_STRING];
Q_snprintf( desc, sizeof( desc ), CVAR_GLCONFIG_DESCRIPTION, name );
parm = gEngfuncs.Cvar_Get( cvarname, "1", FCVAR_GLCONFIG|FCVAR_READ_ONLY, desc );
}
@@ -495,7 +493,7 @@ static qboolean GL_CheckExtension( const char *name, const dllfunc_t *funcs, siz
return false; // nothing to process at
}
extensions_string = glConfig.extensions_string;
const char *extensions_string = glConfig.extensions_string;
if(( name[2] == '_' || name[3] == '_' ) && !Q_strstr( extensions_string, name ) && ( glver < minver || !minver || !glver ) )
{
@@ -508,7 +506,7 @@ static qboolean GL_CheckExtension( const char *name, const dllfunc_t *funcs, siz
// clear exports
ClearExports( funcs, num_funcs );
for( i = 0; i < num_funcs; i++ )
for( size_t i = 0; i < num_funcs; i++ )
{
// functions are cleared before all the extensions are evaluated
if(( *(funcs[i].func) = (void *)gEngfuncs.GL_GetProcAddress( funcs[i].name )) == NULL )