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
99296369
Commit
99296369
authored
Nov 11, 2013
by
John Kessenich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add GL_EXT_frag_depth.
git-svn-id:
https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24003
e7fa87d3-cd2b-0410-9028-fcbf551c1848
parent
06a37c39
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
51 additions
and
7 deletions
+51
-7
100.frag
Test/100.frag
+11
-0
100.frag.out
Test/baseResults/100.frag.out
+19
-1
Initialize.cpp
glslang/MachineIndependent/Initialize.cpp
+10
-5
SymbolTable.h
glslang/MachineIndependent/SymbolTable.h
+7
-0
Versions.cpp
glslang/MachineIndependent/Versions.cpp
+3
-1
Versions.h
glslang/MachineIndependent/Versions.h
+1
-0
No files found.
Test/100.frag
View file @
99296369
...
@@ -100,4 +100,14 @@ void foo236()
...
@@ -100,4 +100,14 @@ void foo236()
dFdx
(
v
[
0
]);
dFdx
(
v
[
0
]);
dFdy
(
3
.
2
);
dFdy
(
3
.
2
);
fwidth
(
f13
);
fwidth
(
f13
);
gl_FragDepth
=
f13
;
// ERROR
gl_FragDepthEXT
=
f13
;
// ERROR
}
}
#extension GL_EXT_frag_depth : enable
void
foo239
()
{
gl_FragDepth
=
f13
;
// ERROR
gl_FragDepthEXT
=
f13
;
}
\ No newline at end of file
Test/baseResults/100.frag.out
View file @
99296369
...
@@ -45,7 +45,10 @@ ERROR: 0:80: 'sampler/image' : type requires declaration of default precision qu
...
@@ -45,7 +45,10 @@ ERROR: 0:80: 'sampler/image' : type requires declaration of default precision qu
ERROR: 0:91: 'dFdx' : required extension not requested: GL_OES_standard_derivatives
ERROR: 0:91: 'dFdx' : required extension not requested: GL_OES_standard_derivatives
ERROR: 0:92: 'dFdy' : required extension not requested: GL_OES_standard_derivatives
ERROR: 0:92: 'dFdy' : required extension not requested: GL_OES_standard_derivatives
ERROR: 0:93: 'fwidth' : required extension not requested: GL_OES_standard_derivatives
ERROR: 0:93: 'fwidth' : required extension not requested: GL_OES_standard_derivatives
ERROR: 40 compilation errors. No code generated.
ERROR: 0:103: 'gl_FragDepth' : undeclared identifier
ERROR: 0:104: 'gl_FragDepthEXT' : required extension not requested: GL_EXT_frag_depth
ERROR: 0:111: 'gl_FragDepth' : undeclared identifier
ERROR: 43 compilation errors. No code generated.
ERROR: node is still EOpNull!
ERROR: node is still EOpNull!
0:3 Sequence
0:3 Sequence
...
@@ -166,6 +169,21 @@ ERROR: node is still EOpNull!
...
@@ -166,6 +169,21 @@ ERROR: node is still EOpNull!
0:101 0.000000
0:101 0.000000
0:102 fwidth (mediump float)
0:102 fwidth (mediump float)
0:102 'f13' (invariant mediump float)
0:102 'f13' (invariant mediump float)
0:103 move second child to first child (mediump float)
0:103 'gl_FragDepth' (mediump float)
0:103 'f13' (invariant mediump float)
0:104 move second child to first child (highp float)
0:104 'gl_FragDepthEXT' (gl_FragDepth highp float)
0:104 'f13' (invariant mediump float)
0:109 Function Definition: foo239( (void)
0:109 Function Parameters:
0:111 Sequence
0:111 move second child to first child (mediump float)
0:111 'gl_FragDepth' (mediump float)
0:111 'f13' (invariant mediump float)
0:112 move second child to first child (highp float)
0:112 'gl_FragDepthEXT' (gl_FragDepth highp float)
0:112 'f13' (invariant mediump float)
0:? Linker Objects
0:? Linker Objects
0:? 'a' (3-element array of mediump int)
0:? 'a' (3-element array of mediump int)
0:? 'uint' (mediump int)
0:? 'uint' (mediump int)
...
...
glslang/MachineIndependent/Initialize.cpp
View file @
99296369
...
@@ -1425,6 +1425,9 @@ void TBuiltIns::initialize(int version, EProfile profile)
...
@@ -1425,6 +1425,9 @@ void TBuiltIns::initialize(int version, EProfile profile)
"mediump vec2 gl_PointCoord;"
// needs qualifier fixed later
"mediump vec2 gl_PointCoord;"
// needs qualifier fixed later
"highp float gl_FragDepth;"
// needs qualifier fixed later
"highp float gl_FragDepth;"
// needs qualifier fixed later
);
);
stageBuiltins
[
EShLangFragment
].
append
(
"highp float gl_FragDepthEXT;"
// GL_EXT_frag_depth
);
}
}
stageBuiltins
[
EShLangFragment
].
append
(
"
\n
"
);
stageBuiltins
[
EShLangFragment
].
append
(
"
\n
"
);
...
@@ -2138,16 +2141,18 @@ void IdentifyBuiltIns(int version, EProfile profile, EShLanguage language, TSymb
...
@@ -2138,16 +2141,18 @@ void IdentifyBuiltIns(int version, EProfile profile, EShLanguage language, TSymb
break
;
break
;
case
EShLangFragment
:
case
EShLangFragment
:
SpecialQualifier
(
"gl_FrontFacing"
,
EvqFace
,
symbolTable
);
SpecialQualifier
(
"gl_FrontFacing"
,
EvqFace
,
symbolTable
);
SpecialQualifier
(
"gl_FragCoord"
,
EvqFragCoord
,
symbolTable
);
SpecialQualifier
(
"gl_FragCoord"
,
EvqFragCoord
,
symbolTable
);
SpecialQualifier
(
"gl_PointCoord"
,
EvqPointCoord
,
symbolTable
);
SpecialQualifier
(
"gl_PointCoord"
,
EvqPointCoord
,
symbolTable
);
SpecialQualifier
(
"gl_FragColor"
,
EvqFragColor
,
symbolTable
);
SpecialQualifier
(
"gl_FragColor"
,
EvqFragColor
,
symbolTable
);
SpecialQualifier
(
"gl_FragDepth"
,
EvqFragDepth
,
symbolTable
);
SpecialQualifier
(
"gl_FragDepth"
,
EvqFragDepth
,
symbolTable
);
SpecialQualifier
(
"gl_FragDepthEXT"
,
EvqFragDepth
,
symbolTable
);
if
(
version
==
100
)
{
if
(
version
==
100
)
{
symbolTable
.
setFunctionExtensions
(
"dFdx"
,
1
,
&
GL_OES_standard_derivatives
);
symbolTable
.
setFunctionExtensions
(
"dFdx"
,
1
,
&
GL_OES_standard_derivatives
);
symbolTable
.
setFunctionExtensions
(
"dFdy"
,
1
,
&
GL_OES_standard_derivatives
);
symbolTable
.
setFunctionExtensions
(
"dFdy"
,
1
,
&
GL_OES_standard_derivatives
);
symbolTable
.
setFunctionExtensions
(
"fwidth"
,
1
,
&
GL_OES_standard_derivatives
);
symbolTable
.
setFunctionExtensions
(
"fwidth"
,
1
,
&
GL_OES_standard_derivatives
);
}
}
symbolTable
.
setVariableExtensions
(
"gl_FragDepthEXT"
,
1
,
&
GL_EXT_frag_depth
);
break
;
break
;
case
EShLangCompute
:
case
EShLangCompute
:
...
...
glslang/MachineIndependent/SymbolTable.h
View file @
99296369
...
@@ -574,6 +574,13 @@ public:
...
@@ -574,6 +574,13 @@ public:
table
[
level
]
->
setFunctionExtensions
(
name
,
num
,
extensions
);
table
[
level
]
->
setFunctionExtensions
(
name
,
num
,
extensions
);
}
}
void
setVariableExtensions
(
const
char
*
name
,
int
num
,
const
char
*
const
extensions
[])
{
TSymbol
*
symbol
=
find
(
TString
(
name
));
if
(
symbol
)
symbol
->
setExtensions
(
num
,
extensions
);
}
int
getMaxSymbolId
()
{
return
uniqueId
;
}
int
getMaxSymbolId
()
{
return
uniqueId
;
}
void
dump
(
TInfoSink
&
infoSink
)
const
;
void
dump
(
TInfoSink
&
infoSink
)
const
;
void
copyTable
(
const
TSymbolTable
&
copyOf
);
void
copyTable
(
const
TSymbolTable
&
copyOf
);
...
...
glslang/MachineIndependent/Versions.cpp
View file @
99296369
...
@@ -151,6 +151,7 @@ void TParseContext::initializeExtensionBehavior()
...
@@ -151,6 +151,7 @@ void TParseContext::initializeExtensionBehavior()
{
{
extensionBehavior
[
GL_OES_texture_3D
]
=
EBhDisable
;
extensionBehavior
[
GL_OES_texture_3D
]
=
EBhDisable
;
extensionBehavior
[
GL_OES_standard_derivatives
]
=
EBhDisable
;
extensionBehavior
[
GL_OES_standard_derivatives
]
=
EBhDisable
;
extensionBehavior
[
GL_EXT_frag_depth
]
=
EBhDisable
;
extensionBehavior
[
GL_ARB_texture_rectangle
]
=
EBhDisable
;
extensionBehavior
[
GL_ARB_texture_rectangle
]
=
EBhDisable
;
extensionBehavior
[
GL_3DL_array_objects
]
=
EBhDisable
;
extensionBehavior
[
GL_3DL_array_objects
]
=
EBhDisable
;
...
@@ -167,7 +168,8 @@ const char* TParseContext::getPreamble()
...
@@ -167,7 +168,8 @@ const char* TParseContext::getPreamble()
return
return
"#define GL_ES 1
\n
"
"#define GL_ES 1
\n
"
"#define GL_OES_texture_3D 1
\n
"
"#define GL_OES_texture_3D 1
\n
"
"#define GL_OES_standard_derivatives 1
\n
"
;
"#define GL_OES_standard_derivatives 1
\n
"
"#define GL_EXT_frag_depth 1
\n
"
;
}
else
{
}
else
{
return
return
"#define GL_FRAGMENT_PRECISION_HIGH 1
\n
"
"#define GL_FRAGMENT_PRECISION_HIGH 1
\n
"
...
...
glslang/MachineIndependent/Versions.h
View file @
99296369
...
@@ -74,6 +74,7 @@ typedef enum {
...
@@ -74,6 +74,7 @@ typedef enum {
//
//
const
char
*
const
GL_OES_texture_3D
=
"GL_OES_texture_3D"
;
const
char
*
const
GL_OES_texture_3D
=
"GL_OES_texture_3D"
;
const
char
*
const
GL_OES_standard_derivatives
=
"GL_OES_standard_derivatives"
;
const
char
*
const
GL_OES_standard_derivatives
=
"GL_OES_standard_derivatives"
;
const
char
*
const
GL_EXT_frag_depth
=
"GL_EXT_frag_depth"
;
const
char
*
const
GL_ARB_texture_rectangle
=
"GL_ARB_texture_rectangle"
;
const
char
*
const
GL_ARB_texture_rectangle
=
"GL_ARB_texture_rectangle"
;
const
char
*
const
GL_3DL_array_objects
=
"GL_3DL_array_objects"
;
const
char
*
const
GL_3DL_array_objects
=
"GL_3DL_array_objects"
;
...
...
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