summaryrefslogtreecommitdiffstats
path: root/src/gallium/winsys/amdgpu
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2016-10-04 23:29:27 +0200
committerMarek Olšák <[email protected]>2016-10-05 21:03:54 +0200
commit844f8268e1cde496a854a72e080558f3c5700583 (patch)
treeeb5747f34cd4036d8c89eec85dcdaf80aa2ed069 /src/gallium/winsys/amdgpu
parent1b37e5541c7d74c50124e5220936bd4b0234df6d (diff)
gallium/radeon/winsyses: set reasonable max_alloc_size
which is returned for GL_MAX_TEXTURE_BUFFER_SIZE. It doesn't have any other use at the moment. Bigger allocations are not rejected. This fixes GL45-CTS.texture_buffer.texture_buffer_max_size on Bonaire. Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/winsys/amdgpu')
-rw-r--r--src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c b/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c
index c28e1ca373c..98d72bd9f2c 100644
--- a/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c
+++ b/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c
@@ -318,8 +318,8 @@ static bool do_winsys_init(struct amdgpu_winsys *ws, int fd)
/* Set hardware information. */
ws->info.gart_size = gtt.heap_size;
ws->info.vram_size = vram.heap_size;
- /* TODO: the kernel reports vram/gart.max_allocation == 251 MB (bug?) */
- ws->info.max_alloc_size = MAX2(ws->info.vram_size, ws->info.gart_size);
+ /* The kernel can split large buffers, so we can do large allocations. */
+ ws->info.max_alloc_size = MAX2(ws->info.vram_size, ws->info.gart_size) * 0.9;
/* convert the shader clock from KHz to MHz */
ws->info.max_shader_clock = ws->amdinfo.max_engine_clk / 1000;
ws->info.max_se = ws->amdinfo.num_shader_engines;