Commit Graph

4 Commits

Author SHA1 Message Date
Erik Faye-Lund 0c5d772b71 microsoft/spirv_to_dxil: use dxil_validator
This has one negative side-effect; we're no longer able to print
validation errors without dxcompiler.dll. I doubt that's a real problem,
but if it is, we should add this ability to dxil_validator instead of
having a second implementation here.

The reasons I didn't try adding this in the first place is:

1. This code seems a bit janky; it doesn't consult the "known"-variable
   to figure out if the encoding is OK, and it's lacking a fallback path
   in that case.
2. It seems unlikely that the compiler varies the encoding of the output
   in the first place; one of the two code-paths in here is probably
   untested.
3. Since dxil_validator leaves reporting to the call-site, we'd need to
   either add and output-encoding to the API (yuck), or re-encode the
   string to UTF-8 using WinAPI.

Right now, it seems questionable if fixing all of the above is worth it.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15751>
2022-04-07 00:00:45 +00:00
Marcin Ślusarz f547122772 microsoft/compiler: normalize line endings
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11779>
2022-01-19 15:17:17 +00:00
Vinson Lee 1ca90f8752 microsoft/spirv_to_dxil: Fix non-Windows build.
../src/microsoft/spirv_to_dxil/dxil_validation.cpp: In function ‘bool validate_dxil(dxil_spirv_object*)’:
../src/microsoft/spirv_to_dxil/dxil_validation.cpp:129:12: error: ‘stderr’ was not declared in this scope
  129 |    fprintf(stderr, "DXIL validation only available in Windows.\n");
      |            ^~~~~~

Fixes: 37c366e283 ("microsoft/spirv_to_dxil: Add DXIL validation to spirv2dxil")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13736>
2021-11-11 01:37:16 +00:00
Enrico Galli 37c366e283 microsoft/spirv_to_dxil: Add DXIL validation to spirv2dxil
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13655>
2021-11-09 01:32:47 +00:00