mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-17 17:43:52 +00:00
fix(diagnostics): instrument applyMsaaChange to find NULL deref
AMD crash is caused by msaaChangePending_ flipping true from saved settings. applyMsaaChange() then crashes with faultAddr=(nil). Add LOG_WARNING markers between pipeline recreation groups to identify the failing call.
This commit is contained in:
parent
45ac7e4d8e
commit
9c4e61a227
1 changed files with 6 additions and 2 deletions
|
|
@ -734,12 +734,13 @@ void Renderer::applyMsaaChange() {
|
||||||
VkSampleCountFlagBits current = vkCtx->getMsaaSamples();
|
VkSampleCountFlagBits current = vkCtx->getMsaaSamples();
|
||||||
if (samples == current) return;
|
if (samples == current) return;
|
||||||
|
|
||||||
LOG_INFO("Changing MSAA from ", static_cast<int>(current), "x to ", static_cast<int>(samples), "x");
|
LOG_WARNING("MSAA change: ", static_cast<int>(current), "x → ", static_cast<int>(samples), "x");
|
||||||
|
|
||||||
// Single GPU wait — all subsequent operations are CPU-side object creation
|
// Single GPU wait — all subsequent operations are CPU-side object creation
|
||||||
vkDeviceWaitIdle(vkCtx->getDevice());
|
vkDeviceWaitIdle(vkCtx->getDevice());
|
||||||
|
|
||||||
// Set new MSAA and recreate swapchain (render pass, depth, MSAA image, framebuffers)
|
// Set new MSAA and recreate swapchain (render pass, depth, MSAA image, framebuffers)
|
||||||
|
LOG_WARNING("MSAA: recreating swapchain");
|
||||||
vkCtx->setMsaaSamples(samples);
|
vkCtx->setMsaaSamples(samples);
|
||||||
if (!vkCtx->recreateSwapchain(window->getWidth(), window->getHeight())) {
|
if (!vkCtx->recreateSwapchain(window->getWidth(), window->getHeight())) {
|
||||||
LOG_ERROR("MSAA change failed — reverting to 1x");
|
LOG_ERROR("MSAA change failed — reverting to 1x");
|
||||||
|
|
@ -748,6 +749,7 @@ void Renderer::applyMsaaChange() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Recreate all sub-renderer pipelines (they embed sample count from render pass)
|
// Recreate all sub-renderer pipelines (they embed sample count from render pass)
|
||||||
|
LOG_WARNING("MSAA: recreating terrain/water/wmo/m2/char pipelines");
|
||||||
if (terrainRenderer) terrainRenderer->recreatePipelines();
|
if (terrainRenderer) terrainRenderer->recreatePipelines();
|
||||||
if (waterRenderer) {
|
if (waterRenderer) {
|
||||||
waterRenderer->recreatePipelines();
|
waterRenderer->recreatePipelines();
|
||||||
|
|
@ -756,6 +758,7 @@ void Renderer::applyMsaaChange() {
|
||||||
if (wmoRenderer) wmoRenderer->recreatePipelines();
|
if (wmoRenderer) wmoRenderer->recreatePipelines();
|
||||||
if (m2Renderer) m2Renderer->recreatePipelines();
|
if (m2Renderer) m2Renderer->recreatePipelines();
|
||||||
if (characterRenderer) characterRenderer->recreatePipelines();
|
if (characterRenderer) characterRenderer->recreatePipelines();
|
||||||
|
LOG_WARNING("MSAA: recreating quest/weather/sky pipelines");
|
||||||
if (questMarkerRenderer) questMarkerRenderer->recreatePipelines();
|
if (questMarkerRenderer) questMarkerRenderer->recreatePipelines();
|
||||||
if (weather) weather->recreatePipelines();
|
if (weather) weather->recreatePipelines();
|
||||||
if (lightning) lightning->recreatePipelines();
|
if (lightning) lightning->recreatePipelines();
|
||||||
|
|
@ -772,6 +775,7 @@ void Renderer::applyMsaaChange() {
|
||||||
if (auto* lf = skySystem->getLensFlare()) lf->recreatePipelines();
|
if (auto* lf = skySystem->getLensFlare()) lf->recreatePipelines();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LOG_WARNING("MSAA: recreating minimap/postprocess/imgui");
|
||||||
if (minimap) minimap->recreatePipelines();
|
if (minimap) minimap->recreatePipelines();
|
||||||
|
|
||||||
// Selection circle + overlay + FSR use lazy init, just destroy them
|
// Selection circle + overlay + FSR use lazy init, just destroy them
|
||||||
|
|
@ -800,7 +804,7 @@ void Renderer::applyMsaaChange() {
|
||||||
};
|
};
|
||||||
ImGui_ImplVulkan_Init(&initInfo);
|
ImGui_ImplVulkan_Init(&initInfo);
|
||||||
|
|
||||||
LOG_INFO("MSAA change complete");
|
LOG_WARNING("MSAA change complete");
|
||||||
}
|
}
|
||||||
|
|
||||||
void Renderer::beginFrame() {
|
void Renderer::beginFrame() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue