Revision b034398ab12d3cc3a5fc04174688cb707404791d authored by Tim Foley on 02 February 2018, 15:49:32 UTC, committed by GitHub on 02 February 2018, 15:49:32 UTC
* Basic fixes to gets some Vulkan GLSL out of the IR path

We haven't been paying much attention to the Vulkan output from the IR path, but that needs to change ASAP. This commit really just implements quick fixes, without concern for whether they are a good fit in the long term.

- Add some more mappings from D3D `SV_*` semantics to built-in GLSL variables, and stop redeclaring those built-in variables in our output GLSL.

- Add custom output logic for HLSL `*StructuredBuffer<T>` types, so that they emit as `buffer` declarations with an unsized array inside. This has some real limitations:
  - What if the user passes the type into a function? The parameter should be typed as an (unsized) array, and not a buffer.
  - What happens if we have an array of structured buffers? We need to declare an array of blocks (which GLSL allows), but this changes the GLSL we should emit when indexing.

- Customize the way that we emit entry point attributes (e.g., `[numthread(...)]`) to also support outputting equivalent GLSL `layout` qualifiers.

In many of these cases, a better fix might involve doing more of this work in the IR as part of legalization (e.g., we already have a pass that deals with varying input/output for GLSL, so that should probalby be responsible for swapping the `SV_*` to `gl_*`, especially in cases where the types don't match perfectly across langauges).

* Start adding Vulkan support to render-test

- Add both Vulkan and D3D12 as nominally supported back-ends

- Add a git submodule to pull in the Vulkan SDK dependencies
  - I don't want our users to have to install it manually, since the SDK is huge
  - Checking in the binaries to our main repository seems like a bad idea, but my hope is that we can prune the bloat using a subodule with the `shallow` cloning option

- Implement enough logic for the Vulkan back-end to get a single test passing on Vulkan

* Fix warning

* Fixup: disable new compute tests for Linux

* Fixup: ignore Vulkan tests on AppVeyor

* Dynamically load Vulkan implementation

Rather than statically link to the Vulkan library, we will dynamically load all of the required functions.
This removes the need to have the stub libs involved at all.

* Remove vulkan submodule

I had set up a `vulkan` submodule to pull in the headers and stub libs, but now that we are going to dynamically load all the symbols anyway, the stub lib binaries aren't needed and we can just commit the headers.

* Add Vulkan headers to external/
1 parent 652a3c9
History
File Mode Size
slang-build.props -rw-r--r-- 516 bytes

back to top