vkr: replace vrend_printf by vkr_log

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Acked-by: Gert Wollny <gert.wollny@collabora.com>
macos/master
Chia-I Wu 3 years ago
parent ec5275adbf
commit e473430d1f
  1. 6
      src/venus/vkr_context.c
  2. 7
      src/venus/vkr_device.c
  3. 2
      src/venus/vkr_instance.c
  4. 4
      src/venus/vkr_renderer.h
  5. 2
      src/venus/vkr_transport.c

@ -30,7 +30,7 @@
static void
vkr_dispatch_debug_log(UNUSED struct vn_dispatch_context *dispatch, const char *msg)
{
vrend_printf("vkr: %s\n", msg);
vkr_log(msg);
}
static void
@ -383,7 +383,7 @@ vkr_context_transfer_3d_locked(struct virgl_context *base,
/* TODO transfer via dmabuf (and find a solution to coherency issues) */
if (LIST_IS_EMPTY(&att->memories)) {
vrend_printf("unable to transfer without VkDeviceMemory (TODO)");
vkr_log("unable to transfer without VkDeviceMemory (TODO)");
return EINVAL;
}
@ -504,7 +504,7 @@ vkr_context_destroy(struct virgl_context *base)
}
if (ctx->instance) {
vrend_printf("destroying context with a valid instance");
vkr_log("destroying context with a valid instance");
vkr_instance_destroy(ctx, ctx->instance);
}

@ -322,8 +322,7 @@ vkr_device_object_destroy(struct vkr_context *ctx,
case VK_OBJECT_TYPE_COMMAND_BUFFER: /* pool objects */
case VK_OBJECT_TYPE_DESCRIPTOR_SET: /* pool objects */
default:
vrend_printf("Unhandled vkr_object(%p) with VkObjectType(%u)\n", obj,
(uint32_t)obj->type);
vkr_log("Unhandled vkr_object(%p) with VkObjectType(%u)", obj, (uint32_t)obj->type);
assert(false);
break;
};
@ -339,10 +338,10 @@ vkr_device_destroy(struct vkr_context *ctx, struct vkr_device *dev)
VkDevice device = dev->base.handle.device;
VkResult ret = vkDeviceWaitIdle(device);
if (ret != VK_SUCCESS)
vrend_printf("vkDeviceWaitIdle(%p) failed(%d)", dev, (int32_t)ret);
vkr_log("vkDeviceWaitIdle(%p) failed(%d)", dev, (int32_t)ret);
if (!LIST_IS_EMPTY(&dev->objects)) {
vrend_printf("destroying device with valid objects");
vkr_log("destroying device with valid objects");
struct vkr_object *obj, *obj_tmp;
LIST_FOR_EACH_ENTRY_SAFE (obj, obj_tmp, &dev->objects, track_head)

@ -72,7 +72,7 @@ vkr_validation_callback(UNUSED VkDebugUtilsMessageSeverityFlagBitsEXT messageSev
{
struct vkr_context *ctx = pUserData;
vrend_printf("%s\n", pCallbackData->pMessage);
vkr_log(pCallbackData->pMessage);
if (!ctx->validate_fatal)
return false;

@ -12,7 +12,7 @@
#include <stdint.h>
#include "os/os_misc.h"
#include "vrend_debug.h"
#include "virgl_util.h"
#define VKR_RENDERER_THREAD_SYNC (1u << 0)
#define VKR_RENDERER_MULTI_PROCESS (1u << 1)
@ -44,7 +44,7 @@ vkr_context_create(size_t debug_len, const char *debug_name);
static inline int
vkr_renderer_init(UNUSED uint32_t flags)
{
vrend_printf("Vulkan support was not enabled in virglrenderer\n");
virgl_log("Vulkan support was not enabled in virglrenderer\n");
return -1;
}

@ -181,7 +181,7 @@ vkr_dispatch_vkCreateRingMESA(struct vn_dispatch_context *dispatch,
/* TODO support scatter-gather or require logically contiguous resources */
if (att->resource->iov_count != 1) {
vrend_printf("vkr: no scatter-gather support for ring buffers (TODO)");
vkr_log("no scatter-gather support for ring buffers (TODO)");
vkr_cs_decoder_set_fatal(&ctx->decoder);
return;
}

Loading…
Cancel
Save