Vulkan/Mac - RenderTarget2D losing data when drawn on
Prerequisites
- I have verified this issue is present in the
developbranch - I have searched open and closed issues to ensure it has not already been reported.
MonoGame Version
MonoGame 3.8.5
Which MonoGame platform are you using?
MonoGame Cross-Platform Desktop Vulkan Application
Operating System
Mac M3 - Tahoe 26.5.2
Description
RenderTarget2D (with PreserveContents) is losing some data outside the drawn area on Mac VK. I have tested all scenarios on Windows VK and GL and couldn't reproduce.
Steps to Reproduce
Use a RenderTarget2D with PreserveContents. Draw a on a small area. The neighboring area will become corrupted and lose the data.
See recordings below. Attached a reproduction repo
Minimal Example Repo
https://github.com/VladBeu4/MGVulkanIssue/tree/render-target-losing-data
Expected Behavior
I expect similar results as on Windows VK/GL or Mac GL:
Mac GL using NonPremultiplied, Additive, AlphaBlend, Opaque blends: https://github.com/user-attachments/assets/b0972059-606d-45c1-85ce-c3718cef505f
Mac GL using custom EraseBlend: https://github.com/user-attachments/assets/2e37f733-44d8-462b-841b-46a040a53222
Resulting Behavior
Mac VK using NonPremultiplied, Additive, AlphaBlend, Opaque blends: https://github.com/user-attachments/assets/107d6841-0db8-44f9-86c4-9f075f7adb76
Mac VK using custom EraseBlend: https://github.com/user-attachments/assets/2851a433-7752-49bc-9945-0d2000eff23d
Files
No response
Source: MonoGame/MonoGame