summaryrefslogtreecommitdiffstats
path: root/tools/gfx-unit-test
Commit message (Collapse)AuthorAge
...
* Fix validation errors (and hang) in swapchain resize test (#2578)Ellie Hermaszewska2023-01-06
| | | | | | | * Use same format as swapchain for framebuffer in swapchain resize test * Use correct resource state for vertex buffer in swapchain resize test * Call acquireNextImage before drawing to fix validation error in swapchain resize test
* Shader cache improvements (#2564)skallweitNV2022-12-14
| | | | | | | | | | | | | | | * Make shader cache tests check the output buffer * Add shader cache eviction test * Cleanup comments * Improve TestReporter thread safety * Split lockFile test into two tests * Cleanup PersistentCache tests * Disable multi-threaded tests on aarch64
* Refactor shader cache (#2558)skallweitNV2022-12-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fix a bug in Path::find * Fix code formatting * Fix LockFile and add LockFileGuard * Add PersistentCache and unit test * Replace file path dependency list with source file dependency list * Add note on ordering in Module/FileDependencyList * Remove old shader cache code * Refactor shader cache implementation * Temporarily skip unit tests reading/writing files * Fix warning * Reenable lock file test * Rename shader cache tests and disable crashing test * Testing * Stop using Path::getCanonical * Fix persistent cache lock and test * Fix threading issues * Move adding file dependency hashes to getEntryPointHash() * Fix handling of #include files * Allow specifying additional search paths for gfx testing device * Work on shader cache tests * Update project files * Revive shader cache graphics tests * Split graphics pipeline test * Fix compilation
* Cleanup crypto utilities (#2549)skallweitNV2022-12-02
| | | | | | | * Consolidate crypto functions into single module * Migrate rest of code to new crypto module * Fix name conflict
* FileStream-based implementation for updating cache index file (#2485)lucy96chen2022-11-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Draft FileStream-based implementation for updating cache file * File streams fully integrated into shader cache code paths; Tests will not run unless file system is on disk as file streams do not play nicely with in-memory * Brought old code back as fallback path, but tests need to ensure previous is freed first * Testing structure updated, beginning cleanup work * All tests working * Cleanup changes * Removed an extra tab at the end of a line * Cleanup change * Undo externals change * Removed redundant logic for OS vs memory file system handling of the shader cache; Removed extra helper function left over from old cache implementation * Reverted performance change to generate contents hashes when modules are being loaded as this code path is not always followed; Contents hashing now uses a combination of hashing and checking the last modified time for all file dependencies, only reading in and hashing the contents of all files if the last modified hash does not match * Added handling to Module::updateContentsBasedHash for file dependencies which are not from a physical source file on disk; Added test for above Co-authored-by: Lucy Chen <lucchen@nvidia.com> Co-authored-by: Yong He <yonghe@outlook.com>
* Squash warnings (#2515)Ellie Hermaszewska2022-11-16
| | | | | | | | | | | | | | | | | | | | | * Don't use uname -p It's not portable (doesn't work on my machine) * Disable maybe-uninitialized warning on gcc Only false positives at the moment * Squash warning in miniz Allow it to use 64 bit file handing functions with gcc * Use noreturn c++11 attribute in SLANG_RETURN_NEVER * Squash uninitialized variable warnings * Squash const char/char conversion warnings Co-authored-by: Yong He <yonghe@outlook.com>
* Shader cache bugfixes and test additions (#2467)lucy96chen2022-10-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | * Preliminary graphics shader test * Added test checking that a graphics shader is correctly split into two different entries * Removed testing only addition * Changed RequirementDictionary to an OrderedDictionary and added SerialTypeInfo for OrderedDictionary; Added entry point mangled name to the dependency hash * Added test covering failure case discovered as part of Falcor integration * Changed DifferentiableTypeSemanticContext::m_mapTypeToIDifferentiableWitness to an OrderedDictionary * Added serializedAST field to Module in order to save serialized ASTs to avoid reserialization as much as possible; Added classes field to Session in order to save the output of SerialClassesUtil::create to avoid recreating as much as possible * Changed AST hashing to hash the contents of a Module's file dependencies; Renamed all references to AST hashing to contents hashing * Further cleanup * Moved contents hash computation up to Linkage::loadModule and added field to Module to save the computed contents digest * Changed PreprocessorHandler::handleFileDependency to optionally take an ISlangBlob* containing file contents and changed FrontEndPreprocessorHandler::handleFileDependency to add the source code for an included file to the module's contents digest * Removed extraneous addToDigest call * Fixed accidental removal of source code hash for module being loaded
* Cache eviction policy test refinement (#2456)lucy96chen2022-10-20
| | | | | | | | | * Refined cache eviction test; Added check to cache file load to ensure only the maximum number of allowed entries is loaded * Fixed logic error in entry count check * Changed getCacheFile to not append the newline at the end of cache files * Refined if check
* PersistentShaderCache integration (#2453)lucy96chen2022-10-19
| | | | | | | | | | | | | | | | | | | | | | | * Shader cache index integrated into RendererBase; Added test for cache eviction policy (which currently does not pass) * Restructured main if block in getEntryPointCodeFromShaderCache; Post-rebase cleanup * undo local testing only change * Fixed issues causing shader cache tests to fail * Edited gfx.slang to reflect structural changes to IDevice::Desc and to include ShaderCacheDesc; Modified how the cache is reading in the file from disk; Added a check to the cache eviction policy test that checks for correct order of entries in the cache as well as eight total expected output files for D3D12 and Vulkan * Removed line in gfx-unit-test.cpp for local testing * Edited .gitignore to ignore all shaders automatically generated by the shader cache tests and removed the test shaders that were previously added; Review changes, most notably with an overhaul of how the cache eviction policy test handles checking order of entries * Ran premake; Removed local testing specific line (again) * Removed expected comparison files from earlier commit; Ran premake * Edited premake5.lua to also ignore the auto-generated shader files from specific shader cache tests * Fixed weird indent in premake5.lua
* Add getVersionString() to IDownstreamCompiler (#2446)lucy96chen2022-10-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * checkpoint * Added shaderCachePath field to IDevice desc in gfx.slang, gfx-smoke.slang should be functional * ran premake * Added getVersionString() to IDownstreamCompiler and implemented it in DownstreamCompilerBase, GlslangDownstreamCompiler, and DXCDownstreamCompiler * Added hashInto to Val and implemented for all subtypes which contain _getHashCodeOverride implementations; nothing hooked up to caching yet * Revert erroneous commits from rebasing * Re-ran premake.bat; changed hashInto implementations to _hashIntoOverride * downstream compiler getVersionString hooked up into shader cache * Rebuild CI, Win32 Release builds successfully locally * Rebuild CI, Win32 and x64 Release build successfully locally * Reverted Val::hashInto changes, deferred for later; modified init() for downstream compilers to fetch, hash, and save the hashes of their corresponding dlls (currently implemented for glslang and dxc), changed getVersionString() to directly return the saved hash for key computation * call site changes post-merge; fixing CI build failures * Removed remaining hashInto; Updated hashToString to produce string one byte at a time * Fixed expected output to match new hashToString output order * Missed string edit in hashing related unit tests * Updated dxcapi.h; Replaced getVersionString implementation in glslang with the shared library timestamp, dxc implementation queries for IDxcVersionInfo and IDxcVersionInfo2 then fetches and returns the relevant values * Fixing CI build failures * Changed RawBlob to StringBlob for strings * Modified getVersionString for dxc to always return either the version plus commit hash or shared library timestamp
* Add specialization args test (#2444)lucy96chen2022-10-12
| | | | | * Added specialization args test; small cleanup changes to slang-digest.h * Moved slang::Digest inside namespace Slang
* Shader caching (#2432)lucy96chen2022-10-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Changed all getEntryPointCode calls to use RendererBase::getEntryPointCodeFromShaderCache * Hashing hooked up, tests pass but need to add more to fully test functionality * checkpoint * Checkpoint: File system creation seems functional, saving is broken * checkpoint: Fixed filename generation from MD5 hash, shader blob might be going missing ahead of pipeline state creation * Fixed a lot of bugs related to hash code generation, shader cache is likely working but needs further testing * Added workaround for module loading by re-creating the test device, shader cache test functional * Vulkan shader caching bug fixed, checkpoint commit before more refinement * pre-ToT merge checkpoint * checkpoint commit, improving cache keys * Significantly expanded items included in the dependency hash for Module; Added dependency hash functions to SpecializedComponentType and RenamedEntryPointComponentType * Temporarily disable shader cache test * Mid cleanup changes, solution successfully builds * Added several helper update functions to slang-md5 to help simplify usage; Added a function under ISession to compute a hash for all linkage-related items; Function renames and cleaned up some comments * Ran premake.bat; Renamed getASTBasedHashCode to computeASTBasedHash * Added slang unit tests for Checksum and MD5; Extended gfx shader cache test to test with multiple shader files and one shader file with multiple entry points * Solution builds and shader cache tests pass, but at least a couple other tests now failing * ran premake.bat * More cleanup changes * Added shaderCachePath field to IDevice desc in gfx.slang, gfx-smoke.slang should be functional * ran premake * cleanup changes; Adding test printf to getEntryPointCodeFromShaderCache to see if output can be seen in CI * Removed debugging printfs; Added handling for getEntryPointCode() failing * Cleanup changes; Jonathan's fixes to SerialWriter to zero initialize otherwise uninitialized memory; Change to SwizzleExpr creation to zero initialize elementCount * Changed enable_if_t to enable_if * Fixed enable_if * Added test for import vs include and changes to included and imported files; Fixed build errors in CUDA; Renamed shader cache statistics fields * cleanup changes * Readd removed file * Restructured computeDependencyBasedHash calls, added computeDependencyBasedHashImpl to all classes dervied from ComponentType * Applied same restructuring to the AST hash functions * Cleanup changes; Moved HashBuilder out to slang-digest.h and added some helper functions to streamline the process of adding items to a hash * Cleanup; Fixed incorrect expected results for shader import and include test
* Fix for Vulkan ray tracing test using a non-zero raygen shader index (#2380)lucy96chen2022-08-25
| | | | | | | * Fixed math errors in SBT creation causing a ray tracing test to fail with a fully zero output when given a non-zero raygen shader index * Removed unnecessary code * raygen memcpy now copies the 32 bytes from srcHandle and zeroes out the remaining 32 bytes due to 64 byte alignment
* Call `gfx` in slang program. (#2370)Yong He2022-08-20
|
* Add gfx interface definition in Slang. (#2364)Yong He2022-08-16
| | | | | | | | | | | | | | | | | | * Add gfx interface definition in Slang. - add gfx interface definitons in Slang. - fix slang compiler to correctly type-check `out` interface argument. - modify gfx interface to be fully COM compatible - add convenient ShaderProgram creation methods to gfx. * Fix compile errors and warnings. * Update project files * Fix cuda. * Properly implement queryInterface in command encoder impls. Co-authored-by: Yong He <yhe@nvidia.com>
* Split render-cuda.cpp into smaller files (#2334)lucy96chen2022-07-25
| | | | | | | | | | | | | * render-cuda split, compile errors galore due to missing includes etc. * render-cuda split and fully compiles * Ran premake.bat to disable cuda; Added all new files * Removed render-cuda files * CI fixes * Rerun CI
* Support `class` types. (#2321)Yong He2022-07-12
| | | | | | | | | * Support `class` types. * Ignore class-keyword test * Fix codereview comments and warnings. Co-authored-by: Yong He <yhe@nvidia.com>
* Added a second set of shaders to the ray tracing test and added another test ↵lucy96chen2022-06-21
| | | | that uses these shaders; Fixed a bug in Vulkan's RayTracingCommandEncoder::dispatchRays() where the supplied raygen shader index wasn't being used (#2290)
* Swapchain resize now draws both before and after the resize operation (#2281)lucy96chen2022-06-14
|
* Add simple ray tracing test (#2261)lucy96chen2022-06-07
| | | | | | | | | | | | | * checkpoint commit * Simple ray tracing test works * Removed unnecessary shaders and code but image is completely black * Simple ray tracing test for a 2x2 texture working; Added new helper functions to gfx-test-texture-util for stripping padding from texture resource readback and dumping textures to disk * Renamed variables * Ignore test if ray tracing isn't supported
* Add simple swapchain resize test (#2249)lucy96chen2022-06-02
| | | | | | | | | * Added swapchain resize test * fixed externals * Rerun CI * Ignore test if swapchain fails to create
* Changed all uses of attachment (in the context of render/depth stencil ↵lucy96chen2022-05-04
| | | | | targets) to target (#2214) Co-authored-by: Theresa Foley <10618364+tangent-vector@users.noreply.github.com>
* GFX renaming work part 2: slang-gfx.h renames (#2194)lucy96chen2022-04-21
| | | | | | | | | | | | | * Fixed all build errors and type conversion warnings from renames in slang-gfx.h * Made necessary build fixes to the CUDA implementation * Renamed ITextureResource::Size to ITextureResource::Extents * More rename changes based on CI errors * More renames to fix CI build errors * Rerun tests
* GFX renaming work part 1 (#2183)lucy96chen2022-04-14
| | | | | * Added new typedefs for Size, Offset, Count, and Index; Replaced numerous instances of size_t in slang-gfx.h, render-d3d12, render-vk, and renderer-shared with either Size or Offset; Fixed compiler warnings for mismatched numerical types * Renamed Index and Count to GfxIndex and GfxCount, changed to 32 bit from 64 bit
* Texture views/shapes tests part 1 (#2179)lucy96chen2022-04-07
| | | | | | | * Framework for texture views testing working; Small tweaks to texture testing utils; Changed D3D12 readTextureResource to account for non-1 depth * Basic framework for texture views tests working; Test file needs a rename at some point * 1D, 2D, and 3D textures working for ShaderResource, UnorderedAccess, and RenderTarget tests; Fixed some small issues with handling the depth field of 3D textures in Vulkan causing incorrectly cleared textures
* Separated out new texture-related structures and texture data generation ↵lucy96chen2022-03-24
| | | | from texture copying tests into a new util file to make them accessible to all gfx unit tests (#2169)
* Add additional texture to texture copying tests (#2165)lucy96chen2022-03-21
| | | | | | | | | | | | | | | | | | | * Working on finding a better way to do result comparisons in order to accommodate testing different formats and texture types, copying small to large texture currently half broken * All tests except copying into a buffer with an offset working with new code for results comparison, support for most formats WIP * Replaced SubresourceStuff with ValidationTextureData; Added implementation for ValidationTextureFormat::initializeTexel() and changed generateTextureData() to call this * All implemented formats work on D3D12, a few broken for Vulkan * Fixed numerous locations in render-vk.cpp to set aspect masks based on either the format or the provided TextureAspect; All tests except copy to buffer with offset working on new code structure * All texture to texture copying tests work for all non-compressed formats; Test code cleaned up to minimize the amount of stuff needing to be passed between functions * All tests working with all texture types except TextureCube and all non-compressed formats; Temporarily removing test for copying to a buffer at an offset, will likely return in a separate test file * Small cleanup changes * build fixes
* Expose API-specific row alignment values (#2151)lucy96chen2022-03-08
| | | | | | | * Added function to IDevice that retrieves the row alignment for the particular API; Added rowDstStride argument to copyTextureToBuffer and changed D3D12 footprint row pitch to check that the user-supplied stride is correctly aligned before assigning to the footprint's row pitch * Changed alignment from Uint to size_t Co-authored-by: jsmall-nvidia <jsmall@nvidia.com>
* gfx: d3d12 performance optimizations. (#2140)Yong He2022-02-23
| | | | | | | | | | | * gfx: d3d12 performance optimizations. * Fix. * Fix unit test bug. * Add gfx interface for directly allocating GPU descriptor tables. Co-authored-by: Yong He <yhe@nvidia.com>
* Optimize d3d12 mutable shader object implementation. (#2138)Yong He2022-02-19
| | | | | | | | | | | | | * Optimize d3d12 mutable shader object implementation. * Disable mismatched clear value warning message from d3d sdk. * Fix. * Fix. * gfx: Avoid redundant d3d12 QueryInterface call. Co-authored-by: Yong He <yhe@nvidia.com>
* Various gfx fixes. (#2132)Yong He2022-02-16
| | | | | | | | | | | | | | | * Various gfx fixes. * Fix test case. * Fix crash. * Trigger build * Trigger build 2 * Fix vulkan unit tests. Co-authored-by: Yong He <yhe@nvidia.com>
* gfx: Various Vulkan fixes. (#2129)Yong He2022-02-11
| | | | | | | | | * gfx: Various Vulkan fixes. * Fix test case. * Fix vulkan crash. Co-authored-by: Yong He <yhe@nvidia.com>
* gfx: support d3d12 root parameters (#2122)Yong He2022-02-10
| | | | | | | | | | | | | | | | | | | | | | * Various fixes to gfx. * Fix. * Fixes. * Fix. * gfx: support root parameter via user-defined attribute. * Fix. * Fix. * Skip d3d12 tests on win x86. * Fixes. Co-authored-by: Yong He <yhe@nvidia.com> Co-authored-by: jsmall-nvidia <jsmall@nvidia.com>
* Various fixes to gfx. (#2120)Yong He2022-02-09
| | | | | | | | | | | * Various fixes to gfx. * Fix. * Fixes. * Fix. Co-authored-by: Yong He <yhe@nvidia.com>
* Added a simple test for getFormatSupportedResourceStates() (#2118)lucy96chen2022-02-09
| | | | | | | | | | | * Checkpoint * Fixed problem with global variables in supported resource states test, test is functional for both Vulkan and D3D12 * Removed a comment * Added a loop over all existing formats * Rerun tests
* Add gfx interop to allow more direct D3D12 usage scenarios. (#2117)Yong He2022-02-03
| | | | | | | | | | | | | * Add gfx interop to allow more direct D3D12 usage scenarios. * Fix compile error in win32. * gfx: Implement IFence::getNativeHandle() on d3d12. * More GFX-D3D interop interface. * Fix cuda. Co-authored-by: Yong He <yhe@nvidia.com>
* Add implementations for resolveResource() to D3D12 and Vulkan backends (#2094)lucy96chen2022-01-25
| | | | | | | | | * Added implementations for resolveResource to both D3D and Vulkan backends * Simple test for resolving a multisampled resource written and confirmed to run successfully for D3D12 * Fixed a bug preventing MSAA from working in Vulkan * Changed test format to RGBA32 Float (because swiftshader)
* Vulkan implementations for copyTexture, copyTextureToBuffer, and ↵lucy96chen2022-01-19
| | | | | | | | | | | | | | | | | | | | | | | | textureSubresourceBarrier (#2080) * Added preliminary implementations for Vulkan's copyTexture, copyTextureToBuffer, and textureSubresourceBarrier * Simple copyTexture test working * Expanded test to use textureSubresourceBarrier() to change resource states before copying out to a buffer; Changed copyTextureToBuffer() to assert that only a single mip level is being copied; Test passes on Vulkan only * Fixed an incorrect loop condition in D3D12's textureSubresourceBarrier and changed the size of the results buffer to pre-account for padding; Test runs in D3D12 but does not pass * D3D12 test working, compareComputeResult for buffers now takes an offset into the results * Refactored texture copying tests * Second test written but does not copy correctly * Fixed texture creation in D3D12 to take into account the subresource index when copying texture data so it actually copies all slices instead of just the ones in the first array layer; Second test working on both D3D12 and Vulkan * Added a note for future tests to be added for texture copying; Fixed build errors in CUDA Co-authored-by: Yong He <yhe@nvidia.com> Co-authored-by: Theresa Foley <tfoleyNV@users.noreply.github.com>
* Various fixes to GFX, nested parameter block test for d3d12. (#2081)Yong He2022-01-14
| | | | | | | | | | | | | * Various fixes. * Add nested parameter block test. * Remove slang-llvm licence info * Ingore slang-llvm/ directory. * Fixup. Co-authored-by: Yong He <yhe@nvidia.com>
* Various fixes to gfx. (#2074)Yong He2022-01-10
| | | | | | | * Various gfx fixes. * Fixup. Co-authored-by: Yong He <yhe@nvidia.com>
* Draw call tests for Vulkan (#2073)lucy96chen2022-01-10
| | | | | | | | | | | | | | | | | | | | | | | | | * Added instancing support to Vulkan, drawInstanced() test image is upside-down * Fixed inverted drawInstanced() test output by changing Vulkan viewport convention * Replaced vkCmdDraw with vkCmdDrawIndexed in all non-indirect indexed draws, drawIndexedIndirect test now working for Vulkan * Moved index and vertex buffer binding into setIndexBuffer and setVertexBuffers; Defaulted countBuffer to nullptr and countOffset to 0 and added a check for non-null countBuffer to drawIndirect and drawIndexedIndirect in Vulkan; All Vulkan draw tests working (but D3D12 tests broken) * Added support for drawInstanced and drawIndexedInstanced to D3D11 and added tests for both, however D3D11 tests are currently disabled due to readTextureResource assuming a fixed pixel size (among other possible problems); Fixed issues causing D3D12 tests to fail after major back-end fixes to get Vulkan up and running * Removed testing function for dumping images and some other commented out code * Removed some commented out code * Fix initializer list causing builds to fail (attempt 1) * Removed initializer list for VertexStreamDesc in createInputLayout() and fill in struct fields normally (build fix attempt 2) * Removed default values from VertexStreamDesc and changed all initializer lists to reflect this change * Moved applyBinding before setVertexBuffer in RenderTestApp::renderFrame() to ensure the pipeline has already been bound before vertex buffers are * Changed D3D11's readTextureResource to calculate pixel size using format-specific size information; Removed wrapper around D3D11 instanced and indexed instanced draw tests
* Buffer allocation backend. (#2045)ZanderMajercik2022-01-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * removed initialization of upload resource for CPU visible buffers (D3D12, Vulkan) * reverted slang-gfx.h change * declared DescBase::hasCpuAccessFlag() const to make backend changes compile under gcc * commit before checking master branch * commit before merge * commit before checking master * commit before merging upstream * revert vulkan changes * commit before testing on master * commit before merge with master * reverted bad merge changes * reverted more bad merge changes in render-d3d12.cpp * reverted buffer transition in _uploadBufferData * implemented bufferBarrier() in render-d3d12.cpp * reverted uneccesary transition in createBuffer * create staging buffer even when AccessFlag::None passed to D3D11 createBufferResource * renamed AccessFlags to MemoryType Co-authored-by: Yong He <yonghe@outlook.com>
* gfx: Add tests for instanced, indexed instanced, and indirect draw calls (#2060)lucy96chen2021-12-16
| | | | | | | | | | | | | | | | | | | * Implemented instancing for the drawInstanced test and confirmed that test values taken at specific pixel location match expected values * Removed writeImage() helper function as this is for debugging only * Factored out shared test code and wrapped tests inside a base class with derived structs for each individual draw call variant; Added a test for indexed, instanced draws but test is currently not working correctly * Indexed instancing test finish and working; Further refactor to move code that fills the test result array and creates the vertex and color buffers to the base test class * Commented out image dump helper function at the top as it may still be needed for the remaining draw tests * Added a new struct derived from the base test class for testing indirect but non-indexed draws; Moved required command signatures for indirect draws into D3D12Device to ensure they continue to exist outside of their respective draw calls; Moved command signature creation into D3D12Device::initialize(); Small consistency cleanup changes * Added working indexed indirect draw call test * Moved expectedResult and compareComputeResult() call into getTestResults() and renamed to checkTestResults() * Rerun tests
* Implement instanced and indirect draw calls (#2053)lucy96chen2021-12-09
| | | | | | | | | | | | | | | | * Added implementations of drawInstanced, drawIndexedInstanced, drawIndirect, and drawIndexedIndirect to both render-d3d12 and render-vk * drawInstanced test WIP * Draw calls implemented, working on debugging test * Added new test and accompanying shader file * Fixes. * Fixes. Co-authored-by: Yong He <yhe@nvidia.com> Co-authored-by: Yong He <yonghe@outlook.com>
* Remove `PipelineType` from gfx header. (#2051)Yong He2021-12-09
| | | Co-authored-by: Yong He <yhe@nvidia.com>
* D3D12 and Vulkan to CUDA Texture Sharing (#2038)lucy96chen2021-12-08
|
* gfx: D3D12 and VK Fence implementation. (#2048)Yong He2021-12-07
| | | | | | | | | | | | | * gfx: D3D12 and VK Fence implementation. * Fix. * Update project files. * Revert project file changes. * Remove project files Co-authored-by: Yong He <yhe@nvidia.com>
* gfx Mutable Root shader object implementation. (#2042)Yong He2021-12-06
| | | | | | | * gfx Mutable Root shader object implementation. * Fix x86 build. Co-authored-by: Yong He <yhe@nvidia.com>
* Add BGRA8 Unorm SRGB to the list of supported formats (#2016)lucy96chen2021-11-15
| | | Co-authored-by: Yong He <yonghe@outlook.com>
* Add support for buffer sharing from Vulkan to CUDA (#2008)lucy96chen2021-11-12
| | | | | | | | | | | | | | | | | | | * Added getSharedHandle() and additional code to handle shareable buffer creation to Buffer::init() and initVulkanInstanceAndDevice() for Vulkan; Modified createBufferFromSharedHandle() in CUDA to assign externalMemoryHandleDesc.type based on the type of handle being provided; Added an additional test case to get-shared-handle.cpp testing Vulkan to CUDA * Added createBufferFromNativeHandle() to Vulkan and enabled corresponding test * disable cuda * Fixed getSharedHandle() for D3D12 buffers assigning Win32 as the handle's source * Removed a dangling comment inside Buffer::init() * Added a missing override; Added code to check that a physical device supports the necessary external memory extensions before adding them to the deviceExtensions list; Added #if SLANG_WINDOWS_FAMILY guards around all Windows-specific code and sharedHandleVulkanToCUDA test (which uses said platform-specific code) * Added Windows check around vkGetMemoryWin32HandleKHR in vk-api.h * Added missing Windows check around BufferResourceImpl destructor * Added a temporary hack to ensure synchronization between devices, which solves an issue with buffer sharing resulting in incorrect values being read back; Added #if SLANG_WIN64 around all CUDA tests as the backend currently only supports running CUDA on 64-bit (despite devices being created successfully in a 32-bit config)