From: Zebediah Figura Subject: Re: [PATCH vkd3d v3 4/7] vkd3d-shader/hlsl: Lower matrix casts. Message-Id: Date: Fri, 3 Jun 2022 00:03:02 -0500 In-Reply-To: <20220602140609.3419134-4-gmascellani@codeweavers.com> References: <20220602140609.3419134-1-gmascellani@codeweavers.com> <20220602140609.3419134-4-gmascellani@codeweavers.com> On 6/2/22 09:06, Giovanni Mascellani wrote: > Signed-off-by: Giovanni Mascellani > --- > 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).