Most I/O registers are already described by the shader signatures.
The registers that are not do not have any property other then
being used by the program or not, so they can be collectively
described with a bitmap.
The register storage class is now represented in
vkd3d_register_builtins, so the spirv_compiler_emit_io_register()
doesn't need to know it from the caller.
This makes it available to all backends, without requiring an
ad-hoc solution for each of them. It also gets rid of an
undocumented flag we're currently passing to
DCL_CONTROL_POINT_PHASE.
The number of components needed for texel offsets is the number of
components needed to address a single image/layer of an array. I.e.,
"coordinate_component_count - 1" for array textures, and
"coordinate_component_count" for non-array textures.
This change will also fix sampling of cube textures with explicit
gradients. Because texel offsets are unsupported for cube textures,
"offset_component_count" is currently 0 for cube textures. However, the
SAMPLE_GRAD handler also uses "offset_component_count" to determine the
number of components needed for the explicit gradients, and SAMPLE_GRAD
is supposed to work with cube textures.
This commit fixes the compilation of shaders in Star Wars Jedi:
Survivor.
We don't need them for SRVs. Worse, if we're using a combined
resource/sampler pair for the SRV, a separate resource symbol may not
even exist.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Vulkan requires that point size be written.
There should be no backwards compatibility concern here, since the vertex shader
supplies point size with the lowest priority.