diff options
| author | Tim Foley <tfoleyNV@users.noreply.github.com> | 2018-02-02 08:49:04 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-02-02 08:49:04 -0800 |
| commit | 0360f81b9741ece65768a65731bd23455a3b7a96 (patch) | |
| tree | eab15cf6737cf091bf94d073e82c7b233f958e57 /tests/glsl/sascha-willems/viewportarray | |
| parent | b034398ab12d3cc3a5fc04174688cb707404791d (diff) | |
Remove support for the -no-checking flag (#392)
* Remove support for the -no-checking flag
Fixes #381
Fixes #383
Work on #382
- No longer expose flag through API (`SLANG_COMPILE_FLAG_NO_CHECKING`) and command-line (`-no-checking`) options
- Remove all logic in `check.cpp` that was withholding diagnostics (including errors) when the no-checking mode was enabled
- Remove `HiddenImplicitCastExpr`, which was only created to support no-checking mode (it represented an implicit cast that our checking through was needed, but couldn't emit because it might be wrong)
- Remove logic for storing function bodies as raw token lists when checking is turned off. I'm leaving in the `UnparsedStmt` AST node in case we ever need/want to lazily parse and check function bodies down the line.
- Remove a few of the code-generation paths we had to contend with, but keep the comment about them in place.
- Remove GLSL-based tests that can't meaningfully work with the new approach.
- Fix other tests that used a GLSL baseline so that their GLSL compiles with `-pass-through glslang` instead of invoking `slang` with the `-no-checking` flag.
- Remove tests that were explicitly added to test the "rewriter + IR" path, since that is no longer supported.
There is more cleanup that can be done here, now that we know that AST-based rewrite and IR will never co-exist, but it is probably easier to deal with that as part of removing the AST-based rewrite path.
We've lost some test coverage here, but actually not too much if we consider that we are dropping GLSL input anyway.
* Fixup: test runner was mis-counting ignored tests
* Fixup: turn on dumping on test failure under Travis
* Fixup: enable extensions in Linux build of glslang
Diffstat (limited to 'tests/glsl/sascha-willems/viewportarray')
| -rw-r--r-- | tests/glsl/sascha-willems/viewportarray/multiview.geom | 46 | ||||
| -rw-r--r-- | tests/glsl/sascha-willems/viewportarray/scene.frag | 21 | ||||
| -rw-r--r-- | tests/glsl/sascha-willems/viewportarray/scene.vert | 21 |
3 files changed, 0 insertions, 88 deletions
diff --git a/tests/glsl/sascha-willems/viewportarray/multiview.geom b/tests/glsl/sascha-willems/viewportarray/multiview.geom deleted file mode 100644 index 39303fb33..000000000 --- a/tests/glsl/sascha-willems/viewportarray/multiview.geom +++ /dev/null @@ -1,46 +0,0 @@ -//TEST:COMPARE_GLSL: -#version 450 - -#extension GL_ARB_viewport_array : enable - -layout (triangles, invocations = 2) in; -layout (triangle_strip, max_vertices = 3) out; - -layout (binding = 0) uniform UBO -{ - mat4 projection[2]; - mat4 modelview[2]; - vec4 lightPos; -} ubo; - -layout (location = 0) in vec3 inNormal[]; -layout (location = 1) in vec3 inColor[]; - -layout (location = 0) out vec3 outNormal; -layout (location = 1) out vec3 outColor; -layout (location = 2) out vec3 outViewVec; -layout (location = 3) out vec3 outLightVec; - -void main(void) -{ - for(int i = 0; i < gl_in.length(); i++) - { - outNormal = mat3(ubo.modelview[gl_InvocationID]) * inNormal[i]; - outColor = inColor[i]; - - vec4 pos = gl_in[i].gl_Position; - vec4 worldPos = (ubo.modelview[gl_InvocationID] * pos); - - vec3 lPos = vec3(ubo.modelview[gl_InvocationID] * ubo.lightPos); - outLightVec = lPos - worldPos.xyz; - outViewVec = -worldPos.xyz; - - gl_Position = ubo.projection[gl_InvocationID] * worldPos; - - // Set the viewport index that the vertex will be emitted to - gl_ViewportIndex = gl_InvocationID; - - EmitVertex(); - } - EndPrimitive(); -}
\ No newline at end of file diff --git a/tests/glsl/sascha-willems/viewportarray/scene.frag b/tests/glsl/sascha-willems/viewportarray/scene.frag deleted file mode 100644 index 1ecd7fdb3..000000000 --- a/tests/glsl/sascha-willems/viewportarray/scene.frag +++ /dev/null @@ -1,21 +0,0 @@ -//TEST:COMPARE_GLSL: -#version 450 - -layout (location = 0) in vec3 inNormal; -layout (location = 1) in vec3 inColor; -layout (location = 2) in vec3 inViewVec; -layout (location = 3) in vec3 inLightVec; - -layout (location = 0) out vec4 outColor; - -void main() -{ - vec3 N = normalize(inNormal); - vec3 L = normalize(inLightVec); - vec3 V = normalize(inViewVec); - vec3 R = reflect(-L, N); - vec3 ambient = vec3(0.1); - vec3 diffuse = max(dot(N, L), 0.0) * vec3(1.0); - vec3 specular = pow(max(dot(R, V), 0.0), 16.0) * vec3(0.75); - outColor = vec4((ambient + diffuse) * inColor.rgb + specular, 1.0); -}
\ No newline at end of file diff --git a/tests/glsl/sascha-willems/viewportarray/scene.vert b/tests/glsl/sascha-willems/viewportarray/scene.vert deleted file mode 100644 index 28e1c3d8b..000000000 --- a/tests/glsl/sascha-willems/viewportarray/scene.vert +++ /dev/null @@ -1,21 +0,0 @@ -//TEST:COMPARE_GLSL: -#version 450 - -layout (location = 0) in vec3 inPos; -layout (location = 1) in vec3 inNormal; -layout (location = 2) in vec3 inColor; - -layout (location = 0) out vec3 outNormal; -layout (location = 1) out vec3 outColor; - -out gl_PerVertex -{ - vec4 gl_Position; -}; - -void main() -{ - outColor = inColor; - outNormal = inNormal; - gl_Position = vec4(inPos.xyz, 1.0); -} |
