A Dxil shader flag should be added when SV_Barycentrics semantic or
AttributeAtVertex() are used. It was defined and member variables
created for it, but it wasn't actually set.
At some point, these tests were disabled because they didn't run on
WARP. They do now, so I'm enabling them.
Additionally, tests that depend on 6.3 don't need to hide behind a lower
priority, they should be conditional on the availability of shader model
6.3. They still don't run on WARP since it doesn't support 6.3, but they
should run where that support is reported.
When trying to fixup line numbers when inlining a function, if the call
instruction had no debug location, the DIsubprogram was queried. That
query took a very long time and was pointless when there is no debug
info.
The code now checks for debug metatdata before trying to get the
disubprogram
Fixes#3130
Under certain rare circumstances, it is possible for errors to be
reported for function or global variables that are null.
This eliminates the absolute necessity for a non-null function or GV by
passing in the context needed to report any error. It also avoids some
of the cases where trying to get a debug function would give a null
which would replace the non-null function.
In DX12, `SV_InstanceID` always counts from 0. On the other hand,
Vulkan `gl_InstanceIndex` starts from the first instance. Thus it
doesn't emulate actual DX12 shader behavior. To make it equivalent,
we can set `SV_InstanceID = gl_InstanceIndex - gl_BaseInstance`.
However, it can break the existing working shaders (i.e., compatibility
issue). We want to provide an option for users to choose what they
exactly want by `SV_InstanceID`. This commit adds
`-fvk-support-nonzero-base-instance` option. If it is enabled, it emits
`SV_InstanceID = gl_InstanceIndex - gl_BaseInstance`. Otherwise,
`SV_InstanceID = gl_InstanceIndex`.
The new spirv-val rule reports an error if we use a variable (not
OpConst*) for OpImage* Offset:
https://github.com/KhronosGroup/SPIRV-Tools/pull/4118
This CL also let the DXC SPIR-V backend report an error if it checks
the HLSL code uses a variable for the `offset` operand of `Sample*`
built-in methods.
It aligns with the DXIL or FXC behavior. They do not accept a variable
for the `offset` operand of `Sample*` built-in methods.
The code meant to add an integer to the string indicating the dimension
of the resource binding didn't convert it to a string resulting in a
corrupted string.
Adds a test as well
Fixed#3335
A change to silence warnings mistakenly cast a 64-bit value down to
32-bit. This corrects the cast.
Replaces instances where size_t usage may result in incorrect results on
32-bit systems plus one where it wouldn't for consistency.
The AS/MS shader stages were overwriting each other's groupshared output,
and were not using the expected per-thread index when offsetting into
buffers and groupshared memory. Instead, follow the pattern of
AtomicsTest and use the payload data to convey groupshared data between
AS and MS, and use unique ranges of per-thread indices for each stage.
While the tests were not accounting for the z coord, the number of
expected results was, leading to an attempt to verify uninitiatized
values. These uninitialized values failed to match the expected results
in all but the most infinitescimally improbable cases
* Move warning enabling pragma to cpp files before includes and fixed warning that popped up
Whitespace change in ShaderOpArithTable.xml
* Enable and fix warnings on execution tests
* One more warning