File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed
Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff 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 ();
You can’t perform that action at this time.
0 commit comments