On Fri Jul 21 01:25:37 2023 +0000, Henri Verbeet wrote:
For the d3d12 and shader runner tests I've been using an environment
variable to specify the path to DXC, HLSL source declarations in d3d12.c, and an `[enable]` directive in shader runner. Are those acceptable for upstream? It's of course not ideal to depend on DXC/dxcompiler for the DXIL shader runner tests like that, but I think we can work with that, yes. There's some precedent as well, because we can also use d3dcompiler for running shader runner tests. In terms of the checksum, the most practical way to make that work in the shader runner is probably to introduce a flag like "VKD3D_SHADER_PARSE_DXBC_IGNORE_CHECKSUM" for vkd3d_shader_parse_dxbc(), then use that to parse the DXBCs produced by Linux DXC, and use vkd3d_shader_serialize_dxbc() to create a DXBC blob to pass to d3d12/vkd3d. Also, would we need to use DXC, or could we use the dxcompiler library?
Using dxcompiler would be preferable, but instead of COM interfaces it uses C++ linking, and when I tried using it a while ago I couldn't get the calling conventions to match up, even if the C declaration was explicitly declared the same convention as the dxcompiler function. It worked if I added a wrapper in a C++ source file, but we probably don't want that. I'll take another look and see if they can be made to match up.