diff options
| author | Tim Foley <tfoleyNV@users.noreply.github.com> | 2018-02-16 09:04:44 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-02-16 09:04:44 -0800 |
| commit | 1b93da040ef00836438437e998c1c9584e3fd4ac (patch) | |
| tree | aa740da003832a7c0e653883c7cc739fab12e8ba /tests/reflection | |
| parent | 32549707cc9aa67dbc19cbdc0490ffebc8ec253c (diff) | |
IR/Vulkan fixes (#412)
* Fix bugs around IR legalization of GLSL input/output
- Add case to handle assignment of one `ScalarizedVal::Flavor::address` to another (still need to make sure we are handling all the possible cases there)
- Revamp logic for creating global variable declarations for varying inputs/outputs.
- Actually handle creating array declarations (not sure if binding locations will be correct)
- Properly deal with offsetting of locations for nested fields
- Only create varying input/output layout information as needed for the separate `in` and `out` variables we create to represent a single HLSL `inout` varying
* During SSA generation, recursively remove trivial phis
This is actually written up in the original paper I used as a reference, but I hadn't implemented the case yet.
When you eliminate one phi as trivial (because its only operands were itself and at most one other value), you might find that another phi becomes trivial (because it had this phi as an operand, but now it will have the other value...).
The one thing that made any of this tricky is that our "phi" nodes are really block parameters, and thus they don't technically have operands (`IRUse`s). The `IRUse`s for each phi were being tracked in a separate array, and had their `user` field set to null.
With this change, I set their `user` to be the corresponding `IRParam` for the phi (and that means I changed `IRParam` to inherit from `IRUser` even though it shouldn't really be required).
* Re-build SSA form after specialization/legalization
The main reason to do this is that legalization might scalarize types, and thus might allow us to clean up resource-type local variables that we were not able to clean up when they were part of an aggregate.
Note: we shouldn't really need to do this, because the front-end should actually be guaranteeing that types that include resources are used in "safe" ways, but we currently don't have the analyses required to support that.
* Give an error message if we get GLSL input
The API and command-line interface still recognize and nominally support GLSL input files, because they need to be supported in the "pass-through" mode.
This change just adds an error message if we encounter a GLSL input file in anything other than "pass-through" mode.
Diffstat (limited to 'tests/reflection')
| -rw-r--r-- | tests/reflection/gh-55.glsl | 6 | ||||
| -rw-r--r-- | tests/reflection/image-types.glsl | 12 | ||||
| -rw-r--r-- | tests/reflection/image-types.glsl.expected | 33 | ||||
| -rw-r--r-- | tests/reflection/std430-layout.glsl | 6 |
4 files changed, 10 insertions, 47 deletions
diff --git a/tests/reflection/gh-55.glsl b/tests/reflection/gh-55.glsl index f6db07482..49b6d2bcc 100644 --- a/tests/reflection/gh-55.glsl +++ b/tests/reflection/gh-55.glsl @@ -1,4 +1,8 @@ -//TEST(smoke):REFLECTION:-profile ps_4_0 -target glsl +//TEST_DISABLED(smoke):REFLECTION:-profile ps_4_0 -target glsl + +// Disabled because we don't support GLSL any more. +// (kept around so we can replace with an equivalent +// test that uses HLSL input and tests GLSL layout rules) // Confirm fix for GitHub issue #55 diff --git a/tests/reflection/image-types.glsl b/tests/reflection/image-types.glsl deleted file mode 100644 index 9bba69d3d..000000000 --- a/tests/reflection/image-types.glsl +++ /dev/null @@ -1,12 +0,0 @@ -//TEST(smoke):REFLECTION:-profile ps_4_0 -target glsl - -// Confirm that we expose GLSL `image` types through reflection - -layout(rgba32f) -uniform writeonly imageBuffer iBuffer; - -layout(rgba32f) -uniform writeonly image2D i2D; - -void main() -{} diff --git a/tests/reflection/image-types.glsl.expected b/tests/reflection/image-types.glsl.expected deleted file mode 100644 index dfe477287..000000000 --- a/tests/reflection/image-types.glsl.expected +++ /dev/null @@ -1,33 +0,0 @@ -result code = 0 -standard error = { -} -standard output = { -{ - "parameters": [ - { - "name": "iBuffer", - "binding": {"kind": "descriptorTableSlot", "index": 0}, - "type": { - "kind": "resource", - "baseShape": "textureBuffer", - "access": "readWrite" - } - }, - { - "name": "i2D", - "binding": {"kind": "descriptorTableSlot", "index": 1}, - "type": { - "kind": "resource", - "baseShape": "texture2D", - "access": "readWrite" - } - } - ], - "entryPoints": [ - { - "name": "main", - "stage:": "fragment" - } - ] -} -} diff --git a/tests/reflection/std430-layout.glsl b/tests/reflection/std430-layout.glsl index 73e48a8a0..d05c83785 100644 --- a/tests/reflection/std430-layout.glsl +++ b/tests/reflection/std430-layout.glsl @@ -1,5 +1,9 @@ #version 450 -//TEST(smoke):REFLECTION:-profile ps_4_0 -target glsl +//TEST_DISABLED(smoke):REFLECTION:-profile ps_4_0 -target glsl + +// Note: disabled because we don't support GLSL input any more +// (kept around so we can replace with an equivalent +// test that uses HLSL input and tests GLSL layout rules) // Confirm fix for GitHub issue #55 |
