summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_vulkan
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2019-12-25 21:02:17 +0100
committerReinUsesLisp <reinuseslisp@airmail.cc>2020-02-28 20:39:27 +0100
commit96ac3d518a9882a2a040f319c47a567467c9266d (patch)
treed1465f931df28d12891b07e5ab8c1d921a396376 /src/video_core/renderer_vulkan
parentcommon/math_util: Support float type rectangles (diff)
downloadyuzu-96ac3d518a9882a2a040f319c47a567467c9266d.tar
yuzu-96ac3d518a9882a2a040f319c47a567467c9266d.tar.gz
yuzu-96ac3d518a9882a2a040f319c47a567467c9266d.tar.bz2
yuzu-96ac3d518a9882a2a040f319c47a567467c9266d.tar.lz
yuzu-96ac3d518a9882a2a040f319c47a567467c9266d.tar.xz
yuzu-96ac3d518a9882a2a040f319c47a567467c9266d.tar.zst
yuzu-96ac3d518a9882a2a040f319c47a567467c9266d.zip
Diffstat (limited to 'src/video_core/renderer_vulkan')
-rw-r--r--src/video_core/renderer_vulkan/vk_pipeline_cache.cpp5
-rw-r--r--src/video_core/renderer_vulkan/vk_rasterizer.cpp28
2 files changed, 1 insertions, 32 deletions
diff --git a/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp b/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp
index 7ddf7d3ee..8186942da 100644
--- a/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp
+++ b/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp
@@ -172,11 +172,6 @@ VKPipelineCache::~VKPipelineCache() = default;
std::array<Shader, Maxwell::MaxShaderProgram> VKPipelineCache::GetShaders() {
const auto& gpu = system.GPU().Maxwell3D();
- auto& dirty = system.GPU().Maxwell3D().dirty.shaders;
- if (!dirty) {
- return last_shaders;
- }
- dirty = false;
std::array<Shader, Maxwell::MaxShaderProgram> shaders;
for (std::size_t index = 0; index < Maxwell::MaxShaderProgram; ++index) {
diff --git a/src/video_core/renderer_vulkan/vk_rasterizer.cpp b/src/video_core/renderer_vulkan/vk_rasterizer.cpp
index 3bf86da87..b1be41a21 100644
--- a/src/video_core/renderer_vulkan/vk_rasterizer.cpp
+++ b/src/video_core/renderer_vulkan/vk_rasterizer.cpp
@@ -568,9 +568,7 @@ void RasterizerVulkan::FlushWork() {
RasterizerVulkan::Texceptions RasterizerVulkan::UpdateAttachments() {
MICROPROFILE_SCOPE(Vulkan_RenderTargets);
- auto& dirty = system.GPU().Maxwell3D().dirty;
- const bool update_rendertargets = dirty.render_settings;
- dirty.render_settings = false;
+ constexpr bool update_rendertargets = true;
texture_cache.GuardRenderTargets(true);
@@ -973,10 +971,6 @@ void RasterizerVulkan::SetupImage(const Tegra::Texture::TICEntry& tic, const Ima
}
void RasterizerVulkan::UpdateViewportsState(Tegra::Engines::Maxwell3D& gpu) {
- if (!gpu.dirty.viewport_transform && scheduler.TouchViewports()) {
- return;
- }
- gpu.dirty.viewport_transform = false;
const auto& regs = gpu.regs;
const std::array viewports{
GetViewportState(device, regs, 0), GetViewportState(device, regs, 1),
@@ -993,10 +987,6 @@ void RasterizerVulkan::UpdateViewportsState(Tegra::Engines::Maxwell3D& gpu) {
}
void RasterizerVulkan::UpdateScissorsState(Tegra::Engines::Maxwell3D& gpu) {
- if (!gpu.dirty.scissor_test && scheduler.TouchScissors()) {
- return;
- }
- gpu.dirty.scissor_test = false;
const auto& regs = gpu.regs;
const std::array scissors = {
GetScissorState(regs, 0), GetScissorState(regs, 1), GetScissorState(regs, 2),
@@ -1011,10 +1001,6 @@ void RasterizerVulkan::UpdateScissorsState(Tegra::Engines::Maxwell3D& gpu) {
}
void RasterizerVulkan::UpdateDepthBias(Tegra::Engines::Maxwell3D& gpu) {
- if (!gpu.dirty.polygon_offset && scheduler.TouchDepthBias()) {
- return;
- }
- gpu.dirty.polygon_offset = false;
const auto& regs = gpu.regs;
scheduler.Record([constant = regs.polygon_offset_units, clamp = regs.polygon_offset_clamp,
factor = regs.polygon_offset_factor](auto cmdbuf, auto& dld) {
@@ -1023,10 +1009,6 @@ void RasterizerVulkan::UpdateDepthBias(Tegra::Engines::Maxwell3D& gpu) {
}
void RasterizerVulkan::UpdateBlendConstants(Tegra::Engines::Maxwell3D& gpu) {
- if (!gpu.dirty.blend_state && scheduler.TouchBlendConstants()) {
- return;
- }
- gpu.dirty.blend_state = false;
const std::array blend_color = {gpu.regs.blend_color.r, gpu.regs.blend_color.g,
gpu.regs.blend_color.b, gpu.regs.blend_color.a};
scheduler.Record([blend_color](auto cmdbuf, auto& dld) {
@@ -1035,20 +1017,12 @@ void RasterizerVulkan::UpdateBlendConstants(Tegra::Engines::Maxwell3D& gpu) {
}
void RasterizerVulkan::UpdateDepthBounds(Tegra::Engines::Maxwell3D& gpu) {
- if (!gpu.dirty.depth_bounds_values && scheduler.TouchDepthBounds()) {
- return;
- }
- gpu.dirty.depth_bounds_values = false;
const auto& regs = gpu.regs;
scheduler.Record([min = regs.depth_bounds[0], max = regs.depth_bounds[1]](
auto cmdbuf, auto& dld) { cmdbuf.setDepthBounds(min, max, dld); });
}
void RasterizerVulkan::UpdateStencilFaces(Tegra::Engines::Maxwell3D& gpu) {
- if (!gpu.dirty.stencil_test && scheduler.TouchStencilValues()) {
- return;
- }
- gpu.dirty.stencil_test = false;
const auto& regs = gpu.regs;
if (regs.stencil_two_side_enable) {
// Separate values per face