From 7d4142e6aca5257602a7d82db5625adbb6fbc832 Mon Sep 17 00:00:00 2001 From: Anders Leino Date: Tue, 7 Jan 2025 12:51:51 +0200 Subject: Fix some robustness issues in the examples (#5984) * examples: Make hello-world example exit gracefully if VK cannot be initialized - Check if VK API function pointers are valid before using them - Return 0 and exit if VK initialization fails - Enable hello-world example * examples: Fixes for ray-tracing examples - Assert that accelleration structure buffer is not nullptr - Check if buffer creation succeeded before proceeding - This makes initialization not hang, but it still fails. Therefore, the test expectations are just updated to point to another issue. - Enable ray-tracing tests on Windows --- tools/gfx/d3d12/d3d12-device.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'tools/gfx') diff --git a/tools/gfx/d3d12/d3d12-device.cpp b/tools/gfx/d3d12/d3d12-device.cpp index cb5404961..35192fd7d 100644 --- a/tools/gfx/d3d12/d3d12-device.cpp +++ b/tools/gfx/d3d12/d3d12-device.cpp @@ -2231,6 +2231,7 @@ Result DeviceImpl::createAccelerationStructure( IAccelerationStructure** outAS) { #if SLANG_GFX_HAS_DXR_SUPPORT + assert(desc.buffer != nullptr); RefPtr result = new AccelerationStructureImpl(); result->m_device5 = m_device5; result->m_buffer = static_cast(desc.buffer); -- cgit v1.2.3