| Age | Commit message (Collapse) | Author |
|
|
|
Closes https://github.com/shader-slang/slang/issues/4262
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
* Add markdown formatting to extras/formatting.sh
* Correct formatting in markdown
* Warn on unrecognized argument in formatting script
* Print all diffs in formatting script
* Correct markdown emph formatting
* Don't format markdown by default
---------
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
* Implement semantics for WGSL
This helps to address issue #4943.
* format code
---------
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
Issue #5567.
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
Co-authored-by: Ellie Hermaszewska <ellieh@nvidia.com>
|
|
functions. (#5585)
|
|
* Add `IDifferentiablePtrType` support for arrays
- Also fixes an issue with spirv-emit of constructors that contain references to global params
* Fix GLSL legalization for arrays of resource types
|
|
* Embed core module in wasm build.
* format code
* add uintptr_t case.
---------
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
|
|
* Add new texture sampling test for WebGPU
There are no 1d array textures in WGSL, so
add texture-sampling-no-1d-arrays.slang based on texture-sampling.slang, but without
1d texture arrays.
This helps to address issue #4943.
* Insert needed conversion when querying texture attributes in WGSL
This helps to address issue #4943.
---------
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
|
|
* use pass encoder api
* update slang-rhi
|
|
|
|
This stops adding the repo root to the include path for anything linking
with slang. This enabled a bunch of convenient includes, but might lead
to confusing behavior for anyone including slang. Not to mention
differences including it from an install vs source.
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
|
|
|
|
Closes https://gitlab-master.nvidia.com/slang/slang/-/issues/243
Co-authored-by: Jay Kwak <82421531+jkwak-work@users.noreply.github.com>
|
|
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
|
|
* Update Slang-RHI to get WGPU backend fixes
* render-test: Use device local memory type for vertex buffers
This helps to avoid https://github.com/shader-slang/slang-rhi/issues/104
* Fix bug in WGSL emitter layout code.
There was a "kinds" vs. "kind flags" mismatch, and also getBindingOffsetForKinds was not
being used.
This patch enables a bunch of tests for WGPU.
This helps to address issue #4943.
* format code
---------
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
|
|
* Update CONTRIBUTION.md to clarify merge strategy.
* Update.
* Add explanation on breaking change labeling.
---------
Co-authored-by: Ellie Hermaszewska <ellieh@nvidia.com>
|
|
* Push buffer load to end of access chain.
* Update test.
* Fix.
* Fix.
* Fix.
* Make more robust.
* Fix.
|
|
* Fix two specialization bugs
The first bug was introduced in b2ca2d5a4efeae807d3c3f48f60235e47413b559 and ran some
code at scope exit that dereferenced a nullptr context.
The second bug was introduced in bea1394ad35680940a0b69b9c67efc43764cc194 and would cause
the wrong mangled name to be used during specialization.
This closes #5516.
* format code
---------
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
|
|
Co-authored-by: Ellie Hermaszewska <ellieh@nvidia.com>
|
|
Fixes https://github.com/shader-slang/slang/issues/5481
We should consider changing the CMAKE_BINARY_DIR usages also in our build descs
|
|
* Moved the pretty writer code from slang-reflection-test into core
* Moved reflection test code into the slang codebase and added the compiler option -reflection-json to store the reflection data in a separate file.
* Documented -reflection-json command line option
* moved PrettyWriter from core to compiler-core
* Fixed variable shadowing warning
* Use File::writeAllText instead of OSFilesystem and write to stdout if - is used as the path
* format code
* Fixed linker error
* Fix COM Ptr life time issues.
* Move enum to the end.
* Fix formatting.
---------
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
Closes https://github.com/shader-slang/slang/issues/5441
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
* Transfer offset decorations when legalizing laid-out structs
Struct legalization removing fields not representable in memory should transfer all
decorations in case the struct has already had offsets calculated.
Closes #5264.
* format code
---------
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
* update render test to use new slang-rhi API
* update slang-rhi
---------
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
|
|
* Require GL_EXT_samplerless_texture_functions only if needed
This extension is only necessary when using texture functions
on non-combined texture/samplers.
Fixes #5518
|
|
* Add key reflection endpoints for WASM
* Fix WGSL output around bit-manipulation operators
* format code
* Fix pointer ownership
* fix formatting
---------
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
The previous attempt to enable Structured Exception Handling in
(only) MSVC using the /EHa compiler flag caused trouble with flags
defined with Cmake Generator Expressions. These expressions are
not fully resolved, and they fail validation checks in
check_cxx_compiler_flag(). The previous attempt at applying
/EHa to only MVSC involved refactoring a direct call to
target_compile_options() with a call to the Slang helper function
add_supported_cxx_flags() where an additional MSVC filter was
introduced, but the helper also calls check_cxx_compiler_flag() to
see if flags are supported. It was okay for /EHa, but not some
other flags that ended up getting newly validated.
The above issue is fixed by re-implementing the change that added
/EHa to only MSVC. This change goes back to adding compiler flags
without the helper function with its extra validation, instead using
an additional cmake generator expression to apply /EHa only to MSVC.
|
|
|
|
This slangc option internally uses an experimental Slang API
interface. The feature is only at prototype-level completion,
currently.
Fixes #5434
|
|
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
The WGPU backend was crashing because of the
unbound sampler state. Fix the test by adding
a test sampler.
Issue 5277
Co-authored-by: Ellie Hermaszewska <ellieh@nvidia.com>
|
|
This closes issue #5505.
|
|
|
|
* Fix CUDA prelude for makeMatrix
* Add regression test.
|
|
After a struct with a semantic is inlined to a newly synthasized struct,
the previous semantic must be removed in order to avoid duplicated
semantic on the same location.
The following function is copied from slang-ir-metal-legalize.cpp,
- removeSemanticLayoutsFromLegalizedStructs()
This must be refactored to reduce the code duplication later.
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
regression. (#5508)
* Fix IntVal unification logic to insert type casts.
* Fix regression.
|
|
Closes https://github.com/shader-slang/slang/issues/5447
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
* Fix WGSL parameter block binding.
* Re-enable tests.
* Update failure list.
* Fix entrypoint parameters.
* Update tests.
* Enable stat-var test.
|
|
* [WGSL] Enable arbitrary arrays in uniform buffers.
* format code
* Undo irrelevant change and fixups.
* Update expected failure list.
* Fix.
* Rename.
---------
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
|
|
targeting WGSL (#5483)
Structured buffer types translate to array types in the WGSL emitter.
WGSL doesn't allow passing runtime-sized arrays to functions.
Similarly for pointers to texture handles.
Also, structured buffers (runtime-sized arrays) cannot be returned in WGSL.
This closes issue #5228, issue #5278 and issue #5288 by enabling specialized functions
to be generated in these cases, in order to work around these constraints.
|
|
* Legalize the Entry-point for WGSL
The return type of the entry-point needs to be legalized when targeting
WGSL.
This commit flattens the nested-structs of the return type and the input
parameters of the entry-point.
Most of code is copied from the legalization code for Metal. The
following functions are exactly same to the implementation for Metal or
almost same.
- flattenInputParameters() : 136 lines
- reportUnsupportedSystemAttribute() : 7 lines
- ensureResultStructHasUserSemantic() : 46 lines
- struct MapStructToFlatStruct : 176 lines
- flattenNestedStructs() : 95 lines
- maybeFlattenNestedStructs() : 42 lines
- _replaceAllReturnInst() : 19 lines
- _returnNonOverlappingAttributeIndex() : 16 lines
- _replaceAttributeOfLayout() : 23 lines
- tryConvertValue() : 41 lines
- legalizeSystemValueParameters() : 11 lines
They need to be refactored to reduce the duplication later.
The test case, `tests/compute/assoctype-lookup.slang`, had a bug that
the compute shader was trying to use the varying input/output with the
user defined semantics.
This commit removes the user defined semantics, because the compute
shaders cannot use the user defined semantics.
---------
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
|
|
Catch all exceptions in render-test
In MSVC, the /EHsc flag is used by default,
it causes only C++ (synchronous) exceptions
to be caught by try/catch blocks.
The /EHa flag can instead be used to catch
both synchronous C++ exceptions as well
as structured asynchronous exceptions
such as those seen in segfaults or other
typical bugs.
Using /EHa allows render-test to not crash
completely if there is a buggy graphics driver in the system.
Issue 5275
|
|
Close the issue #4940.
|