mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-22 14:00:37 +02:00
mesa: remove MAX_3D_TEXTURE_LEVELS, MAX_CUBE_TEXTURE_LEVELS
they are redundant with MAX_TEXTURE_LEVELS Reviewed-by: Eric Anholt <eric@anholt.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7956>
This commit is contained in:
parent
0ef61a162a
commit
0bf7f7fcd2
3 changed files with 7 additions and 17 deletions
|
|
@ -94,15 +94,9 @@
|
|||
/** Max memory to allow for a single texture image (in megabytes) */
|
||||
#define MAX_TEXTURE_MBYTES 1024
|
||||
|
||||
/** Number of 1D/2D texture mipmap levels */
|
||||
/** Number of texture mipmap levels */
|
||||
#define MAX_TEXTURE_LEVELS 15
|
||||
|
||||
/** Number of 3D texture mipmap levels */
|
||||
#define MAX_3D_TEXTURE_LEVELS 15
|
||||
|
||||
/** Number of cube texture mipmap levels - GL_ARB_texture_cube_map */
|
||||
#define MAX_CUBE_TEXTURE_LEVELS 15
|
||||
|
||||
/** Maximum rectangular texture size - GL_NV_texture_rectangle */
|
||||
#define MAX_TEXTURE_RECT_SIZE 16384
|
||||
|
||||
|
|
|
|||
|
|
@ -551,8 +551,8 @@ _mesa_init_constants(struct gl_constants *consts, gl_api api)
|
|||
/* Constants, may be overriden (usually only reduced) by device drivers */
|
||||
consts->MaxTextureMbytes = MAX_TEXTURE_MBYTES;
|
||||
consts->MaxTextureSize = 1 << (MAX_TEXTURE_LEVELS - 1);
|
||||
consts->Max3DTextureLevels = MAX_3D_TEXTURE_LEVELS;
|
||||
consts->MaxCubeTextureLevels = MAX_CUBE_TEXTURE_LEVELS;
|
||||
consts->Max3DTextureLevels = MAX_TEXTURE_LEVELS;
|
||||
consts->MaxCubeTextureLevels = MAX_TEXTURE_LEVELS;
|
||||
consts->MaxTextureRectSize = MAX_TEXTURE_RECT_SIZE;
|
||||
consts->MaxArrayTextureLayers = MAX_ARRAY_TEXTURE_LAYERS;
|
||||
consts->MaxTextureCoordUnits = MAX_TEXTURE_COORD_UNITS;
|
||||
|
|
@ -793,14 +793,10 @@ check_context_limits(struct gl_context *ctx)
|
|||
|
||||
/* Texture size checks */
|
||||
assert(ctx->Const.MaxTextureSize <= (1 << (MAX_TEXTURE_LEVELS - 1)));
|
||||
assert(ctx->Const.Max3DTextureLevels <= MAX_3D_TEXTURE_LEVELS);
|
||||
assert(ctx->Const.MaxCubeTextureLevels <= MAX_CUBE_TEXTURE_LEVELS);
|
||||
assert(ctx->Const.Max3DTextureLevels <= MAX_TEXTURE_LEVELS);
|
||||
assert(ctx->Const.MaxCubeTextureLevels <= MAX_TEXTURE_LEVELS);
|
||||
assert(ctx->Const.MaxTextureRectSize <= MAX_TEXTURE_RECT_SIZE);
|
||||
|
||||
/* Texture level checks */
|
||||
assert(MAX_TEXTURE_LEVELS >= MAX_3D_TEXTURE_LEVELS);
|
||||
assert(MAX_TEXTURE_LEVELS >= MAX_CUBE_TEXTURE_LEVELS);
|
||||
|
||||
/* Max texture size should be <= max viewport size (render to texture) */
|
||||
assert(ctx->Const.MaxTextureSize <= ctx->Const.MaxViewportWidth);
|
||||
assert(ctx->Const.MaxTextureSize <= ctx->Const.MaxViewportHeight);
|
||||
|
|
|
|||
|
|
@ -92,11 +92,11 @@ void st_init_limits(struct pipe_screen *screen,
|
|||
|
||||
c->Max3DTextureLevels
|
||||
= _min(screen->get_param(screen, PIPE_CAP_MAX_TEXTURE_3D_LEVELS),
|
||||
MAX_3D_TEXTURE_LEVELS);
|
||||
MAX_TEXTURE_LEVELS);
|
||||
|
||||
c->MaxCubeTextureLevels
|
||||
= _min(screen->get_param(screen, PIPE_CAP_MAX_TEXTURE_CUBE_LEVELS),
|
||||
MAX_CUBE_TEXTURE_LEVELS);
|
||||
MAX_TEXTURE_LEVELS);
|
||||
|
||||
c->MaxTextureRectSize = _min(c->MaxTextureSize, MAX_TEXTURE_RECT_SIZE);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue