mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 07:40:14 +00:00
Fix MSAA 8x crash and eliminate redundant GPU stalls
- Add error handling: revert to 1x if recreateSwapchain fails - Clamp requested MSAA to device maximum before applying - Retry MSAA color image allocation without TRANSIENT on failure - Remove redundant vkDeviceWaitIdle from WMO/M2/Character recreatePipelines (caller already waits once, was causing ~13 stalls instead of 1)
This commit is contained in:
parent
e12141a673
commit
fa1867cf2f
5 changed files with 17 additions and 7 deletions
|
|
@ -384,8 +384,13 @@ bool VkContext::createMsaaColorImage() {
|
|||
allocInfo.preferredFlags = VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT;
|
||||
|
||||
if (vmaCreateImage(allocator, &imgInfo, &allocInfo, &msaaColorImage_, &msaaColorAllocation_, nullptr) != VK_SUCCESS) {
|
||||
LOG_ERROR("Failed to create MSAA color image");
|
||||
return false;
|
||||
// Retry without TRANSIENT (some drivers reject it at high sample counts)
|
||||
imgInfo.usage = VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT;
|
||||
allocInfo.preferredFlags = 0;
|
||||
if (vmaCreateImage(allocator, &imgInfo, &allocInfo, &msaaColorImage_, &msaaColorAllocation_, nullptr) != VK_SUCCESS) {
|
||||
LOG_ERROR("Failed to create MSAA color image");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
VkImageViewCreateInfo viewInfo{};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue