Skip to content

Commit 9e8586a

Browse files
committed
fix for not using OMM.
1 parent 6e8a2bf commit 9e8586a

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

attachments/simple_engine/renderer.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -555,6 +555,7 @@ class Renderer {
555555
// This method polls rawPixelCache.size() until it is stable, confirming that
556556
// upload worker threads have finished their StoreRawTexturePixels calls.
557557
// Returns false on timeout.
558+
#ifdef ENABLE_COURSE_OPACITY_MICROMAPS
558559
bool WaitForRawPixelCacheToSettle(float timeoutSeconds = 60.f) const {
559560
const auto deadline = std::chrono::steady_clock::now()
560561
+ std::chrono::duration_cast<std::chrono::steady_clock::duration>(
@@ -580,6 +581,7 @@ class Renderer {
580581
std::this_thread::sleep_for(std::chrono::milliseconds(50));
581582
}
582583
}
584+
#endif // ENABLE_COURSE_OPACITY_MICROMAPS
583585

584586
// Process pending texture GPU uploads on the calling thread.
585587
// This should be invoked from the main/render thread so that all

attachments/simple_engine/renderer_core.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1124,7 +1124,9 @@ bool Renderer::createLogicalDevice(bool enableValidationLayers) {
11241124
opacityMicromapSupported = featChain2.template get<vk::PhysicalDeviceOpacityMicromapFeaturesKHR>();
11251125
if (opacityMicromapSupported.micromap) {
11261126
opacityMicromapEnable.micromap = vk::True;
1127+
#ifdef ENABLE_COURSE_OPACITY_MICROMAPS
11271128
opacityMicromapEnabled = true;
1129+
#endif
11281130
*tailNext = &opacityMicromapEnable;
11291131
tailNext = reinterpret_cast<void **>(&opacityMicromapEnable.pNext);
11301132
}

0 commit comments

Comments
 (0)