summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2019-04-29 15:38:24 -0700
committerEric Anholt <[email protected]>2019-05-13 12:03:08 -0700
commit0c31fe9ee743f699bcabcb638ccc83e515f0d1bd (patch)
tree7a8e3fba596796d27e75bc40ba110c24a13c0dec /src/gallium/drivers/r600
parentf33cb272f0890f115c36fb96173123bc699b7b2c (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/drivers/r600')
-rw-r--r--src/gallium/drivers/r600/r600_pipe.c6
-rw-r--r--src/gallium/drivers/r600/r600_test_dma.c5
2 files changed, 7 insertions, 4 deletions
diff --git a/src/gallium/drivers/r600/r600_pipe.c b/src/gallium/drivers/r600/r600_pipe.c
index 41a878ab9d2..5c915e0f91a 100644
--- a/src/gallium/drivers/r600/r600_pipe.c
+++ b/src/gallium/drivers/r600/r600_pipe.c
@@ -497,7 +497,11 @@ static int r600_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
return 2048;
/* Texturing. */
- case PIPE_CAP_MAX_TEXTURE_2D_LEVELS:
+ case PIPE_CAP_MAX_TEXTURE_2D_SIZE:
+ if (family >= CHIP_CEDAR)
+ return 16384;
+ else
+ return 8192;
case PIPE_CAP_MAX_TEXTURE_CUBE_LEVELS:
if (family >= CHIP_CEDAR)
return 15;
diff --git a/src/gallium/drivers/r600/r600_test_dma.c b/src/gallium/drivers/r600/r600_test_dma.c
index af86ad386f6..512e7742021 100644
--- a/src/gallium/drivers/r600/r600_test_dma.c
+++ b/src/gallium/drivers/r600/r600_test_dma.c
@@ -177,11 +177,10 @@ void r600_test_dma(struct r600_common_screen *rscreen)
struct pipe_context *ctx = screen->context_create(screen, NULL, 0);
struct r600_common_context *rctx = (struct r600_common_context*)ctx;
uint64_t max_alloc_size;
- unsigned i, iterations, num_partial_copies, max_levels, max_tex_side;
+ unsigned i, iterations, num_partial_copies, max_tex_side;
unsigned num_pass = 0, num_fail = 0;
- max_levels = screen->get_param(screen, PIPE_CAP_MAX_TEXTURE_2D_LEVELS);
- max_tex_side = 1 << (max_levels - 1);
+ max_tex_side = screen->get_param(screen, PIPE_CAP_MAX_TEXTURE_2D_SIZE);
/* Max 128 MB allowed for both textures. */
max_alloc_size = 128 * 1024 * 1024;