diff options
author | Jason Ekstrand <[email protected]> | 2020-01-17 22:23:30 -0600 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-01-20 22:08:52 +0000 |
commit | 70e8064e131467527e70a681ac6cf763587bd8bf (patch) | |
tree | 12aab6d26dcf8c3aed8751225fde15086bae53ad /src/intel/vulkan/genX_pipeline.c | |
parent | 735a3ba00765baa717ff541fb5aa5105dc816ad7 (diff) |
anv: Add an anv_physical_device field to anv_device
Having to always pull the physical device from the instance has been
annoying for almost as long as the driver has existed. It also won't
work in a world where we ever have more than one physical device. This
commit adds a new field called "physical" to anv_device and switches
every location where we use device->instance->physicalDevice to use the
new field instead.
Reviewed-by: Lionel Landwerlin <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3461>
Diffstat (limited to 'src/intel/vulkan/genX_pipeline.c')
-rw-r--r-- | src/intel/vulkan/genX_pipeline.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/intel/vulkan/genX_pipeline.c b/src/intel/vulkan/genX_pipeline.c index 73b187f8362..e508389031d 100644 --- a/src/intel/vulkan/genX_pipeline.c +++ b/src/intel/vulkan/genX_pipeline.c @@ -2192,9 +2192,7 @@ compute_pipeline_create( VkPipeline* pPipeline) { ANV_FROM_HANDLE(anv_device, device, _device); - const struct anv_physical_device *physical_device = - &device->instance->physicalDevice; - const struct gen_device_info *devinfo = &physical_device->info; + const struct gen_device_info *devinfo = &device->info; struct anv_pipeline *pipeline; VkResult result; @@ -2267,7 +2265,7 @@ compute_pipeline_create( ALIGN(cs_prog_data->push.per_thread.regs * cs_prog_data->threads + cs_prog_data->push.cross_thread.regs, 2); - const uint32_t subslices = MAX2(physical_device->subslice_total, 1); + const uint32_t subslices = MAX2(device->physical->subslice_total, 1); const struct anv_shader_bin *cs_bin = pipeline->shaders[MESA_SHADER_COMPUTE]; |