| Commit message (Collapse) | Author | Age |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#8547)
This allows us to specialize functions whose argument is a sub element
of a constant buffer, instead of being only applicable to entire buffer
element. Closes #8421.
This change also implements a proper heuristic to determine when to
specialize the calls and defer the buffer loads.
This PR addresses a pathological case exposed in
`slangpy\slangpy\benchmarks\test_benchmark_tensor.py`, which used to
take 27ms to finish, and now takes 1.25ms.
For example, given:
```
struct Bottom
{
float bigArray[1024];
[mutating]
void setVal(int index, float value) { bigArray[index] = value; }
}
struct Root
{
Bottom top[2];
[mutating]
void setTopVal(int x, int y, float value)
{
top[x].setVal(y, value);
}
}
RWStructuredBuffer<Root> sb;
[shader("compute")]
[numthreads(1, 1, 1)]
void compute_main(uint3 tid: SV_DispatchThreadID)
{
sb[0].setTopVal(1, 2, 100.0f);
}
```
We are now able to specialize the call to `setTopVal` into:
```
void compute_main(uint3 tid: SV_DispatchThreadID)
{
setTopVal_specialized(0, 1, 2, 100.0f);
}
void setTopVal_specialized(int sbIdx, int x, int y, float value)
{
Bottom_setVal_specialized(sbIdx, x, y, value);
}
void Bottom_setVal_specialized(int sbIdx, int x, int y, float value)
{
sb[sbIdx].top[x].bigArray[y] = value;
}
```
And get rid of all unnecessary loads. Achieving this requires a
combination of function call specialization and buffer-load-defer pass.
The buffer-load-defer pass has been completely rewritten to be more
correct and avoid introducing redundant loads.
This PR also adds tests to make sure pointers, bindless handles, and
loads from structured buffer or constant buffers works as expected.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Closes #8500.
`slang-ir-translate-global-varying-var.cpp` turns the global varying
outputs into a struct that's returned from the entry point. Currently,
there's a problem when one of the outputs is a struct. It always creates
a generic `IRTypeLayout`, even when a correct type layout already
exists. Somehow, this appears to work when the global varying outputs
aren't structs.
The crash occurs in
`slang-ir-glsl-legalize.cpp:createGLSLGlobalVaryingsImpl()`. It
correctly handles the generated outer struct, but when that contains an
inner struct, it's been given a non-struct type layout and crashes.
This PR uses the correct layout if found, instead of generating a broken
placeholder. This matches the behaviour that has already been
implemented for inputs.
Additionally, I removed a call to `addResourceUsage` from both the input
and output side. I can't see any way in which it would've affected
anything, the layout builder is never used after that call and it
doesn't retroactively modify the layout that was already created.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Implement SPV_EXT_fragment_invocation_density
-Adds semantics SV_FragSize and SV_FragInvocationCount and implements them for SPIRV and GLSL using the appropriate target builtins from extensions.
-Adds test case checking for expected target builtins from these semantics.
-For future work, could implement SV_FragSize using pixel shader input SV_ShadingRate for HLSL, and SV_FragInvocationCount needs research.
Fixes #7974
Generated with Claude Code
* address review feedback
https://github.com/shader-slang/slang/pull/8037#pullrequestreview-3084645845
* fixup format
* review feedback
https://github.com/shader-slang/slang/pull/8037#pullrequestreview-3086442819
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add emit cases for WGSL and GLSL
* Fix compilation warnings
Modify short cutting test to reflect change in emit logic
Lower matrix for metal as well
Add emit matrix logic for metal
Fix compiler warning
Brace initializer for lowered matrices
Fix compiler warnings
* Tests for metal
* Fix mult, any, and determinant
* Fix matrix-matrix multiplication
* Fix mat mul to be element-wise
* Fix compiler warning
* Move makeMatrix to legalization
* Move unary and binary arithmetic operator lowering to legalization
* Remove emit logic and move final comparison operators to legalization
* Handle vector/matrix negation for WGSL
* Restore older SPIR-V emit logic
* Address PR comments
* Revert to zero minus for negation
* format code
---------
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#7740)
* Fix GLSL memory layout qualifiers not applied to uniform buffers or cbuffers
The `layout(scalar)` qualifier was being ignored for GLSL `uniform` blocks and
HLSL `cbuffer` declarations, causing them to use std140 layout instead of the
requested scalar layout.
**Root Cause**:
The parsing logic in `slang-parser.cpp` handled layout qualifiers inconsistently:
- GLSL `buffer` blocks correctly used `getLayoutArg()` to map layout modifiers
- GLSL `uniform` blocks and HLSL `cbuffer` skipped layout arguments entirely
**Solution**:
- Enhanced `parseHLSLCBufferDecl()` to check for GLSL layout qualifiers
- Added same `getLayoutArg()` logic used by buffer blocks
- Modified uniform block parsing to pass layout arguments through
**Testing**:
- Added comprehensive test case: `tests/glsl/layout-scalar-qualifier.slang`
- Verified fix works for both `uniform` blocks and `cbuffer` declarations
- Confirmed no regressions in existing test suite
**Before**: `layout(scalar) uniform {...}` → std140 layout (32 bytes, offset 0,16)
**After**: `layout(scalar) uniform {...}` → scalar layout (16 bytes, offset 0,4)
Fixes #7735
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-authored-by: pdeayton-nv <pdeayton-nv@users.noreply.github.com>
* Apply code formatting to slang-parser.cpp
Fixed line wrapping, trailing whitespace, and parameter formatting
according to repository style guidelines.
Co-authored-by: Harsh Aggarwal (NVIDIA) <szihs@users.noreply.github.com>
* format code (#7742)
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: pdeayton-nv <pdeayton-nv@users.noreply.github.com>
Co-authored-by: Harsh Aggarwal (NVIDIA) <szihs@users.noreply.github.com>
Co-authored-by: slangbot <ellieh+slangbot@nvidia.com>
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
Co-authored-by: Yong He <yonghe@outlook.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes issue #6898
The -emit-spirv-via-glsl slang-test option has been broken for
some amount of time. Tests that were using it were operating as
if using -emit-spirv-directly, leading to many duplicated tests.
After fixing the test option, there were an number of errors that
appeared as a result.
This change fixes the broken test option and the resulting test
errors. Some of the test errors revealed some legitimate issues,
such as:
-The GLSL bitCount instrinsic only supports 32-bit integers and
requires emulation for other bit widths.
-Emitting GLSL 8-bit and 16-bit glsl integer types did not emit
the proper extension requirements
-Emitting GLSL and casting for 16-bit integers was missing a
closing parenthesis.
-Missing profile for GL_EXT_shader_explicit_arithmetic_types
-Missing toType cases for UInt8/Int8 for the kIROp_BitCast case
in tryEmitInstExprImpl.
|
| |
|
|
|
|
|
|
|
|
|
| |
Fixes #6708
This commit adds type aliases for half-precision matrices, including
f16mat3x2, f16mat3x3, f16mat3x4, f16mat4x2, f16mat4x3, and f16mat4x4.
Convenience aliases for square matrices (f16mat2, f16mat3, f16mat4) are
also added.
This commit introduces a new test file that validates the usage of
half-precision types in a compute shader context.
|
| |
|
|
|
|
|
| |
bitcast requires the input has same width with result type, this PR ensures that we always lower the bitcast IR instruction satisfies this requirement.
Close #7017.
|
| |
|
|
|
|
|
|
|
|
|
| |
* Add interger pack/unpack intrinsic to glsl
Add unpack8, unpack16 and pack32 intrinsics to glsl.
* add unit test
* fix lowering logic for 'bitcast'
* format
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#6651)
* Fix incorrect assert on mixed global uniform and varyings
* add test
* remove unnecessary include
* fix incorrect logic
* fix comment grammar
* address review comments and improve test
* minimize diff
* fix more issues for cuda build
* remove unnecessary line for diff
|
| |
|
|
|
| |
* Include generics' operands in call graph construction
* add test
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add a simple interface parameter test
Since there's no documentation, it's nice to have a simple test case in order to
experiment with this feature of the testing framework.
* Add shader entry point attributes to tests
* Fix specialization arguments for tests
- Add some missing arguments
- Rremove one extraneous argument.
* Stop using deprecated compile request in render-test
Use a session object instead of the deprecated compile request object.
This closes issue #4760.
|
| |
|
|
|
|
|
| |
Adds support for input GLSL interface blocks.
closes #5535
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
|
| |
|
|
|
| |
* Properly plumbing layout for global varyings.
* Fix test.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Allow using specialization constants in numthreads attribute
* Add support for GLSL local_size_x_id syntax
* Fix overeager specialization constant parsing
* Add diagnostics for specialization constant numthreads
* Remove unused variable
* Fix local_size_x_id not finding existing specialization constant
* Allow materializeGetWorkGroupSize to reference specialization constants
* Use SpvOpExecutionModeId for modes that require it
* Cleanup specialization constant numthreads code
* Add tests for specialization constant work group sizes
* Fix implicit Slang::Int -> int32_t cast
* Fix querying thread group size in reflection API
---------
Co-authored-by: Yong He <yonghe@outlook.com>
|
| |
|
|
|
| |
* Add executable test on matrix-typed vertex input.
* Fix emit logic of matrix layout qualifier.
* Pass fragment shader varying input by constref to allow EvaluateAttributeAtCentroid etc. to be implemented correctly.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Allow glsl set and binding layout qualifiers to be compile time integer exprs
* add new tests
* add comments
* cleanup on asserts
* addressed review comments and cleanup
* fix missing set expr in test
* fixed tests and cleanup
---------
Co-authored-by: Yong He <yonghe@outlook.com>
|
| |
|
|
| |
functions. (#5585)
|
| |
|
| |
Decorations were not expected as an input, this causes a crash.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| | |
|
| |
|
|
|
|
| |
* Unify GLSL and HLSL buffer block parsing.
Automatic GLSL module recognition.
* Fix.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* GLSL Passthrough support for SSBO types
* GLSL Passthrough support for SSBO types
* Correctly apply glsl local size layout to entry points during lowering
* Test for glsl layout correctness
* typo
* Reflect GLSL SSBO as raw buffers
* Functional test for glsl ssbo
* Allow allow glsl for render tests
* Functional test for ssbo passthrough
* Functional test for ssbo passthrough with spirv-direct
* fix windows build error
---------
Co-authored-by: Yong He <yonghe@outlook.com>
|
| |
|
|
|
| |
* Correctly apply glsl local size layout to entry points during lowering
* Test for glsl layout correctness
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Squash warnings and fix build with SLANG_EMBED_STDLIB
* Add GLSLShaderStorageBuffer magic wrapper
* Make GLSLSSBO not a uniform type
* Buffers are global variables
* Allow creating ssbo aggregate types
* Allow reading from RWSB using builder
* Nicer debug printing for ssbos
* Lower SSBO to RWSB
* Parse interface blocks into wrapped structs
* Lower Interface Block Decls to structs
* remove comment
* Two simple ssbo tests
* Move ssbo pass earlier
* Correct mutable buffer detection
* Do not replace ssbo usages outside of blocks
* Treat GLSLSSBO as a mutable buffer for type layouts
* regenerate vs projects
* Correctly detect ssbo types
* Diagnose illegal ssbo
* remove unreachable code
* neaten
* ci wobble
* Make GLSLSSBO ast handling more uniform
* Add modifier cases for glsl
* Use empty val info for unhandled interface blocks
necessary for ./tests/glsl/out-binding-redeclaration.slang
* more sophisticated modifier check
* Correct ssbo wrapper name
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Unify Texture types in stdlib into 1 generic type.
* Fixes.
* Fix.
* Fixes.
* Fix reflection.
* Fix binding reflection.
* Add gather intrinsics.
* Fix gather intrinsics.
* Fix texture type toText.
* Fix intrinsic.
* fix cuda intrinsic.
* Fix project files.
* cleanup.
* Fix.
* Fix.
* Fix sampler feedback test.
* Fix getDimension intrinsics.
* Fix spirv sample image intrinsics.
* Fix test.
* Fix GLSL intrinsic.
* Cleanup.
---------
Co-authored-by: Yong He <yhe@nvidia.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Parse glsl buffer blocks to GLSLInterfaceBlockDecl
* Parse glsl local size layout declarations
* Parse (and ignore) glsl version directives
* spelling
* Better l-value interpretation for glsl interface blocks
* Better l-value interpretation for glsl interface blocks
* Add compile flag for enabling glsl
* Parse and ignore precision modifiers.
* Automatically import `glsl` module for compatiblity.
* Complete vector and matrix types for glsl
* Remove generated file from repo
* Bump .gitignore
* do not mark out globals as params
* Synthesize entrypoint layout from global inout vars.
* update test result.
* Allow HLSL semantic on global variables.
* Fix.
* Fix test.
* Fix win32 compile error.
* Add more builtin input/output and texture intrinsics.
* Add struct/array constructor syntax.
* Skip `#extension` lines.
* overide operator * for matrix/vector multiplication.
* Add `matrixCompMult`.
* Parse modifiers in for loop init var declr.
* Add more glsl intrinsics, add stage into to var layout.
* Allow `int[3] x` syntax.
* Fix array type syntax.
---------
Co-authored-by: Ellie Hermaszewska <ellieh@nvidia.com>
Co-authored-by: Yong He <yhe@nvidia.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Remove support for the -no-checking flag
Fixes #381
Fixes #383
Work on #382
- No longer expose flag through API (`SLANG_COMPILE_FLAG_NO_CHECKING`) and command-line (`-no-checking`) options
- Remove all logic in `check.cpp` that was withholding diagnostics (including errors) when the no-checking mode was enabled
- Remove `HiddenImplicitCastExpr`, which was only created to support no-checking mode (it represented an implicit cast that our checking through was needed, but couldn't emit because it might be wrong)
- Remove logic for storing function bodies as raw token lists when checking is turned off. I'm leaving in the `UnparsedStmt` AST node in case we ever need/want to lazily parse and check function bodies down the line.
- Remove a few of the code-generation paths we had to contend with, but keep the comment about them in place.
- Remove GLSL-based tests that can't meaningfully work with the new approach.
- Fix other tests that used a GLSL baseline so that their GLSL compiles with `-pass-through glslang` instead of invoking `slang` with the `-no-checking` flag.
- Remove tests that were explicitly added to test the "rewriter + IR" path, since that is no longer supported.
There is more cleanup that can be done here, now that we know that AST-based rewrite and IR will never co-exist, but it is probably easier to deal with that as part of removing the AST-based rewrite path.
We've lost some test coverage here, but actually not too much if we consider that we are dropping GLSL input anyway.
* Fixup: test runner was mis-counting ignored tests
* Fixup: turn on dumping on test failure under Travis
* Fixup: enable extensions in Linux build of glslang
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This includes a bunch of related changes:
- `slang-test`
- Add a notion of an "output mode" that specifies whether we output to console (the default), or invoke the apprpriate AppVeyor command to update test status
- Add a notion of test categories, so that tests can be tagged with categories, and then we can invoke only those tets in a given category, or choose to *exclude* tests with specific categories
- Allow the `OSProcessSpawner` to look up an executable by "path" (meaning a full path is expected) or by "name" (meaning it should be allowed to look in the current directory, `PATH` environment variable, etc.). This was important to make sure that I can run `appveyor` without having to know its absolute path.
- AppVeyor configuration
- Change badge to reflect new build account for organization (rather than a single-user account)
- Remove attempt to set AppVeyor build version in a clever way, since it breaks links from GitHub to AppVeyor
- Change order or configurations in the build matrix to front-load the Release build (which has the main tests)
- Turn on `fast_finish` flag so we don't have to wait as long for failed builds
- Turn on `parallel` builds
- Set `verbosity: minimal` to avoid getting build spew about Xamarin stuff I'm not using
- Add custom `test_script` to invoke `test.bat`
- Sets the test category based on teh build configuration, so we don't run the full test suite on every input.
- `test.bat`
- Allow for `-platform` and `-configuration` arguments
- Rewrute a platform of `Win32` over to `x86` to match how the output directories are named
- Futz around with how the directories are being passed along to work around annoying `.bat` file quoting behavior (I still don't get how batch files work)
- Tests
- Mark a bunch of tests as `smoke` tests
- Mark the relevant tests as `render` tests
(these get filtered out for AppVeyor builds)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Most of the Vulkan GLSL shaders in the `sascha-willems` corpus use completely regular parameter bindings, e.g.:
```
layout (binding = 0) uniform sampler2D samplerPositionDepth;
layout (binding = 1) uniform sampler2D samplerNormal;
layout (binding = 2) uniform sampler2D ssaoNoise;
```
With the Slang compiler, we can write this kind of stuff more compactly as:
```
uniform sampler2D samplerPositionDepth;
uniform sampler2D samplerNormal;
uniform sampler2D ssaoNoise;
```
and get the exact same result (in fact, we will generate output GLSL matching the first example).
There are a few spot tests for this in the HLSL case, but I hadn't done anything for GLSL yet.
Now that we have the ability to specify multiple tests to run on each input file, it was easy enough to go in and tweak some of these files to be usable as binding-generation tests.
I didn't ammend all of the GLSL shaders for two reasons:
1. Not all of the shaders will work with completely automatic binding generation done on a per-file basis. In some cases, the parameter layout needs to consider multiple files (and the order in which the files are supplied could matter). This is probably best handled with more directed tests.
2. There is going to be a ton of duplication if I just have 100s of tests that all confirm that, yes, the Slang compiler can count vertex inputs starting from zero. These shaders aren't really presenting a whole lot of unique cases to work with.
That said, a level of confidence greater than zero is always better than zero confidence.
|
| |
|