Age | Commit message (Collapse) | Author |
|
Handle ShaderDebugInfo non-semantic extension.
|
|
|
|
Merge HLSL support for VK_EXT_mesh_shader
|
|
Force gl_in_out path for HLSL as well when mesh shaders are used.
|
|
The array mechanism breaks DXC which needs to observe that all
components have been written.
Uninitialized outputs will be undefined. Resort to simple vector
instead.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
MSL: Implement `CompositeInsert` `OpSpecConstantOp`.
|
|
This op creates a new composite constant with one element replaced. So,
we reconstruct the `SPIRConstant` for the composite constant, but with
one of the IDs replaced. Constant initializer lists are memoized for
when the result of a `CompositeInsert` is used in another
`CompositeInsert`.
(I wanted to add a test case for GLSL as well, but for two things:
1. `glslang` in Vulkan mode chokes on the first constant array,
insisting that its initializer needs to be a constant. [Bug in
glslang?]
2. The declarations for the buffers used by the shader aren't emitted,
regardless of whether Vulkan mode is enabled.)
Fixes five tests under
`dEQP-VK.spirv_assembly.instruction.*.opspecconstantop.vector_related`.
|
|
Roll glslang dependency.
|
|
|
|
MSL: Handle implicit integer promotion rules.
|
|
MSL inherits the behavior of C where arithmetic on small types are
implicitly converted to int. SPIR-V does not have this behavior, so make
sure that arithmetic results are handled correctly.
|
|
MSL: Fix restrict vs __restrict incompatibility.
|
|
restrict was supported, but it broke in MSL 3.0. __restrict works on all
versions, so opt for that instead.
Also check for RestrictPointer decoration and refactor to_restrict() to
not take optional parameter to make it more obvious when implied space
character is added.
|
|
HLSL: Add option to bind vertex input smemantics by name.
|
|
MSL: Handle partial access chains with array-of-UBO/SSBO.
|
|
|
|
Need to consider the backing variable, not just plain SPIRVariable.
|
|
Raw buffer tess input
|
|
In tessellation shaders, we call
`add_plain_member_variable_to_interface_block()` on composite types,
since we are using buffers for I/O and can use nested structs/arrays
here. In those cases, we need to make sure the next location is
incremented by the total amount consumed by the entire composite.
Fixes six more tests in the CTS, under
`dEQP-VK.tessellation.user_defined_io.per_vertex_block.*`.
|
|
Flattening doesn't play well with dynamic indices. In this case, it's
better to leave it as an array of structs.
(I wanted to do this for named blocks generally. Trouble is, the builtin
`gl_out` block is *also* a named block...)
Fixes six more CTS tests, under
`dEQP-VK.tessellation.user_defined_io.per_patch_block_array.*`.
|
|
Using vertex-style stage input is complex, and it doesn't support
nesting of structures or arrays. By using raw buffer input instead, we
get this support "for free," and everything becomes much simpler.
Arguably, this is the way I should've done this in the first place.
Eventually, I'd like to make this the default, and then remove the
option altogether. (And I still need to do that with
`multi_patch_workgroup`...)
Should help fix 66 tests in the Vulkan CTS, under the following trees:
- `dEQP-VK.pipeline.*.interface_matching.*`
- `dEQP-VK.tessellation.user_defined_io.*`
- `dEQP-VK.clipping.user_defined.*`
|
|
HLSL: Improve support for VertexInfo aux struct.
|
|
MSL: Expose way to query if a buffer needs array length.
|
|
Add reflection support for shader record buffers.
|
|
Add concept of explicit bindings for aux structs and allows query if
these aux structs are required.
|
|
|
|
Reflect naming scheme in a context sensitive way that matches the
frontend.
GLSL -> use block name
HLSL (DXC) -> use instance name.
|
|
MSL: Emit correct address space when casting during OpStore.
|
|
When storing to local variable (eg. OpCopyLogical), the
default device address space used during casts is illegal.
Determine correct address space based on variable type.
|
|
MSL: Block 64-bit atomics and fix some reserved keywords
|
|
Address space qualifiers must also be banned.
|
|
Overall just broken in some cases. And lack of fetch_* variants for a
few opcodes is also broken. When officially supported in some future MSL
version, this can be lifted.
|
|
MSL: Do not attempt to alias push constants.
|
|
|
|
MSL: Handle descriptor aliasing of raw buffer descriptors.
|
|
It is allowed to redeclare descriptors with different types in Vulkan.
MSL in general does not allow this, but for raw buffers, we can cast the
reference type at the very least.
For typed resources we are kinda hosed. Without descriptor indexing's
PARTIALLY_BOUND_BIT, descriptors must be valid if they are statically
accessed, so it would not be valid to access differently typed aliases
unless that flag is used. There might be a way to reinterpret cast
descriptors, but that seems very sketchy.
Implements support for:
- Single discrete descriptor
- Single argument buffer descriptor
- Array of argument buffer descriptors
Other cases are unimplemented for now since they are extremely painful
to unroll.
|
|
GLSL: Account for ES sampler1D to sampler2D promotion in textureSize.
|
|
|
|
MSL: only fix up gl_FragCoord if really necessary.
|
|
billhollings/msl-OpPtrEqual-OpPtrNotEqual-OppPtrDiff
MSL: Support OpPtrEqual, OpPtrNotEqual, and OpPtrDiff.
|
|
- Add CompilerMSL::emit_binary_ptr_op() and to_ptr_expression()
to emit binary pointer op. Compare matrix addresses without automatic
transpose() conversion, to avoid error taking address of temporary copy.
- Add Compiler::add_active_interface_variable() to also track active
interface vars in the entry point for SPIR-V 1.4 and above.
- For OpPtrAccessChain that ends in array element, use Element
as offset to existing index, otherwise it will access into
array dimension that doesn't exist.
- Dereference pointer function call arguments. Ultimately, this
dereferencing is actually backwards, and in future, we should aim
to properly support passing pointer variables between functions,
but such a refactoring was beyond the scope here.
- Use [] to declare array of pointers, as array<T*> is not supported in MSL.
- Add unit test shaders.
|