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/anv_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/anv_pipeline.c')
-rw-r--r-- | src/intel/vulkan/anv_pipeline.c | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/src/intel/vulkan/anv_pipeline.c b/src/intel/vulkan/anv_pipeline.c index 295b48cf492..29747cf6c4a 100644 --- a/src/intel/vulkan/anv_pipeline.c +++ b/src/intel/vulkan/anv_pipeline.c @@ -397,22 +397,8 @@ anv_pipeline_add_compiled_stage(struct anv_pipeline *pipeline, const struct brw_stage_prog_data *prog_data, struct anv_pipeline_bind_map *map) { - struct brw_device_info *devinfo = &pipeline->device->info; - uint32_t max_threads[] = { - [MESA_SHADER_VERTEX] = devinfo->max_vs_threads, - [MESA_SHADER_TESS_CTRL] = devinfo->max_hs_threads, - [MESA_SHADER_TESS_EVAL] = devinfo->max_ds_threads, - [MESA_SHADER_GEOMETRY] = devinfo->max_gs_threads, - [MESA_SHADER_FRAGMENT] = devinfo->max_wm_threads, - [MESA_SHADER_COMPUTE] = devinfo->max_cs_threads, - }; - pipeline->prog_data[stage] = prog_data; pipeline->active_stages |= mesa_to_vk_shader_stage(stage); - pipeline->scratch_start[stage] = pipeline->total_scratch; - pipeline->total_scratch = - align_u32(pipeline->total_scratch, 1024) + - prog_data->total_scratch * max_threads[stage]; pipeline->bindings[stage] = *map; } @@ -1176,7 +1162,6 @@ anv_pipeline_init(struct anv_pipeline *pipeline, * 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; @@ -1185,7 +1170,6 @@ anv_pipeline_init(struct anv_pipeline *pipeline, pipeline->ps_ksp0 = NO_KERNEL; pipeline->active_stages = 0; - pipeline->total_scratch = 0; const VkPipelineShaderStageCreateInfo *pStages[MESA_SHADER_STAGES] = { 0, }; struct anv_shader_module *modules[MESA_SHADER_STAGES] = { 0, }; @@ -1278,10 +1262,6 @@ anv_pipeline_init(struct anv_pipeline *pipeline, if (extra && extra->use_rectlist) pipeline->topology = _3DPRIM_RECTLIST; - while (anv_block_pool_size(&device->scratch_block_pool) < - pipeline->total_scratch) - anv_block_pool_alloc(&device->scratch_block_pool); - return VK_SUCCESS; } |