Fixes an issue where invalid SPIR-V was generated when
gl_ObjectToWorldEXT and gl_ObjectToWorld3x4EXT, or
gl_WorldToObjectEXT and gl_WorldToObject3x4EXT, were used in the same
shader. The SPIR-V specification requires that there be at most one
OpVariable decorated with a given BuiltIn value.
It was counting bits up to the current lane included, whereas the
documentation says it should be excluded. This now matches dxc's behavior
as well.
Fix#2929
For recent GLSL versions, if texture2D function call appears, the error
message reports an unsupported type constructor. Change message to
unsupported function. Likewise for other removed texture* function calls.
Before this change, the example is rejected by DXC:
$ dxc -T ps_6_0 hlsl.namespace.frag
hlsl.namespace.frag:22:73: error: call to non-static member function
without an object argument
return N1::getVec() + N2::getVec() + N2::N3::getVec() + N2::N3::C1::getVec() * N2::gf;
~~~~~~~~~~~~^~~~~~
The call to the class member function requires an object, or we ned to
make the function static. This update makes the function static.
This also fixes SPIR-V validation: without this change the call
to that getVec does not have enough arguments:
error: line 69: OpFunctionCall Function <id>'s parameter count does not
match the argument count.
%43 = OpFunctionCall %v4float %N2__N3__C1__getVec_
Specifically, make GLSL link error messages more specific and output
only information relevant to the error.
Also change type printing to more closely reflect GLSL syntax. This
is the default for link error messages, but must me enabled with the
new option --enhanced-msgs for compilation error messages.
Also with --enhanced-msgs, only emit one error message per source
line.
For GL_EXT_vulkan_glsl_relaxed. When merging the default uniform block,
there were cases where symbols in the tree wern't updated to match the
new block structure after merging blocks together.
This change traverses the symbol tree and updates any references to the
merged block.
Also update known goods to Vulkan 1.3 support
Also re-enable SPIR-V 1.6 tests with vulkan1.3 target
Also re-cache SPIRV 1.6 header which somehow regressed back to 1.5
Add command line support which enables the following behavior:
- Remap discard
Map discard to DemoteToHelperInvocation for HLSL shaders. Map to
OpTerminateInvocation for GLSL shaders.
- Decorate HelperInvocation with Volatile
- Use localSizeId for execution mode
WorkGroupSize is deprecated in spirv1.6
Also update known goods to SPIRV 1.6
1. The test cases of OpReadClockKHR is invalid. The return type is
unsigned integer rather than signed integer.
2. When SPIR-V decorate or SPIR-V type is specified, we should avoid
auto location mapping because the semantics are totally decided by
SPIR-V tokens.
When using this qualifier for a parameter, we make it as a pointer.
However, the function TranslateStorageClass() is therefore called and
the storage class should only be set to Function when it is invoked
to translate parameter types rather than actual argument types.
We previously use createOp() in SPV builder to create type declaration.
However, all type declarations should be placed in const-type-variable
declaration section. And duplicated type defintions ought to be avoided.
We now make a method in SPV builder to perform this operation with a
more general solution: makeGenericType().