v3dv: move error string definition to debug path

No point in computing this if debug is disabled.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7848>
This commit is contained in:
Iago Toral Quiroga
2020-12-01 11:51:02 +01:00
committed by Marge Bot
parent 4679a3855f
commit 9adbaeff85
+2 -2
View File
@@ -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);