RT BLAS update bug fix
This commit is contained in:
@@ -99,6 +99,15 @@ static VkDeviceAddress get_buffer_address(VkDevice dev, VkBuffer buf)
|
||||
AccelStructureHandle RayTracingManager::getOrBuildBLAS(const std::shared_ptr<MeshAsset> &mesh)
|
||||
{
|
||||
if (!mesh) return {};
|
||||
|
||||
// If uploads are deferred, ensure any pending mesh buffer uploads are flushed
|
||||
// before building a BLAS that reads from those GPU buffers.
|
||||
if (_resources && _resources->deferred_uploads() && _resources->has_pending_uploads())
|
||||
{
|
||||
fmt::println("[RT] getOrBuildBLAS: flushing pending resource uploads before BLAS build");
|
||||
_resources->process_queued_uploads_immediate();
|
||||
}
|
||||
|
||||
if (auto it = _blasByMesh.find(mesh.get()); it != _blasByMesh.end())
|
||||
{
|
||||
fmt::println("[RT] getOrBuildBLAS reuse by mesh mesh='{}' handle={}", mesh->name,
|
||||
|
||||
@@ -9,9 +9,9 @@ except Exception:
|
||||
PIL_OK = False
|
||||
|
||||
DEFAULT_SUFFIX = {
|
||||
"albedo": ["_albedo", "_basecolor", "_base_colour", "_base_color", "_base", "baseColor"],
|
||||
"mr": ["_mr", "_orm", "_metalrough", "_metallicroughness", "metallicRoughness"],
|
||||
"normal": ["_normal", "_norm", "_nrm", "_normalgl"]
|
||||
"albedo": ["_albedo", "_basecolor", "_base_colour", "_base_color", "_base", "baseColor", "BaseColor"],
|
||||
"mr": ["_mr", "_orm", "_metalrough", "_metallicroughness", "metallicRoughness", "Metallic"],
|
||||
"normal": ["_normal", "_norm", "_nrm", "_normalgl", "Normal"]
|
||||
}
|
||||
|
||||
SUPPORTED_IMAGE_EXTS = {".png", ".jpg", ".jpeg", ".tga", ".tif", ".tiff"}
|
||||
|
||||
Reference in New Issue
Block a user