gallium: add PIPE_CAP_MAX_TEXTURE_MB

Allows driver to override the default value (1024) from mesa.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6754>
This commit is contained in:
Pierre-Eric Pelloux-Prayer
2020-09-14 10:49:29 +02:00
parent 2228835fb5
commit fc6df020e3
5 changed files with 7 additions and 2 deletions

View File

@@ -87,6 +87,8 @@ void st_init_limits(struct pipe_screen *screen,
c->MaxTextureSize = screen->get_param(screen, PIPE_CAP_MAX_TEXTURE_2D_SIZE);
c->MaxTextureSize = MIN2(c->MaxTextureSize, 1 << (MAX_TEXTURE_LEVELS - 1));
c->MaxTextureMbytes = MAX2(c->MaxTextureMbytes,
screen->get_param(screen, PIPE_CAP_MAX_TEXTURE_MB));
c->Max3DTextureLevels
= _min(screen->get_param(screen, PIPE_CAP_MAX_TEXTURE_3D_LEVELS),