Skip to content

Commit 881aad9

Browse files
committed
Merge branch 'dev/jerrans/REMIX-4388' into 'main'
REMIX-4388: If we find an unsuitable BLAS for updating then we need to force a rebuild Closes REMIX-4388 See merge request lightspeedrtx/dxvk-remix-nv!1574
2 parents e7a5067 + 26ae6e7 commit 881aad9

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

src/dxvk/rtx_render/rtx_accel_manager.cpp

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,15 @@ namespace dxvk {
603603
// Try to reuse our dynamic BLAS if it exists
604604
Rc<PooledBlas>& selectedBlas = blasEntry->dynamicBlas;
605605

606-
const bool build = forceRebuild || !selectedBlas.ptr() || selectedBlas->accelStructure->info().size != sizeInfo.accelerationStructureSize;
606+
bool build = forceRebuild || !selectedBlas.ptr() || selectedBlas->accelStructure->info().size != sizeInfo.accelerationStructureSize;
607+
608+
// Validate that the selected blas is compatible with the current build info for update purposes
609+
bool update = blasEntry->frameLastUpdated == currentFrame;
610+
if (update && !build && !validateUpdateMode(selectedBlas->buildInfo, buildInfo)) {
611+
// If an update is requested but the BLAS is not compatible with the current build info then force a rebuild
612+
update = false;
613+
build = true;
614+
}
607615

608616
// There is no such BLAS - create one
609617
if (build) {
@@ -619,12 +627,6 @@ namespace dxvk {
619627
selectedBlas->frameLastTouched = currentFrame;
620628
blasEntry->dynamicBlas->opacityMicromapSourceHash = boundOpacityMicromapHash;
621629

622-
// Validate that the selected blas is compatible with the current build info for update purposes
623-
bool update = blasEntry->frameLastUpdated == currentFrame;
624-
if (update && !build && !validateUpdateMode(selectedBlas->buildInfo, buildInfo)) {
625-
update = false;
626-
}
627-
628630
if (update || build) {
629631
if (update && !build) {
630632
buildInfo.srcAccelerationStructure = selectedBlas->accelStructure->getAccelStructure();

0 commit comments

Comments
 (0)