summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_vulkan
diff options
context:
space:
mode:
authorFernandoS27 <fsahmkow27@gmail.com>2021-04-16 23:52:58 +0200
committerameerj <52414509+ameerj@users.noreply.github.com>2021-07-23 03:51:28 +0200
commitf18a6dd1bdaffda4c3e771af3cf7cf41919ebd67 (patch)
treeffd531d2a81f9e48369c7f362e11e224f437fd5c /src/video_core/renderer_vulkan
parentshader: Fix Phi node types (diff)
downloadyuzu-f18a6dd1bdaffda4c3e771af3cf7cf41919ebd67.tar
yuzu-f18a6dd1bdaffda4c3e771af3cf7cf41919ebd67.tar.gz
yuzu-f18a6dd1bdaffda4c3e771af3cf7cf41919ebd67.tar.bz2
yuzu-f18a6dd1bdaffda4c3e771af3cf7cf41919ebd67.tar.lz
yuzu-f18a6dd1bdaffda4c3e771af3cf7cf41919ebd67.tar.xz
yuzu-f18a6dd1bdaffda4c3e771af3cf7cf41919ebd67.tar.zst
yuzu-f18a6dd1bdaffda4c3e771af3cf7cf41919ebd67.zip
Diffstat (limited to 'src/video_core/renderer_vulkan')
-rw-r--r--src/video_core/renderer_vulkan/fixed_pipeline_state.cpp2
-rw-r--r--src/video_core/renderer_vulkan/fixed_pipeline_state.h1
-rw-r--r--src/video_core/renderer_vulkan/vk_pipeline_cache.cpp1
3 files changed, 4 insertions, 0 deletions
diff --git a/src/video_core/renderer_vulkan/fixed_pipeline_state.cpp b/src/video_core/renderer_vulkan/fixed_pipeline_state.cpp
index 6a3baf837..24834e0f7 100644
--- a/src/video_core/renderer_vulkan/fixed_pipeline_state.cpp
+++ b/src/video_core/renderer_vulkan/fixed_pipeline_state.cpp
@@ -82,6 +82,8 @@ void FixedPipelineState::Refresh(Tegra::Engines::Maxwell3D& maxwell3d,
alpha_test_ref = Common::BitCast<u32>(regs.alpha_test_ref);
point_size = Common::BitCast<u32>(regs.point_size);
+ y_negate.Assign(regs.screen_y_control.y_negate != 0 ? 1 : 0);
+
if (maxwell3d.dirty.flags[Dirty::InstanceDivisors]) {
maxwell3d.dirty.flags[Dirty::InstanceDivisors] = false;
for (size_t index = 0; index < Maxwell::NumVertexArrays; ++index) {
diff --git a/src/video_core/renderer_vulkan/fixed_pipeline_state.h b/src/video_core/renderer_vulkan/fixed_pipeline_state.h
index 5568c4f72..31de6b2c8 100644
--- a/src/video_core/renderer_vulkan/fixed_pipeline_state.h
+++ b/src/video_core/renderer_vulkan/fixed_pipeline_state.h
@@ -202,6 +202,7 @@ struct FixedPipelineState {
BitField<3, 1, u32> early_z;
BitField<4, 1, u32> depth_enabled;
BitField<5, 5, u32> depth_format;
+ BitField<10, 1, u32> y_negate;
};
std::array<u8, Maxwell::NumRenderTargets> color_formats;
diff --git a/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp b/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp
index 4d0d3ebb7..e9b93336b 100644
--- a/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp
+++ b/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp
@@ -1116,6 +1116,7 @@ Shader::Profile PipelineCache::MakeProfile(const GraphicsPipelineCacheKey& key,
break;
}
profile.force_early_z = key.state.early_z != 0;
+ profile.y_negate = key.state.y_negate != 0;
return profile;
}