Age | Commit message (Collapse) | Author |
|
GLSL and RelaxedPrecision are quite different in what they affect.
RelaxedPrecision affects operations, while this is merely implied in
GLSL based on inputs.
This leads to situations where we have to promote mediump inputs to
highp, and the simplest approach is to force highp temporaries for
inputs which are consumed in a highp context. For completeness, we also
demote RelaxedPrecision inputs to mediump variables.
PHI is handled by copying the PHI into a temporary.
We have to be very careful with hoisted temporaries, since the child
temporary will not be analyzed up-front. We inherit the hoisted-ness
state and emit the hoisted child temporary as necessary. When faking the
temporaries with OpCopyObject, we make sure to block any variable
hoisting.
Hoisting children of PHI variables is fine, since PHIs are not hoisted with
the same framework as other temporaries.
|
|
Makes codegen from typical D3D emulation SPIR-V more readable.
Also makes cross compilation with NotEqual more sensible.
It's very rare to actually need the strict NaN-checks in practice.
Also, glslang now emits UnordNotEqual by default it seems, so give up
trying to assume OrdNotEqual. Harmonize for UnordNotEqual as the sane
default.
|
|
|
|
|
|
In cases where we know the size of the vector and the index at compile
time, we can check if it's accessing in bounds and rely in undefined
behavior otherwise.
Signed-off-by: Sebastián Aedo <saedo@codeweavers.com>
|
|
Add 64 bit switch support for MSL version 2.2.
* Also fixes a wrong endianness conversion.
Signed-off-by: Sebastián Aedo <saedo@codeweavers.com>
|
|
This is somewhat awkward to support, but the best effort we can do here
is to analyze various Load/Store opcodes and deduce the ideal overall
alignment based on this. This is not a 100% perfect solution, but should
be correct for any reasonable use case.
Also fix various nitpicks with BDA support while I'm at it.
|
|
Consider it a write to a variable, similar to OpStore.
|
|
|
|
(OpKill).
Add test shader for new functionality.
Add legacy test reference shader for unrelated buffer-bitcast
test, that doesn't seem to have been added previously.
|
|
Tests provided by @cdavis5e.
|
|
|
|
|
|
|
|
Fix bug in to_trivial_mix_op, where we made a pre-1.4 assumption that
component count of selector is equal to value component count.
|
|
|
|
|
|
|
|
We'll need to force a temporary and mark it as precise.
MSL is a little weird here, but we can piggyback on top of the invariant
float math option here to force fma() operations everywhere.
|
|
|
|
Remove all shenanigans with propagation, and only consume nonuniform
qualifiers exactly where needed (last minute).
|
|
|
|
Fairly minor differences, so can keep them side by side without too much
effort. NV support is effectively deprecated now however.
- Add OpConvertUToAccelerationStructureKHR
- Ignore/Terminate ray is now a terminator in KHR, but a call in NV.
- Fix some bugs with reportIntersection.
|
|
|
|
Subsequent stages can legally attempt to read from these variables,
which causes compilation failure.
Always make sure we emit user outputs in vertex shaders if they are
active in the entry point.
|
|
Deal with patch blocks, arrays of patch blocks, arrays of blocks, etc.
|
|
|
|
We have been interchanging spv and SPIRV_Cross_ for a while, which
causes weirdness since we don't explicitly ban SPIRV_Cross identifiers,
as these identifiers are generally used for interface variable
workarounds.
|
|
GLSL: Provide round/roundEven for legacy GLSL
|
|
GLSL: implement transpose() in GLSL 1.10 / ES 1.00
|
|
|
|
|
|
|
|
On AMD Windows OpenGL, it has been reported that we need to load
matrices via a wrapper function.
|
|
|
|
This CL rolls the spirv-tools, spirv-headers and glslang dependencies.
|
|
|
|
To facilitate an improved linking-by-name use case for older GL,
we will be more aggressive about merging struct definitions, even for
rather unrelated cases where we don't strictly need to use type aliases.
|
|
This Cl updates the various dependencies and the test file outputs.
|
|
This CL updates the GLSLang and SPIRV-Tools depedencies and updates test
files as needed.
|
|
|
|
|
|
|
|
GLSL: Support switch more properly in legacy ESSL
|
|
Cannot use switch on legacy ESSL, fallback to plain branches.
|
|
When inside a loop, treat any read of outer expressions to happen
multiple times, forcing a temporary of said outer expressions.
This avoids the problem where we can end up relying on loop-invariant code motion to happen in the
compiler when converting optimized shaders.
|
|
For a direct branch without merge, we lost control dependent
expressions.
|
|
When we see a switch block which only contains one default block, emit a
do {} while(false) statement instead, which is far more idiomatic and
readable anyways.
|
|
This CL rolls the GLSlang, SPIRV-Tools and SPIRV-Headers dependencies
and updates the various test files.
|
|
Opt-in to using the extension to support gl_InstanceIndex.
|