Mesa (main): radv: Remove radv_util.c
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Apr 5 16:39:11 UTC 2022
Module: Mesa
Branch: main
Commit: dacd78fd5a2bdac50557fff59c30d52a2f64f5fd
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=dacd78fd5a2bdac50557fff59c30d52a2f64f5fd
Author: Konstantin Seurer <konstantin.seurer at gmail.com>
Date: Sun Apr 3 13:25:44 2022 +0200
radv: Remove radv_util.c
Signed-off-by: Konstantin Seurer <konstantin.seurer at gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15725>
---
src/amd/vulkan/meson.build | 1 -
src/amd/vulkan/radv_device.c | 6 ++--
src/amd/vulkan/radv_private.h | 5 ---
src/amd/vulkan/radv_util.c | 73 -------------------------------------------
4 files changed, 3 insertions(+), 82 deletions(-)
diff --git a/src/amd/vulkan/meson.build b/src/amd/vulkan/meson.build
index a1a29a31154..523782f281f 100644
--- a/src/amd/vulkan/meson.build
+++ b/src/amd/vulkan/meson.build
@@ -89,7 +89,6 @@ libradv_files = files(
'radv_spm.c',
'radv_sqtt.c',
'radv_query.c',
- 'radv_util.c',
'radv_wsi.c',
'si_cmd_buffer.c',
'vk_format.h',
diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c
index e9cfc3f7840..b0e9df2b283 100644
--- a/src/amd/vulkan/radv_device.c
+++ b/src/amd/vulkan/radv_device.c
@@ -633,7 +633,7 @@ radv_physical_device_try_create(struct radv_instance *instance, drmDevicePtr drm
drmFreeVersion(version);
if (instance->debug_flags & RADV_DEBUG_STARTUP)
- radv_logi("Found compatible device '%s'.", path);
+ fprintf(stderr, "radv: info: Found compatible device '%s'.\n", path);
}
#endif
@@ -1046,7 +1046,7 @@ radv_CreateInstance(const VkInstanceCreateInfo *pCreateInfo,
instance->perftest_flags = parse_debug_string(getenv("RADV_PERFTEST"), radv_perftest_options);
if (instance->debug_flags & RADV_DEBUG_STARTUP)
- radv_logi("Created an instance");
+ fprintf(stderr, "radv: info: Created an instance.\n");
instance->physical_devices_enumerated = false;
list_inithead(&instance->physical_devices);
@@ -1113,7 +1113,7 @@ radv_enumerate_physical_devices(struct radv_instance *instance)
int max_devices = drmGetDevices2(0, devices, ARRAY_SIZE(devices));
if (instance->debug_flags & RADV_DEBUG_STARTUP)
- radv_logi("Found %d drm nodes", max_devices);
+ fprintf(stderr, "radv: info: Found %d drm nodes.\n", max_devices);
if (max_devices < 1)
return vk_error(instance, VK_SUCCESS);
diff --git a/src/amd/vulkan/radv_private.h b/src/amd/vulkan/radv_private.h
index 648a8788e48..f3ae38a4b53 100644
--- a/src/amd/vulkan/radv_private.h
+++ b/src/amd/vulkan/radv_private.h
@@ -226,11 +226,6 @@ radv_float_to_ufixed(float value, unsigned frac_bits)
struct radv_image_view;
struct radv_instance;
-void radv_loge(const char *format, ...) radv_printflike(1, 2);
-void radv_loge_v(const char *format, va_list va);
-void radv_logi(const char *format, ...) radv_printflike(1, 2);
-void radv_logi_v(const char *format, va_list va);
-
/* A non-fatal assert. Useful for debugging. */
#ifdef NDEBUG
#define radv_assert(x) \
diff --git a/src/amd/vulkan/radv_util.c b/src/amd/vulkan/radv_util.c
deleted file mode 100644
index b8d3a22493a..00000000000
--- a/src/amd/vulkan/radv_util.c
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright © 2015 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include <assert.h>
-#include <errno.h>
-#include <stdarg.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "radv_debug.h"
-#include "radv_private.h"
-#include "vk_enum_to_str.h"
-
-#include "util/u_math.h"
-
-/** Log an error message. */
-void radv_printflike(1, 2) radv_loge(const char *format, ...)
-{
- va_list va;
-
- va_start(va, format);
- radv_loge_v(format, va);
- va_end(va);
-}
-
-/** \see radv_loge() */
-void
-radv_loge_v(const char *format, va_list va)
-{
- fprintf(stderr, "vk: error: ");
- vfprintf(stderr, format, va);
- fprintf(stderr, "\n");
-}
-
-/** Log an error message. */
-void radv_printflike(1, 2) radv_logi(const char *format, ...)
-{
- va_list va;
-
- va_start(va, format);
- radv_logi_v(format, va);
- va_end(va);
-}
-
-/** \see radv_logi() */
-void
-radv_logi_v(const char *format, va_list va)
-{
- fprintf(stderr, "radv: info: ");
- vfprintf(stderr, format, va);
- fprintf(stderr, "\n");
-}
More information about the mesa-commit
mailing list