Without LTO, gcc doesn't know that hresult_from_vk_result() will always return a
failure HRESULT for a failure VkResult, and so thinks that we might exit from
vkd3d_check_device_extensions() with a success HRESULT but without initializing
vk_extensions.
Move the temp allocation back to hlsl_codegen.c.
Note that the DCL_TEMPS instructions wouldn't be necessary if we had the
capacity to store the temp_count for both the main program and the patch
constant program (or more generally speaking, a temp_count for all
phases).
The plan is to eventually also move the HS_CONTROL_POINT and
HS_FORK_PHASE markers to the vsir_program, making it able to contain
both functions.
This node type will be deleted (again) once the hlsl->vsir->tpf
translation is complete. It serves the purpose of allowing to keep
both real hlsl_ir_nodes and vsir_instructions in the hlsl_block,
until all the former can be translated into the latter.
Currently the mutable descriptor set is repeated many times in the
pipeline layout in order to cover the indices for all the
descriptor types that would be present if mutable descriptors were
not used. This is useless and wasteful, but was necessary before
the descriptor sets backing the SRV-UAV-CBV heap were moved at the
end of the allocation table because descriptor set indices are
currently a compile-time constant in many places.
Now this is not needed any more and we can just avoid putting
many copies of the mutable descriptor set in the pipeline layout,
making it easier to meet Vulkan implementation limits.
So that when mutable descriptors are in use we can avoid putting
the other descriptor sets backing the SRV-UAV-CBV descriptor heap
in the pipeline layout altogether.
So we avoid hardcoding that it is number zero. There are two
goals here: first making the code easier to understand and
second allow reshuffling the descriptor set allocation in a
later commit.
This is required to properly optimize signatures, because these
semantics must be alligned while being packed:
- Array elements.
- The first fields of structs.
- Major vectors of a matrix.
For now this has no effect since semantics are allocated with reg_size
4, but will have effect when optimizing interstage signatures.
The generated pixel shader input signature must be consistent with the
generated vertex shader output signature for the same data type.
Since the interpolation mode affects allocation order, the allocator
needs to know the modifiers for both input and output signature elements.