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
0fc4338f
Commit
0fc4338f
authored
Aug 22, 2015
by
John Kessenich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement GL_OES_shader_multisample_interpolation, as well as core desktop versions of it.
parent
ba01ebd5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
294 additions
and
7 deletions
+294
-7
310.frag
Test/310.frag
+56
-0
310.vert
Test/310.vert
+16
-0
400.frag
Test/400.frag
+41
-0
440.frag
Test/440.frag
+7
-0
310.frag.out
Test/baseResults/310.frag.out
+0
-0
310.vert.out
Test/baseResults/310.vert.out
+35
-1
400.frag.out
Test/baseResults/400.frag.out
+0
-0
440.frag.out
Test/baseResults/440.frag.out
+30
-0
intermediate.h
glslang/Include/intermediate.h
+4
-0
revision.h
glslang/Include/revision.h
+2
-2
Initialize.cpp
glslang/MachineIndependent/Initialize.cpp
+30
-1
Intermediate.cpp
glslang/MachineIndependent/Intermediate.cpp
+29
-0
ParseHelper.cpp
glslang/MachineIndependent/ParseHelper.cpp
+28
-0
Scan.cpp
glslang/MachineIndependent/Scan.cpp
+4
-0
Versions.cpp
glslang/MachineIndependent/Versions.cpp
+1
-1
intermOut.cpp
glslang/MachineIndependent/intermOut.cpp
+8
-2
localintermediate.h
glslang/MachineIndependent/localintermediate.h
+3
-0
No files found.
Test/310.frag
View file @
0fc4338f
...
...
@@ -341,3 +341,59 @@ void goodImageAtom()
imageAtomicMax
(
badIm2Du
,
P
,
datu
);
// ERROR, not an allowed layout() on the image
imageAtomicExchange
(
badIm2Df
,
P
,
datf
);
// ERROR, not an allowed layout() on the image
}
sample
in
vec4
colorSampInBad
;
// ERROR, reserved
centroid
out
vec4
colorCentroidBad
;
// ERROR
flat
out
vec4
colorBadFlat
;
// ERROR
smooth
out
vec4
colorBadSmooth
;
// ERROR
noperspective
out
vec4
colorBadNo
;
// ERROR
flat
centroid
in
vec2
colorfc
;
in
float
scalarIn
;
void
badInterp
()
{
interpolateAtCentroid
(
colorfc
);
// ERROR, need extension
interpolateAtSample
(
colorfc
,
1
);
// ERROR, need extension
interpolateAtOffset
(
colorfc
,
vec2
(
0
.
2
));
// ERROR, need extension
}
#if defined GL_OES_shader_multisample_interpolation
#extension GL_OES_shader_multisample_interpolation : enable
#endif
sample
in
vec4
colorSampIn
;
sample
out
vec4
colorSampleBad
;
// ERROR
flat
sample
in
vec4
colorfsi
;
sample
in
vec3
sampInArray
[
4
];
void
interp
()
{
float
res
;
vec2
res2
;
vec3
res3
;
vec4
res4
;
res2
=
interpolateAtCentroid
(
colorfc
);
res4
=
interpolateAtCentroid
(
colorSampIn
);
res4
=
interpolateAtCentroid
(
colorfsi
);
res
=
interpolateAtCentroid
(
scalarIn
);
res3
=
interpolateAtCentroid
(
sampInArray
);
// ERROR
res3
=
interpolateAtCentroid
(
sampInArray
[
2
]);
res2
=
interpolateAtCentroid
(
sampInArray
[
2
].
xy
);
// ERROR
res3
=
interpolateAtSample
(
sampInArray
,
1
);
// ERROR
res3
=
interpolateAtSample
(
sampInArray
[
i
],
0
);
res2
=
interpolateAtSample
(
sampInArray
[
2
].
xy
,
2
);
// ERROR
res
=
interpolateAtSample
(
scalarIn
,
1
);
res3
=
interpolateAtOffset
(
sampInArray
,
vec2
(
0
.
2
));
// ERROR
res3
=
interpolateAtOffset
(
sampInArray
[
2
],
vec2
(
0
.
2
));
res2
=
interpolateAtOffset
(
sampInArray
[
2
].
xy
,
vec2
(
0
.
2
));
// ERROR, no swizzle
res
=
interpolateAtOffset
(
scalarIn
+
scalarIn
,
vec2
(
0
.
2
));
// ERROR, no binary ops other than dereference
res
=
interpolateAtOffset
(
scalarIn
,
vec2
(
0
.
2
));
float
f
;
res
=
interpolateAtCentroid
(
f
);
// ERROR, not interpolant
res4
=
interpolateAtSample
(
outp
,
0
);
// ERROR, not interpolant
}
Test/310.vert
View file @
0fc4338f
...
...
@@ -373,3 +373,19 @@ void goodImageAtom()
imageAtomicCompSwap
(
im2Di
,
P
,
3
,
dati
);
imageAtomicCompSwap
(
im2Du
,
P
,
5u
,
datu
);
}
sample
out
vec4
colorSampInBad
;
// ERROR, reserved
#extension GL_OES_shader_multisample_interpolation : enable
sample
out
vec4
colorSample
;
flat
sample
out
vec4
colorfsi
;
sample
out
vec3
sampInArray
[
4
];
in
vec4
inv4
;
void
badInterp
()
{
interpolateAtCentroid
(
inv4
);
// ERROR, wrong stage
interpolateAtSample
(
inv4
,
1
);
// ERROR, need extension
interpolateAtOffset
(
inv4
,
vec2
(
0
.
2
));
// ERROR, need extension
}
Test/400.frag
View file @
0fc4338f
...
...
@@ -99,3 +99,43 @@ void foodc2()
d
=
packDouble2x32
(
u2
);
u2
=
unpackDouble2x32
(
d
);
}
sample
in
vec4
colorSampIn
;
sample
out
vec4
colorSampleBad
;
// ERROR
noperspective
in
vec4
colorfsi
;
sample
in
vec3
sampInArray
[
4
];
smooth
in
float
scalarIn
;
flat
centroid
in
vec2
colorfc
;
struct
S
{
float
x
;
};
in
S
s1
;
sample
S
s2
;
void
interp
()
{
interpolateAtCentroid
(
colorfc
);
interpolateAtCentroid
(
colorSampIn
);
interpolateAtCentroid
(
colorfsi
);
interpolateAtCentroid
(
scalarIn
);
interpolateAtCentroid
(
sampInArray
);
// ERROR
interpolateAtCentroid
(
sampInArray
[
2
]);
interpolateAtCentroid
(
sampInArray
[
2
].
xy
);
// ERROR
interpolateAtSample
(
sampInArray
,
1
);
// ERROR
interpolateAtSample
(
sampInArray
[
i
],
0
);
interpolateAtSample
(
s1
.
x
,
2
);
// ERROR
interpolateAtSample
(
scalarIn
,
1
);
interpolateAtOffset
(
sampInArray
,
vec2
(
0
.
2
));
// ERROR
interpolateAtOffset
(
sampInArray
[
2
],
vec2
(
0
.
2
));
interpolateAtOffset
(
sampInArray
[
2
].
xy
,
vec2
(
0
.
2
));
// ERROR, no swizzle
interpolateAtOffset
(
scalarIn
+
scalarIn
,
vec2
(
0
.
2
));
// ERROR, no binary ops other than dereference
interpolateAtOffset
(
s2
.
x
,
vec2
(
0
.
2
));
// ERROR
float
f
;
interpolateAtCentroid
(
f
);
// ERROR, not interpolant
interpolateAtSample
(
outp
,
0
);
// ERROR, not interpolant
}
\ No newline at end of file
Test/440.frag
View file @
0fc4338f
...
...
@@ -138,3 +138,10 @@ layout(std430, align = 128) uniform block24301 {
int
aconst
[
gl_MaxTransformFeedbackBuffers
];
int
bconst
[
gl_MaxTransformFeedbackInterleavedComponents
];
sample
in
vec3
sampInArray
[
4
];
void
interp
()
{
interpolateAtCentroid
(
sampInArray
[
2
].
xy
);
}
Test/baseResults/310.frag.out
View file @
0fc4338f
This diff is collapsed.
Click to expand it.
Test/baseResults/310.vert.out
View file @
0fc4338f
...
...
@@ -90,7 +90,11 @@ ERROR: 0:318: 'sampler/image' : type requires declaration of default precision q
ERROR: 0:319: 'sampler/image' : type requires declaration of default precision qualifier
ERROR: 0:339: 'textureSize' : no matching overloaded function found
ERROR: 0:339: '=' : cannot convert from 'const float' to 'temp highp 3-component vector of int'
ERROR: 86 compilation errors. No code generated.
ERROR: 0:377: 'sample' : Reserved word.
ERROR: 0:388: 'interpolateAtCentroid' : no matching overloaded function found
ERROR: 0:389: 'interpolateAtSample' : no matching overloaded function found
ERROR: 0:390: 'interpolateAtOffset' : no matching overloaded function found
ERROR: 90 compilation errors. No code generated.
Shader version: 310
...
...
@@ -98,6 +102,7 @@ Requested GL_EXT_texture_buffer
Requested GL_OES_gpu_shader5
Requested GL_OES_shader_image_atomic
Requested GL_OES_shader_io_blocks
Requested GL_OES_shader_multisample_interpolation
Requested GL_OES_texture_buffer
Requested GL_OES_texture_cube_map_array
Requested GL_OES_texture_storage_multisample_2d_array
...
...
@@ -852,6 +857,15 @@ ERROR: node is still EOpNull!
0:374 Constant:
0:374 5 (const uint)
0:374 'datu' (temp highp uint)
0:386 Function Definition: badInterp( (global void)
0:386 Function Parameters:
0:388 Sequence
0:388 Constant:
0:388 0.000000
0:389 Constant:
0:389 0.000000
0:390 Constant:
0:390 0.000000
0:? Linker Objects
0:? 's' (shared highp 4-component vector of float)
0:? 'v' (buffer highp 4-component vector of float)
...
...
@@ -953,6 +967,11 @@ ERROR: node is still EOpNull!
0:? 'im2Du' (layout(r32ui ) uniform highp uimage2D)
0:? 'im2Di' (layout(r32i ) uniform highp iimage2D)
0:? 'P' (uniform highp 2-component vector of int)
0:? 'colorSampInBad' (smooth sample out highp 4-component vector of float)
0:? 'colorSample' (smooth sample out highp 4-component vector of float)
0:? 'colorfsi' (flat sample out highp 4-component vector of float)
0:? 'sampInArray' (smooth sample out 4-element array of highp 3-component vector of float)
0:? 'inv4' (in highp 4-component vector of float)
0:? 'gl_VertexID' (gl_VertexId highp int VertexId)
0:? 'gl_InstanceID' (gl_InstanceId highp int InstanceId)
...
...
@@ -965,6 +984,7 @@ Requested GL_EXT_texture_buffer
Requested GL_OES_gpu_shader5
Requested GL_OES_shader_image_atomic
Requested GL_OES_shader_io_blocks
Requested GL_OES_shader_multisample_interpolation
Requested GL_OES_texture_buffer
Requested GL_OES_texture_cube_map_array
Requested GL_OES_texture_storage_multisample_2d_array
...
...
@@ -1719,6 +1739,15 @@ ERROR: node is still EOpNull!
0:374 Constant:
0:374 5 (const uint)
0:374 'datu' (temp highp uint)
0:386 Function Definition: badInterp( (global void)
0:386 Function Parameters:
0:388 Sequence
0:388 Constant:
0:388 0.000000
0:389 Constant:
0:389 0.000000
0:390 Constant:
0:390 0.000000
0:? Linker Objects
0:? 's' (shared highp 4-component vector of float)
0:? 'v' (buffer highp 4-component vector of float)
...
...
@@ -1820,6 +1849,11 @@ ERROR: node is still EOpNull!
0:? 'im2Du' (layout(r32ui ) uniform highp uimage2D)
0:? 'im2Di' (layout(r32i ) uniform highp iimage2D)
0:? 'P' (uniform highp 2-component vector of int)
0:? 'colorSampInBad' (smooth sample out highp 4-component vector of float)
0:? 'colorSample' (smooth sample out highp 4-component vector of float)
0:? 'colorfsi' (flat sample out highp 4-component vector of float)
0:? 'sampInArray' (smooth sample out 4-element array of highp 3-component vector of float)
0:? 'inv4' (in highp 4-component vector of float)
0:? 'gl_VertexID' (gl_VertexId highp int VertexId)
0:? 'gl_InstanceID' (gl_InstanceId highp int InstanceId)
Test/baseResults/400.frag.out
View file @
0fc4338f
This diff is collapsed.
Click to expand it.
Test/baseResults/440.frag.out
View file @
0fc4338f
...
...
@@ -53,6 +53,20 @@ ERROR: 48 compilation errors. No code generated.
Shader version: 440
ERROR: node is still EOpNull!
0:144 Function Definition: interp( (global void)
0:144 Function Parameters:
0:146 Sequence
0:146 interpolateAtCentroid (global 2-component vector of float)
0:146 vector swizzle (temp 2-component vector of float)
0:146 direct index (smooth sample temp 3-component vector of float)
0:146 'sampInArray' (smooth sample in 4-element array of 3-component vector of float)
0:146 Constant:
0:146 2 (const int)
0:146 Sequence
0:146 Constant:
0:146 0 (const int)
0:146 Constant:
0:146 1 (const int)
0:? Linker Objects
0:? 'a' (layout(location=4 component=2 ) smooth in 2-component vector of float)
0:? 'b' (layout(location=4 component=1 ) smooth in float)
...
...
@@ -88,6 +102,7 @@ ERROR: node is still EOpNull!
0:? 'specExample4301' (layout(column_major std430 align=128 ) uniform block{layout(column_major std430 offset=0 align=128 ) uniform 4-component vector of float a, layout(column_major std430 offset=128 align=128 ) uniform 3-component vector of float b, layout(column_major std430 offset=256 align=128 ) uniform 2-component vector of float d, layout(column_major std430 offset=512 align=128 ) uniform float e, layout(column_major std430 offset=520 align=8 ) uniform double f, layout(column_major std430 offset=640 align=128 ) uniform float h, layout(column_major std430 offset=768 align=128 ) uniform 3-component vector of double i})
0:? 'aconst' (global 4-element array of int)
0:? 'bconst' (global 64-element array of int)
0:? 'sampInArray' (smooth sample in 4-element array of 3-component vector of float)
Linked fragment stage:
...
...
@@ -96,6 +111,20 @@ ERROR: Linking fragment stage: Missing entry point: Each stage requires one "voi
Shader version: 440
ERROR: node is still EOpNull!
0:144 Function Definition: interp( (global void)
0:144 Function Parameters:
0:146 Sequence
0:146 interpolateAtCentroid (global 2-component vector of float)
0:146 vector swizzle (temp 2-component vector of float)
0:146 direct index (smooth sample temp 3-component vector of float)
0:146 'sampInArray' (smooth sample in 4-element array of 3-component vector of float)
0:146 Constant:
0:146 2 (const int)
0:146 Sequence
0:146 Constant:
0:146 0 (const int)
0:146 Constant:
0:146 1 (const int)
0:? Linker Objects
0:? 'a' (layout(location=4 component=2 ) smooth in 2-component vector of float)
0:? 'b' (layout(location=4 component=1 ) smooth in float)
...
...
@@ -131,4 +160,5 @@ ERROR: node is still EOpNull!
0:? 'specExample4301' (layout(column_major std430 align=128 ) uniform block{layout(column_major std430 offset=0 align=128 ) uniform 4-component vector of float a, layout(column_major std430 offset=128 align=128 ) uniform 3-component vector of float b, layout(column_major std430 offset=256 align=128 ) uniform 2-component vector of float d, layout(column_major std430 offset=512 align=128 ) uniform float e, layout(column_major std430 offset=520 align=8 ) uniform double f, layout(column_major std430 offset=640 align=128 ) uniform float h, layout(column_major std430 offset=768 align=128 ) uniform 3-component vector of double i})
0:? 'aconst' (global 4-element array of int)
0:? 'bconst' (global 64-element array of int)
0:? 'sampInArray' (smooth sample in 4-element array of 3-component vector of float)
glslang/Include/intermediate.h
View file @
0fc4338f
...
...
@@ -226,6 +226,10 @@ enum TOperator {
EOpDPdyCoarse
,
// Fragment only
EOpFwidthCoarse
,
// Fragment only
EOpInterpolateAtCentroid
,
// Fragment only
EOpInterpolateAtSample
,
// Fragment only
EOpInterpolateAtOffset
,
// Fragment only
EOpMatrixTimesMatrix
,
EOpOuterProduct
,
EOpDeterminant
,
...
...
glslang/Include/revision.h
View file @
0fc4338f
...
...
@@ -2,5 +2,5 @@
// For the version, it uses the latest git tag followed by the number of commits.
// For the date, it uses the current date (when then script is run).
#define GLSLANG_REVISION "3.0.73
0
"
#define GLSLANG_DATE "2
1
-Aug-2015"
#define GLSLANG_REVISION "3.0.73
2
"
#define GLSLANG_DATE "2
2
-Aug-2015"
glslang/MachineIndependent/Initialize.cpp
View file @
0fc4338f
...
...
@@ -1185,6 +1185,28 @@ void TBuiltIns::initialize(int version, EProfile profile)
"
\n
"
);
}
// GL_OES_shader_multisample_interpolation
if
((
profile
==
EEsProfile
&&
version
>=
310
)
||
(
profile
!=
EEsProfile
&&
version
>=
400
))
{
stageBuiltins
[
EShLangFragment
].
append
(
"float interpolateAtCentroid(float);"
"vec2 interpolateAtCentroid(vec2);"
"vec3 interpolateAtCentroid(vec3);"
"vec4 interpolateAtCentroid(vec4);"
"float interpolateAtSample(float, int);"
"vec2 interpolateAtSample(vec2, int);"
"vec3 interpolateAtSample(vec3, int);"
"vec4 interpolateAtSample(vec4, int);"
"float interpolateAtOffset(float, vec2);"
"vec2 interpolateAtOffset(vec2, vec2);"
"vec3 interpolateAtOffset(vec3, vec2);"
"vec4 interpolateAtOffset(vec4, vec2);"
"
\n
"
);
}
//============================================================================
//
// Standard Uniforms
...
...
@@ -3009,8 +3031,12 @@ void IdentifyBuiltIns(int version, EProfile profile, EShLanguage language, TSymb
symbolTable
.
setFunctionExtensions
(
"dFdy"
,
1
,
&
E_GL_OES_standard_derivatives
);
symbolTable
.
setFunctionExtensions
(
"fwidth"
,
1
,
&
E_GL_OES_standard_derivatives
);
}
if
(
version
>=
310
)
if
(
version
>=
310
)
{
symbolTable
.
setFunctionExtensions
(
"fma"
,
Num_AEP_gpu_shader5
,
AEP_gpu_shader5
);
symbolTable
.
setFunctionExtensions
(
"interpolateAtCentroid"
,
1
,
&
E_GL_OES_shader_multisample_interpolation
);
symbolTable
.
setFunctionExtensions
(
"interpolateAtSample"
,
1
,
&
E_GL_OES_shader_multisample_interpolation
);
symbolTable
.
setFunctionExtensions
(
"interpolateAtOffset"
,
1
,
&
E_GL_OES_shader_multisample_interpolation
);
}
}
else
if
(
version
<
130
)
{
symbolTable
.
setFunctionExtensions
(
"texture1DLod"
,
1
,
&
E_GL_ARB_shader_texture_lod
);
symbolTable
.
setFunctionExtensions
(
"texture2DLod"
,
1
,
&
E_GL_ARB_shader_texture_lod
);
...
...
@@ -3351,6 +3377,9 @@ void IdentifyBuiltIns(int version, EProfile profile, EShLanguage language, TSymb
symbolTable
.
relateToOperator
(
"dFdyCoarse"
,
EOpDPdyCoarse
);
symbolTable
.
relateToOperator
(
"fwidthCoarse"
,
EOpFwidthCoarse
);
}
symbolTable
.
relateToOperator
(
"interpolateAtCentroid"
,
EOpInterpolateAtCentroid
);
symbolTable
.
relateToOperator
(
"interpolateAtSample"
,
EOpInterpolateAtSample
);
symbolTable
.
relateToOperator
(
"interpolateAtOffset"
,
EOpInterpolateAtOffset
);
break
;
case
EShLangCompute
:
...
...
glslang/MachineIndependent/Intermediate.cpp
View file @
0fc4338f
...
...
@@ -861,6 +861,35 @@ TIntermTyped* TIntermediate::addSwizzle(TVectorFields& fields, const TSourceLoc&
}
//
// Follow the left branches down to the root of an l-value
// expression (just "." and []).
//
// Return the base of the l-value (where following indexing quits working).
// Return nullptr if a chain following dereferences cannot be followed.
//
// 'swizzleOkay' says whether or not it is okay to consider a swizzle
// a valid part of the dereference chain.
//
const
TIntermTyped
*
TIntermediate
::
findLValueBase
(
const
TIntermTyped
*
node
,
bool
swizzleOkay
)
{
do
{
const
TIntermBinary
*
binary
=
node
->
getAsBinaryNode
();
if
(
binary
==
nullptr
)
return
node
;
TOperator
op
=
binary
->
getOp
();
if
(
op
!=
EOpIndexDirect
&&
op
!=
EOpIndexIndirect
&&
op
!=
EOpIndexDirectStruct
&&
op
!=
EOpVectorSwizzle
)
return
nullptr
;
if
(
!
swizzleOkay
)
{
if
(
op
==
EOpVectorSwizzle
)
return
nullptr
;
if
((
op
==
EOpIndexDirect
||
op
==
EOpIndexIndirect
)
&&
binary
->
getLeft
()
->
getType
().
isVector
()
&&
!
binary
->
getLeft
()
->
getType
().
isArray
())
return
nullptr
;
}
node
=
node
->
getAsBinaryNode
()
->
getLeft
();
}
while
(
true
);
}
//
// Create loop nodes.
//
TIntermLoop
*
TIntermediate
::
addLoop
(
TIntermNode
*
body
,
TIntermTyped
*
test
,
TIntermTyped
*
terminal
,
bool
testFirst
,
const
TSourceLoc
&
loc
)
...
...
glslang/MachineIndependent/ParseHelper.cpp
View file @
0fc4338f
...
...
@@ -1485,6 +1485,30 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan
break
;
}
case
EOpInterpolateAtCentroid
:
case
EOpInterpolateAtSample
:
case
EOpInterpolateAtOffset
:
// "For the interpolateAt* functions, the call will return a precision
// qualification matching the precision of the 'interpolant' argument to
// the function call."
callNode
.
getQualifier
().
precision
=
arg0
->
getQualifier
().
precision
;
// Make sure the first argument is an interpolant, or an array element of an interpolant
if
(
arg0
->
getType
().
getQualifier
().
storage
!=
EvqVaryingIn
)
{
// It might still be an array element.
//
// We could check more, but the semantics of the first argument are already met; the
// only way to turn an array into a float/vec* is array dereference and swizzle.
//
// ES and desktop 4.3 and earlier: swizzles may not be used
// desktop 4.4 and later: swizzles may be used
bool
swizzleOkay
=
(
profile
!=
EEsProfile
)
&&
(
version
>=
440
);
const
TIntermTyped
*
base
=
TIntermediate
::
findLValueBase
(
arg0
,
swizzleOkay
);
if
(
base
==
nullptr
||
base
->
getType
().
getQualifier
().
storage
!=
EvqVaryingIn
)
error
(
loc
,
"first argument must be an interpolant, or interpolant-array element"
,
fnCandidate
.
getName
().
c_str
(),
""
);
}
break
;
default
:
break
;
}
...
...
@@ -2456,6 +2480,10 @@ void TParseContext::globalQualifierTypeCheck(const TSourceLoc& loc, const TQuali
error
(
loc
,
"cannot be a matrix"
,
GetStorageQualifierString
(
qualifier
.
storage
),
""
);
return
;
}
if
(
qualifier
.
isAuxiliary
())
error
(
loc
,
"can't use auxiliary qualifier on a fragment output"
,
"centroid/sample/patch"
,
""
);
if
(
qualifier
.
isInterpolation
())
error
(
loc
,
"can't use interpolation qualifier on a fragment output"
,
"flat/smooth/noperspective"
,
""
);
break
;
case
EShLangCompute
:
...
...
glslang/MachineIndependent/Scan.cpp
View file @
0fc4338f
...
...
@@ -738,6 +738,10 @@ int TScanContext::tokenizeIdentifier()
return
es30ReservedFromGLSL
(
400
);
case
SAMPLE
:
if
(
parseContext
.
extensionsTurnedOn
(
1
,
&
E_GL_OES_shader_multisample_interpolation
))
return
keyword
;
return
es30ReservedFromGLSL
(
400
);
case
SUBROUTINE
:
return
es30ReservedFromGLSL
(
400
);
...
...
glslang/MachineIndependent/Versions.cpp
View file @
0fc4338f
...
...
@@ -183,7 +183,7 @@ void TParseContext::initializeExtensionBehavior()
extensionBehavior
[
E_GL_KHR_blend_equation_advanced
]
=
EBhDisablePartial
;
extensionBehavior
[
E_GL_OES_sample_variables
]
=
EBhDisable
;
extensionBehavior
[
E_GL_OES_shader_image_atomic
]
=
EBhDisable
;
extensionBehavior
[
E_GL_OES_shader_multisample_interpolation
]
=
EBhDisable
Partial
;
extensionBehavior
[
E_GL_OES_shader_multisample_interpolation
]
=
EBhDisable
;
extensionBehavior
[
E_GL_OES_texture_storage_multisample_2d_array
]
=
EBhDisable
;
extensionBehavior
[
E_GL_EXT_geometry_shader
]
=
EBhDisable
;
extensionBehavior
[
E_GL_EXT_geometry_point_size
]
=
EBhDisable
;
...
...
glslang/MachineIndependent/intermOut.cpp
View file @
0fc4338f
...
...
@@ -286,6 +286,9 @@ bool TOutputTraverser::visitUnary(TVisit /* visit */, TIntermUnary* node)
case
EOpDPdxCoarse
:
out
.
debug
<<
"dPdxCoarse"
;
break
;
case
EOpDPdyCoarse
:
out
.
debug
<<
"dPdyCoarse"
;
break
;
case
EOpFwidthCoarse
:
out
.
debug
<<
"fwidthCoarse"
;
break
;
case
EOpInterpolateAtCentroid
:
out
.
debug
<<
"interpolateAtCentroid"
;
break
;
case
EOpDeterminant
:
out
.
debug
<<
"determinant"
;
break
;
case
EOpMatrixInverse
:
out
.
debug
<<
"inverse"
;
break
;
case
EOpTranspose
:
out
.
debug
<<
"transpose"
;
break
;
...
...
@@ -473,8 +476,11 @@ bool TOutputTraverser::visitAggregate(TVisit /* visit */, TIntermAggregate* node
case
EOpBitfieldInsert
:
out
.
debug
<<
"bitfieldInsert"
;
break
;
case
EOpFma
:
out
.
debug
<<
"fma"
;
break
;
case
EOpFrexp
:
out
.
debug
<<
"frexp"
;
break
;
case
EOpLdexp
:
out
.
debug
<<
"ldexp"
;
break
;
case
EOpFrexp
:
out
.
debug
<<
"frexp"
;
break
;
case
EOpLdexp
:
out
.
debug
<<
"ldexp"
;
break
;
case
EOpInterpolateAtSample
:
out
.
debug
<<
"interpolateAtSample"
;
break
;
case
EOpInterpolateAtOffset
:
out
.
debug
<<
"interpolateAtOffset"
;
break
;
default
:
out
.
debug
.
message
(
EPrefixError
,
"Bad aggregation op"
);
}
...
...
glslang/MachineIndependent/localintermediate.h
View file @
0fc4338f
...
...
@@ -192,6 +192,9 @@ public:
TIntermTyped
*
foldDereference
(
TIntermTyped
*
node
,
int
index
,
const
TSourceLoc
&
);
TIntermTyped
*
foldSwizzle
(
TIntermTyped
*
node
,
TVectorFields
&
fields
,
const
TSourceLoc
&
);
// Tree ops
static
const
TIntermTyped
*
findLValueBase
(
const
TIntermTyped
*
,
bool
swizzleOkay
);
// Linkage related
void
addSymbolLinkageNodes
(
TIntermAggregate
*&
linkage
,
EShLanguage
,
TSymbolTable
&
);
void
addSymbolLinkageNode
(
TIntermAggregate
*&
linkage
,
TSymbolTable
&
,
const
TString
&
);
...
...
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