-
Notifications
You must be signed in to change notification settings - Fork 254
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merge/vsdk 1.4.304 #6199
Merge/vsdk 1.4.304 #6199
Conversation
* Split out SPIR-V -specific legalization of global functions This is a refactoring and should not affect generated code. * Move global inst inlining code into separate function This is a refactoring and should not affect generated code. * Take SPIR-V -specific parts out of GlobalInstInliningContext This is a refactoring and should not affect generated code. * Move 'inlineGlobalValues' to generic inlining context This is a refactoring and should not affect generated code. * Move 'setInsertBeforeOutsideASM' to generic inlining context This is a refactoring and should not affect generated code. * Move generic inlining context into own file This is a refactoring and should not affect generated code. * Run global inlining for WGSL as well * Make the 'getOutsideASM' function generic as well * Enable language-feature/constants/static-const-in-generic-interface.slang for WebGPU * Clarify when it's safe to remove and deallocate an IRInst * Remove globals if they're left unused after inlining This closes shader-slang#5607. * Handle IRGlobalValueRef in C-like emitter * format code --------- Co-authored-by: slangbot <[email protected]>
* Add an example for using the reflection API The example program is meant to accompany a document that goes into more detail about the mental model behind the reflection API and the way this program drives it. Ideally this program can land before the document goes live, and then the document can be published with a link to the example. After that, the example could be updated to include links into the live document. Along with adding the example program, this change also adds some convenience functions to the reflection API to avoid cases where the program would otherwise need to cast between `slang::ParameterCategory` and `SlangParameterCategory`. * format code * fixup: error noticed by clang --------- Co-authored-by: slangbot <[email protected]>
This will necessetate changing the "required tests" setting on the GitHub repo Co-authored-by: Yong He <[email protected]>
* promoting bitfield extraction and insertion to become intrinsics for internal compiler use * removing duplicate intrinsics from glsl.meta.slang * refactor: update function signatures of bitfield extraction and insertion to use uint as the parameter type for offset and bits. --------- Co-authored-by: Nate Morrical <[email protected]> Co-authored-by: Yong He <[email protected]>
…der-slang#5855) * bump slang-rhi * More precise slang-rhi settings --------- Co-authored-by: Yong He <[email protected]>
* Update reflection API chapter in User guide The new version of the chapter is intended to accompany the `reflection-api` example program, and reflects (pun intended) the best practices that the Slang project team wants to encourage for interacting with the reflection API. * Rebuild TOCs
* Fix `getArgumentValueFloat` when arg is int. * format code --------- Co-authored-by: slangbot <[email protected]>
* Fix entrypoint auto discovery logic. * format code --------- Co-authored-by: slangbot <[email protected]>
Close shader-slang#5470 * implement bitcast for 64-bit date type * Move 'ensurePrelude' to base class to remove duplication * Assert on 'double' type for Metal target, as Metal doesn't have 'double' support
…slang#5887) * Add verification logic on push and specialization constants. * format code --------- Co-authored-by: slangbot <[email protected]>
* Examples: Don't proceed if 'initializeBase' fails * Examples: Only access gWindow if it's been initialized * Examples: Free memory from CommandLineToArgvW * Add example run step to CI Lots of examples are still unexpectedly failing, but is one small step towards addressing issue shader-slang#5520.
…ut. (shader-slang#5889) * Allow `Optional` and `Tuple` to be used in varying input/output. * Fix. * format code * Fix. * Fix test. * Fix. * enhance test. * Fix. * format code --------- Co-authored-by: slangbot <[email protected]>
Close shader-slang#5911. In this issue, if we define the generic in source file 1, and import it into source file 2, then when parsing the reference of that generic in source file 2, we will not parse the generic directly, instead we have a logic to speculate it as generics first with a fake diagnostic sink, and if there is no error report, we will consider it as a actual generic and will parse it again. In this logic, we will also disambiguate the expression based on the following token, but we didn't consider the token '[', so we will finally not treat the expression as generic. The fix is just simply add '[' here. Co-authored-by: Yong He <[email protected]>
This helps to address issue shader-slang#5520.
* Fix issues reported by 'shellcheck' This helps to address issue shader-slang#5520. * format code --------- Co-authored-by: slangbot <[email protected]>
Co-authored-by: Yong He <[email protected]>
…izationLevel::Maximal (shader-slang#6137)
* Fix bug: IgnoreInheritance in lookup When specifying IgnoreInheritance in lookup, it will ignore all members in the self extension for generic, the reason is that it doesn't specialize the target type of the extension decl when comparing with self type, so it will result that every type is unequal to the target type.
…r-slang#6131) * fix metal entry point global params * address review comments, cleanup and test * remove dead code * undo accidental change * address review comments and cleanup * minor fix and cleanup --------- Co-authored-by: Yong He <[email protected]>
* Use SPIRV integer vector dot product instructions * fix test --------- Co-authored-by: Yong He <[email protected]>
* Reimplement the GLSL atomic* functions in terms of __intrinsic_op Many of these functions map directly to atomic IR instructions. The functions taking atomic_uint are left as they are. This helps to address shader-slang#5989, since the destination pointer type validation can then be written only for the atomic IR instructions. * Add validation for atomic operations Diagnose an error if the destination of the atomic operation is not appropriate, where appropriate means it's either: - 'groupshared' - from a device buffer This closes shader-slang#5989. * Add tests for GLSL atomics destination validation Attempting to use the GLSL atomic functions on destinations that are neither groupshared nor from a device buffer should fail with the following error: error 41403: cannot perform atomic operation because destination is neither groupshared nor from a device buffer. * Validate atomic operations after address space specialization Address space specialization for SPIR-V is not done as part of `linkAndOptimizeIR`, as it is for e.g. Metal, so opt out and add a separate call for SPIR-V. * Allow unchecked in/inout parameters for non-SPIRV targets * Clean up callees left without uses during address space specialziation * format code --------- Co-authored-by: slangbot <[email protected]> Co-authored-by: Yong He <[email protected]>
* Cache and reuse glsl module. * Fix. * Implement record/replay for the new api. * Fix record replay. * Fix test.
* Fix incorrect resolve of specialization instance While checking the uninitialized variables, we were not resolving the specialized instance correctly. This commit repeats the resolve while the result is a specialization instance. A new test is added for this: tests/diagnostics/uninitialized-generic.slang After the problem is fixed, it revealed another problem in existing tests: tests/compute/nested-generics2.slang tests/diagnostics/uninitialized-local-variables.slang When a struct has a member variable whose type is a generic type, we cannot iterate over its member variables yet, because the type is unknown until the generic function/struct is specialized. We will have to give up checking for these cases.
* Add SLANG_ENABLE_RELEASE_LTO cmake option * Fix cmake static build * Disable install SlangTargets to avoid static build failing
Co-authored-by: Yong He <[email protected]>
* add brga8 format * add tests * minor fixes * cleanup * maybe fix broken quad control test * add missing xslang flag on test --------- Co-authored-by: Yong He <[email protected]>
…ang#6160) * Add intptr_t abs/min/max operations for CPU & CUDA targets * Define intptr_t and uintptr_t with CUDACC_RTC --------- Co-authored-by: Yong He <[email protected]>
* Sharpen the requirements for formatting * Add option to only format files changed since a given revision * Avoid divison-by-zero when total is zero * format code --------- Co-authored-by: slangbot <[email protected]>
* Fix an incorrect iteration with a workList We cannot modify workList while iterating it, because its type `List` is actually an array container. * Change based on the feedback * Use `Index` instead of `int` for for-loop index --------- Co-authored-by: Yong He <[email protected]>
|
839bc9a
into
shader-slang:vulkan-sdk-1.4.304
Merge changes through be2accb5c6f86aa6f6e5502bada (v2025.3.2)