mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 21:30:19 -06: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:
@ -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())}};
|
||||||
|
Reference in New Issue
Block a user