Module: Mesa
Branch: master
Commit: 9adbaeff8526bd8e895ff083d2494a4f4eac0783
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=9adbaeff8526bd8e895ff083d2494a4f4eac0783

Author: Iago Toral Quiroga <[email protected]>
Date:   Tue Dec  1 11:51:02 2020 +0100

v3dv: move error string definition to debug path

No point in computing this if debug is disabled.

Reviewed-by: Alejandro PiƱeiro <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7848>

---

 src/broadcom/vulkan/v3dv_util.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/broadcom/vulkan/v3dv_util.c b/src/broadcom/vulkan/v3dv_util.c
index a1fe59e99b6..d26369f9f56 100644
--- a/src/broadcom/vulkan/v3dv_util.c
+++ b/src/broadcom/vulkan/v3dv_util.c
@@ -45,12 +45,12 @@ __vk_errorf(struct v3dv_instance *instance, VkResult error, 
const char *file,
    va_list ap;
    char buffer[256];
 
-   const char *error_str = vk_Result_to_str(error);
-
 #ifndef DEBUG
       return error;
 #endif
 
+   const char *error_str = vk_Result_to_str(error);
+
    if (format) {
       va_start(ap, format);
       vsnprintf(buffer, sizeof(buffer), format, ap);

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to