diff options
author | Lionel Landwerlin <[email protected]> | 2016-09-07 17:19:35 +0100 |
---|---|---|
committer | Lionel Landwerlin <[email protected]> | 2016-09-21 12:01:06 +0300 |
commit | 09394ee6cfe9df2c99373963794c60678da08b39 (patch) | |
tree | 01a4ff0b5a7a8c92fd949af3255c73240f888250 /src/intel/vulkan/anv_allocator.c | |
parent | 1f291369e430922821c6f9fe5d73998c0eb09501 (diff) |
anv: device: calculate compute thread numbers using subslices numbers
Signed-off-by: Lionel Landwerlin <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/intel/vulkan/anv_allocator.c')
-rw-r--r-- | src/intel/vulkan/anv_allocator.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/intel/vulkan/anv_allocator.c b/src/intel/vulkan/anv_allocator.c index c1687b98979..f694aee92d6 100644 --- a/src/intel/vulkan/anv_allocator.c +++ b/src/intel/vulkan/anv_allocator.c @@ -924,14 +924,15 @@ anv_scratch_pool_alloc(struct anv_device *device, struct anv_scratch_pool *pool, if (size == 0) { /* We own the lock. Allocate a buffer */ - struct gen_device_info *devinfo = &device->info; + struct anv_physical_device *physical_device = + &device->instance->physicalDevice; 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, + [MESA_SHADER_VERTEX] = physical_device->max_vs_threads, + [MESA_SHADER_TESS_CTRL] = physical_device->max_hs_threads, + [MESA_SHADER_TESS_EVAL] = physical_device->max_ds_threads, + [MESA_SHADER_GEOMETRY] = physical_device->max_gs_threads, + [MESA_SHADER_FRAGMENT] = physical_device->max_wm_threads, + [MESA_SHADER_COMPUTE] = physical_device->max_cs_threads, }; size = per_thread_scratch * max_threads[stage]; |