anv: increase ANV_MAX_STATE_SIZE_LOG2 limit to 1 MB
authorSamuel Iglesias Gonsálvez <siglesias@igalia.com>
Tue, 10 Jan 2017 11:44:32 +0000 (12:44 +0100)
committerSamuel Iglesias Gonsálvez <siglesias@igalia.com>
Tue, 17 Jan 2017 05:42:42 +0000 (06:42 +0100)
Fixes crash in dEQP-VK.ubo.random.all_shared_buffer.48 due to a
fragment shader code bigger than 128 kB.

This patch increases the allocation size limit to 1 MB.

v2:
- Increase it to 1 MB (Jason)
- Increase device->instruction_block_pool allocation size in
  anv_device.c (Jason)

Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/intel/vulkan/anv_device.c
src/intel/vulkan/anv_private.h

index 6349537d172ec893ba503debe129903d6f714695..f80a36a9400e040f5df714a8c33af59a4fcca537 100644 (file)
@@ -948,7 +948,7 @@ VkResult anv_CreateDevice(
    anv_state_pool_init(&device->dynamic_state_pool,
                        &device->dynamic_state_block_pool);
 
-   anv_block_pool_init(&device->instruction_block_pool, device, 128 * 1024);
+   anv_block_pool_init(&device->instruction_block_pool, device, 1024 * 1024);
    anv_state_pool_init(&device->instruction_state_pool,
                        &device->instruction_block_pool);
 
index 17b72368819ccf32efc5951ff1f6d9640a666504..75f2bde66a8a4e77cdd5fcece3e2ecef46ae3f6d 100644 (file)
@@ -388,7 +388,7 @@ struct anv_fixed_size_state_pool {
 };
 
 #define ANV_MIN_STATE_SIZE_LOG2 6
-#define ANV_MAX_STATE_SIZE_LOG2 17
+#define ANV_MAX_STATE_SIZE_LOG2 20
 
 #define ANV_STATE_BUCKETS (ANV_MAX_STATE_SIZE_LOG2 - ANV_MIN_STATE_SIZE_LOG2 + 1)