From 43e1b7cdc70b2fcac8a3e8ee72f5bc91726f4ec5 Mon Sep 17 00:00:00 2001 From: lucy96chen <47800040+lucy96chen@users.noreply.github.com> Date: Thu, 26 May 2022 10:54:35 -0700 Subject: Split render-vk.h/.cpp into a set of smaller files (#2244) * Some preliminary work on splitting render-vk * render-vk split, tests currently crash on null reference * fixed circular include --- tools/gfx/vulkan/vk-texture.h | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 tools/gfx/vulkan/vk-texture.h (limited to 'tools/gfx/vulkan/vk-texture.h') diff --git a/tools/gfx/vulkan/vk-texture.h b/tools/gfx/vulkan/vk-texture.h new file mode 100644 index 000000000..95e3b779e --- /dev/null +++ b/tools/gfx/vulkan/vk-texture.h @@ -0,0 +1,37 @@ +// vk-texture.h +#pragma once + +#include "vk-base.h" +#include "vk-device.h" + +namespace gfx +{ + +using namespace Slang; + +namespace vk +{ + +class TextureResourceImpl : public TextureResource +{ +public: + typedef TextureResource Parent; + TextureResourceImpl(const Desc& desc, DeviceImpl* device); + ~TextureResourceImpl(); + + VkImage m_image = VK_NULL_HANDLE; + VkFormat m_vkformat = VK_FORMAT_R8G8B8A8_UNORM; + VkDeviceMemory m_imageMemory = VK_NULL_HANDLE; + bool m_isWeakImageReference = false; + RefPtr m_device; + + virtual SLANG_NO_THROW Result SLANG_MCALL + getNativeResourceHandle(InteropHandle* outHandle) override; + + virtual SLANG_NO_THROW Result SLANG_MCALL getSharedHandle(InteropHandle* outHandle) override; + + virtual SLANG_NO_THROW Result SLANG_MCALL setDebugName(const char* name) override; +}; + +} // namespace vk +} // namespace gfx -- cgit v1.2.3