summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_vulkan
diff options
context:
space:
mode:
authorFernando S <fsahmkow27@gmail.com>2022-08-31 10:40:45 +0200
committerGitHub <noreply@github.com>2022-08-31 10:40:45 +0200
commita83a5d2e4c8932df864dd4cea2b04d87a12c8760 (patch)
tree53bd0ce10e965110c7811bd227443fd51e054eff /src/video_core/renderer_vulkan
parentMerge pull request #8809 from german77/finally_is_fixed (diff)
parentvideo_code: support rectangle texture (diff)
downloadyuzu-a83a5d2e4c8932df864dd4cea2b04d87a12c8760.tar
yuzu-a83a5d2e4c8932df864dd4cea2b04d87a12c8760.tar.gz
yuzu-a83a5d2e4c8932df864dd4cea2b04d87a12c8760.tar.bz2
yuzu-a83a5d2e4c8932df864dd4cea2b04d87a12c8760.tar.lz
yuzu-a83a5d2e4c8932df864dd4cea2b04d87a12c8760.tar.xz
yuzu-a83a5d2e4c8932df864dd4cea2b04d87a12c8760.tar.zst
yuzu-a83a5d2e4c8932df864dd4cea2b04d87a12c8760.zip
Diffstat (limited to 'src/video_core/renderer_vulkan')
-rw-r--r--src/video_core/renderer_vulkan/vk_pipeline_cache.cpp4
-rw-r--r--src/video_core/renderer_vulkan/vk_texture_cache.cpp9
2 files changed, 6 insertions, 7 deletions
diff --git a/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp b/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp
index 43cc94fab..3adad5af4 100644
--- a/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp
+++ b/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp
@@ -434,7 +434,9 @@ void PipelineCache::LoadDiskResources(u64 title_id, std::stop_token stop_loading
state.statistics.get(), false)};
std::scoped_lock lock{state.mutex};
- graphics_cache.emplace(key, std::move(pipeline));
+ if (pipeline) {
+ graphics_cache.emplace(key, std::move(pipeline));
+ }
++state.built;
if (state.has_loaded) {
callback(VideoCore::LoadCallbackStage::Build, state.built, state.total);
diff --git a/src/video_core/renderer_vulkan/vk_texture_cache.cpp b/src/video_core/renderer_vulkan/vk_texture_cache.cpp
index 16463a892..caca79d79 100644
--- a/src/video_core/renderer_vulkan/vk_texture_cache.cpp
+++ b/src/video_core/renderer_vulkan/vk_texture_cache.cpp
@@ -230,6 +230,7 @@ constexpr VkBorderColor ConvertBorderColor(const std::array<float, 4>& color) {
case Shader::TextureType::Color1D:
return VK_IMAGE_VIEW_TYPE_1D;
case Shader::TextureType::Color2D:
+ case Shader::TextureType::Color2DRect:
return VK_IMAGE_VIEW_TYPE_2D;
case Shader::TextureType::ColorCube:
return VK_IMAGE_VIEW_TYPE_CUBE;
@@ -254,6 +255,7 @@ constexpr VkBorderColor ConvertBorderColor(const std::array<float, 4>& color) {
case VideoCommon::ImageViewType::e1D:
return VK_IMAGE_VIEW_TYPE_1D;
case VideoCommon::ImageViewType::e2D:
+ case VideoCommon::ImageViewType::Rect:
return VK_IMAGE_VIEW_TYPE_2D;
case VideoCommon::ImageViewType::Cube:
return VK_IMAGE_VIEW_TYPE_CUBE;
@@ -265,9 +267,6 @@ constexpr VkBorderColor ConvertBorderColor(const std::array<float, 4>& color) {
return VK_IMAGE_VIEW_TYPE_2D_ARRAY;
case VideoCommon::ImageViewType::CubeArray:
return VK_IMAGE_VIEW_TYPE_CUBE_ARRAY;
- case VideoCommon::ImageViewType::Rect:
- UNIMPLEMENTED_MSG("Rect image view");
- return VK_IMAGE_VIEW_TYPE_2D;
case VideoCommon::ImageViewType::Buffer:
ASSERT_MSG(false, "Texture buffers can't be image views");
return VK_IMAGE_VIEW_TYPE_1D;
@@ -1579,6 +1578,7 @@ ImageView::ImageView(TextureCacheRuntime& runtime, const VideoCommon::ImageViewI
break;
case VideoCommon::ImageViewType::e2D:
case VideoCommon::ImageViewType::e2DArray:
+ case VideoCommon::ImageViewType::Rect:
create(TextureType::Color2D, 1);
create(TextureType::ColorArray2D, std::nullopt);
render_target = Handle(Shader::TextureType::ColorArray2D);
@@ -1592,9 +1592,6 @@ ImageView::ImageView(TextureCacheRuntime& runtime, const VideoCommon::ImageViewI
create(TextureType::ColorCube, 6);
create(TextureType::ColorArrayCube, std::nullopt);
break;
- case VideoCommon::ImageViewType::Rect:
- UNIMPLEMENTED();
- break;
case VideoCommon::ImageViewType::Buffer:
ASSERT(false);
break;