pvr: reorder device setup to create the compiler context earlier
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com> Acked-by: Frank Binns <frank.binns@imgtec.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33998>
This commit is contained in:
committed by
Marge Bot
parent
ba4628a094
commit
2983d23e63
@@ -812,18 +812,12 @@ static VkResult pvr_physical_device_init(struct pvr_physical_device *pdevice,
|
||||
VK_MEMORY_PROPERTY_HOST_COHERENT_BIT;
|
||||
pdevice->memory.memoryTypes[0].heapIndex = 0;
|
||||
|
||||
result = pvr_wsi_init(pdevice);
|
||||
if (result != VK_SUCCESS) {
|
||||
vk_error(instance, result);
|
||||
goto err_free_pipeline_cache;
|
||||
}
|
||||
|
||||
pdevice->compiler = rogue_compiler_create(&pdevice->dev_info);
|
||||
if (!pdevice->compiler) {
|
||||
result = vk_errorf(instance,
|
||||
VK_ERROR_INITIALIZATION_FAILED,
|
||||
"Failed to initialize Rogue compiler");
|
||||
goto err_wsi_finish;
|
||||
goto err_free_pipeline_cache;
|
||||
}
|
||||
|
||||
pdevice->pco_ctx = pco_ctx_create(&pdevice->dev_info, NULL);
|
||||
@@ -832,13 +826,22 @@ static VkResult pvr_physical_device_init(struct pvr_physical_device *pdevice,
|
||||
result = vk_errorf(instance,
|
||||
VK_ERROR_INITIALIZATION_FAILED,
|
||||
"Failed to initialize PCO compiler context");
|
||||
goto err_wsi_finish;
|
||||
goto err_free_compiler;
|
||||
}
|
||||
|
||||
result = pvr_wsi_init(pdevice);
|
||||
if (result != VK_SUCCESS) {
|
||||
vk_error(instance, result);
|
||||
goto err_free_pco_ctx;
|
||||
}
|
||||
|
||||
return VK_SUCCESS;
|
||||
|
||||
err_wsi_finish:
|
||||
pvr_wsi_finish(pdevice);
|
||||
err_free_pco_ctx:
|
||||
ralloc_free(pdevice->pco_ctx);
|
||||
|
||||
err_free_compiler:
|
||||
ralloc_free(pdevice->compiler);
|
||||
|
||||
err_free_pipeline_cache:
|
||||
pvr_physical_device_free_pipeline_cache(pdevice);
|
||||
|
||||
Reference in New Issue
Block a user