mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-01-14 10:55:14 +00:00
Merge pull request #1630 from vladmikhalin/fix-missing-rts
Fixed incorrectly skipped RTs
This commit is contained in:
commit
f658fc58d1
|
@ -260,7 +260,7 @@ bool PipelineCache::RefreshGraphicsKey() {
|
||||||
// recompiler.
|
// recompiler.
|
||||||
for (auto cb = 0u, remapped_cb = 0u; cb < Liverpool::NumColorBuffers; ++cb) {
|
for (auto cb = 0u, remapped_cb = 0u; cb < Liverpool::NumColorBuffers; ++cb) {
|
||||||
auto const& col_buf = regs.color_buffers[cb];
|
auto const& col_buf = regs.color_buffers[cb];
|
||||||
if (skip_cb_binding || !col_buf || !regs.color_target_mask.GetMask(cb)) {
|
if (skip_cb_binding || !col_buf) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
const auto base_format =
|
const auto base_format =
|
||||||
|
@ -362,8 +362,7 @@ bool PipelineCache::RefreshGraphicsKey() {
|
||||||
// Second pass to fill remain CB pipeline key data
|
// Second pass to fill remain CB pipeline key data
|
||||||
for (auto cb = 0u, remapped_cb = 0u; cb < Liverpool::NumColorBuffers; ++cb) {
|
for (auto cb = 0u, remapped_cb = 0u; cb < Liverpool::NumColorBuffers; ++cb) {
|
||||||
auto const& col_buf = regs.color_buffers[cb];
|
auto const& col_buf = regs.color_buffers[cb];
|
||||||
if (skip_cb_binding || !col_buf || !regs.color_target_mask.GetMask(cb) ||
|
if (skip_cb_binding || !col_buf || (key.mrt_mask & (1u << cb)) == 0) {
|
||||||
(key.mrt_mask & (1u << cb)) == 0) {
|
|
||||||
key.color_formats[cb] = vk::Format::eUndefined;
|
key.color_formats[cb] = vk::Format::eUndefined;
|
||||||
key.mrt_swizzles[cb] = Liverpool::ColorBuffer::SwapMode::Standard;
|
key.mrt_swizzles[cb] = Liverpool::ColorBuffer::SwapMode::Standard;
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -95,13 +95,6 @@ RenderState Rasterizer::PrepareRenderState(u32 mrt_mask) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// If the color buffer is still bound but rendering to it is disabled by the target
|
|
||||||
// mask, we need to prevent the render area from being affected by unbound render target
|
|
||||||
// extents.
|
|
||||||
if (!regs.color_target_mask.GetMask(col_buf_id)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Skip stale color buffers if shader doesn't output to them. Otherwise it will perform
|
// Skip stale color buffers if shader doesn't output to them. Otherwise it will perform
|
||||||
// an unnecessary transition and may result in state conflict if the resource is already
|
// an unnecessary transition and may result in state conflict if the resource is already
|
||||||
// bound for reading.
|
// bound for reading.
|
||||||
|
|
Loading…
Reference in a new issue