mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-05 14:31:24 +12: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
3 changed files with 9 additions and 6 deletions
|
@ -1190,8 +1190,7 @@ void VKGSRender::clear_surface(u32 mask)
|
||||||
if (require_mem_load) rtt->write_barrier(*m_current_command_buffer);
|
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
|
// Add a barrier to ensure previous writes are visible; also transitions into GENERAL layout
|
||||||
const auto old_layout = rtt->current_layout;
|
rtt->push_barrier(*m_current_command_buffer, VK_IMAGE_LAYOUT_GENERAL);
|
||||||
vk::insert_texture_barrier(*m_current_command_buffer, rtt, VK_IMAGE_LAYOUT_GENERAL);
|
|
||||||
|
|
||||||
if (!renderpass)
|
if (!renderpass)
|
||||||
{
|
{
|
||||||
|
@ -1201,8 +1200,7 @@ void VKGSRender::clear_surface(u32 mask)
|
||||||
}
|
}
|
||||||
|
|
||||||
attachment_clear_pass->run(*m_current_command_buffer, rtt, region.rect, renderpass);
|
attachment_clear_pass->run(*m_current_command_buffer, rtt, region.rect, renderpass);
|
||||||
|
rtt->pop_layout(*m_current_command_buffer);
|
||||||
rtt->change_layout(*m_current_command_buffer, old_layout);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
fmt::throw_exception("Unreachable" HERE);
|
fmt::throw_exception("Unreachable" HERE);
|
||||||
|
|
|
@ -1518,6 +1518,12 @@ private:
|
||||||
change_image_layout(cmd, this, layout);
|
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)
|
void pop_layout(VkCommandBuffer cmd)
|
||||||
{
|
{
|
||||||
verify(HERE), !m_layout_stack.empty();
|
verify(HERE), !m_layout_stack.empty();
|
||||||
|
|
|
@ -1027,8 +1027,7 @@ namespace vk
|
||||||
// Coverage sampling disabled, but actually report correct number of samples
|
// Coverage sampling disabled, but actually report correct number of samples
|
||||||
renderpass_config.set_multisample_state(target->samples(), 0xFFFF, false, false, false);
|
renderpass_config.set_multisample_state(target->samples(), 0xFFFF, false, false, false);
|
||||||
|
|
||||||
overlay_pass::run(cmd, { 0, 0, target->width(), target->height() }, target,
|
overlay_pass::run(cmd, { 0, 0, target->width(), target->height() }, target, std::vector<vk::image_view*>{}, render_pass);
|
||||||
target->get_view(0xAAE4, rsx::default_remap_vector), render_pass);
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue