Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
glslang
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
glslang
Commits
f6480833
Commit
f6480833
authored
Mar 16, 2018
by
Ben Clayton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add tests for GL_NV_shader_noperspective_interpolation
parent
017a567b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
79 additions
and
1 deletion
+79
-1
nvShaderNoperspectiveInterpolation.frag.out
Test/baseResults/nvShaderNoperspectiveInterpolation.frag.out
+38
-0
nvShaderNoperspectiveInterpolation.frag
Test/nvShaderNoperspectiveInterpolation.frag
+16
-0
AST.FromFile.cpp
gtests/AST.FromFile.cpp
+24
-0
Spv.FromFile.cpp
gtests/Spv.FromFile.cpp
+1
-1
No files found.
Test/baseResults/nvShaderNoperspectiveInterpolation.frag.out
0 → 100644
View file @
f6480833
nvShaderNoperspectiveInterpolation.frag
ERROR: 0:5: 'noperspective' : Reserved word.
ERROR: 0:5: 'noperspective' : not supported for this version or the enabled extensions
ERROR: 2 compilation errors. No code generated.
Shader version: 300
Requested GL_NV_shader_noperspective_interpolation
ERROR: node is still EOpNull!
0:13 Function Definition: main( ( global void)
0:13 Function Parameters:
0:14 Sequence
0:14 move second child to first child ( temp mediump 4-component vector of float)
0:14 'fragColor' ( out mediump 4-component vector of float)
0:14 'color' ( noperspective in mediump 4-component vector of float)
0:? Linker Objects
0:? 'bad' ( noperspective in mediump 4-component vector of float)
0:? 'color' ( noperspective in mediump 4-component vector of float)
0:? 'fragColor' ( out mediump 4-component vector of float)
Linked fragment stage:
Shader version: 300
Requested GL_NV_shader_noperspective_interpolation
ERROR: node is still EOpNull!
0:13 Function Definition: main( ( global void)
0:13 Function Parameters:
0:14 Sequence
0:14 move second child to first child ( temp mediump 4-component vector of float)
0:14 'fragColor' ( out mediump 4-component vector of float)
0:14 'color' ( noperspective in mediump 4-component vector of float)
0:? Linker Objects
0:? 'bad' ( noperspective in mediump 4-component vector of float)
0:? 'color' ( noperspective in mediump 4-component vector of float)
0:? 'fragColor' ( out mediump 4-component vector of float)
Test/nvShaderNoperspectiveInterpolation.frag
0 → 100644
View file @
f6480833
#version 300 es
precision
mediump
float
;
noperspective
in
vec4
bad
;
// ERROR
#extension GL_NV_shader_noperspective_interpolation : enable
noperspective
in
vec4
color
;
out
vec4
fragColor
;
void
main
()
{
fragColor
=
color
;
}
\ No newline at end of file
gtests/AST.FromFile.cpp
View file @
f6480833
...
@@ -41,6 +41,10 @@ namespace {
...
@@ -41,6 +41,10 @@ namespace {
using
CompileToAstTest
=
GlslangTest
<::
testing
::
TestWithParam
<
std
::
string
>>
;
using
CompileToAstTest
=
GlslangTest
<::
testing
::
TestWithParam
<
std
::
string
>>
;
#ifdef NV_EXTENSIONS
using
CompileToAstTestNV
=
GlslangTest
<::
testing
::
TestWithParam
<
std
::
string
>>
;
#endif
TEST_P
(
CompileToAstTest
,
FromFile
)
TEST_P
(
CompileToAstTest
,
FromFile
)
{
{
loadFileCompileAndCheck
(
GlobalTestSettings
.
testRoot
,
GetParam
(),
loadFileCompileAndCheck
(
GlobalTestSettings
.
testRoot
,
GetParam
(),
...
@@ -48,6 +52,16 @@ TEST_P(CompileToAstTest, FromFile)
...
@@ -48,6 +52,16 @@ TEST_P(CompileToAstTest, FromFile)
Target
::
AST
);
Target
::
AST
);
}
}
#ifdef NV_EXTENSIONS
// Compiling GLSL to SPIR-V under OpenGL semantics (NV extensions enabled).
TEST_P
(
CompileToAstTestNV
,
FromFile
)
{
loadFileCompileAndCheck
(
GlobalTestSettings
.
testRoot
,
GetParam
(),
Source
::
GLSL
,
Semantics
::
OpenGL
,
glslang
::
EShTargetVulkan_1_0
,
Target
::
AST
);
}
#endif
// clang-format off
// clang-format off
INSTANTIATE_TEST_CASE_P
(
INSTANTIATE_TEST_CASE_P
(
Glsl
,
CompileToAstTest
,
Glsl
,
CompileToAstTest
,
...
@@ -214,6 +228,16 @@ INSTANTIATE_TEST_CASE_P(
...
@@ -214,6 +228,16 @@ INSTANTIATE_TEST_CASE_P(
})),
})),
FileNameAsCustomTestSuffix
FileNameAsCustomTestSuffix
);
);
#ifdef NV_EXTENSIONS
INSTANTIATE_TEST_CASE_P
(
Glsl
,
CompileToAstTestNV
,
::
testing
::
ValuesIn
(
std
::
vector
<
std
::
string
>
({
"nvShaderNoperspectiveInterpolation.frag"
,
})),
FileNameAsCustomTestSuffix
);
#endif
// clang-format on
// clang-format on
}
// anonymous namespace
}
// anonymous namespace
...
...
gtests/Spv.FromFile.cpp
View file @
f6480833
...
@@ -171,7 +171,7 @@ TEST_P(CompileVulkanToSpirvTestAMD, FromFile)
...
@@ -171,7 +171,7 @@ TEST_P(CompileVulkanToSpirvTestAMD, FromFile)
#endif
#endif
#ifdef NV_EXTENSIONS
#ifdef NV_EXTENSIONS
// Compiling GLSL to SPIR-V under Vulkan semantics (
AMD
extensions enabled).
// Compiling GLSL to SPIR-V under Vulkan semantics (
NV
extensions enabled).
// Expected to successfully generate SPIR-V.
// Expected to successfully generate SPIR-V.
TEST_P
(
CompileVulkanToSpirvTestNV
,
FromFile
)
TEST_P
(
CompileVulkanToSpirvTestNV
,
FromFile
)
{
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment