On Mon Nov 6 10:54:11 2023 +0000, Giovanni Mascellani wrote:
You can download the job artifacts from the panel on the right when looking at the job (i.e., https://gitlab.winehq.org/cmccarthy/vkd3d/-/jobs/35840). That's a ZIP archive where you can find the .log files sorted by commit. In this specific case, the problem is flagged by the VSIR validator. You're probably not seeing it on your computer because it has to be explicitly enabled with `VKD3D_CONFIG=force_validation` (which is on in the CI). Even then, the failure is unfortunately not completely evident, because the shader compiler used by vkd3d to compile to SPIR-V has logging disabled. This patch should probably applied to the validator, I'll submit it with the next MR:
diff --git a/libs/vkd3d-shader/ir.c b/libs/vkd3d-shader/ir.c index 8cf92656b..f6ba888d3 100644 --- a/libs/vkd3d-shader/ir.c +++ b/libs/vkd3d-shader/ir.c @@ -1489,6 +1489,7 @@ static void VKD3D_PRINTF_FUNC(3, 4) validator_error(struct validation_context *c va_end(args); vkd3d_shader_parser_error(ctx->parser, error, "instruction %zu: %s", ctx->instruction_idx + 1, buf.buffer); + FIXME("Validation error: instruction %zu: %s\n", ctx->instruction_idx + 1, buf.buffer); vkd3d_string_buffer_cleanup(&buf); }
With this patch in place the problem becomes apparent:
vkd3d:3777003:fixme:validator_error Validation error: instruction 11: Invalid register precision 0x559d. vkd3d:3777003:fixme:validator_error Validation error: instruction 14: Invalid register precision 0x7ffe. vkd3d:3777003:fixme:validator_error Validation error: instruction 16: Invalid register precision 0x559d. vkd3d:3777003:fixme:validator_error Validation error: instruction 16: Invalid register data type 0x559d. [...]
So it seems that some registers are not fully initialized in your code. Ideally you should always go through `vsir_register_init()`, maybe there is some place where this doesn't happen?
Turns out it's in the `BINOP` MR. Validation doesn't fail there because the shaders fail to compile.