From 81b4ed2a81d7bada71a115efc7fb2347378fb975 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Thu, 20 Jul 2017 15:25:35 +1000 Subject: Vulkan: Uber shader support --- Source/Core/VideoBackends/Vulkan/ObjectCache.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'Source/Core/VideoBackends/Vulkan/ObjectCache.h') diff --git a/Source/Core/VideoBackends/Vulkan/ObjectCache.h b/Source/Core/VideoBackends/Vulkan/ObjectCache.h index dd7b1ed739..bfcec09166 100644 --- a/Source/Core/VideoBackends/Vulkan/ObjectCache.h +++ b/Source/Core/VideoBackends/Vulkan/ObjectCache.h @@ -15,6 +15,7 @@ #include "Common/LinearDiskCache.h" #include "VideoBackends/Vulkan/Constants.h" +#include "VideoBackends/Vulkan/Texture2D.h" #include "VideoCommon/GeometryShaderGen.h" #include "VideoCommon/PixelShaderGen.h" @@ -62,6 +63,9 @@ public: VkSampler GetLinearSampler() const { return m_linear_sampler; } VkSampler GetSampler(const SamplerState& info); + // Dummy image for samplers that are unbound + Texture2D* GetDummyImage() const { return m_dummy_texture.get(); } + VkImageView GetDummyImageView() const { return m_dummy_texture->GetView(); } // Perform at startup, create descriptor layouts, compiles all static shaders. bool Initialize(); @@ -89,6 +93,9 @@ private: VkSampler m_linear_sampler = VK_NULL_HANDLE; std::map m_sampler_cache; + + // Dummy image for samplers that are unbound + std::unique_ptr m_dummy_texture; }; extern std::unique_ptr g_object_cache; -- cgit v1.2.3