summaryrefslogtreecommitdiffstats
path: root/tools/gfx/d3d12
Commit message (Collapse)AuthorAge
* Support SM6.9 with GFX (#7387)Jay Kwak2025-06-13
|
* Enable Windows full debug testsuite in CI (#7085)Gangzheng Tong2025-05-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Unify Debug Layer Control Logic and Add Disable Option for Debug Builds This PR refactors and unifies the debug layer control logic in slang-test. A new `-disable-debug-layers` option is introduced, allowing debug builds to skip enabling the validation (debug) layer. This is currently needed to ensure stability in the debug test suite. Previously, different toggles such as ENABLE_VALIDATION_LAYER, ENABLE_DEBUG_LAYER, and debugLayerEnabled were used inconsistently across different components of slang-test. This PR standardizes the logic by using a single variable, debugLayerEnabled, to control the enabling/disabling of the debug layer internally. Notes: By default, the debug/validation layer is enabled in debug builds and is not supported in release builds of slang-test. Fixes: #7132 * Disable spirv-opt for the DebugFunctionDefinition issue * Run debug build only in GCP machines * Fix VUID-vkCmdPipelineBarrier-pBufferMemoryBarriers-02818 dstAcessMask can't include VK_ACCESS_TRANSFER_READ_BIT when stage mask has VK_PIPELINE_STAGE_RAY_TRACING_SHADER_BIT_KHR * Set failed retry limit to 32 --------- Co-authored-by: slangbot <ellieh+slangbot@nvidia.com> Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
* Fix intermittent failure of slang-unit-test-tool/ReplayRecord (#6981)Jay Kwak2025-05-02
| | | | | | | | | | | * Fix intermittent failure of slang-unit-test-tool/ReplayRecord Three problems are addressed: 1. the graphics driver sometimes returns nullptr from GetShaderIdentifier 2. `findRecordFileName()` may not find any records at all. 3. the return value from cleanupRecordFiles() overwrote the error value in `res` and it returned SLANG_OK even when there were errors. * Fix compiler warnings on Windows
* Fix precompiledTargetModule tests (#6455)cheneym22025-02-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fix precompiledTargetModule tests Add SPIRV-Tool linker support to gfx unit tests and use the linker in precompileModule tests that use precompiled modules to reconstitute SPIRV shaders that were modularly compiled. Fix a Slang reference count bug in the precompile service. * Use sm_6_6 New DXC requires higher version for linkability. * Rename helper function, pass by reference * Link through slang-glslang * Add missing files * Fix metal * format code --------- Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com> Co-authored-by: Yong He <yonghe@outlook.com>
* Support cooperative vector (#6223)Jay Kwak2025-01-30
| | | | | | | * Support cooperative vector without Vulkan-header update Adding a Slang support for cooperative vector. But this commit doesn't have Vulkan-header update.
* Fix some robustness issues in the examples (#5984)Anders Leino2025-01-07
| | | | | | | | | | | | | | | * 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
* Fix attribute reflection. (#5823)Yong He2024-12-11
| | | | | | | * Fix attribute reflection. * Fix. * Fix.
* Move switch statement bodies to their own lines (#5493)Ellie Hermaszewska2024-11-05
| | | | | | | | | * Move switch statement bodies to their own lines * format --------- Co-authored-by: Yong He <yonghe@outlook.com>
* formatEllie Hermaszewska2024-10-29
| | | | | | | * format * Minor test fixes * enable checking cpp format in ci
* Fix UAV access for 3d texture mips (#5363)ccummingsNV2024-10-21
|
* Fix incorrect setting of array information for 1d texture arrays in D3D12 ↵ccummingsNV2024-10-21
| | | | (#5361)
* Fixes for Metal ParameterBlock support. (#4752)Yong He2024-07-30
|
* add support for callable shaders in gfx (#3460)skallweitNV2024-05-27
| | | | Co-authored-by: Jay Kwak <82421531+jkwak-work@users.noreply.github.com> Co-authored-by: Yong He <yonghe@outlook.com>
* [gfx] specify resource view buffer range in bytes (#4149)skallweitNV2024-05-13
| | | | | | | | | | | | | * refactor gfx buffer range to use byte range * create buffer view with zero struct stride for ClearUnorderedAccessViewUint/Float * create buffer descriptors on demand * avoid copying gfx.dll --------- Co-authored-by: Yong He <yonghe@outlook.com>
* add missing Result to IRayTracingCommandEncoder::bindPipline (#4148)skallweitNV2024-05-11
|
* [gfx] Cache mutable root shader object in Vulkan (#4119)skallweitNV2024-05-08
| | | | | | | | | | | * fix comment * add caching of mutable root shader objects in vulkan * Fix. --------- Co-authored-by: Yong He <yonghe@outlook.com>
* [GFX] Fix d3d12 buffer view creation logic for StructuredBuffers. (#3954)Yong He2024-04-15
|
* [gfx] compile shaders when creating programs for d3d12/vulkan (#3774)skallweitNV2024-03-16
|
* [SPIRV] Add NonSemanticDebugInfo for step-through debugging. (#3644)Yong He2024-02-28
| | | | | | | * [SPIRV] Add NonSemanticDebugInfo for step-through debugging. * Fix. * Fix.
* Refactor compiler option representations. (#3598)Yong He2024-02-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | * Refactor compiler option representation. * Fix binary compatibility. * Add a test for specifying compiler options at link time. * Fix binary compatibility. * Fix binary compatibility. * Fix backward compatibility on matrix layout. * Fix. * Fix. * Fix. * Fix gfx. * Fix gfx. * Fix dynamic dispatch. * Polish.
* warnings (#3335)Ellie Hermaszewska2023-11-17
| | | | | | | | | | | * ignores * Remove unused variables * Squash out of bounds warning --------- Co-authored-by: Yong He <yonghe@outlook.com>
* Parameter binding and gfx fixes. (#3302)Yong He2023-11-01
| | | | | | | | | | | * Parameter binding and gfx fixes. * Add diagnostics on entry point parameters. * Fix. --------- Co-authored-by: Yong He <yhe@nvidia.com>
* Type layouts for structured buffers with counters (#3269)Ellie Hermaszewska2023-10-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * More tests for append structured buffer * Append and Consume structured buffer tests for DX12 * neaten * test wobble * Add counter layout information to append/consume structured buffers * add getRWStructuredBufferType * Correct definition of get size for append/consume structured buffers * tweak append structured buffer test * Allow initializing counter buffer in render test * vulkan test for consume structured buffer * Handle null counterVarLayout in getExplicitCounterBindingRangeOffset * remove dead code * Implement atomic counter increment/decrement for spirv * explicit spirv test * Add missing check on result * Hold on to counter resources --------- Co-authored-by: Yong He <yonghe@outlook.com>
* Add SPIRV intrinsics for ShaderExecutionReordering and RW/Buffer. (#3252)Yong He2023-10-02
| | | | | | | | | | | | | | | | | * Add SPIRV intrinsics for ShaderExecutionReordering. * Add intrinsics for `Buffer` and `RWBuffer`. * Various spirv fixes. * Marshal bool vector type. * Inline global constants + OpFOrdNotEqual->OpFUnordNotEqual. * Fix. --------- Co-authored-by: Yong He <yhe@nvidia.com>
* Add gfx d3d12 TextureCube UAV case (#3205)SirKero2023-09-13
| | | Co-authored-by: Yong He <yonghe@outlook.com>
* Add Mesh and Task shader support to GFX (#3190)Ellie Hermaszewska2023-09-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Bump vulkan headers Also just use vulkan-headers as a submodule * Add drawMeshTasks to gfx graphics pipelines * Add DispatchMesh overload with no payload, with GLSL intrinsic * Require spirv 1.4 for mesh shaders * Add vulkan mesh shader feature discovery * Add mesh shader stage bits to vk-util * Add mesh and task shader support to render-test * Add mesh and task tests * Preserve "payload" specifier in task shaders * Add mesh shader pipeline support to gfx * Add TODO * Add numThreads attribute for amplification stage * Add payload to task shader test * Drop dependency on d3dx12 * Allow passing payloads from task to mesh shaders * regenerate vs projects * check DispatchMesh name correctly * Add mesh shader tests to failing tests * Detect wave-ops feature on vulkan * Add fuse-product to expected failures This fails because the global varaible `count` is not initialized * Add required extension to WaveMaskMatch SPIR-V impl * Remove meshShader member from pipeline desc * Identify mesh shader support on d3d12
* Remove redundant define form synchapi emulation (#3169)Ellie Hermaszewska2023-08-31
|
* Bail out of infinite timeouts in our posix synchapi emulation (#3129)Ellie Hermaszewska2023-08-18
| | | This can happen if vkd3d-proton triggered a VK_DEVICE_LOST
* Added D3D12 RenderTargetView TextureCube case (#3048)SirKero2023-08-04
| | | | | | | | | * Added D3D12 RenderTargetView TextureCube case * Added D3D12 DepthStencilView TextureCube case --------- Co-authored-by: jsmall-nvidia <jsmall@nvidia.com>
* nsight Aftermath crash example (#2984)jsmall-nvidia2023-07-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Small fixes and improvements around reflection tool. * Make PrettyWriter printing a class. * Aftermath crash demo WIP. * Enable aftermath in test project. * Setting failCount. * Dumping out of source maps. * Improve comments. Simplify handling of compile products. * Other small fixes to aftermath example. * Added Emit SourceLocType. Track sourcemap association meaning. Improved documentation. * Small improvements. * Capture debug information for D3D11/D3D12/Vulkan. * Enable debug info. * Small improvements. * Improve aftermath example README.md.
* Fix handling result codes in D3D12 resource creation calls (#2949)skallweitNV2023-06-29
| | | Co-authored-by: Yong He <yonghe@outlook.com>
* fixed incorrect handling of D3D12_RENDER_TARGET_VIEW_DESC.ViewDimensi… (#2897)kopaka18222023-05-23
| | | | | | | | | | * fixed incorrect handling of D3D12_RENDER_TARGET_VIEW_DESC.ViewDimension for arrays (needs to be set based on the underlying resource and not the requested view. Otherwise members like FirstArraySlice can not be set properly). Also fixes problems with D3D12_RENDER_TARGET_VIEW_DESC.PlaneSlice since Texture2DArray.PlaneSlice and Texture2D.PlaneSlice do not share the same memory location (unlike the MipSlice). * fixed isArray definition for d3d12 texture views --------- Co-authored-by: Yong He <yonghe@outlook.com>
* added D32_S8 format (#2885)kopaka18222023-05-19
| | | | | | | | | | | | | * added D32_S8 format * fixed isTypelessDepthFormat format for DXGI_FORMAT_R32G8X24_TYPELESS * added R32_FLOAT_X32_TYPELESS format to allow (depth component only) shader resource views for the D32_FLOAT_S8_UINT format. - unsure about the changed in the vk-util.cpp: No matching VK_Format? --------- Co-authored-by: Yong He <yonghe@outlook.com> Co-authored-by: jsmall-nvidia <jsmall@nvidia.com>
* fixed shader resource views for multisample textures (#2880)kopaka18222023-05-11
|
* vkd3d and dxvk integration (#2823)Ellie Hermaszewska2023-04-29
| | | | | | | | | | | | | | | | | | | | | | | | | * Add d3d sources for linux builds * Return NOT_IMPLEMENTED for shared handle support on Linux * Enable DirectX api on Linux * Do not report DX11 support without FXC * Initial version of SynchAPI emulation * Neaten dx library name handling * Neaten and use posix-synchapi * Add premake option for DirectX on Vulkan * s/SLANG_ENABLE_VKD3D_PROTON/SLANG_ENABLE_VKD3D * Skip failing tests on vkd3d * Regenerate vs projects * Silence unused var warning
* Minor tidyings around d3d usage (#2854)Ellie Hermaszewska2023-04-29
| | | | | | | | | | | | | | | | | | | | | | | * Remove unused COM annotation * Move SLANG_ENABLE_DXBC_SUPPORT to slang.h * Add DX11 simple compute test * Remove unnecessary COM parameter annotation * Run compute smoke test for DX12 * Ignore d3d11 tests when we do not have fxc * Do not try to find NVAPI on Linux * Add some logs to .gitignore * Minor cleanups in d3d12 headers * Fix tautological comparison (due to integer overflow) * Limit OutputDebugStringA to Windows
* Changes for vkd3d proton (#2813)Ellie Hermaszewska2023-04-20
| | | | | | | | | | | | | | | | | | | | | | | | * Add some caches to .gitignore * Remove appendWideChars Use String::toWString instead * s/Sleep/sleepCurrentThread * formatting * Expand set of shared libraries which have buggy dlclose Work around https://github.com/microsoft/DirectXShaderCompiler/issues/5119 and https://github.com/doitsujin/dxvk/issues/3330 libdxcompiler.so invokes UB on dlclose, the dxvk libs break GDB when closed * Add assert for specialization failure on DX11 As a band aid for https://github.com/shader-slang/slang/issues/2805 * More fine grained selection of directx features
* Bugfix: compiler will run forever to eliminate dead code (#2809)winmad2023-04-14
| | | | | | | | | | | | * Add a test case that the compile will run forever * Fix. * fix. --------- Co-authored-by: Lifan Wu <lifanw@nvidia.com> Co-authored-by: Yong He <yhe@nvidia.com>
* Some small fixes with Windows/DX usage (#2797)Ellie Hermaszewska2023-04-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Correct case of windows.h includes * Use Slang::SharedLibrary to load directx dlls * s/max/std::max/ * Factor common OS code in calcHasApi * Add DXIL test for compute/simple * s/false/FALSE for calls to WinAPI functions * Factor common OS code in gfxGetAdapters * 2 missing headers d3d12sdklayers for ID3DDebug climits for UINT_MAX * Define out unused function on Linux * Only try to load Vulkan and CUDA on Windows or Linux * simplify D3DUtil::getDxgiModule * Remove WIN32_LEAN_AND_MEAN &co from source files Add a global define * Set WIN32_LEAN_AND_MEAN &friends in headers Restore previous state also * regenerate vs projects
* Preliminary support for realtime clock (#2772)jsmall-nvidia2023-04-04
| | | | | | | | | | * #include an absolute path didn't work - because paths were taken to always be relative. * Initial support for realtime clock. * Add realtime-clock render feature where seems appropriate. * Fixes to make NVAPI compile properly. Change realtime-clock.slang check to use maths that can't overflow.
* GFX: make dispatch commands return error code. (#2625)Yong He2023-02-06
| | | | | | | | | * GFX: make dispatch commands return error code. * Fix cuda. --------- Co-authored-by: Yong He <yhe@nvidia.com>
* Fix supported shader model check in D3D12 device (#2503)skallweitNV2022-11-09
| | | | | | | * Fix supported shader model check in D3D12 device * Add comment on shader model list order. Co-authored-by: jsmall-nvidia <jsmall@nvidia.com>
* Initial version of DeviceLimits implemented in d3d12, d3d11, vulkan and cuda ↵skallweitNV2022-11-07
| | | | (#2496)
* Add AdapterLUID to identify GPU adapters (#2492)skallweitNV2022-11-04
| | | | | * Add AdapterLUID to identify GPU adapters * Remove adapter option in render-test
* Add gfxGetAdapters function (currently implemented for D3D12/Vulkan) (#2486)skallweitNV2022-11-03
| | | | | | | | | | | * Add gfxGetAdapters function (currently implemented for D3D12/Vulkan) * Extend to handle DirectX11 and CUDA * Use blob to return adapter list and add AdapterList helper * Replace strncpy with memcpy Co-authored-by: jsmall-nvidia <jsmall@nvidia.com>
* Fix d3d debug layer error on setting clear value. (#2458)Yong He2022-10-26
|
* Fix D3D12 dispatchRays() when using an empty miss and/or hitgroup table (#2468)skallweitNV2022-10-26
|
* Make `optimalClearValue` optional in `ITextureResource::Desc` (#2450)Yong He2022-10-13
| | | Co-authored-by: Yong He <yhe@nvidia.com>
* Add gfx debug layer trampoline for D3D12 interfaces. (#2445)Yong He2022-10-12
| | | Co-authored-by: Yong He <yhe@nvidia.com>
* Allow setting shader model upon d3d device creation. (#2442)Yong He2022-10-12
| | | | | | | | | * Allow setting shader model upon d3d device creation. * Add sm_6_7 profile. * More fixes and cleanups. Co-authored-by: Yong He <yhe@nvidia.com>