Giovanni Mascellani (@giomasce) commented about libs/vkd3d-shader/vkd3d_shader_main.c:
return ret; }
- if (compile_info->target_type == VKD3D_SHADER_TARGET_D3D_ASM)
- {
ret = vkd3d_dxbc_binary_to_text(&parser->instructions, &parser->shader_version, compile_info, out);
vkd3d_shader_parser_destroy(parser);
return ret;
- }
- ret = vkd3d_shader_parser_compile(parser, compile_info, out, message_context);
This triggers a regression: [this shader](https://shader-playground.timjones.io/a5e16574feaf5e24cf566b77ed25e286) is correctly dumped to ASM before this commit, but now fails with: ``` /tmp/shader-binary.o:14:0: E1000: Encountered ‘else’ instruction without corresponding ‘if’ block. Failed to compile shader, ret -4. ```
I guess the reason is that `vkd3d_shader_parser_compile()` now also does a scan on the shader, and the scanner doesn't recognize `IFC` instead of `IF`. I don't really know the difference between the two, but I guess this shouldn't be hard to fix. It doesn't look like that the scan is really needed for dumping to ASM anyway, so maybe it could be avoided in `vkd3d_shader_parser_compile()`?
Also, I couldn't help noticing that we dump `IFC` as `ifc`, while FXC seems to dump it as plain `if`. And our dumper doesn't count it for indenting in the code.