diff options
author | Jonathan Charest <[email protected]> | 2013-07-22 09:24:56 -0400 |
---|---|---|
committer | Tom Stellard <[email protected]> | 2013-07-30 07:09:16 -0700 |
commit | 4f8048bb5a8558ae4313b12ffd70b593cc629fe8 (patch) | |
tree | 36c896c1a6ebf72bb6035b677017541dff30358d /src/gallium | |
parent | d9576598c7e1c6e4fee913a918345190248a9d19 (diff) |
r600g/compute: Added missing address space checking of kernel parameters
To have non-static buffers in local memory, it is necessary to pass them
as arguments to the kernel.
For r600, the correct lds size must be set to the SQ_LDS_ALLOC register.
The correct size is the clover size plus the size reported by the
compiler.
Reviewed-by: Tom Stellard <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/r600/evergreen_compute.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/gallium/drivers/r600/evergreen_compute.c b/src/gallium/drivers/r600/evergreen_compute.c index f76fc9cc25e..9b2bae3e841 100644 --- a/src/gallium/drivers/r600/evergreen_compute.c +++ b/src/gallium/drivers/r600/evergreen_compute.c @@ -211,8 +211,7 @@ void *evergreen_create_compute_state( #endif shader->ctx = (struct r600_context*)ctx; - /* XXX: We ignore cso->req_local_mem, because we compute this value - * ourselves on a per-kernel basis. */ + shader->local_size = cso->req_local_mem; shader->private_size = cso->req_private_mem; shader->input_size = cso->req_input_mem; @@ -334,7 +333,7 @@ static void evergreen_emit_direct_dispatch( unsigned wave_divisor = (16 * num_pipes); int group_size = 1; int grid_size = 1; - unsigned lds_size = shader->active_kernel->bc.nlds_dw; + unsigned lds_size = shader->local_size / 4 + shader->active_kernel->bc.nlds_dw; /* Calculate group_size/grid_size */ for (i = 0; i < 3; i++) { |