https://github.com/shader-slang/slang

sort by:
Revision Author Date Message Commit Date
1b3887f Fix __init() functions that returns an existing value (#3866) Fixes the issue #3671 * The __init constructors are not expected to return a value like other member functions, but must construct a new value and return the struct type or none. * This patch enables this behavior in the IR lowering without complaining about illegal situations where the user returns an invalid type or none at all. Translate ordinary struct `return ...;` to `this = ...; return this;` Translate NonCopyableType struct `return ...;` to `return this;` * This patch also fixes the issue with type checking when __init() returns a void that mismatches the base type of the struct/ class Translate ordinary struct `return;` to `return this;` Translate NonCopyableType struct `return;` to `return;` * Add end-to-end test and compile only tests to check the above behavior. 05 April 2024, 23:47:47 UTC
d61f813 Add decoration PerPrimitiveEXT when a mesh output variable is decorated with PrimitiveID (#3895) Fixes bug 3872 05 April 2024, 21:52:50 UTC
cb87a8f gfx vulkan fixes (#3897) 05 April 2024, 16:39:06 UTC
94ced35 Legalization of non-struct when function expects struct, resolves #3840 (#3880) * Legalization of non-struct when expects struct. `__forceVarIntoStructTemporarily()` solves the issue of passing "non-struct type's" into a parameter that only accepts "struct type's". The intrinsic solves the issue through checking the parameter of the intrinsic: If the parameter is a "struct type" * Return a reference to the parameter else * a "struct type" Temporary variable is made and the "non struct type" parameter is copied to a member of this struct. This struct is then returned by `__forceVarIntoStructTemporarily()`. Optionally if the use location of this call is a argument which can have side effects (out, inout, ref, etc.) the temporary struct variable is copied into the original "non struct type" parameter. Testing code has "addComplexity" functions to avoid optimizations through forcing side effects so we can predict the code output. * Address review comments - ForceInline ray functions - fix testing - adjust how we replace operands in senarios to avoid unexpected side effects of replacing operands without any explicit checks * Adjust nv test slightly and remove .glsl file * Remove implicit LOD sampling & test additions - Implicit LOD sampling is not allowed in a raygen. Implicit LOD sampling requires depth (from a fragment shader) to sample. Raygen does not have the depth, so this function was replaced. - Changed other tests for correctness/clarity * Test if Falcor breaks through use of ForceInline * Add back force inline may need to look at how Falcor wrote its slang shaders. This will be done if ForceInline causes issues since ForceInline should not affect code gen in an impactable way. 04 April 2024, 00:43:24 UTC
f6c49fd Fix assertions due to malformed switch statements (#3858) * Fix assertions due to malformed switch statements Fixes the issue #2955 * Checks for multiple case statements with same values * Checks for multiple default cases * Constant-folds case exprs into an Integer value * fix the comments, and updated error code * one-line comment on diagnostic code 03 April 2024, 22:10:16 UTC
2768e42 Not emit DepthReplacing when frag shader uses SV_Position. (#3893) 03 April 2024, 20:13:09 UTC
a369835 Delete out-of-date notes from user guide. (#3877) We support partial generic parameter inference today. 03 April 2024, 18:47:19 UTC
f8e038f Add documentation about constructors (#3879) 03 April 2024, 18:46:59 UTC
74d4c8a Update glsl intrinsic for GroupMemoryBarrierWithGroupSync (#3890) * Update glsl intrinsic for `GroupMemoryBarrierWithGroupSync`, * Add spirv tests for `GroupMemoryBarrierWithGroupSync`. 03 April 2024, 18:46:25 UTC
e0de98e Refactor memory qualifier decorators to be a bit-flag set, resolves #3841 (#3881) * Refactor memory qualifier decorators to be a bit-flag set. replace GloballyCoherent, ReadOnly, WriteOnly, Volatile, and Restrict memory modifiers and decorations with a bit flag set to more efficiently manage memory qualifiers. added `restrict` modifier to test to ensure the code works when dropping a `restrict` memory qualifier * Refine tests & add SSBO memory qualifer support add CHECK's to tests to ensure memory qualifiers emit as intended added tests and changed code to ensure memory qualifiers work on SSBO objects (SPIR-V & GLSL) * add memory qualifiers & fixes. Add to StructuredBuffer & ByteAddressBuffer `ReadOnly`/NonWritable qualifier. * Memory qualifiers must be decorated on a variable inst. Due to this the qualifier is added after `lowerStructuredBufferType` Fixed an error where ReadOnly->NonReadable & WriteOnly->NonWritable * Adjusted tests accordingly Added back the removed `globallycoherent` memory qualifier emit'ing code in hlsl-emit (was incorrectly removed). undo hlsl.meta changes cleanup 03 April 2024, 18:19:15 UTC
a697b2c Implement 8.14-8.19 of OpenGL-GLSL specification The following PR implements 8.14-8.19 of the [OpenGL-GLSL specification](https://registry.khronos.org/OpenGL/specs/gl/GLSLangSpec.4.60.pdf). Fully implements all functions and built-in type's, resolves https://github.com/shader-slang/slang/issues/3692 for GLSL & SPRI-V targets. _Notes:_ Testing Tools: * Fragment shaders cannot test computational results. Only OpCodes are checked for proper emitting. Implementation Notes: * SubpassInput requires an unknown image format. * SubpassInput is disjoint from TextureType: __SubpassImpl (.slang) & SubpassInputType (Compiler) to reduce code generation required. * SubpassInput required an additional input layout modifier, input_attachment_index, this was added as a new parameter binding attribute. Since the following qualifiers can overlap with different resources (`layout(input_attachment_index = 0, binding = 0, set = 0)`) input_attachment_index is checked for overlapping resource bindings separately from other qualifiers with `LayoutResourceKind::InputAttachmentIndex`. * `GLSLInputAttachmentIndexLayoutModifier` was added to enforce function parameters only accepting `in` decorated variables. * `in` decorated variables needed to have emitting modified to allow directly emitting the variable into function calls if used as a parameter, normally Slang has a "global variable" shadow as a "global parameter" through a copy. This does not work and is solved using `GlobalVariableShadowingGlobalParameterDecoration` to build a relationship of "global variable" to "global parameter", we then resolve this relationship and replace "global variable" uses later in compile. * `AtomicCounterMemory` memory-constraint requires `OpCapability AtomicStorage`, `AtomicStorage` is invalid for Vulkan targets. glslang outputs for `barrier`, `memoryBarrier`, and `groupMemoryBarrier` `AtomicCounterMemory` as a memory constraint. This compiles as valid SPIR-V for Vulkan since `OpCapability AtomicStorage` is not declared. This behavior of glslang is undefined as per [3.31.Capability of the SPIR-V specification](https://registry.khronos.org/SPIR-V/specs/unified1/SPIRV.html#_capability). We will omit `AtomicCounterMemory` from our barrier calls. 03 April 2024, 13:30:46 UTC
c0482ec Fix the erroneous logic of determining whether or not to emit DepthReplacing. (#3885) * Fix the erroneous logic of determining whether or not to emit DepthReplacing. Closes #3884. * Fix. * More cleanup. 02 April 2024, 23:30:06 UTC
539d368 Update user guilde for new features. (#3875) 02 April 2024, 19:49:06 UTC
b5f4cf6 Allow enum values to be used as generic arguments. (#3874) * Allow enum values to be used as generic arguments. * Fix constant folding. 02 April 2024, 18:51:36 UTC
251f55c Support SM6.6 keyword "WaveSize" (#3871) Resolves an issue #3385 Shader Model 6.6 added a new keyowrd, "WaveSize". See the following link for more details: https://microsoft.github.io/DirectX-Specs/d3d/HLSL_SM_6_6_WaveSize.html Co-authored-by: Yong He <yonghe@outlook.com> 02 April 2024, 05:02:25 UTC
daf63cc Fix static member lookup in pointer types. (#3869) 02 April 2024, 01:45:21 UTC
abb7f1a Support `[RequirePrelude]` attribute on types. (#3867) 02 April 2024, 01:44:44 UTC
2c4f981 Allow bit operators on enum types. (#3862) * Allow bit operators on enum types. * Fix. 01 April 2024, 22:56:02 UTC
65ac9f3 Fix peephole optimization of `TypeEquals`. (#3865) Closes #3861. 01 April 2024, 21:32:30 UTC
844a8d6 Correctly emit spv extension targeting EXT rather than NV, added to test for this case (#3864) CullPrimitive [follows capabilities to emit as per SPIR-V specification](https://registry.khronos.org/SPIR-V/specs/unified1/SPIRV.html#_capability) 01 April 2024, 17:42:32 UTC
75afa65 Fix type union logic in generic type inference. (#3852) 28 March 2024, 23:57:53 UTC
5692879 Fix incorrect SPV stride for unsized array (#3837) * Fix incorrect SPV stride for unsized array (#3825) In '-emit-spirv-directly' mode, slang generates the stride 0 for unsized array in `OpDecorate` instructions. For unsized array, the stride is invalid, but we need to provide a non-zero value to pass the spirv validator. * Decorate struct with unsized array field as 'Block' For the struct having unsized array fields, it has to be decorated as "Block", otherwise it will fails the spirv-val. So we add a check at in 'emitGlobalInst' when emitting spirv for 'kIROp_StructType', where if there is unsized array field inside the struct, emit a decorate instruction for above purpose. * Update decoration for kIROp_SizeAndAlignmentDecoration When add a decoration node for kIROp_SizeAndAlignmentDecoration, we implicitly convert the 64 bit size to 32 bit. In most cases, this should not be a problem because we won't have that large data type. However, we use 64-bit -1 to represent the size of unsized-array, so in that case, the conversion will change the size to 0, which is incorrect. So change that decoration to use 64-bit size. --------- Co-authored-by: Yong He <yonghe@outlook.com> 27 March 2024, 20:30:34 UTC
b346a93 Allow var/param names to be the same as type name. (#3850) 27 March 2024, 20:03:28 UTC
8395acf Fix lookup to prevent finding `typedef` itself. (#3848) 27 March 2024, 19:21:07 UTC
c5369d5 Update README.md with tables for platform & target support (#3847) Adds tables to README.md for quick reference of which platforms and targets are supported. Links to detailed information in user guide. Bug Id: shader-slang/slang #3667 27 March 2024, 17:54:00 UTC
c37e3ee Fix parsing issue around __transparent_block. (#3842) 27 March 2024, 02:59:55 UTC
dfdf243 Support mutable existential parameters. (#3836) * Support mutable existential parameters. * Update test. 27 March 2024, 00:35:24 UTC
0877d1a Implement GLSL gimageDim & memory qualifiers with optional extension(s); resolves #3587 for GLSL & SPIR-V targets #3631 (#3810) * [early push of code since memory qualifiers may be made into a seperate branch & pr and I rather make it simple to split the implementation if required] all type & functions impl. for GLSL image type added all memory qualifiers & tests for direct read/write [GLSL syntax] (DID NOT test or implement parameter qualifiers, that is next commit) * this inlcudes emit-glsl & emit-spirv for qualifier decorations * this also includes error handling * this includes parsing * full implementation other than Rect; all errors and basic tests are done & working what is left: 1. need to now add Rect type support (additional TextureImpl flag) 2. tests 3. testing infrastructure to support variety of types * testing framework now works with images of all types and imageBuffers -- next steps are actual tests * push code for mostly working image atomics; missing int64/uint64 tests and slightly broken feature likley due to missing code from master which I pushed for regular atomics * fix all remaining shader image atomic issues and tests to work with float & i64/u64 fully will now clean up code and squash the commits (since they are quite all over the place) * refactor code to work & look correct, fix all regressions Turned off tests for texture format R64 due to the shader use limitation of currently being only for storage buffers on most hardware (test fail cause, this is not allowed) Changed raygen.slang & nv-ray-tracing-motion-blur.slang since both cross-compiled with glslang, which does not respect layout(rgba8) for RWBuffer's, in this scenario making the type into a SPIR-V rgba32f, which is incorrect and a known problem, this causes different code to be outputted from Slang & HLSL+GLSL->Slang paths Clean up all code and better explain the "why" for the gimageDim definition we use various strings of Slang code, the gist is: 1. Parameters are structured as per IMAGE_PARAM keyword in spec, and we respect this in order to match specification (to allow easy code iteration) 2. sample parameters are required for functions 3. types are inconsistently named fixed regression of breaking l-value lowering when r-value should be lowered (lower-to-ir) fix compiler warnings remove unneeded lambdas `expr->type.isLeftValue = isMutableGLSLBufferBlockVarExpr(baseExpr) && (expr->type.hasReadOnlyOnTarget == false);` is an adjustment made such that a buffer block is mutable only if the block is mutable and the base expression is mutable (to handle case of readonly buffer block, immutable) * remove rectangle parameter * use proper const syntax and struct naming * adjust syntax * adjust modifier capabilitites: HLSL+GLSL --> GLSL. Notice most specifically, if the parent is a global struct we can put a memory qualifier, this does not include, struct inside a struct, with a member variable with a memory qualifier (since then you could use the struct in invalid ways). Added test for struct inside struct with member variable with memory qualifier. adjust syntax and remove code which will rot * adjust formatting for consistency * addressing review feedback addressing review feedback: change testing code to handle int and float/half correctly in all cases adjust testing code syntax as requested change vkdevice code to fit a different form as requested * adjust code as per requested for review: 1. adjusted testing code logic to handle non 0-1 values appropriately, notice int8_t will likley be the range and set order of {[0,127],[-1,-128]}, this is intentional 2. syntax adjustments for correctness * trying to fix falcor regressions * add back removed code for regression testing * test removing changes which may break falcor * Revert "test removing changes which may break falcor" This reverts commit 240da97f06c23e98a26ac23cf1d385995c67b251. * disable R64 support in attempt to fix falcor tests * Revert "disable R64 support in attempt to fix falcor tests" This reverts commit 317cb632eb2f47e980fc4aeafe418f8060f4c473. * disable major device changes (still trying to figure out falcor fails -- locally working different than CI) * test removing d3d changes * remove all format changes * add back removed code for regression testing * try something to get code to work with falcor * address review * Add way to handle constref/ref/encapsulated texture objects with memory qualifiers as a parameter. Fixed an issue (and improved codegen) for when we have a store(dst,load(src)) pattern, where dst is supposed to be equal to src for when resolving globalParam's (no need for work-arounds anymore) * move recent-fix/change to textureType loading into a proper optimization pass which now runs after SPIR-V legalization to catch odd SPIR-V emitting after legalizing types for SPIR-V * Revert most recent optimization pass change, add work around getting a unmangled global parameter address through a intrinsic op instead of spir-v intrinsic (works same as `__imagePointer()`) * remove unneeded changes * remove unneeded `__constref` in glsl.meta * move memory qualifier checks to visitInvoke of check-expr.cpp move GetLegalizedSPIRVGlobalParamAddr resolving to spirv-legalization pass move error for "if using non texture type with memory qualifer in param" earlier such that we error with this first. No point in telling user "you are not putting correct memory qualifiers" when memory qualifiers should not have been used. * add memory qualifier folding modifier 'MemoryQualifierCollectionModifier' to reduce searching and processing (later will be adapted to whole system) as suggested/asked. The utility is a method to track memory qualifiers without doing a expensive linked-list traversal (image's have 4 modifiers normally). * properly pass multiple qualifiers from checkModifier down to the `modifier`s list * addressing review comments: * change implementation to properly handle restrict modifier * add comments about implementation for clarity 26 March 2024, 20:07:32 UTC
57f514d Fix the sign-extending issue in right shift (#3820) Fix issue (#3637). In constant folding of a right shift operation,slang always uses signed interger as the operand no matter the input source code is signed or unsigned, this could causes sign-extending issue if the input source is unsigned integer with highest bit set to 1. Fix the issue by checking the original type of the input and use the unsigned type if the input is unsigned. 26 March 2024, 18:05:00 UTC
5c88619 Fix default space assignment. (#3833) 25 March 2024, 19:25:13 UTC
cbe5526 Fix missing PerPrimitive decoration in mesh shader output. (#3828) 25 March 2024, 16:24:04 UTC
c9df734 Allow anonymous struct. (#3822) 23 March 2024, 18:25:51 UTC
a23adc2 Make `-no-mangle` option work, add `-no-hlsl-binding`. (#3817) 23 March 2024, 17:54:01 UTC
9b0df14 Changes to make UE TSR working with Slang. (#3815) 22 March 2024, 16:07:44 UTC
0047473 Partially implement vk_buffer_ref proposal. (#3814) 22 March 2024, 04:10:48 UTC
7a8ef89 Support arrow operator `->` on pointers. (#3812) 22 March 2024, 00:19:03 UTC
dd32414 Diagnose cyclic references in inheritance graph. (#3811) 21 March 2024, 22:45:27 UTC
9bd6b23 Fix `TriangleStream` lowering. (#3809) 21 March 2024, 21:21:36 UTC
45c7d33 Fix spirv generation for using output stream in a function. (#3806) * Fix spirv generation for using output stream in a function. * polish. 20 March 2024, 22:47:36 UTC
c371cce Update a1-01-matrix-layout.md 20 March 2024, 22:11:39 UTC
c28a22f Fix namespace parsing. (#3803) * Fix namespace parsing. * Fix. 20 March 2024, 20:33:13 UTC
04ffa84 Update a1-01-matrix-layout.md 20 March 2024, 20:30:31 UTC
6cefb85 Change representation of float literal in language translation (#3798) * Change representation of float literal in language translation Fix the issue (#3490). Previous implementation could zero out the very small float literal. We now use scientific notation instead to represent the float numbers whose exponential part are larger than a threshold. In other cases, keep using fixed notation. --------- Co-authored-by: Yong He <yonghe@outlook.com> 20 March 2024, 15:48:13 UTC
f3b1161 Use static const in glsl.meta.slang. (#3801) 20 March 2024, 04:12:48 UTC
c2d4bcf Add more cases for `isUniformParameterType`. (#3800) 20 March 2024, 01:13:13 UTC
1ee1688 Fix type checking for constructors in generic interfaces. (#3799) 20 March 2024, 01:01:42 UTC
05f403b Fix regression on pointer address space handling. (#3797) 20 March 2024, 00:02:02 UTC
2b55de9 Fix inconsistent digest of precompiled module. (#3796) 20 March 2024, 00:01:45 UTC
50c268e Swap `left` and `right` for matrix multiplication (#3777) Co-authored-by: Yong He <yonghe@outlook.com> 19 March 2024, 00:59:27 UTC
2bfde34 Check cyclic types after specialization. (#3791) 19 March 2024, 00:59:08 UTC
26e25f6 Check for cylic types. (#3790) 19 March 2024, 00:21:48 UTC
f96a3fe Fix SPIRV for mesh shaders, checks for invalid target code&recursion. (#3788) * Fix #3780. * Fixers #3781. * Add test for #3781. * Diagnose error on unsupported builtin intrinsic types. * Add check for recursion. * Fix. * Fix. * Fix recursion detection. * Fix. * Fix. * Fix recursion logic. * More fix. 18 March 2024, 23:41:40 UTC
7f6e959 Fix name mangling and source file finding logic for precompiled module validation. (#3784) * Fix name mangling. * Fix source validation. * Caching and search path fixes. 18 March 2024, 22:16:15 UTC
2d41012 Update 09-reflection.md (#3787) 18 March 2024, 18:12:12 UTC
667e209 Remove out of date documentation on compilation API. (#3785) * Remove out of date documentation on compilation API. * Update toc. 17 March 2024, 22:17:28 UTC
db60d19 [gfx] compile shaders when creating programs for d3d12/vulkan (#3774) 16 March 2024, 22:02:40 UTC
9b434e5 Implement raytracing extension(s); resolves #3560 for GLSL & SPIR-V targets (#3675) The following PR implements raytracing extensions (GLSL_EXT_ray_tracing, GLSL_EXT_ray_query, GLSL_NV_shader_invocation_reorder & GLSL_NV_ray_tracing_motion_blur); for GLSL & SPIR-V targets. Fully implements all functions, built-in variables, & syntax; resolves #3560 for GLSL & SPIR-V Targets. notes of worth: * __rayPayloadFromLocation, __rayAttributeFromLocation, and __rayCallableFromLocation, were added as SPIR-V Intrinsics to refer to location's of raytracing objects in SPIR-V for when using GLSL syntax. 15 March 2024, 20:14:32 UTC
9ee88a4 [gfx] use CUDA driver API (#3776) 15 March 2024, 17:25:21 UTC
d40931c Mesh shader refactoring and bugfixes (#3702) 15 March 2024, 00:48:41 UTC
c7d7a96 Support `#include` with angle brackets. (#3773) 14 March 2024, 21:58:24 UTC
f5f0740 Support unscoped enums. (#3771) 14 March 2024, 21:45:57 UTC
78d4df0 Add diagnostic on invalid type constraint. (#3769) 14 March 2024, 21:14:18 UTC
ba65c21 Fix lowering of glsl builtin globals. (#3767) 14 March 2024, 20:43:42 UTC
73c0cd1 Add cautionary desclaimers on interop mechanisms. (#3763) * Add cautionary desclaimers on interop mechanisms. * Fix. 14 March 2024, 01:55:32 UTC
67704d0 CMake fixes for MacOS (#3761) Co-authored-by: Yong He <yonghe@outlook.com> 14 March 2024, 01:35:59 UTC
e4b01c4 Fix side effect checking around storage buffer type. (#3762) 14 March 2024, 01:35:42 UTC
25df6b8 Fix crash when specializing generic entry points. (#3760) 13 March 2024, 23:46:23 UTC
5f0ee87 Add wrapper type synthesis logic for constructors. (#3756) * Add wrapper type synthesis logic for constructors. * Fix. 13 March 2024, 19:17:01 UTC
9fd7437 Implement glsl atomic's [non image or memory scope] with optional extension(s); resolves #3587 for GLSL & SPIR-V targets (#3755) The following commit implements atomic operations & types associated with OpenGL 4.6, GL_EXT_vulkan_glsl_relaxed, GLSL_EXT_shader_atomic_float, GLSL_EXT_shader_atomic_float2, for GLSL & SPIR-V targets. Fully implements all functions, and built-in type's, resolves https://github.com/shader-slang/slang/issues/3560 for GLSL & SPRI-V targets. [Atomic extensions for GLSL can be found here](https://github.com/KhronosGroup/GLSL/tree/main) Notes of worth: * atomic_uint is well defined in GLSL->OpenGL, although was removed in GLSL->VK unless a compiler extension is supported (GL_EXT_vulkan_glsl_relaxed). This support entails transforming all atomic_uint operations and references into a storage buffer. SPIR-V has AtomicCounter+AtomicStorage (atomic_uint parallel) but does not implement these capabilities for SPIR-V->VK in any scenario. Due to the case we transform atomic_uint ourselves (GLSL_Syntax->Slang_IR) to accommodate transforming atomic_uint into valid syntax. * GLSL_EXT_shader_atomic_float2 (all float16_t & some float/double operations) support is minimal and worth watching out for if enabling the tests. 13 March 2024, 19:03:16 UTC
6f7c827 Fix `sessionDesc.defaultMatrixLayoutMode` being ineffective. (#3753) * Fix `sessionDesc.defaultMatrixLayoutMode` being ineffective. * Fix matrix layout in buffer pointer. * Attempt to fix. * Fix buffer element type lowering for buffer pointers. * Add comment. * Fix test. * Fix member lookup in `Ref<T>`. * Fix validation error. * Enhance test. 13 March 2024, 02:31:25 UTC
eef7e20 Fix derivative implementation of `clamp`. (#3750) 12 March 2024, 22:10:06 UTC
edc85fc Make type names spec-conformant in SPIRV reflect. (#3748) * Preserve ByteAddressBuffer user type name. * Make user type lowercase. * Make typenames conform to spec. * Use `SpvOpDecorateString`. 12 March 2024, 20:47:14 UTC
8b51960 [SPIRV] Fix OpMemberDecorateString. (#3747) 12 March 2024, 18:56:10 UTC
66a0d91 Add nightly vkcts workflow (#3717) * Create vk-gl-cts-nightly.yml Action to run VK-GL-CTS expected slang passing test list nightly on schedule to run at 12am Pacific time. 12 March 2024, 18:37:43 UTC
8dc635a gfx: return error when vulkan fails to create buffer/pipeline (#3741) * return buffer creation errors in vulkan * return pipeline creation errors in vulkan --------- Co-authored-by: Yong He <yonghe@outlook.com> 12 March 2024, 17:33:37 UTC
1c4e1ac [SPIRV] Use VectorTimesScalar opcode. (#3737) * [SPIRV] Use VectorTimesScalar opcode. * Fix. 12 March 2024, 17:32:35 UTC
d8eb701 Support emitting generic target_intrinsic type. (#3745) 12 March 2024, 17:01:11 UTC
a91af96 Update 08-compiling.md 11 March 2024, 22:46:59 UTC
7c7fbd5 Add `-fvk-use-dx-position-w` and fix ExecutionMode ordering for geometry shaders. (#3731) * Add `-fvk-use-dx-position-w`. * Fix ordering of OutputVertices and output primitive type decoration in spirv. * Fix. * fix * Fix. * Move test around. 11 March 2024, 21:52:16 UTC
1bbcf25 Link-time specialization fixes. (#3734) * Fix method synthesis logic for static differentiable methods. * Support link-time constants in thread group size reflection. 11 March 2024, 21:42:14 UTC
25a7d51 Fix spirv builtin for `SV_ShadingRate`. (#3730) 11 March 2024, 04:23:57 UTC
10c4d2e Fix crash when trying to constant fold non-existent call. (#3728) 11 March 2024, 04:02:36 UTC
5074ee7 Improve cpp prelude. (#3725) 09 March 2024, 02:09:13 UTC
0629b22 Enhance link-time type test. (#3724) * Enhance link-time type test. * Fix. * Fix. 09 March 2024, 02:08:24 UTC
2150287 Add documentation for uniformity analysis. (#3721) 09 March 2024, 00:33:04 UTC
bc3dc0e Parser and module finding logic fixes. (#3720) * Fix parsing logic of `struct` decl. Fixes #3716. * Allow `loadModule` to find modules with underscores. * Fix test. 09 March 2024, 00:32:37 UTC
6f8a206 [SPIRV] fix code gen for `SV_Coverage`. (#3718) * [SPIRV] fix code gen for `SV_Coverage`. * Fix #3714, #3699. * Fix. 08 March 2024, 23:13:08 UTC
5afe970 Add ray query intrinsic test (#3707) 08 March 2024, 15:26:02 UTC
faaa532 [SPIRV] Fix pointer lowering bug. (#3713) * [SPIRV] Fix pointer lowering bug. * Update falcor CI setting. 08 March 2024, 07:44:19 UTC
a810aa3 Link-time constant and linkage API improvements. (#3708) * Link-time constant and linkage API improvements. * Fix. * Allow module name to be empty. * Fix. * Fix. * Fix compile error. 08 March 2024, 01:28:19 UTC
6492906 Fix SPIRV emit logic of `PrimitiveId` in fragment shader. (#3705) 07 March 2024, 22:04:30 UTC
240727d Uniformity analysis. (#3704) * Uniformity analysis. * Add [NonUniformReturn] decorations to some hlsl intrinsic functions. 07 March 2024, 21:19:44 UTC
af108c7 set VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT for device local memory (#3698) 07 March 2024, 17:00:56 UTC
a1e79e4 Fix the cuda left-hand swizzle issue (#3538) (#3691) 07 March 2024, 07:20:13 UTC
cc2a879 Integrate compile & validation test (#3674) Co-authored-by: Yong He <yonghe@outlook.com> 06 March 2024, 00:58:45 UTC
1cba7f3 Enable SampleCmpLevelZero tests and update the results (#3677) Fixes bug #3585 05 March 2024, 22:44:27 UTC
f2e3257 [slangc] generate an error when `-entry` is not specified for targets that require them. (#3679) * [slangc] generate an error when `-entry` is not specified for targets that require them. * Fix. * Fix. 05 March 2024, 21:11:17 UTC
8d4b659 [SPIRV] Fix DebugLine generated from source with #line directive. (#3678) 05 March 2024, 19:18:14 UTC
bb017e6 Extend `as` and `is` operator to work on generic types. (#3672) 05 March 2024, 05:57:50 UTC
2297623 Implement short-circuit logic operator (#3635) * Implement short-circuit logic operator Implement short-circuit evaluation for logic && and || operator. The short-circuit behavior is only used when the operands involved are scalar and the parent function is non-differentiable. In implementation, we define a new class 'LogicOperatorShortCircuitExpr' derived from 'OperatorExpr'. In the visitInvoke() call, we will create a new expression object 'LogicOperatorShortCircuitExpr' if the expression is logic && or ||. So that we can generate new IR code in the new visit function 'visitLogicOperatorShortCircuitExpr' to implement the short-circuit behavior. Add new test to test the short-circuit behavior. * Fix an compile issue occurred in Falcon test Previously, we early return when at least one of the operands of "&&" or "||" is vector in convertToLogicOperatorExpr call. However, in that case the arguments involved in the expression have already been type checked. When it falls-back to 'visitInvokeExpr', it will check the arguments again, and some unexpected behavior could occur which could in turn cause some internal error. So we add a check in the 'visitInvokeExpr' to avoid double type checking of arguments. * Update glsl subgroup test to not use short-circuit Since the short-circuit evaluation could cause the threads diverging in subgroup intrinsics. So change the test to not using "&&" to chain those subgroup intrinsics together. Instead, using "&" to chain them together because those test functions have the return value as bool. * Disable short-circuit in few situations Disable short-circuit in following situations: 1. generic parameter list 2. static const varible initialization * Use a flag to indicate the enablement of short-circuit Instead of using a struct to indicate the state of the outer environment of current expression, use a simple bool flag to indicate whether or not apply the short-circuit to current expression because there few situations where we will disable short-circuiting and in those circumstances, there is no nested. Therefore, a flag is good enough to indicate the case. * Disable short-circuit in index expression Also fix the build issue. (A cleanup for the last change.) * check both 'static' and 'const' modifiers Previously we only check HLSLStaticModifier to decide whether or not using short-circuit, but we really should check both 'static' and 'const' modifiers together, because we only want to disable the short circuit for init expression for 'static const' variable. * relax the restriction of short-circuit for index expression Disable the short-circuit for index expression only when declare an array. * Simplify the logic by creating subVisitor Simplify the logic by create a sub expression visitor so that we don't need to introduce extra recursion. * Call convertToLogicOperatorExpr after args check Change to call convertToLogicOperatorExpr after arguments check in visitInvokeExpr such that we don't have to check whether the arguments checked to avoid the double checking issue. 05 March 2024, 04:55:50 UTC
back to top