Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
angle
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
angle
Commits
1bc1b6a3
Commit
1bc1b6a3
authored
Jul 12, 2013
by
Jamie Madill
Committed by
Shannon Woods
Jul 19, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Only allow zero indexes for gl_FragData when the draw buffers extension is disabled.
TRAC #23509 Signed-off-by: Shannon Woods Signed-off-by: Nicolas Capens Authored-by: Jamie Madill
parent
57a04544
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
0 deletions
+20
-0
ParseHelper.cpp
src/compiler/ParseHelper.cpp
+19
-0
ParseHelper.h
src/compiler/ParseHelper.h
+1
-0
No files found.
src/compiler/ParseHelper.cpp
View file @
1bc1b6a3
...
...
@@ -892,6 +892,19 @@ bool TParseContext::supportsExtension(const char* extension)
return
(
iter
!=
extbehavior
.
end
());
}
bool
TParseContext
::
isExtensionEnabled
(
const
char
*
extension
)
const
{
const
TExtensionBehavior
&
extbehavior
=
extensionBehavior
();
auto
iter
=
extbehavior
.
find
(
extension
);
if
(
iter
==
extbehavior
.
end
())
{
return
false
;
}
return
(
iter
->
second
==
EBhEnable
||
iter
->
second
==
EBhRequire
);
}
/////////////////////////////////////////////////////////////////////////////////
//
// Non-Errors.
...
...
@@ -1513,6 +1526,12 @@ TIntermTyped* TParseContext::addIndexExpression(TIntermTyped *baseExpression, co
recover
();
index
=
baseExpression
->
getType
().
getArraySize
()
-
1
;
}
else
if
(
baseExpression
->
getQualifier
()
==
EvqFragData
&&
index
>
0
&&
!
isExtensionEnabled
(
"GL_EXT_draw_buffers"
))
{
error
(
location
,
""
,
"["
,
"array indexes for gl_FragData must be zero when GL_EXT_draw_buffers is disabled"
);
recover
();
index
=
0
;
}
}
else
if
((
baseExpression
->
isVector
()
||
baseExpression
->
isMatrix
())
&&
baseExpression
->
getType
().
getNominalSize
()
<=
index
)
{
...
...
src/compiler/ParseHelper.h
View file @
1bc1b6a3
...
...
@@ -101,6 +101,7 @@ struct TParseContext {
const
TPragma
&
pragma
()
const
{
return
directiveHandler
.
pragma
();
}
const
TExtensionBehavior
&
extensionBehavior
()
const
{
return
directiveHandler
.
extensionBehavior
();
}
bool
supportsExtension
(
const
char
*
extension
);
bool
isExtensionEnabled
(
const
char
*
extension
)
const
;
bool
containsSampler
(
TType
&
type
);
bool
areAllChildConst
(
TIntermAggregate
*
aggrNode
);
...
...
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