diff options
author | Tom Stellard <thomas.stellard@amd.com> | 2012-09-13 17:09:03 +0000 |
---|---|---|
committer | Tom Stellard <thomas.stellard@amd.com> | 2012-09-21 20:42:11 +0000 |
commit | 57c51b2d6570b11870f9b09579586648a8e1253d (patch) | |
tree | ffb0bb73e5e785d4a191c37a5a8d40d5498d3085 | |
parent | 54f69cbedb4a1a7bc389e8f11efc0e42a0b445a5 (diff) |
r600g: Re-enable growing of the compute memory poolSep24-Compute
-rw-r--r-- | src/gallium/drivers/r600/compute_memory_pool.c | 15 | ||||
-rw-r--r-- | src/gallium/drivers/r600/r600_pipe.c | 7 |
2 files changed, 4 insertions, 18 deletions
diff --git a/src/gallium/drivers/r600/compute_memory_pool.c b/src/gallium/drivers/r600/compute_memory_pool.c index b96ad466404..1dd8db866db 100644 --- a/src/gallium/drivers/r600/compute_memory_pool.c +++ b/src/gallium/drivers/r600/compute_memory_pool.c @@ -92,10 +92,7 @@ static void compute_memory_pool_init(struct compute_memory_pool * pool, COMPUTE_DBG("* compute_memory_pool_init() initial_size_in_dw = %ld\n", initial_size_in_dw); - /* XXX: pool->shadow is used when the buffer needs to be resized, but - * resizing does not work at the moment. - * pool->shadow = (uint32_t*)CALLOC(4, pool->size_in_dw); - */ + pool->shadow = (uint32_t*)CALLOC(initial_size_in_dw, 4); pool->next_id = 1; pool->size_in_dw = initial_size_in_dw; pool->bo = (struct r600_resource*)create_pool_texture(pool->screen, @@ -197,19 +194,9 @@ void compute_memory_grow_pool(struct compute_memory_pool* pool, assert(new_size_in_dw >= pool->size_in_dw); - assert(!pool->bo && "Growing the global memory pool is not yet " - "supported. You will see this message if you are trying to" - "use more than 64 kb of memory"); - if (!pool->bo) { compute_memory_pool_init(pool, MAX2(new_size_in_dw, 1024 * 16)); } else { - /* XXX: Growing memory pools does not work at the moment. I think - * it is because we are using fragment shaders to copy data to - * the new texture and some of the compute registers are being - * included in the 3D command stream. */ - fprintf(stderr, "Warning: growing the global memory pool to" - "more than 64 kb is not yet supported\n"); new_size_in_dw += 1024 - (new_size_in_dw % 1024); COMPUTE_DBG(" Aligned size = %d\n", new_size_in_dw); diff --git a/src/gallium/drivers/r600/r600_pipe.c b/src/gallium/drivers/r600/r600_pipe.c index 55db78ce572..2f61a93cf65 100644 --- a/src/gallium/drivers/r600/r600_pipe.c +++ b/src/gallium/drivers/r600/r600_pipe.c @@ -643,10 +643,9 @@ static int r600_get_compute_param(struct pipe_screen *screen, case PIPE_COMPUTE_CAP_MAX_GLOBAL_SIZE: if (ret) { uint64_t * max_global_size = ret; - /* XXX: This is 64kb for now until we get the - * compute memory pool working correctly. - */ - *max_global_size = 1024 * 16 * 4; + /* XXX: This is what the proprietary driver reports, we + * may want to use a different value. */ + *max_global_size = 201326592; } return sizeof(uint64_t); |