mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-22 02:32:36 +01:00
vk: Fix some minor spec violation
- Stencil clear pass does not consume an image, do not bind one. - Add push_barrier to allow push-pop semantics for texture barrier insert.
This commit is contained in:
parent
d257ba5156
commit
d000d648b0
@ -1190,8 +1190,7 @@ void VKGSRender::clear_surface(u32 mask)
|
||||
if (require_mem_load) rtt->write_barrier(*m_current_command_buffer);
|
||||
|
||||
// Add a barrier to ensure previous writes are visible; also transitions into GENERAL layout
|
||||
const auto old_layout = rtt->current_layout;
|
||||
vk::insert_texture_barrier(*m_current_command_buffer, rtt, VK_IMAGE_LAYOUT_GENERAL);
|
||||
rtt->push_barrier(*m_current_command_buffer, VK_IMAGE_LAYOUT_GENERAL);
|
||||
|
||||
if (!renderpass)
|
||||
{
|
||||
@ -1201,8 +1200,7 @@ void VKGSRender::clear_surface(u32 mask)
|
||||
}
|
||||
|
||||
attachment_clear_pass->run(*m_current_command_buffer, rtt, region.rect, renderpass);
|
||||
|
||||
rtt->change_layout(*m_current_command_buffer, old_layout);
|
||||
rtt->pop_layout(*m_current_command_buffer);
|
||||
}
|
||||
else
|
||||
fmt::throw_exception("Unreachable" HERE);
|
||||
|
@ -1518,6 +1518,12 @@ private:
|
||||
change_image_layout(cmd, this, layout);
|
||||
}
|
||||
|
||||
void push_barrier(VkCommandBuffer cmd, VkImageLayout layout)
|
||||
{
|
||||
m_layout_stack.push(current_layout);
|
||||
insert_texture_barrier(cmd, this, layout);
|
||||
}
|
||||
|
||||
void pop_layout(VkCommandBuffer cmd)
|
||||
{
|
||||
verify(HERE), !m_layout_stack.empty();
|
||||
|
@ -1027,8 +1027,7 @@ namespace vk
|
||||
// Coverage sampling disabled, but actually report correct number of samples
|
||||
renderpass_config.set_multisample_state(target->samples(), 0xFFFF, false, false, false);
|
||||
|
||||
overlay_pass::run(cmd, { 0, 0, target->width(), target->height() }, target,
|
||||
target->get_view(0xAAE4, rsx::default_remap_vector), render_pass);
|
||||
overlay_pass::run(cmd, { 0, 0, target->width(), target->height() }, target, std::vector<vk::image_view*>{}, render_pass);
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user