Added FeatureManager to record all extensions specified from
the command-line and emit error if trying to use one not permitted.
Added command-line option -fspv-extension= to specify
whitelisted extensions.
This is configurable via Tools | Options. The '%in' string will be replaced with the path to a temporary file with the rewritten XML, with the shaders within their respective nodes.
fxc errors out if the template argument for ConstantBuffer or
TextureBuffer is not a struct type with "D3D12 constant/texture
buffer template element can only be a struct". This commit
enforces that behavior on dxc.
Longform explanation:
Views/descriptors over resources may specify some non-default properties.
The prior implementation was trying to check values and infer whether
they had been set or were forcibly needed. For starters, this wasn't
always properly initialized, so results were not consistent. Guessing
at this point is a bad idea in any case, so the new implementation
keeps track of whether anything was in fact specified (and if so, values
should have been initialized by the reader, although that is still WIP
for some cases).
* Add 'implicit truncation of vector type' warning
There was no warning when the truncation happened
due to a binary operation.
Fixes#1159
* Whitespace fix
The compiler was crashing on binary operations used on vectors and
matrices of varying sizes. This fix aligns the matrix/vector conversion
behavior and allowed combinations with FXC.
Vector initialization from matrices of equivalent dimensions now works
as well.
Fixes: #1090, #1157
Previously we emit a store for each sub-element, which is not
friendly to SPIR-V transformations. This commit converted that
into first constructing a temporary value of the target storage
class, and the store once.
This commit uses the HlslCounterBufferGOOGLE decoration to link
the main RW/Append/Consume StructuredBuffer with its associated
counter buffer. It also uses HLSLSemanticGOOGLE to decorate
stage IO variables with their semantic strings from the source code.
In SPIR-V, if shifting a value by an amount that is greater than
the value's bitwidth, the result is undefined.
FXC and DXC/DXIL performs a bitwise and over the RHS of the shift
operation to only consider its (n - 1) least significant bits,
where n is the bitwidth of LHS.
Fix HoistConstantArray pass to recognize more complex load & store patterns.
Previously it was expecting no nesting and just a simple list of GetElementPtr's that fed loads or stores. Now it can accept a tree (DAG) of GetElementPtrs that feed leaf node loads or stores.
These patterns cannot be directly derived from HLSL, however they can occur due to previous optimizations that transform the array accesses (like a partial CSE or similar).
Previously we use an additional parameter to translateType()
to convey the matrix majorness info. It causes lots of type
inconsistency issue.
Now the majorness info is queried directly from the QualType.
This should be more robust.
This commit changes the behavior of how to handle externally-visiable
non-resource-type stand-alone variables. Previously they are emitted
as stand-alone SPIR-V variables. Now they are grouped into a cbuffer
that named as $Globals. This is more aligned with how DirectX handles
them.