Mesa (main): radv: do not abort if SPM isn't supported for the current GPU

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Jul 4 11:50:29 UTC 2022


Module: Mesa
Branch: main
Commit: 25d5ef0450639b48c96d11acf64577cd991a14ba
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=25d5ef0450639b48c96d11acf64577cd991a14ba

Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date:   Wed Jun 29 11:04:00 2022 +0200

radv: do not abort if SPM isn't supported for the current GPU

In a mixed GFX9/GFX10 setup, this would crash for the GFX9 logical
device. Just print a message intead of aborting.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17292>

---

 src/amd/vulkan/radv_device.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c
index e3df1f7d27b..3db01f6e4b3 100644
--- a/src/amd/vulkan/radv_device.c
+++ b/src/amd/vulkan/radv_device.c
@@ -3424,13 +3424,13 @@ radv_CreateDevice(VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo *pCr
               radv_spm_trace_enabled() ? "enabled" : "disabled");
 
       if (radv_spm_trace_enabled()) {
-         if (device->physical_device->rad_info.gfx_level < GFX10) {
-            fprintf(stderr, "SPM isn't supported for this GPU!\n");
-            abort();
+         if (device->physical_device->rad_info.gfx_level >= GFX10) {
+            if (!radv_spm_init(device))
+               goto fail;
+         } else {
+            fprintf(stderr, "radv: SPM isn't supported for this GPU (%s)!\n",
+                    device->physical_device->name);
          }
-
-         if (!radv_spm_init(device))
-            goto fail;
       }
    }
 



More information about the mesa-commit mailing list