diff options
author | Jason Ekstrand <[email protected]> | 2016-06-16 15:26:54 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2016-06-22 12:39:45 -0700 |
commit | c2f2c8e407207c31c29aab5570d23cd6e98d287a (patch) | |
tree | ad4cecf8a32a0293e0c63d1a5f91353f860d083f /src/intel/vulkan/genX_pipeline.c | |
parent | 45c0f60999587ed29a7a9b81f09950dd8f58fb49 (diff) |
anv: Use different BOs for different scratch sizes and stages
This solves a race condition where we can end up having different stages
stomp on each other because they're all trying to scratch in the same BO
but they have different views of its layout.
Signed-off-by: Jason Ekstrand <[email protected]>
Cc: "12.0" <[email protected]>
Diffstat (limited to 'src/intel/vulkan/genX_pipeline.c')
-rw-r--r-- | src/intel/vulkan/genX_pipeline.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/intel/vulkan/genX_pipeline.c b/src/intel/vulkan/genX_pipeline.c index 736044889b8..5cbcfd2e48a 100644 --- a/src/intel/vulkan/genX_pipeline.c +++ b/src/intel/vulkan/genX_pipeline.c @@ -64,7 +64,6 @@ genX(compute_pipeline_create)( * of various prog_data pointers. Make them NULL by default. */ memset(pipeline->prog_data, 0, sizeof(pipeline->prog_data)); - memset(pipeline->scratch_start, 0, sizeof(pipeline->scratch_start)); memset(pipeline->bindings, 0, sizeof(pipeline->bindings)); pipeline->vs_simd8 = NO_KERNEL; @@ -72,7 +71,6 @@ genX(compute_pipeline_create)( pipeline->gs_kernel = NO_KERNEL; pipeline->active_stages = 0; - pipeline->total_scratch = 0; pipeline->needs_data_cache = false; @@ -103,8 +101,10 @@ genX(compute_pipeline_create)( anv_batch_emit(&pipeline->batch, GENX(MEDIA_VFE_STATE), vfe) { vfe.ScratchSpaceBasePointer = (struct anv_address) { - .bo = NULL, - .offset = pipeline->scratch_start[MESA_SHADER_COMPUTE], + .bo = anv_scratch_pool_alloc(device, &device->scratch_pool, + MESA_SHADER_COMPUTE, + cs_prog_data->base.total_scratch), + .offset = 0, }; vfe.PerThreadScratchSpace = ffs(cs_prog_data->base.total_scratch / 2048); #if GEN_GEN > 7 |