summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-10-13Make `optimalClearValue` optional in `ITextureResource::Desc` (#2450)Yong He
Co-authored-by: Yong He <yhe@nvidia.com>
2022-10-13Fix missing implementations in ConjunctionSubtypeWitness. (#2449)Yong He
* Fix missing implementations in ConjunctionSubtypeWitness. * Fix. Co-authored-by: Yong He <yhe@nvidia.com>
2022-10-12Add gfx debug layer trampoline for D3D12 interfaces. (#2445)Yong He
Co-authored-by: Yong He <yhe@nvidia.com>
2022-10-12Allow setting shader model upon d3d device creation. (#2442)Yong He
* 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>
2022-10-12Add support for SV_ViewID (#2440)Ellie Hermaszewska
closes https://github.com/shader-slang/slang/issues/2410 Co-authored-by: Yong He <yonghe@outlook.com>
2022-10-12Add specialization args test (#2444)lucy96chen
* Added specialization args test; small cleanup changes to slang-digest.h * Moved slang::Digest inside namespace Slang
2022-10-12Shader caching (#2432)lucy96chen
* 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
2022-10-11Small IR cleanups. (#2441)Yong He
2022-10-11Ignore d3d12 tests on x86. (#2439)Yong He
2022-10-10Support multi-level break + single-return conversion + general inline. (#2436)Yong He
* Support multi-level break. * Single return. * Add test for inlining `void` return-type functions. Co-authored-by: Yong He <yhe@nvidia.com>
2022-10-08Fixes around byte decode lite (#2438)jsmall-nvidia
* #include an absolute path didn't work - because paths were taken to always be relative. * Small improvements around Lite byte decode. * Missing break.
2022-10-08Fix for issue with user attribute lookup (#2437)jsmall-nvidia
* #include an absolute path didn't work - because paths were taken to always be relative. * Add handling for root paths. * Fixes around absolute paths. * Add SimplifyStyle * Remove unrequire include. * Fix some details around RelativeFileSystem canonical paths. * For MemoryFileSystem make sure "/a" and "a" maps to same canonical path. * Add test for canonicalPath. * Improve comment. * More testing around canonical paths. * Fix for user attribute lookup issue. * Add a test. * Small improvements in test. * Improve the comments around lookup workaround.
2022-10-07Prevent out of bounds access by unaligned access in decodeLiteUInt32 (#2435)sdawson-nvidia
This prevents memory tools like gflags causing an exception on the out of bound access. Co-authored-by: jsmall-nvidia <jsmall@nvidia.com>
2022-10-06Add syntax for multi-level break. (#2431)Yong He
* Add syntax for multi-level break. * Fix. * Fix. Co-authored-by: Yong He <yhe@nvidia.com>
2022-10-06Update README.mdjsmall-nvidia
2022-10-06Improvements around absolute paths and file systems (#2433)jsmall-nvidia
* #include an absolute path didn't work - because paths were taken to always be relative. * Add handling for root paths. * Fixes around absolute paths. * Add SimplifyStyle * Remove unrequire include. * Fix some details around RelativeFileSystem canonical paths. * For MemoryFileSystem make sure "/a" and "a" maps to same canonical path. * Add test for canonicalPath. * Improve comment. * More testing around canonical paths.
2022-10-05Various gfx fixes. (#2434)Yong He
2022-10-04Fix `ApplyExtensionToType` on own type being extended. (#2430)Yong He
Co-authored-by: Yong He <yhe@nvidia.com>
2022-10-04Squash some warnings from gcc 12.2 (#2428)Ellie Hermaszewska
* Use premake's linkgroups rather than specifying the flags ourselves Fixes linker warning about unterminated --start-group * C++ only warnings only when compiling C++ * compile miniz and l4z as C, not C++ * Use enum over 0 literal Silences enum-literal-compare warning Co-authored-by: jsmall-nvidia <jsmall@nvidia.com>
2022-10-04Set slang-tag-version.h on windows builds (#2429)jsmall-nvidia
* #include an absolute path didn't work - because paths were taken to always be relative. * Create the slang-tag-version.h file on windows. * Add non binary files to the artifact upload for windows. * Add headers/docs to linux artifact.
2022-10-04Shader container proposal (#2387)jsmall-nvidia
* #include an absolute path didn't work - because paths were taken to always be relative. * WIP artifact container format. * WIP Artifact/shader cache document. * Some more thoughts around caching system. * Small improvements around source hash. * More improvements to container discussion. * Discussions about naming and combining options. * Small fixes to container format doc. * Small improvements around container doc. * Some more improvements to container doc. * First effort around API and container format. * More improvements around container doc. * First stab at a proposed approach. * Fix some typos. * Some other small improvements.
2022-10-03IMutableFileSystem::saveFileBlob (#2427)jsmall-nvidia
* #include an absolute path didn't work - because paths were taken to always be relative. * Remove ref count for Entry in RiffFileSystem. Free up backing Entry types (to work around Dictionary not doing this). * Some small improvements to RiffFileSystem. * Add testing for file systems. * Split out MemoryFileSystem. * Add some documentation around different FileSystems. * Small tiry up - removing unused headers, fixing some comments. Use StringBlob::moveCreate where appropriate. * Small improvement to MemoryFileSystem. Improve documentation comments a little. * Added PathKind * * Make MemoryFileSystem not have implicit directories * Make RelativeFileSystem only allow access to files in file system (kind of like chroot) * Added Path::simplifyAbsolute * Special handling for root of MemoryFileSystem * Improvements around paths for different impls * More improvements around RelativeFileSystem. Special case root handling. * Test archive serialization. Move testinf from compression. Remove the implicit directory test -> doesn't work on all file systems. * Small optimization that removes need for check for a parent unless an item is being *created*. * Add implicit path testing. * Add support for saveFileBlob Add testing for saveFileBlob * Removed TemporaryFileSet Added PlatformUtil::outputDebugMessage * Some small improvements around RelativeFileSystem. * Split out ImplicitDirectoryCollector so can use without requiring compression systems. * Split out StringSliceIndexMap into own files.
2022-09-29Don't run aarch64 builds on PR. (#2426)Yong He
Co-authored-by: Yong He <yhe@nvidia.com>
2022-09-29GFX: support D3D12EnableExperimentalFeatures. (#2424)Yong He
* GFX: support D3D12EnableExperimentalFeatures. * Fix. Co-authored-by: Yong He <yhe@nvidia.com>
2022-09-29Split out MemoryFileSystem (#2422)jsmall-nvidia
* #include an absolute path didn't work - because paths were taken to always be relative. * Remove ref count for Entry in RiffFileSystem. Free up backing Entry types (to work around Dictionary not doing this). * Some small improvements to RiffFileSystem. * Add testing for file systems. * Split out MemoryFileSystem. * Add some documentation around different FileSystems. * Small tiry up - removing unused headers, fixing some comments. Use StringBlob::moveCreate where appropriate. * Small improvement to MemoryFileSystem. Improve documentation comments a little.
2022-09-29Add "wave-ops" feature to D3D12 device (#2423)skallweitNV
2022-09-29RIFF filesystem improvements (#2418)jsmall-nvidia
* #include an absolute path didn't work - because paths were taken to always be relative. * Remove ref count for Entry in RiffFileSystem. Free up backing Entry types (to work around Dictionary not doing this). * Some small improvements to RiffFileSystem. * Add testing for file systems.
2022-09-28Fix release CI script. (#2421)Yong He
* Fix release CI script. * Fix vs Co-authored-by: Yong He <yhe@nvidia.com>
2022-09-28Fix build script for macos aarch64. (#2420)Yong He
* Fix build script for macos aarch64. * fix1 * Fix2. * update vs files Co-authored-by: Yong He <yhe@nvidia.com>
2022-09-28Fix release CI script. (#2419)Yong He
* Fix release CI script. * Fix. * Fix. Co-authored-by: Yong He <yhe@nvidia.com>
2022-09-28Make github CI build aarch64 binaries on release. (#2417)Yong He
2022-09-28Fix gfx debug layer crashes. (#2416)Yong He
Co-authored-by: Yong He <yhe@nvidia.com>
2022-09-28Improvements around diagnostic controls (#2414)jsmall-nvidia
* #include an absolute path didn't work - because paths were taken to always be relative. * Test for disabling warnings. * Output diagnostic if argument parsing fails in render test. * More improvements around disabling diagnostics. * Add support for re enabling a warning. * Add warning controls to help text. * Tidy up around NameConventionUtil. * Make NameConvention an enum. * Handle leading underscores. * Update comment, and remove intial handling of _ prefix.
2022-09-26Support clang-format `file` and `--fallback-style` in slangd. (#2412)Yong He
Co-authored-by: Yong He <yhe@nvidia.com>
2022-09-26Use d3d12/vk debug layer when gfx debug layer is enabled. (#2411)Yong He
* Use d3d12/vk debug layer when gfx debug layer is enabled. * Fix. Co-authored-by: Yong He <yhe@nvidia.com>
2022-09-24Update slang-llvm (#2409)jsmall-nvidia
* #include an absolute path didn't work - because paths were taken to always be relative. * Update to llvm to version without tinfo requirement. * Kick because package download failed.
2022-09-22GFX: improve d3d12 performance. (#2408)Yong He
2022-09-20Fix regression in check-overload. (#2407)Yong He
* Fix regression in check-overload. * Make sure language server supports partiallyAppliedGenericExpr. Co-authored-by: Yong He <yhe@nvidia.com>
2022-09-20Use `printf` in tests. (#2406)Yong He
Co-authored-by: Yong He <yhe@nvidia.com>
2022-09-20Support raw string literals. (#2405)Yong He
* Support raw string literals. * Use raw string literal in tests. Co-authored-by: Yong He <yhe@nvidia.com>
2022-09-20Support partial inference of generic arguments (#2404)Theresa Foley
A commonly requested feature is to be able to supply only some of the arguments to a generic explicitly, while allowing the rest to be inferred. A common example is a function that performs some kind of conversion: To convert<To, From>( From fromValue ) { .... } A user would like to be able to call this operation like: int i = convert<int>( 1.0f ); but the current Slang type checker requires all or none of the generic arguments be supplied. Supplying all of the arguments is tedious: int i = convert<int, float>( 1.0f ); In this case, the `float` type argument is redundant and could be inferred from context. However, if the user tries to omit the generic argument list: int i = convert( 1.0f ); The current type-checker cannot infer the `int` type argument (even if one might claim it *should* infer based on the desired result type). This change adds support for the `convert<int>(...)` case, by allowing a generic to be applied to a prefix of its explicit arguments, and then inferring the remaining arguments from contextual information when that "partially applied" generic is applied to value-level arguments. Most of the changes are just plumbing: adding the notion of a partially applied generic and then supporting them during overload resolution. A single test case is included that covers the `convert`-style use case. It is likely that more testing is needed to cover failure modes of this feature.
2022-09-19Fix d3d12 implementation of `uploadBufferData`. (#2402)Yong He
* Fix d3d12 implementation of `uploadBufferData`. * Add ICommandBufferD3D12::ensureInternalDescriptorHeapsBound(). Co-authored-by: Yong He <yhe@nvidia.com>
2022-09-15Add support for GL_EXT_debug_printf extension to slang (#2399)Qubaef
2022-09-15Run simple compute kernel in gfx-smoke test. (#2400)Yong He
2022-09-15Language feature: pointer sized int types. (#2401)Yong He
* Language feature: pointer sized int types. * Fix. * small change to test. * Fix stdlib. * Fix. * Fix. * Add typedef for `size_t` in stdlib. * Fix test. * Add `intptr_t::size` constant. Co-authored-by: Yong He <yhe@nvidia.com>
2022-09-13Allow interface requirements to reference to the interface type itself. (#2398)Yong He
* Allow interface requirements to reference to the interface type itself. * add comment explaining the change. Co-authored-by: Yong He <yhe@nvidia.com>
2022-09-13Deduplicate AST type nodes and cache lookup operations. (#2397)Yong He
* wip: dedup AST type nodes and cache lookup. * Fix. * Remove profiling. * Fixes. Co-authored-by: Yong He <yhe@nvidia.com>
2022-09-06 Specialize and SSA in a loop + better diagnostics on dynamic dispatch ↵Yong He
failure (#2396) * Report diagnostic when dynamic dispatch failed instead of crashing. * Specialize and SSA in a loop. Explicit specialization only interface. Co-authored-by: Yong He <yhe@nvidia.com>
2022-09-05Fix resource inout param specialization. (#2394)Yong He
Co-authored-by: Yong He <yhe@nvidia.com>
2022-09-05Fix matrix packing/unpacking logic. (#2393)Yong He
Include indirectly referenced witness table in dynamic dispatch. Co-authored-by: Yong He <yhe@nvidia.com>