| Age | Commit message (Collapse) | Author |
|
(#3217)
* Move auto-diff force inlining step to before `processAutodiffCalls`
* Fix `replaceUsesWith` to handle existing inst defined after current use.
* Fix.
---------
Co-authored-by: Yong He <yhe@nvidia.com>
|
|
`SelectExpr` (#3219)
* Redirect destination-driven lowering logic to regular lowering for select expr
* Add test
|
|
* Fix atan2 stdlib derivative. Add tests for atan2
* Create dstdlib-atan2.slang.expected.txt
* Update tests
|
|
* Direct SPIRV: Rasterization pipeline tests.
* Fixup.
* Fix.
---------
Co-authored-by: Yong He <yhe@nvidia.com>
|
|
exporting type information (#3209)
* Initial: add a DiffTensor impl
* Auto-binding and diff tensor implementations now work
* Refactored diff-tensor implementation + added py-export for struct types
* Cleanup
* Update slang-ir-pytorch-cpp-binding.cpp
* Updated test names
* Update autodiff-data-flow.slang.expected
* Add more versions of load/store & default generic args for DiffTensorView.
* Add diagnostic for default generic arg and more tests
* Add more `[AutoPyBind]` tests
|
|
* Handle combined image and samplers in spirv
* less expected failure
---------
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
* Neaten emitInst
* Memoize types in spirv asm blocks
* less expected failure
|
|
Co-authored-by: Yong He <yhe@nvidia.com>
|
|
Co-authored-by: Yong He <yhe@nvidia.com>
|
|
predecessors (#3211)
* Add test case for while loop
* Fix loop inversion issue that caused ordinary blocks with multiple predecessors
The original version can leave the CFG in an invalid state with `e4` not being a break block or merge point, but having multiple predecessors.
The updated version creates a separate jump block for each break instruction to avoid this issue.
* Fixup tests
|
|
Co-authored-by: Yong He <yhe@nvidia.com>
|
|
* Use direct spirv in hello-world example.
* Use vulkan 1.1
* Use vulkan 1.2.
* fix.
* Fix test.
---------
Co-authored-by: Yong He <yhe@nvidia.com>
|
|
Co-authored-by: Yong He <yhe@nvidia.com>
|
|
* Add all RayQuery SPIRV Intrinsics.
* Fix
* Fix.
* fix.
* Fix.
* Fix.
* Fix.
---------
Co-authored-by: Yong He <yhe@nvidia.com>
|
|
* Direct SPIRV for RayTracing Inline.
* Fix.
* Cleanup.
* Fix compile error.
---------
Co-authored-by: Yong He <yhe@nvidia.com>
|
|
SPIR-V (#3200)
* Correctly identify the number of operands to image sampling operands in SPIR-V
* Neaten imageoperands warning test
* Neaten imageoperands warning test
|
|
* 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
|
|
* Fix attribute highlighting + language server crash.
* Fix wave intrinsic.
* Fix.
* Fix.
---------
Co-authored-by: Yong He <yhe@nvidia.com>
|
|
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
Co-authored-by: Yong He <yhe@nvidia.com>
|
|
* Incur l-value conversion cost during overload resolution.
* Fix compile error.
* cleanup.
---------
Co-authored-by: Yong He <yhe@nvidia.com>
|
|
Co-authored-by: Yong He <yhe@nvidia.com>
|
|
unresolved `fn` (#3191)
* Fix compiler crashing on unresolved decl-ref
* Update autodiff-custom-diff-unresolved.slang
---------
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
* Fix GLSL output for `gl_ClipDistance` input builtin.
* Fix.
---------
Co-authored-by: Yong He <yhe@nvidia.com>
|
|
method. (#3192)
* Add a unit test
* Fix.
---------
Co-authored-by: Lifan Wu <lifanw@nvidia.com>
Co-authored-by: Yong He <yhe@nvidia.com>
|
|
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
* Update prebuilt glslang binaries
* Add test for GL_EXT_texture_shadow_lod functions.
* fix
---------
Co-authored-by: Yong He <yhe@nvidia.com>
|
|
* Make a warning if a [mutating] method is passed as an in param.
* Kick CI.
---------
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
|
|
* Fix HLSL SER Intrinsics.
* Fix GFX Vulkan shader creation bug.
---------
Co-authored-by: Yong He <yhe@nvidia.com>
|
|
* Add __truncate and __sampledType for spirv_asm
Allows some texture tests to start passing
* add __isVector
Currently unused
* Add 1-vector legalization pass (WIP)
* Add capabilities for image types
* neaten instruction dumping
* add 1-vector test
* Add a couple of cases to vec1 legalization
* Remove texture tests from expected failures
* comment
* regenerate vs projects
* Remove redundant define form synchapi emulation
* refactoring image methods
* All sample functions refactored
* Remove incorrect glsl intrinsics
Partially addresses https://github.com/shader-slang/slang/issues/3174
* __subscript image ops via writing funcs
* Extract texture struct writing from core.meta.slang
* Abstract out cuda intrinsic
* Remvoe erroneous call to opDecorateIndex
* spirv asm IR utils
* Correct position of loads for SPIR-V asm inst operands
* Raise constructors to global scope during spir-v legalization
* Correct snippet output
* Implement most texture sampling ops for SPIR-V
* Legalize 1-vectors for glsl too
* Make SPIR-V inst operands non-hoistable
* Better 1-vector legalization
* Put textures in ptrs for spirv
* insert missing break
* Add vec1 legalization test
* Add some missing pieces to slang-ir-insts
* Greatly neaten vec1 legalization
* a
* Neaten vec1 legalization
* Add image read and write intrinsics for spir-v
* Squash warnings
* regenerate vs projects
* Drop redundant guards
* Drop 5 tests from expected failure list
* Inst numbering changes to cross compile tests
* vec1 legalization tests only on vk
* Correct location of asm op emit
* Inline constant in spirv-asm
* Correct signedness for lane in wave intrinsics
* Extract element from float1 for cuda
* squash warnings
* Neaten spirv-emit
* dedupe more capabilities
* warnings
* neaten assert
* comments
* comments
|
|
* Loop inversion: Handle case where loop can have additional inner breaks
- We now have another critical-edge-breaking block `e4` that is the target of inner breaks.
- Both `e4` and `e1` (the break branch from the loop condition) branch to the loop's ne break block `b2`.
- `b2` is a clone of the old break block `b`, and it simply branches to the old break block.
This fixes an IR validation issue in `tests/autodiff/reverse-while-loop-2.slang`
* Delete region-wave-masks.slang
---------
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
* Proper lowering of functiosn that returns NonCopyable values.
* Fix tests.
* Fix clang errors.
* Fix.
* Fix clang error.
---------
Co-authored-by: Yong He <yhe@nvidia.com>
|
|
* Update slang-llvm.
* Fix.
* fix.
* Fix unit tests for multi-thread execution.
* Fix tests.
* fixes.
* update tests.
* Add gfx-smoke to linux expected failure list.
* Try fix test.
---------
Co-authored-by: Yong He <yhe@nvidia.com>
|
|
* Inline all RayQuery/HitObject typed functions when targeting GLSL.
* update test.
---------
Co-authored-by: Yong He <yhe@nvidia.com>
|
|
* Fix atomics intrinsics and buffer layout lowering.
* Fix.
* Add more test.
* Fix.
---------
Co-authored-by: Yong He <yhe@nvidia.com>
|
|
* Bottleneck type-cast-int-val creation through ASTBuilder
* Update slang-ast-builder.h
|
|
|
|
unnecessary loop state (#3165)
* Extend the unit tests for MxLayeredMaterial
* Add breaking loop test
* Fix subtle corner-case with vars getting hoisted out of the loop creating unnecessary loop state
* remove whitespace changes
* Create loop-init.slang.expected.txt
* Add filecheck tests to ensure correct loop state
* Update comment
---------
Co-authored-by: winmad <winmad.wlf@gmail.com>
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
* Fix memory barrier intrinsics.
Makes them produce the same spirv code as dxc.
* Fix.
* filecheck barrier test for spirv backend.
* Fix glsl intrinsic definition.
* Fix intrinsics.
* Fix intrinsics.
* Fix.
* Fix.
---------
Co-authored-by: Yong He <yhe@nvidia.com>
|
|
* Wave intrinsics.
* scalar intrinsics.
---------
Co-authored-by: Yong He <yhe@nvidia.com>
|
|
* Correct parsing spirv with no rhs operands
* Guard against eof
|
|
Co-authored-by: Yong He <yhe@nvidia.com>
|
|
|
|
work. (#3158)
Co-authored-by: Ellie Hermaszewska <ellieh@nvidia.com>
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
* Add `target_switch` and `__intrinsic_asm` statement.
* Cleanup.
* WaveGetActiveMask, WaveGetActiveMask, WaveCountBits.
* WaveIsFirstLane.
* More wave intrinsics.
* wave intrinsics.
* merge fix.
* Fix.
* Fix.
* Update test.
* update test.
* Fix.
---------
Co-authored-by: Yong He <yhe@nvidia.com>
|
|
|
|
* Add -spirv-core-grammar option to load alternate spirv defs
Also embed a version to use by default
* Use perfect hash for spv op lookup
* Neaten perfect hash embedding
* Refactor spirv grammar lookup in preperation for more kinds of lookups
* Load spirv capability list from spec
* Add all SPIR-V enums to lookup table
* regenerate vs projects
* appease msvc
* Use string slices for spir-v core grammar lookups
* wiggle
* comment
* Add OpInfo for spv ops
* regenerate vs projects
* Embed op names
* Add min/max operand counts and enum categories to spirv info
* neaten
* Operand kinds for spirv ops
* Store and embed all information relating to spirv enums and qualifiers
* Use SPIR-V spec to position instructions in spirv_asm blocks
* Neaten spir-v info embedding
* Neaten perfect hash embedding
* Add assignment syntax to spirv_asm snippets
* Better errors for spirv_asm parser
* Add warning for too many operands in spirv asm
* squash warnings
* neaten
* test wiggle
* Lookup enums for spirv
* Put OpCapability and OpExtension in the correct place for spirv_asm blocks
* Tests for OpCapability and OpExtension
* ci wiggle
* Add expected failure
* Allow raising immediate values to constant ids where necessary in spirv_asm blocks
* Allow bitwise or expressions and numeric literals in spirv_asm blocks
* test numeric literals
* Fix memory issues.
* fix.
---------
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
* Fix issue with trivial loop detection
* Fix issue with unreachable blocks in break elimination
Add logic to avoid eliminating loops with multi-level breaks.
* Incorporate feedback
- Use a boolean for multi-level break check
- Use dominator trees for region check instead of exhaustive enumeration
- Fix potential issue with enumerating parent break blocks.
* fix
|
|
* Initial version of spirv_asm block
* Correct indentation of parent instruction dumping
* neater dumping for spirv_asm instructions
* Add $$ DollarDollar token
* Allow passing addresses to spirv_asm blocks
* spirv OpUndef
* String literals in spirv asm
* OpName for spirv_asm ids
* Correct failure in lower spirv_asm
* correct position for spirv_asm idents
* comment correct
* several more tests for spirv_asm blocks
* Fill out some unimplemented functions for spirv_asm expressions
---------
Co-authored-by: Yong He <yonghe@outlook.com>
|