Files
test2/source/blender/gpu/vulkan/vk_to_string.hh
Jeroen Bakker e84ab459c7 Vulkan: Use std::endl in vk_to_string
Trying to narrow down why some tests are failing on windows, but not on
linux/mac. These tests use a string compare. This PR adds two modifications
to the current vk_to_string.

- use `std::endl` although not required, it is important to portability
- print vulkan handles in a uniform way.

Pull Request: https://projects.blender.org/blender/blender/pulls/120780
2024-04-18 16:09:26 +02:00

58 lines
3.0 KiB
C++

/* SPDX-FileCopyrightText: 2024 Blender Authors
*
* SPDX-License-Identifier: GPL-2.0-or-later */
/** \file
* \ingroup gpu
*/
#pragma once
#include "vk_common.hh"
namespace blender::gpu {
std::string to_string(VkImage vk_handle);
std::string to_string(VkBuffer vk_handle);
std::string to_string(VkDescriptorSet vk_handle);
std::string to_string(VkPipeline vk_handle);
std::string to_string(VkPipelineLayout vk_handle);
std::string to_string(VkRenderPass vk_handle);
std::string to_string(VkFramebuffer vk_handle);
const char *to_string(VkFilter vk_filter);
const char *to_string(VkImageLayout vk_image_layout);
const char *to_string(VkIndexType vk_index_type);
const char *to_string(VkObjectType vk_object_type);
const char *to_string(VkPipelineBindPoint vk_pipeline_bind_point);
const char *to_string(VkSubpassContents vk_subpass_contents);
std::string to_string_vk_access_flags(VkAccessFlags vk_access_flags);
std::string to_string_vk_dependency_flags(VkDependencyFlags vk_dependency_flags);
std::string to_string_vk_image_aspect_flags(VkImageAspectFlags vk_image_aspect_flags);
std::string to_string_vk_pipeline_stage_flags(VkPipelineStageFlags vk_pipeline_stage_flags);
std::string to_string_vk_shader_stage_flags(VkShaderStageFlags vk_shader_stage_flags);
std::string to_string(const VkBufferCopy &vk_buffer_copy, int indentation_level = 0);
std::string to_string(const VkBufferImageCopy &vk_buffer_image_copy, int indentation_level = 0);
std::string to_string(const VkBufferMemoryBarrier &vk_buffer_memory_barrier,
int indentation_level = 0);
std::string to_string(const VkClearAttachment &vk_clear_attachment, int indentation_level = 0);
std::string to_string(const VkClearDepthStencilValue &vk_clear_depth_stencil_value,
int indentation_level = 0);
std::string to_string(const VkClearRect &vk_clear_rect, int indentation_level = 0);
std::string to_string(const VkExtent2D &vk_extent2_d, int indentation_level = 0);
std::string to_string(const VkExtent3D &vk_extent3_d, int indentation_level = 0);
std::string to_string(const VkImageBlit &vk_image_blit, int indentation_level = 0);
std::string to_string(const VkImageCopy &vk_image_copy, int indentation_level = 0);
std::string to_string(const VkImageMemoryBarrier &vk_image_memory_barrier,
int indentation_level = 0);
std::string to_string(const VkImageSubresourceLayers &vk_image_subresource_layers,
int indentation_level = 0);
std::string to_string(const VkImageSubresourceRange &vk_image_subresource_range,
int indentation_level = 0);
std::string to_string(const VkMemoryBarrier &vk_memory_barrier, int indentation_level = 0);
std::string to_string(const VkOffset2D &vk_offset2_d, int indentation_level = 0);
std::string to_string(const VkOffset3D &vk_offset3_d, int indentation_level = 0);
std::string to_string(const VkRect2D &vk_rect2_d, int indentation_level = 0);
std::string to_string(const VkRenderPassBeginInfo &vk_render_pass_begin_info,
int indentation_level = 0);
} // namespace blender::gpu