diff options
author | Eric Anholt <[email protected]> | 2019-04-29 15:38:24 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2019-05-13 12:03:08 -0700 |
commit | 0c31fe9ee743f699bcabcb638ccc83e515f0d1bd (patch) | |
tree | 7a8e3fba596796d27e75bc40ba110c24a13c0dec /src/gallium/auxiliary | |
parent | f33cb272f0890f115c36fb96173123bc699b7b2c (diff) |
gallium: Redefine the max texture 2d cap from _LEVELS to _SIZE.
The _LEVELS assumes that the max is always power of two. For V3D 4.2, we
can support up to 7680 non-power-of-two MSAA textures, which will let X11
support dual 4k displays on newer hardware.
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r-- | src/gallium/auxiliary/util/u_screen.c | 2 | ||||
-rw-r--r-- | src/gallium/auxiliary/vl/vl_video_buffer.c | 6 |
2 files changed, 2 insertions, 6 deletions
diff --git a/src/gallium/auxiliary/util/u_screen.c b/src/gallium/auxiliary/util/u_screen.c index 410f17421e6..f1f9bfa0d62 100644 --- a/src/gallium/auxiliary/util/u_screen.c +++ b/src/gallium/auxiliary/util/u_screen.c @@ -51,7 +51,7 @@ u_pipe_screen_get_param_defaults(struct pipe_screen *pscreen, case PIPE_CAP_TEXTURE_SWIZZLE: return 0; - case PIPE_CAP_MAX_TEXTURE_2D_LEVELS: + case PIPE_CAP_MAX_TEXTURE_2D_SIZE: case PIPE_CAP_MAX_TEXTURE_3D_LEVELS: case PIPE_CAP_MAX_TEXTURE_CUBE_LEVELS: unreachable("driver must implement these."); diff --git a/src/gallium/auxiliary/vl/vl_video_buffer.c b/src/gallium/auxiliary/vl/vl_video_buffer.c index 5b54ee1dd68..71b8f88b2a4 100644 --- a/src/gallium/auxiliary/vl/vl_video_buffer.c +++ b/src/gallium/auxiliary/vl/vl_video_buffer.c @@ -206,11 +206,7 @@ vl_video_buffer_is_format_supported(struct pipe_screen *screen, unsigned vl_video_buffer_max_size(struct pipe_screen *screen) { - uint32_t max_2d_texture_level; - - max_2d_texture_level = screen->get_param(screen, PIPE_CAP_MAX_TEXTURE_2D_LEVELS); - - return 1 << (max_2d_texture_level-1); + return screen->get_param(screen, PIPE_CAP_MAX_TEXTURE_2D_SIZE); } void |