summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore12
-rw-r--r--tests/glsl/sascha-willems/base/textoverlay.frag13
-rw-r--r--tests/glsl/sascha-willems/base/textoverlay.vert13
-rw-r--r--tests/glsl/sascha-willems/bloom/phongpass.vert27
-rw-r--r--tests/glsl/sascha-willems/ssao/ssao.frag23
5 files changed, 55 insertions, 33 deletions
diff --git a/.gitignore b/.gitignore
index a0a57b5aa..e62d06013 100644
--- a/.gitignore
+++ b/.gitignore
@@ -10,15 +10,9 @@ intermediate/
# files generated by test runner
*.actual
-*.hlsl.expected
-*.fx.expected
-*.glsl.expected
-*.vert.expected
-*.frag.expected
-*.geom.expected
-*.tesc.expected
-*.tese.expected
-*.comp.expected
+*.expected
+!*.slang.expected
+!*.slang.*.expected
*.expected.png
*.actual.png
diff --git a/tests/glsl/sascha-willems/base/textoverlay.frag b/tests/glsl/sascha-willems/base/textoverlay.frag
index e5dbb08de..c77198765 100644
--- a/tests/glsl/sascha-willems/base/textoverlay.frag
+++ b/tests/glsl/sascha-willems/base/textoverlay.frag
@@ -1,11 +1,18 @@
#version 450 core
//TEST:COMPARE_GLSL:
+//TEST:COMPARE_GLSL:-DBINDING
-layout (location = 0) in vec2 inUV;
+#if defined(__SLANG__) && defined(BINDING)
+#define LAYOUT(X) /* empty */
+#else
+#define LAYOUT(X) layout(X)
+#endif
-layout (binding = 0) uniform sampler2D samplerFont;
+LAYOUT(location = 0) in vec2 inUV;
-layout (location = 0) out vec4 outFragColor;
+LAYOUT(binding = 0) uniform sampler2D samplerFont;
+
+LAYOUT(location = 0) out vec4 outFragColor;
void main(void)
{
diff --git a/tests/glsl/sascha-willems/base/textoverlay.vert b/tests/glsl/sascha-willems/base/textoverlay.vert
index 8a20fd8b2..5d5dacab6 100644
--- a/tests/glsl/sascha-willems/base/textoverlay.vert
+++ b/tests/glsl/sascha-willems/base/textoverlay.vert
@@ -1,10 +1,17 @@
#version 450 core
//TEST:COMPARE_GLSL:
+//TEST:COMPARE_GLSL:-DBINDING
-layout (location = 0) in vec2 inPos;
-layout (location = 1) in vec2 inUV;
+#if defined(__SLANG__) && defined(BINDING)
+#define LAYOUT(X) /* empty */
+#else
+#define LAYOUT(X) layout(X)
+#endif
-layout (location = 0) out vec2 outUV;
+LAYOUT(location = 0) in vec2 inPos;
+LAYOUT(location = 1) in vec2 inUV;
+
+LAYOUT(location = 0) out vec2 outUV;
out gl_PerVertex
{
diff --git a/tests/glsl/sascha-willems/bloom/phongpass.vert b/tests/glsl/sascha-willems/bloom/phongpass.vert
index ac0a77ab9..a3c77cb48 100644
--- a/tests/glsl/sascha-willems/bloom/phongpass.vert
+++ b/tests/glsl/sascha-willems/bloom/phongpass.vert
@@ -1,26 +1,33 @@
#version 450
//TEST:COMPARE_GLSL:
+//TEST:COMPARE_GLSL:-DBINDING
+
+#if defined(__SLANG__) && defined(BINDING)
+#define LAYOUT(X) /* empty */
+#else
+#define LAYOUT(X) layout(X)
+#endif
#extension GL_ARB_separate_shader_objects : enable
#extension GL_ARB_shading_language_420pack : enable
-layout (location = 0) in vec4 inPos;
-layout (location = 1) in vec2 inUV;
-layout (location = 2) in vec3 inColor;
-layout (location = 3) in vec3 inNormal;
+LAYOUT(location = 0) in vec4 inPos;
+LAYOUT(location = 1) in vec2 inUV;
+LAYOUT(location = 2) in vec3 inColor;
+LAYOUT(location = 3) in vec3 inNormal;
-layout (binding = 0) uniform UBO
+LAYOUT(binding = 0) uniform UBO
{
mat4 projection;
mat4 view;
mat4 model;
} ubo;
-layout (location = 0) out vec3 outNormal;
-layout (location = 1) out vec2 outUV;
-layout (location = 2) out vec3 outColor;
-layout (location = 3) out vec3 outViewVec;
-layout (location = 4) out vec3 outLightVec;
+LAYOUT(location = 0) out vec3 outNormal;
+LAYOUT(location = 1) out vec2 outUV;
+LAYOUT(location = 2) out vec3 outColor;
+LAYOUT(location = 3) out vec3 outViewVec;
+LAYOUT(location = 4) out vec3 outLightVec;
out gl_PerVertex
{
diff --git a/tests/glsl/sascha-willems/ssao/ssao.frag b/tests/glsl/sascha-willems/ssao/ssao.frag
index cdcbfd3ec..ef0035013 100644
--- a/tests/glsl/sascha-willems/ssao/ssao.frag
+++ b/tests/glsl/sascha-willems/ssao/ssao.frag
@@ -1,29 +1,36 @@
-//TEST:COMPARE_GLSL:
#version 450
+//TEST:COMPARE_GLSL:
+//TEST:COMPARE_GLSL:-DBINDING
+
+#if defined(__SLANG__) && defined(BINDING)
+#define LAYOUT(X) /* empty */
+#else
+#define LAYOUT(X) layout(X)
+#endif
#extension GL_ARB_separate_shader_objects : enable
#extension GL_ARB_shading_language_420pack : enable
-layout (binding = 0) uniform sampler2D samplerPositionDepth;
-layout (binding = 1) uniform sampler2D samplerNormal;
-layout (binding = 2) uniform sampler2D ssaoNoise;
+LAYOUT(binding = 0) uniform sampler2D samplerPositionDepth;
+LAYOUT(binding = 1) uniform sampler2D samplerNormal;
+LAYOUT(binding = 2) uniform sampler2D ssaoNoise;
layout (constant_id = 0) const int SSAO_KERNEL_SIZE = 64;
layout (constant_id = 1) const float SSAO_RADIUS = 0.5;
-layout (binding = 3) uniform UBOSSAOKernel
+LAYOUT(binding = 3) uniform UBOSSAOKernel
{
vec4 samples[SSAO_KERNEL_SIZE];
} uboSSAOKernel;
-layout (binding = 4) uniform UBO
+LAYOUT(binding = 4) uniform UBO
{
mat4 projection;
} ubo;
-layout (location = 0) in vec2 inUV;
+LAYOUT(location = 0) in vec2 inUV;
-layout (location = 0) out float outFragColor;
+LAYOUT(location = 0) out float outFragColor;
void main()
{