| Commit message (Collapse) | Author | Age |
| ... | |
| |
|
| |
Co-authored-by: Ellie Hermaszewska <ellieh@nvidia.com>
|
| |
|
|
|
| |
No functional change as overallocating was ok, but this was wrong
Co-authored-by: Yong He <yonghe@outlook.com>
|
| |
|
|
|
|
|
| |
* Update build to allow setting external paths
Update the build to allow setting user-specific paths for the external modules.
This allows building Slang without also fetching the external modules, assuming
they are already present elsewhere locally.
|
| |
|
|
|
|
|
| |
Improve performance when compiling small shaders.
Avoid copying witness table entries that are not getting used during linking.
Avoid copying auto-diff related decorations and derivative functions during linking, if the user modules doesn't use autodiff.
Cache operator overload resolution results on global session, so each new Session doesn't need to repetitively run through overload resolution from scratch.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
The musl libc replacement removed fopen64, fgetpos64, and other 64-bit
variants because it's 64-bit only. However, it does have the following
in its headers:
#define fgetpos64 fgetpos
Just importing <stdio.h> is enough to get slang compiling on musl
systems like Alpine Linux.
Fixes #6330.
Co-authored-by: Yong He <yonghe@outlook.com>
|
| |
|
|
|
|
|
|
|
| |
* fix calcSubtract on UIntSet
* add test
---------
Co-authored-by: Yong He <yonghe@outlook.com>
|
| |
|
|
|
|
|
| |
* Add SLANG_ENABLE_RELEASE_LTO cmake option
* Fix cmake static build
* Disable install SlangTargets to avoid static build failing
|
| | |
|
| |
|
|
| |
inheritance decl. (#5965)
|
| |
|
| |
Partially sorts https://github.com/shader-slang/slang/issues/5843
|
| | |
|
| | |
|
| |
|
| |
Co-authored-by: Ellie Hermaszewska <ellieh@nvidia.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add API for getting last internal error message
* format code (#5773)
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
* make message thread_local
---------
Co-authored-by: slangbot <ellieh+slangbot@nvidia.com>
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* render-test: Add copy-source usage for render targets
I found that Slang-RHI/WGPU was not able to copy from render targets to staging buffers.
This helps to address issue #4943.
* Add entries to render API util infos
Entries for glsl-cross and glsl-rewrite are added.
Without glsl-cross, slang-test fails to select a back-end, and winds up crashing when
tests/render/cross-compile-entry-point.slang is enabled
tests/render/cross-compile0.hlsl fails similarly without glsl-rewrite.
* Enable some rendering tests
* Add expected test outputs
|
| |
|
|
|
|
|
|
|
| |
* Move switch statement bodies to their own lines
* format
---------
Co-authored-by: Yong He <yonghe@outlook.com>
|
| |
|
|
|
|
|
| |
* format
* Minor test fixes
* enable checking cpp format in ci
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Clang-format excludes
* Add .clang-format
* Don't clang-format in external
* Missing includes and forward declarations
* Replace wonky include-once macro name
* neaten include naming
* Add clang-format to formatting script
* Add xargs and diff to required binaries
* add clang-format to ci formatting check
* Add max version check to formatting script
* temporarily disable checking formatting for cpp files
|
| |
|
|
|
|
|
|
|
| |
* format cmake files
* format code
---------
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
auto-diff results (#5394)
* Various AD enhancements
* Fix issue with pt-loop test
* Update pt-loop.slang
* More fixes for perf. Final minimal context test now passes.
* Fix issue with loop-elimination pass not running after dce
* Try fix wgpu test by removing select operator
* Disable wgpu
* Delete out.wgsl
* Remove comments
* Update slang-ir-util.cpp
* Fix header relative paths for slang-embed
* Disbale wgpu for a few other tests
* Better way of determining which params to ignore for side-effects
* Update slang-ir-dce.cpp
* Fix issue with circular reference from previous AD pass being left behind for the next AD pass
* Update slang-ir-dce.cpp
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a breaking change in a way that the Slang API function names are changed. All of them are commented as "experimental" and we wouldn't provide a back-ward compatibility for them.
Following functions are renamed:
compileStdLib() -> compileCoreModule()
loadStdLib() -> loadCoreModule()
saveStdLib() -> saveCoreModule()
slang_createGlobalSessionWithoutStdLib() -> slang_createGlobalSessionWithoutCoreModule()
slang_getEmbeddedStdLib() -> slang_getEmbeddedCoreModule()
hasDeferredStdLib() -> hasDeferredCoreModule()
Following command-line arguments are renamed:
"-load-stdlib" -> "-load-core-module"
"-save-stdlib" -> "-save-core-module"
"-save-stdlib-bin-source" -> "-save-core-module-bin-source"
"-compile-stdlib" -> "-compile-core-module"
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Split examples cmake desc
* declutter top level CMakeLists.txt
* fail if building tests without gfx
* Move llvm fetching to another cmake file
* Further split CMakeLists.txt
* Neaten llvm fetching
* Remove last premake remnant
* correct cross builds
* Neaten
* Neaten project organization in vs
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
D3D12Core.dll had been copied to a wrong directory and slang has been using D3D12Core.dll from the system directory, C:\windows\system32.
D3D12Core.dll has to be copied from external/slang-binaries/bin/windows-x64 to build/Release/bin/D3D12 not to build/Release/bin.
The same is true for the debug build and it had to be copied to build/Debug/bin/D3D12 not build/Debug/bin.
It hasn't been a problem for Release build, because the debug-layer is not enabled for Release build and it didn't cause the version mismatching problem with D3D12SDKLayers.dll. The Release build was loaded from either build/Release/bin or from C:\windows\system32, and it didn't matter which one was used.
The Debug build, however, got into a problem where D3D12Core.dll was loaded from the system directory whereas D3D12SDKLayers.dll was loaded from build/Debug/bin and it failed to load D3D12.dll entirely. This caused D3D12 to be "Not supported" for "Windows/Debug" configuration. Note that our CI explicitly excludes DX12 tests for the "Windows/Debug" configuration with a command-line argument "-api all-dx12", and DX12 tests were going to be ignored anyway.
The actual problem was observed when WGPU is implemented. WGPU started printing explicit errors for the load failure of D3D12.dll.
See more detailed explanation:
https://devblogs.microsoft.com/directx/gettingstarted-dx12agility/#d3d12sdkpath-should-not-be-the-same-directory-as-the-application-exe
Closes #5305
Closes #5276
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Squash redundant move warnings
* Move C interface from slang.h to slang-deprecated.h
spGetBuildTagString remains, because it's useful to have before the
global session exists.
This C API is used quite pervasively in the C++ helpers (for example
slang::UserAttribute. It's not trivial to move these to
slang-deprecated.h as they're entangled with some enums which are
themselves used elsewhere in the compiler.
The fact that these helpers use the C API can be viewed as an
implementation detail for now, and this usage moved to slang-deprecated
in due course.
Closes https://github.com/shader-slang/slang/issues/4758
* Squash warnings for our usage of our deprecated API
---------
Co-authored-by: Yong He <yonghe@outlook.com>
|
| | |
|
| |
|
| |
Co-authored-by: Yong He <yonghe@outlook.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Use the assembly description as target when disassembling
I believe this is a bugfix.
It seems to have worked before because up until the WGSL case, the disassembler has been
the same executable as the one producing the binary to be disassembled.
* Add Tint as a downstream compiler
This closes issue #5104.
* Add downstream compiler for Tint.
* Tint is wrapped in a shared library, 'slang-tint' available from [1].
* The header file for slang-tint.dll is added in external/slang-tint-headers.
* Add some boilerplate for WGSL targets.
* Add an entry point test for WGSL.
[1] https://github.com/shader-slang/dawn/releases/tag/slang-tint-0
* Add WGSL_SPIRV as supported target for Glslang
* Add WebGPU support to slang-test
This helps to address issue #5051.
* Disable lots of crashing compute tests for 'wgpu'
This closes issue #5051.
---------
Co-authored-by: Yong He <yonghe@outlook.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add options to prevent usage of own submodules
Signed-off-by: Jacki <jacki@thejackimonster.de>
* Allow using external unordered dense headers
Signed-off-by: Jacki <jacki@thejackimonster.de>
* Link system wide installed unordered dense
Signed-off-by: Jacki <jacki@thejackimonster.de>
* Allow external header usage for lz4 and spirv
Signed-off-by: Jacki <jacki@thejackimonster.de>
* Add more options to disable targets
Signed-off-by: Jacki <jacki@thejackimonster.de>
* Add option to provide explizit path for spirv headers and remove earlier options that break the build process
Signed-off-by: Jacki <jacki@thejackimonster.de>
* Rename options to use common prefix
Signed-off-by: Jacki <jacki@thejackimonster.de>
* Fix indentation for the cmake changes
Signed-off-by: Jacki <jacki@thejackimonster.de>
* Add advanced_option function for cmake
* Normalize includes between system and submodule dependencies
Fix any before-accidentally-working problems
* Add option for enabling/disabling slang-rhi
Signed-off-by: Jacki <jacki@thejackimonster.de>
* Pass correct include path for cpu tests
* Correct include path
---------
Signed-off-by: Jacki <jacki@thejackimonster.de>
Co-authored-by: Ellie Hermaszewska <ellieh@nvidia.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Compile fixes for Wasm
The issues are all are due to 'long' types being 32 bits on WASM.
- class members redeclared errors
- << with StringBuilder and unsigned long is ambiguous
This helps to address issue #5115.
* Use the host executable suffix for generators
Since the generators are run at build-time, we should not use CMAKE_EXECUTABLE_SUFFIX,
which is the suffix for the target platform.
Instead, define CMAKE_HOST_EXECUTABLE_SUFFIX as appropriate, and use that suffix instead.
This helps to address issue #5115.
* Add support for Wasm as a platform
This helps to address issue #5115.
* Add emscripten build
This closes #5115.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add WGSL as a target
This is required for #4807.
* C-like emitter: Allow the function header emission to be overloaded
WGSL-style function headers are pretty different from normal C-style headers:
Normal C-style headers:
ReturnType Func(...)
void VoidFunc(...)
WGSL-style headers:
fn Func(...) -> ReturnType
fn VoidFunc(...)
This change allows the header style to be overloaded, in order to accomodate WGSL-style
headers as required to resolve issue #4807, but retains normal C-style headers as the
default implementation.
[1] https://www.w3.org/TR/WGSL/#function-declaration-sec
* C-like emitter: Allow emission of switch case selectors to be overloaded
The C-like emitter will emit code like this:
switch(a.x)
{
case 0:
case 1:
{
...
} break;
...
}
This is not allowed in WGSL. Instead, selectors for cases that share a body must [1] be
separated by commas, like this:
switch(a.x)
{
case 0, 1:
{
...
} break;
...
}
To prepare for addressing issue #4807, this patch makes the emission of switch case
selectors overloadable.
[1] https://www.w3.org/TR/WGSL/#syntax-case_selectors
* C-like emitter: Support WGSL-style declarations
This patch helps to address issue 4807.
C-like languages declare variables like this:
i32 a;
WGSL declares variables like this:
var a : i32
The patch introduces overloads so that the forthcoming WGSL emitter can output WGSL-style
declarations, which helps to resolve #4807.
* C-like emitter: Support overloading of declarators
Unlike C-like languages, WGSL does not support the following types at the syntax level,
via declarators:
- arrays
- pointers
- references
For this reason, this patch introduces support for overloading the declarator emitter,
in order to help address issue #4807.
C-like languages:
int a[3]; // Array-ness of type is mixed into the "declarator"
WGSL:
var a : array<int, 3>; // Array-ness of type is part of the... type_specifier!
* C-like emitter: Allow struct declaration separator to be overridden
C-like languages use ';' as a separator, and languages like e.g. WGSL use ','.
This change prepares for addressing issue #4807.
* C-like emitter: Allow overriding of whether pointer-like syntax is necessary
Things like e.g. structured buffers map to "ptr-to-array" in WGSL, but ptr-typed
expressions don't always need C-style pointer-like syntax.
Therefore, make it overrideable whether or not such syntax is emitted in various cases in
order to address #4807.
* C-like emitter: Emit parenthesis to avoid warning about & and + precedence
This helps with #4807 because WGSL compilers (e.g. Tint) treat absence of parenthesis as
an error.
* C-like emitter: Add hook for emitting struct field attributes
WGSL requires @align attributes to specify explicit field alignment in certain cases.
Thus, this patch prepares for addressing #4807.
* C-like emitter: Add hook for emitting global param types
Declarations of structured buffers map to global array declarations in WGSL.
However, in all other cases such as when structured buffers are used in operands, their
types map to *ptr*-to-array.
This patch makes it possible for the WGSL back-end to say that structured buffers
generally map to "ptr-to-array" types, but still have a special case of just "array" when
declaring the global shader parameter.
Thus, this patch helps with addressing #4807.
* IR lowering: Use std140 for WGSL uniform buffers
This patch just cuts out some logic that prevented std140 to be chosen for WGSL uniform
buffers.
Note that WGSL buffers in the uniform address space is not quite std140, but for now it's
close enough to avoid compile issues.
Later on, a custom layout should be created for WGSL uniform buffers.
When that's done, this change will be revisited, but for now it helps to resolve #4807.
* Don't emit line directives in WGSL by default
WGSL does not support line directives [1].
The plan currently seems to be to instead support source-map [2].
This is part of addressing issue #4807.
[1] https://github.com/gpuweb/gpuweb/issues/606
[2] https://github.com/mozilla/source-map
* WGSL IR legalization: Map SV's
The implementation closely follows the cooresponding one for Metal.
Supported:
- DispatchThreadID
- GroupID
- GroupThreadID
- GroupThreadID
Unsupported:
- GSInstanceID
This is not complete, but it helps to address #4807.
* WGSL emitter: Add support for basic language constructs
A lot of the basics are added in order to generate correct WGSL code for basic Slang language constructs.
This addresses issue #4807.
This adds support for at least the following:
- statments
- if statements
- ternary operator
- while statement
- for statements
- variable declarations
- switch statements
- Note: Slang may emit non-constant case expressions, see issue 4834
- literals
- integer literals
- u?int[16|32|64]_t
- float and half literals
- bool literals
- vector literals and splatting (e.g 1.xxx)
- function definitions
- assignments
- +=, *=, /=
- array assignments
- vector assignments/updates
- swizzles of other vectors
- from matrix rows ('m[i]' notation)
- from matrix cols (using swizzle notation, e.g 'm._11_12_13')
- matrix assignments/updates
- to rows ('m[i]' notation)
- to cols (using swizzle notation, e.g 'm._11_12_13')
- declarations
- arrays
[1] https://www.w3.org/TR/WGSL/#syntax-switch_body
* Add some WGSL capabilities
This patch registers some WGSL capabilities required to pass many of the initial compute
shader compile tests.
Many capabilities still remain to be added -- this is just an initial set to help resolve
issue #4807.
- asint
- min and max
- cos and sin
- all and any
* WGSL and C-like emitters: Add hack to bitcast case expression
In WGSL, the switch condition and case types must match.
https://www.w3.org/TR/WGSL/#switch-statement
Slang currently allows these types to mismatch, as pointed out in #4921.
Issue #4921 should eventually be addressed in the front-end by a patch like [1].
However, at the moment that would break Falcor tests.
Thus, this patch temporarily works around the issue in the WGSL emitter only in order to
help resolve #4807.
In the future, the Falcor tests should be fixed, this patch should be dropped and [1]
should be merged instead.
[1] a32156ef52f43b8503b2c77f2f1d51220ab9bdea
|
| |
|
|
|
|
|
| |
We've implemented a function in slang-record-replay unit test
to remove the non-empty directory, now move this function into
slang `Path` namespace to make this function as an utility.
Close issue #4916
|
| |
|
|
|
|
|
|
|
| |
* Change `slang.h` path in `slang-common.h` to allow `slang-embed` to resolve correctly.
* Change `slang.h` path in all slang/core files
---------
Co-authored-by: Yong He <yonghe@outlook.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* add slang-rhi submodule
* refactor render-test to use slang-rhi and remove OpenGL support
* remove -vk -glsl tests
* remove gl test
* disable failing test
* allow recursive submodules in github actions
* update slang-rhi
* update slang-rhi
---------
Co-authored-by: Yong He <yonghe@outlook.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Fix Varying Variable Location Assignments With Hull Shaders
Fixes: #4913
Fixes: #4540
Changes:
1. Added `kIROp_ControlBarrier` to HLSL/GLSL emitting.
2. Added a method to track 'used' and 'unused' varyings for when legalizing GLSL. This allows us to assign correct offsets to automatically added varyings
* Added a `ZeroLSB` check to UIntSet for this purpose
* add missing return
* code comment adjustment
* cleanup
* comment and HLSL controlBarrier mistake
* assume space for glsl/spriv varying is irrelevant
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Fix the slang-test bug
Since we reorganize the build directory, now the libraries are
located at different directory with executables in non-Windows
platform, we have to change the code on how to find the dll directory.
* Integrate the record/replay test into slang-unit-test
We create a unit-test-record-replay.cpp to run the converted slang
examples in child process as our tests for the record-replay layer.
* Disable the test on Apple
Due to the limitation of current examples, we temporarily disable them
on apples.
Change the ci to make this test only be run on the gpu-equipped runners,
for other runners we add a white-list file
"expected-failure-record-replay-tests.txt".
* Remove 'hello-world' example from unit test
"hello-world" doesn't use gfx abstract library, instead it uses vk directly, it's
not a preferable way. So we will drop this test, instead, we will use cpu-hello-world
example.
|
| |
|
|
|
|
|
|
| |
* Implement Path::createDirectoryRecursive
Implement Path::createDirectoryRecursive with existing Path::createDirectory
that uses system call instead of c++ standard lib.
* Change the use of 'while(1)' to 'for(;;)'
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Remove using SpvStorageClass values casted into AddressSpace values
Also removes support for specific storage classes in __target_intrinsic snippets
* remove SLANG_RETURN_NEVER macro
* squash warnings
* Make nonexhaustive switch statement error on gcc
* Add SLANG_EXHAUSTIVE_SWITCH_BEGIN/END macros
---------
Co-authored-by: Yong He <yonghe@outlook.com>
|
| |
|
| |
Adds a new Github CI action for benchmarking the slangc compiler on the MDL shaders. For now, the results are only dumped to the output of the CI, which can be later viewed through raw logs. The next step is to use github-action-benchmark to push these results into a page which will show the benchmark results over time as commits are pushed.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* Support unicode identifier names.
* Fix.
* Fix language server.
* Fix build errors.
* Fix.
* Fix offset translation in language server.
|
| | |
|
| |
|
| |
Co-authored-by: Jay Kwak <82421531+jkwak-work@users.noreply.github.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Move the file public header files to `include` dir
Close the issue (#4635).
Move the following headers files to a `include` dir
located at root dir of slang repo:
slang-com-helper.h -> include/slang-com-helper.h
slang-com-ptr.h -> include/slang-com-ptr.h
slang-gfx.h -> include/slang-gfx.h
slang.h -> include/slang.h
Change cmake/SlangTarget.cmake to add include path to
every target, and change the source file to use
"#include <slang.h>" to include the public headers.
The source code update is by the script like follow:
```
fileNames_slang=$(grep -r "\".*slang\.h\"" source/ -l)
for fileName in "${fileNames_slang[@]}"
do
echo "$fileName"
sed -i "s/\".*slang\.h\"/\"slang\.h\"/" $fileName
done
```
* Fix the test issues
* Fix cpu test issues by adding include seach path
* Update cmake to not add include path for every target
Also change "#include <slang.h>" to "include "slang.h" " to
make the coding style consistent with other slang code.
* Change public include to private include for unit-test and slang-glslang
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add the function tailer for appending the output
- The basic format for the capture encode is as follow:
Header:
4 bytes: magic number ('H' 'E' 'A' 'D' )
4 bytes: call id - specify the method name
8 bytes: handle id - specify 'this' pointer
8 bytes: payload size in bytes - specify the data size of parameters
8 bytes: thread id
Payload:
Encode for all the parameters.
Tailer (optional):
Tailer is an optional, it only used when the output of the method is
also stored in the method. Usually it just the opaque handle allocated
by slang.
4 bytes: magic number ('T' 'A' 'I' 'L')
4 bytes: payload size in bytes.
- Fix some issues in checking the result of write of output stream.
* Encoding methods of IGlobalSession
Add encoding logic for all the member functions of IGlobalSession,
except those query functions that do not impact the internal state
of slang.
Because some get functions will invoke allocations by slang, these
functions are account for the "query functions". Therefore those
functions are still captured.
All the allocations are stored by using their address, because those
allocations are opaque and will finally be used as inputs for other
APIs, there is no need to store the data. We just need to track
those address and know which APIs will consume them.
* Add SLANG_CAPTURE_CHECK macro
Add SLANG_CAPTURE_CHECK macro to check SLANG_OK is returned.
* Fix build error
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Define api call ID for each being captured methods
* Add parameter encoder interface
* Add outputStream and capture manager
Add infrastructure for output stream
This is the interface to record the method and parameter, and also
provide functionality to write all the serialized data into file.
Add capture manager:
Capture manager is associated to global session object, it will
provide the functionality to actual record all the APIs.
Implement some of parameter encoder functions.
* Fix some Windows & cmake build error
* remove unused headers
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* capability upgrade warning/error
adjusted implementation + tests to support a warning/error if capabilities are implicitly upgraded and test accordingly.
* add glsl profile caps
* add GLSL and HLSL capabilities to the associated capability
* syntax error in capdef
* only error if user explicitly enables capabilities
1. changed testing infrastructure to not set a `profile` explicitly,
2. Added tests to be sure this works as intended with user API and with slangc command line
* Change capability atom definitions and how Slang manages them to fix errors
1. most `glsl_spirv` version atoms have been removed from `.capdef`, instead we will translate `spirv` version atoms into `glsl_spirv` since there is no point in writing the same code twice in `.capdef` files to define `spirv` versions.
2. add spirv version, and hlsl sm version (and equivlent) capability dependencies
3. removed some stage requirments which were set on objects, keep the wrapper capabilities. I am keeping the wrapper capabilities since I am unaware on if there are stage limitations (spec says code in practice does not work).
* check internal version instead of version profile (_spirv_1_5 vs. spirv_1_5)
* remove unused OpCapability. adjust SPIRV version'ing again for glsl_spirv
* apply workaround for glslang bug with rayquery usage
* ensure capabilities targetted by a profile and added together by a user are valid
* remove additions to `spirv_1_*` wrapper
* spirv_* -> glsl_spirv fix
* fix bug where incompatable profiles would cause invalid target caps
* try to avoid joining invalid capabilities
* fix the warning/error & printing
* run through tests to fix capability system and test mistakes
many mistakes were mesh shaders doing `-profile glsl_450+spirv_1_4`. This is not allowed for a few reasons
1. the test tooling does not handle arguments the same as `slangc`
2. glsl_450 core profile does not support mesh shaders, nor does spirv_1_4. sm_6_5 does work in this senario
* set some sm_4_1 intrinsics to sm_4_0
* replace `GLSL_` defs with `glsl_`
* swap the unsupported render-test syntax for working syntax
* set d3d11/d3d12 profile defaults
this is required since sm version changes compiled code & behavior
* adjusted nvapi capabilities with atomics + d3d11 set to use sm_5_0 as per default
* cleanup
* address review
* incorrect styling
* change `bitscanForward` to work as intended on 32 bit targets
---------
Co-authored-by: Yong He <yonghe@outlook.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* fixes: #4163
Precompute UIntSet from individual capabilities inside generator (removes intermediate form of capabilities).
note:
1. I still expand capabilities which are missing `target` and `stage` atoms.
* fix compile warning<->error with clang
* address review
preallocate the pregenerated UIntSet's
* disable incorrect warning of 'unreachable code'
The warning is wrong since, when `out` has 0 elements (does not start `for` loop), the `return` is reached.
* fix clang warnings
1. use unsigned long for the buffer serializer
2. braces around scalar init
* address review
added work around to avoid warning with `for(...) return; return;` pattern
`else if constexpr` addition instead of cascading blocks
* push fix for use of `_BitScanForward`
* cleanup
* move around assert for proper checking
* syntax error
* use SLANG_ASSERT instead of assert
* test for why SLANG_ASSERT caused CI to fail with linux-arm builds
* test if `SLANG_ASSERT` really is causing a build issue for linux-arm
|
| | |
|
| | |
|
| | |
|