Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testing improvements #6

Merged
merged 2 commits into from
Jun 14, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
13 changes: 10 additions & 3 deletions tests/glsl/sascha-willems/base/textoverlay.frag
Original file line number Diff line number Diff line change
@@ -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)
{
Expand Down
13 changes: 10 additions & 3 deletions tests/glsl/sascha-willems/base/textoverlay.vert
Original file line number Diff line number Diff line change
@@ -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
{
Expand Down
27 changes: 17 additions & 10 deletions tests/glsl/sascha-willems/bloom/phongpass.vert
Original file line number Diff line number Diff line change
@@ -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
{
Expand Down
23 changes: 15 additions & 8 deletions tests/glsl/sascha-willems/ssao/ssao.frag
Original file line number Diff line number Diff line change
@@ -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()
{
Expand Down
Loading