summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/anv_allocator.c
diff options
context:
space:
mode:
authorLionel Landwerlin <[email protected]>2016-09-23 01:04:25 +0300
committerLionel Landwerlin <[email protected]>2016-09-23 10:12:06 +0300
commit6b21728c4a4f89754a79fe754e0c8496c25d9b66 (patch)
tree9afb4306e1012fbe7d34ec0157ce6a00c8428a0f /src/intel/vulkan/anv_allocator.c
parent94d0e7dc0848a5f70a550f2294e459eab51ace8f (diff)
anv: get rid of duplicated values from gen_device_info
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.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/intel/vulkan/anv_allocator.c b/src/intel/vulkan/anv_allocator.c
index a59ad3cd6f2..83a701e0b0d 100644
--- a/src/intel/vulkan/anv_allocator.c
+++ b/src/intel/vulkan/anv_allocator.c
@@ -924,8 +924,9 @@ anv_scratch_pool_alloc(struct anv_device *device, struct anv_scratch_pool *pool,
if (size == 0) {
/* We own the lock. Allocate a buffer */
- struct anv_physical_device *physical_device =
+ const struct anv_physical_device *physical_device =
&device->instance->physicalDevice;
+ const struct gen_device_info *devinfo = &physical_device->info;
/* WaCSScratchSize:hsw
*
@@ -944,14 +945,14 @@ anv_scratch_pool_alloc(struct anv_device *device, struct anv_scratch_pool *pool,
*/
const unsigned subslices = MAX2(physical_device->subslice_total, 1);
const unsigned scratch_ids_per_subslice =
- device->info.is_haswell ? 16 * 8 : physical_device->max_cs_threads;
+ device->info.is_haswell ? 16 * 8 : devinfo->max_cs_threads;
uint32_t max_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_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] = scratch_ids_per_subslice * subslices,
};