mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 12:19:12 +00:00
Vulkan: Fix incorrect render pass area for out-of-range clears
This occured when a game set an out-of-range EFB clear region.
This commit is contained in:
parent
722aca0830
commit
f4bdfe3e0c
1 changed files with 5 additions and 0 deletions
|
@ -332,6 +332,11 @@ void Renderer::ClearScreen(const EFBRectangle& rc, bool color_enable, bool alpha
|
||||||
{
|
{
|
||||||
// Native -> EFB coordinates
|
// Native -> EFB coordinates
|
||||||
TargetRectangle target_rc = Renderer::ConvertEFBRectangle(rc);
|
TargetRectangle target_rc = Renderer::ConvertEFBRectangle(rc);
|
||||||
|
|
||||||
|
// Size we pass this size to vkBeginRenderPass, it has to be clamped to the framebuffer
|
||||||
|
// dimensions. The other backends just silently ignore this case.
|
||||||
|
target_rc.ClampUL(0, 0, m_target_width, m_target_height);
|
||||||
|
|
||||||
VkRect2D target_vk_rc = {
|
VkRect2D target_vk_rc = {
|
||||||
{target_rc.left, target_rc.top},
|
{target_rc.left, target_rc.top},
|
||||||
{static_cast<uint32_t>(target_rc.GetWidth()), static_cast<uint32_t>(target_rc.GetHeight())}};
|
{static_cast<uint32_t>(target_rc.GetWidth()), static_cast<uint32_t>(target_rc.GetHeight())}};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue