radv: fix setting results for initialization failures in thread trace and trap handler
Reviewed-by: Tatsuyuki Ishi <ishitatsuyuki@gmail.com> Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19083>
This commit is contained in:

committed by
Marge Bot

parent
0e782d9609
commit
c7e9268658
@@ -3667,8 +3667,10 @@ radv_CreateDevice(VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo *pCr
|
|||||||
*/
|
*/
|
||||||
keep_shader_info = true;
|
keep_shader_info = true;
|
||||||
|
|
||||||
if (!radv_init_trace(device))
|
if (!radv_init_trace(device)) {
|
||||||
|
result = VK_ERROR_INITIALIZATION_FAILED;
|
||||||
goto fail;
|
goto fail;
|
||||||
|
}
|
||||||
|
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"*****************************************************************************\n");
|
"*****************************************************************************\n");
|
||||||
@@ -3694,8 +3696,10 @@ radv_CreateDevice(VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo *pCr
|
|||||||
abort();
|
abort();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!radv_thread_trace_init(device))
|
if (!radv_thread_trace_init(device)) {
|
||||||
|
result = VK_ERROR_INITIALIZATION_FAILED;
|
||||||
goto fail;
|
goto fail;
|
||||||
|
}
|
||||||
|
|
||||||
fprintf(stderr, "radv: Thread trace support is enabled (initial buffer size: %u MiB, "
|
fprintf(stderr, "radv: Thread trace support is enabled (initial buffer size: %u MiB, "
|
||||||
"instruction timing: %s, cache counters: %s).\n",
|
"instruction timing: %s, cache counters: %s).\n",
|
||||||
@@ -3705,8 +3709,10 @@ radv_CreateDevice(VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo *pCr
|
|||||||
|
|
||||||
if (radv_spm_trace_enabled()) {
|
if (radv_spm_trace_enabled()) {
|
||||||
if (device->physical_device->rad_info.gfx_level >= GFX10) {
|
if (device->physical_device->rad_info.gfx_level >= GFX10) {
|
||||||
if (!radv_spm_init(device))
|
if (!radv_spm_init(device)) {
|
||||||
|
result = VK_ERROR_INITIALIZATION_FAILED;
|
||||||
goto fail;
|
goto fail;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
fprintf(stderr, "radv: SPM isn't supported for this GPU (%s)!\n",
|
fprintf(stderr, "radv: SPM isn't supported for this GPU (%s)!\n",
|
||||||
device->physical_device->name);
|
device->physical_device->name);
|
||||||
@@ -3727,9 +3733,11 @@ radv_CreateDevice(VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo *pCr
|
|||||||
*/
|
*/
|
||||||
keep_shader_info = true;
|
keep_shader_info = true;
|
||||||
|
|
||||||
if (!radv_trap_handler_init(device))
|
if (!radv_trap_handler_init(device)) {
|
||||||
|
result = VK_ERROR_INITIALIZATION_FAILED;
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (device->physical_device->rad_info.gfx_level >= GFX10_3) {
|
if (device->physical_device->rad_info.gfx_level >= GFX10_3) {
|
||||||
if (getenv("RADV_FORCE_VRS_CONFIG_FILE")) {
|
if (getenv("RADV_FORCE_VRS_CONFIG_FILE")) {
|
||||||
|
Reference in New Issue
Block a user