Skip to content

Commit f658fc5

Browse files
authored
Merge pull request #1630 from vladmikhalin/fix-missing-rts
Fixed incorrectly skipped RTs
2 parents 4a58506 + c0d43a1 commit f658fc5

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

src/video_core/renderer_vulkan/vk_pipeline_cache.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ bool PipelineCache::RefreshGraphicsKey() {
260260
// recompiler.
261261
for (auto cb = 0u, remapped_cb = 0u; cb < Liverpool::NumColorBuffers; ++cb) {
262262
auto const& col_buf = regs.color_buffers[cb];
263-
if (skip_cb_binding || !col_buf || !regs.color_target_mask.GetMask(cb)) {
263+
if (skip_cb_binding || !col_buf) {
264264
continue;
265265
}
266266
const auto base_format =
@@ -362,8 +362,7 @@ bool PipelineCache::RefreshGraphicsKey() {
362362
// Second pass to fill remain CB pipeline key data
363363
for (auto cb = 0u, remapped_cb = 0u; cb < Liverpool::NumColorBuffers; ++cb) {
364364
auto const& col_buf = regs.color_buffers[cb];
365-
if (skip_cb_binding || !col_buf || !regs.color_target_mask.GetMask(cb) ||
366-
(key.mrt_mask & (1u << cb)) == 0) {
365+
if (skip_cb_binding || !col_buf || (key.mrt_mask & (1u << cb)) == 0) {
367366
key.color_formats[cb] = vk::Format::eUndefined;
368367
key.mrt_swizzles[cb] = Liverpool::ColorBuffer::SwapMode::Standard;
369368
continue;

src/video_core/renderer_vulkan/vk_rasterizer.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -95,13 +95,6 @@ RenderState Rasterizer::PrepareRenderState(u32 mrt_mask) {
9595
continue;
9696
}
9797

98-
// If the color buffer is still bound but rendering to it is disabled by the target
99-
// mask, we need to prevent the render area from being affected by unbound render target
100-
// extents.
101-
if (!regs.color_target_mask.GetMask(col_buf_id)) {
102-
continue;
103-
}
104-
10598
// Skip stale color buffers if shader doesn't output to them. Otherwise it will perform
10699
// an unnecessary transition and may result in state conflict if the resource is already
107100
// bound for reading.

0 commit comments

Comments
 (0)