On 6/2/22 09:06, Giovanni Mascellani wrote:
Signed-off-by: Giovanni Mascellani gmascellani@codeweavers.com
I had to add a forward declaration for add_load(). I don't know if in cases like that it is preferred to add a forward declaration (which adds cruft) or move the definition backwards (which break the vague logical order functions have).
libs/vkd3d-shader/hlsl.y | 93 ++++++++++++++++++- tests/hlsl-duplicate-modifiers.shader_test | 2 +- tests/hlsl-initializer-matrix.shader_test | 2 +- ...lsl-return-implicit-conversion.shader_test | 10 +- tests/hlsl-shape.shader_test | 10 +- tests/matrix-semantics.shader_test | 20 ++-- 6 files changed, 111 insertions(+), 26 deletions(-)
With this patch we're able to successfully generate IR for the tests added in patch 1. Unfortunately, the IR is not quite valid. It generates SM4_RT_OUTPUT registers that are not actually declared (neither in the output signature nor with dcl_output instructions). This seems to confuse the DXBC->SPIRV translator, generating the following message and producing SPIR-V that does not consistently pass or fail tests:
fixme:vkd3d_dxbc_compiler_get_register_info: Unrecognized register (register 0x8, 4294967295).