| Age | Commit message (Collapse) | Author |
|
* Refactor compiler option representation.
* Fix binary compatibility.
* Add a test for specifying compiler options at link time.
* Fix binary compatibility.
* Fix binary compatibility.
* Fix backward compatibility on matrix layout.
* Fix.
* Fix.
* Fix.
* Fix gfx.
* Fix gfx.
* Fix dynamic dispatch.
* Polish.
|
|
|
|
* cmake: slang lib type setting
* cmake: change name for slang lib type setting
---------
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
* HLSL texture intrinsic test first draft.
* Some updated to texture-intrinsics.slang
* Update dx11 test config in texture-intrinsics.slang
* made some edits that shouldn't matter, but commiting once more to be sure
* Switch to filecheck-buffer and differing output values per api
* Forgot to uncomment one function and updated expected values.
* Delete tests/hlsl-intrinsic/texture/texture-intrinsics.slang.expected.txt
* Cubemap SampleGrad
* Enable Vulkan and have SampleCmpLevelZero ifdefed out for Vulkan
|
|
* Support loading serialized modules.
* Fix.
* Fix vs solution files
* Fix glsl module loading.
* C++ fix.
* Fix.
* Try fix c++ error.
* Try fix.
* Fix.
* Fix.
|
|
* Deploy the falcor-compiler-perf-test
Deploy the falcor-compiler-perf-test to falcor-test.yml file.
It will download the release pre-build from:
https://github.com/shader-slang/falcor-compile-perf-test
and run the test executable with newly built slang libraries.
It only works on win64 now.
Disable running the tests on macos and linux platform.
* make a separate yml file to only run falcor-perf-test
* Remove falcor-perf-test from dependency
Remove falcor-perf-test from dependency, instead download the binary
in github action.
---------
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
* cmake: add options to disable gfx, test and example targets
* cmake: enable gfx, test, example targets by default
* cmake: use same naming scheme
* cmake: option to disable slangd and slangc targets
* cmake: option for enabling slang-rt target
* cmake: option to deactivate llvm and glslang
* cmake: better option text
* cmake: remove duplicate slang-llvm option
* doc: update docs/building.md
---------
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
|
|
* Fix lowering of static consts in a generic function.
* Fix.
* Fix.
* Fix lowering of shading rate builtin.
|
|
|
|
* Fix spirv legalization of nested ararys.
* Fix test.
|
|
* Support link-time constants.
* Fix.
* Fix.
|
|
* Support pointers in SPIRV.
* Fix test.
* Enhance test.
* Fix test.
* Cleanup.
|
|
* Implement basic GLSL built-in functions
Partially resolves #3362
This change implemented GLSL build-in functions described in the
following sections of "OpenGL Spec" document.
8.1. Angle and Trigonometry Functions
8.2. Exponential Functions
8.3. Common Functions
8.5. Geometric Functions
8.7. Vector Relational Functions
8.8. Integer Functions
About 40 functions are newly implemented and about 150 functions
were preexisted on HLSL side implementation.
The implementation of new functions hasn't been tested yet.
* Unify some of GLSL functions into hlsl.meta.slang
Partially resoves #3362
This change moves Some of GLSL functions from glsl.meta.slang to
hlsl.meta.slang, because those functions are generic enough to be used
for HLSL. Those functions are: dot, normalize, fma, and reflect.
There was "fma" for double in hlsl.meta.slang and it is converted to use
__BuiltinFloatingPointType type, which required some modifications in
diff.meta.slang. The implementation for "fma" in diff.meta.slang is very
similar to how "mad" is implemented.
* Implement more GLSL built-in functions
Partially resolves #3362
This change implements more GLSL built-in functions mentioned in the
following sections.
8.4. Floating-Point Pack and Unpack Functions
8.6. Matrix Functions
This change implemented 11 new GLSL built-in functions and there were 3
already working functions.
The mistake in "normalize" is fixed.
"refract" function is moved from glsl.meta.slang to hlsl.meta.slang.
* Implement basic GLSL built-in functions
Partially resolves #3362
This change implemented GLSL build-in functions described in the
following sections of "OpenGL Spec" document.
8.1. Angle and Trigonometry Functions
8.2. Exponential Functions
8.3. Common Functions
8.5. Geometric Functions
8.7. Vector Relational Functions
8.8. Integer Functions
About 40 functions are newly implemented and about 150 functions
were preexisted on HLSL side implementation.
The implementation of new functions hasn't been tested yet.
* Unify some of GLSL functions into hlsl.meta.slang
Partially resoves #3362
This change moves Some of GLSL functions from glsl.meta.slang to
hlsl.meta.slang, because those functions are generic enough to be used
for HLSL. Those functions are: dot, normalize, fma, and reflect.
There was "fma" for double in hlsl.meta.slang and it is converted to use
__BuiltinFloatingPointType type, which required some modifications in
diff.meta.slang. The implementation for "fma" in diff.meta.slang is very
similar to how "mad" is implemented.
* Implement more GLSL built-in functions
Partially resolves #3362
This change implements more GLSL built-in functions mentioned in the
following sections.
8.4. Floating-Point Pack and Unpack Functions
8.6. Matrix Functions
This change implemented 11 new GLSL built-in functions and there were 3
already working functions.
The mistake in "normalize" is fixed.
"refract" function is moved from glsl.meta.slang to hlsl.meta.slang.
* Fix a few minor bugs on GLSL builtin functions
Partially resovles #3362
Following bugs were addressed:
1. "bitCounts" had to have a "Capability" on its function declaration.
2. "roundEven" is implemented. It is almost same to "round()" but the
behaivor is slightly different the given value is 1.5, 3.5, 5.5 and
so on.
3. umulExtended and imulExtended are simplified.
4. exp2 is implemented with "__target_switch" for GLSL and SPIR-V.
5. "tests/glsl-intrinsic/intrinsic-basic.slang" checks the results
from the GLSL functions. Currently it is mainly to test if the
functions exist or not, but it can now also test for a simple case
where the input value is zero and the result is most of the time
zero or one.
* Disable GLSL exp2 double type tests
This change disables some of GLSL exp2 related tests as a workaround.
The spir-v needs to handle the double-type argument for exp2 properly.
* Fix exp2(double) problem for SPIR-V
SPIR-V can handle a double-type input for exp2 with this change.
However, the slang-test is will failing to test it with an error message
saying, "abort compilation:".
With a simpler test case, I verified that SPIR-V assembly code is
properly generated for exp2(double) and I am not sure why slang-test is
still failing. We will need to revisit this issue later.
The simple testing is done with a following line:
outputBuffer.result[0] = float(exp2(double(outputBuffer.result[0])));
And it generated following lines and it looks correct:
; Function main
%main = OpFunction %void None %3
%5 = OpLabel
%16 = OpAccessChain %_ptr_Uniform_float %outputBuffer_0 %int_0 %uint_0
%17 = OpLoad %float %16
%19 = OpFConvert %double %17
%20 = OpFConvert %float %19
%21 = OpExtInst %float %1 Exp2 %20
%22 = OpAccessChain %_ptr_Uniform_float %outputBuffer_0 %int_0 %uint_0
OpStore %22 %21
OpReturn
OpFunctionEnd
* Add __floatCast that is safer than slang_noop_cast
Adding __floatCast that can be used for exp2 function.
|
|
* CI: cancel onging jobs on commit.
* test change
* Fix.
|
|
* gfx:Add callback to IPipelineCreationAPIDispatcher
Add the callback to IPipelineCreationAPIDispatcher in Vulkan backend
in slang-gfx lib.
* gfx:add uuid for vulkan pipeline dispatcher
Add a define of SLANG_UUID_IVulkanPipelineCreationAPIDispatcher
for Vulkan specific IPipelineCreationAPIDispatcher such that
libgfx.so can have special handle to Vulkan pipeline dispatcher without
break binary compatibility.
In the RendererBase::initialize call, we will provide this new UUID when
the DeviceType is Vulkan.
* gfx: add new variable to GfxGUID
Add new variable to GfxGUID IID_IVulkanPipelineCreationAPIDispatcher
with initialization of SLANG_UUID_IVulkanPipelineCreationAPIDispatcher
to make the implementation aligned with existing
GfxGUID::IID_IPipelineCreationAPIDispatcher.
---------
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
* deploy slang-glslang with macos releases
* sign libslang-glslang.dylib and add it to dist package
---------
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
* Improve capability system.
* Update documentation.
* Tuning semantics.
* LSP: hierarchical diagnostics.
* Fix test.
* Fix test.
|
|
|
|
* Unify GLSL and HLSL buffer block parsing.
Automatic GLSL module recognition.
* Fix.
|
|
* Add per-buffer data layout control.
Fixes #3534.
* Fixes.
* Robustness.
* Update test.
* Fix.
|
|
|
|
* Implement GLSL texture related built-in functions
Partially resolves #3362
This change implemented GLSL build-in functions described in the
following sections of "OpenGL Spec" document.
8.9.1. Texture Query Functions
8.9.2. Texel Lookup Functions
8.9.4. Texture Gather Functions
8.9.5. Compatibility Profile Texture Functions
About 200 functions are newly implemented.
Most of the functions are calling the HLSL implementation so they are
expected to work for all targets but they haven't been tested throughly
yet.
__TextureImpl got a new generic parameter, "isRectangle", to support
sampler2DRect and sampler2DRectShadow. It is a sampler for rectangular
texture with no mipmaps. For the reason, its "GetDimentions()" doesn't
return mip information. The sampling needs to happen in an integer
coordinate not in a normalized [0,1] range. but this hasn't been
implemenented yet.
Texture functions whose name include "Offset" takes an integer type
parameter and those values are required to be a compile-time constant.
However, our currentl implementation of slangc seems to make the values
not-compile-time constant. As a workaround, the test case uses __LINE__
macro to use a unique numbers so that slangc wouldn't collect them into
a runtime variable. I put "constexpr" on "offset" parameters as much as
possible. But the issue was still reproduced when targetting SPIRV.
Texture functions whose name include "Proj" are emulated by dividing the
coordinate value with its last component. For that reason, they take one
additional component for its coordinate value. As an example, following
function takes two components for sampler1D, instead of one:
vec4 textureProj(sampler1D sampler, vec2 p);
All shadow samplers stores depth-compare-value at the last component.
But sampler1DShadow take one extra component, which is vec3 not vec2.
It is unclear what the reason is but the second component is unused in
this case. Here is an example,
float texture(sampler1DShadow sampler, vec3 p);
samplerCubeArrayShadow takes five components for its coordinate and
the depth-compare-value cannot be stored in the last component of the
cooridnate. It is separated out as an independent parameter,
float texture(samplerCubeArrayShadow sampler, vec4 p, float compare);
TextureGather functions got some modifications. The existing
implementation was calling textureGatherOffset[s] with the parameters in
a wrong order. This mistake is corrected.
* Bring back GatherCmpRed/Green/Blue/Alpha
HLSL has GatherCmpRed/Green/Blue/Alpha functions and it was removed from
my previous change by a mistake.
This change brings them back.
* Disabling two failing tests in intrinsic-texture
The new test file, intrinsic-texture.slang, has five test settings and
two of them are currently failing; they are targetting HLSL and CPP.
This change disables them to avoid confusion.
* Remove "isRectangle" parameter from __TextureInfo
Partially resolves #3362
This commit has a few changes based on the feedback from the code
reviews.
1. Remove "isRectangle" parameter from __TextureInfo, because
"sampler2DRect" can be replaced with "sampler2D" that always uses
lod level 0. All functions associated to "Rect" are also removed.
2. Enabled tests for "samplerBuffer".
3. Removed "__target_intrinsic(glsl)" from glsl.meta.slang, because we
want to stay away from it in the future.
4. Some tests in intrinsic-texture.slang are disabled if the functions
take constant offset values or take MultiSample samplers.
---------
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
Fixes #3454.
|
|
|
|
* Capability type checking.
* Fix.
---------
Co-authored-by: Yong He <yhe@nvidia.com>
|
|
* Fix atomics intrinsics, increase kMaxDescriptorSets.
* Add SPIRVASM to known non-differentiable insts.
* Support fp16 wave ops when targeting glsl.
* Fixes.
* Fix vk validation errors.
* Fix.
* Add to allowed failures.
|
|
* 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>
|
|
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
functionality (#3541)
|
|
* FP16 atomics for RWByteAddresBuffer, fp32 atomics for images.
* Fix spelling.
* Add overload.
* Fix test failures.
---------
Co-authored-by: Yong He <yhe@nvidia.com>
|
|
* Add slangc option to specialize entrypoint.
* Auto enable glsl mode when input file has glsl extension name.
* Fix test.
---------
Co-authored-by: Yong He <yhe@nvidia.com>
|
|
* Correctly apply glsl local size layout to entry points during lowering
* Test for glsl layout correctness
|
|
* [LSP] compatibility logic for Visual Studio.
* [LSP] Fix diagnostic rank parsing.
* [LSP] Fix semantic highlighting of cbuffer types.
* Fix.
* Fix.
---------
Co-authored-by: Yong He <yhe@nvidia.com>
|
|
* Fix type checking of enum cases.
* Allow decl to have same name as module.
---------
Co-authored-by: Yong He <yhe@nvidia.com>
|
|
* Fix spirv legalization generating duplicate array types.
* Fix intrinsics.
* Update CI build config.
---------
Co-authored-by: Yong He <yhe@nvidia.com>
|
|
Co-authored-by: Yong He <yhe@nvidia.com>
|
|
* [SPIRV] Support `globallycoherent` modifier.
* Fix.
* Disable executable cooperative vector tests.
* Update expected failure.
* [SPIRV] Emit varying output index decoration.
* Add test.
* Update tests.
* Fix test.
* Emit `SpvExecutionModeEarlyFragmentTests`.
* Lower `StructuredBuffer<bool>`.
* Support globallycoherent on ByteAddressBuffer.
---------
Co-authored-by: Yong He <yhe@nvidia.com>
|
|
parent. Previously special case was added to handle IRDecoration similarly. Replace this with a common method getBlock that traverses the parent chain till it gets to the Block (#3486)
Fixes bug #3432
|
|
The user guide refers to `SlangComPtr`, but the type is actually called
`ComPtr` and resides in the `Slang` namespace.
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
It is not required to specify a pixel shader when rasterizing with D3D11.
Omitting it is useful when writing to the depth buffer without writing to any
render targets.
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
* Generate lookup tables from cmake
* Correct add_custom_command generator dependencies
* set options for lookup table source
* include path
* use slang_add_target for capability generated targets
* vs project regenerate
* ci wobble
---------
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
Co-authored-by: Yong He <yhe@nvidia.com>
|
|
* Fix CFG legalization for SPIRV backend.
* Emit DepthReplacing execution mode.
* Fix do-while lowering.
---------
Co-authored-by: Yong He <yhe@nvidia.com>
|
|
* Adding CONTRIBUTION.md
Fixes #3372
Adding CONTRIBUTION.md that describes the workflow for the contributors
at more details.
* Add instructions for PR process in CONTRIBUTE.me
This commit adds an instruction of how to handle the case when you got
feedbacks during Pull Request process.
* Fix a formatting problem for Code Style
When a word is wrapped with "lessThen" and "greaterThan" characters, it
may disappear on the result based on the formatting syntax of .MD file.
They need to be wrapped with a single back-tick character to avoid the
problem.
---------
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
* Fix incorrect behavior of operator%
Fixes #1059.
This change fixes the incorrect translation of "operator%" from
HLSL to SPIRV.
The issue stems from the fact that the behavior of "operator%" in
GLSL differs from that in HLSL. In HLSL it behaves as "remainder"
where as it behaves as "modulus" in GLSL.
We have been using SpvOpFMod for operator% when Slang compiles
from HLSL to SPRIV, which is incorrect. This change switches it
to SpvOpFRem.
The tests are slightly modified to reveal any potential issues.
* Change output type of test/compute/frem
For testing the operator%, we are using "int" as the output type of the
test, "test/compute/frem.slang".
Since the operands are in float type, it is more preferable to have a
float type as the resulting type. This can be done with an option,
"-output-using-type".
---------
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
Add a member function to RayQuery<RAY_FLAG> class
GetIntersectionTriangleVertexPositions to support the GLSL built-int
rayQueryGetIntersectionTriangleVertexPositionsEXT.
Also add new test file under tests/vkray/rayquery-closesthit.slang
to test this functionality.
|
|
Co-authored-by: Yong He <yhe@nvidia.com>
|
|
* Fix GLSL legalization bug that leads to crash.
* Update diagnostic id to avoid conflict.
* Fix std140 layout logic.
---------
Co-authored-by: Yong He <yhe@nvidia.com>
|
|
Co-authored-by: Yong He <yhe@nvidia.com>
|