From 9fae3ccdb23899b988067334b89d787491a91981 Mon Sep 17 00:00:00 2001 From: Robert Beckebans Date: Fri, 26 Mar 2021 13:35:05 +0100 Subject: [PATCH] Vulkan backend compiles again --- neo/renderer/Vulkan/Image_VK.cpp | 16 ++++++++++++++++ neo/renderer/Vulkan/RenderBackend_VK.cpp | 6 ++++++ 2 files changed, 22 insertions(+) diff --git a/neo/renderer/Vulkan/Image_VK.cpp b/neo/renderer/Vulkan/Image_VK.cpp index d0723772..d8be85e8 100644 --- a/neo/renderer/Vulkan/Image_VK.cpp +++ b/neo/renderer/Vulkan/Image_VK.cpp @@ -102,6 +102,9 @@ static VkFormat VK_GetFormatFromTextureFormat( const textureFormat_t format ) case FMT_R32F: return VK_FORMAT_R32_SFLOAT; + + case FMT_R11G11B10F: + return VK_FORMAT_B10G11R11_UFLOAT_PACK32; // RB end default: @@ -141,24 +144,37 @@ static VkComponentMapping VK_GetComponentMappingFromTextureFormat( const texture componentMapping.b = VK_COMPONENT_SWIZZLE_R; componentMapping.a = VK_COMPONENT_SWIZZLE_ONE; break; + case FMT_L8A8: componentMapping.r = VK_COMPONENT_SWIZZLE_R; componentMapping.g = VK_COMPONENT_SWIZZLE_R; componentMapping.b = VK_COMPONENT_SWIZZLE_R; componentMapping.a = VK_COMPONENT_SWIZZLE_G; break; + case FMT_ALPHA: componentMapping.r = VK_COMPONENT_SWIZZLE_ONE; componentMapping.g = VK_COMPONENT_SWIZZLE_ONE; componentMapping.b = VK_COMPONENT_SWIZZLE_ONE; componentMapping.a = VK_COMPONENT_SWIZZLE_R; break; + case FMT_INT8: componentMapping.r = VK_COMPONENT_SWIZZLE_R; componentMapping.g = VK_COMPONENT_SWIZZLE_R; componentMapping.b = VK_COMPONENT_SWIZZLE_R; componentMapping.a = VK_COMPONENT_SWIZZLE_R; break; + + /* + case FMT_R11G11B10F: + componentMapping.r = VK_COMPONENT_SWIZZLE_R; + componentMapping.g = VK_COMPONENT_SWIZZLE_G; + componentMapping.b = VK_COMPONENT_SWIZZLE_B; + componentMapping.a = VK_COMPONENT_SWIZZLE_ONE; + break; + */ + default: componentMapping.r = VK_COMPONENT_SWIZZLE_R; componentMapping.g = VK_COMPONENT_SWIZZLE_G; diff --git a/neo/renderer/Vulkan/RenderBackend_VK.cpp b/neo/renderer/Vulkan/RenderBackend_VK.cpp index 222968ef..9833cab8 100644 --- a/neo/renderer/Vulkan/RenderBackend_VK.cpp +++ b/neo/renderer/Vulkan/RenderBackend_VK.cpp @@ -2779,6 +2779,12 @@ bool Framebuffer::IsDefaultFramebufferActive() return true; } +Framebuffer* Framebuffer::GetActiveFramebuffer() +{ + // TODO + return NULL; +} + void Framebuffer::Bind() { // TODO