anv: Put back code to grow shader scratch space
authorKristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
Wed, 27 Jan 2016 19:36:44 +0000 (11:36 -0800)
committerKristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
Wed, 27 Jan 2016 19:36:56 +0000 (11:36 -0800)
This was lost in commit a71e614d33e8d869bbaced8948349a7180783ab7.

src/vulkan/anv_pipeline.c

index 40f26d708ee560cec809a3bbcfcd94c240bd013b..e879b35388d96fd6724ef4030617e0fac355dea3 100644 (file)
@@ -1182,6 +1182,10 @@ 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;
 }