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
02f20dd8
Commit
02f20dd8
authored
Sep 12, 2013
by
Jamie Madill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix compile error regressions in OutputGLSL and OutputESSL.
These were broken back with the symbol table changes. TRAC #23857 Signed-off-by: Nicolas Capens Signed-off-by: Shannon Woods
parent
88f18f45
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
34 additions
and
24 deletions
+34
-24
OutputESSL.cpp
src/compiler/OutputESSL.cpp
+4
-3
OutputESSL.h
src/compiler/OutputESSL.h
+3
-2
OutputGLSL.cpp
src/compiler/OutputGLSL.cpp
+4
-3
OutputGLSL.h
src/compiler/OutputGLSL.h
+4
-3
OutputGLSLBase.cpp
src/compiler/OutputGLSLBase.cpp
+8
-6
OutputGLSLBase.h
src/compiler/OutputGLSLBase.h
+5
-2
TranslatorESSL.cpp
src/compiler/TranslatorESSL.cpp
+2
-2
TranslatorGLSL.cpp
src/compiler/TranslatorGLSL.cpp
+2
-2
VersionGLSL.h
src/compiler/VersionGLSL.h
+2
-1
No files found.
src/compiler/OutputESSL.cpp
View file @
02f20dd8
//
// Copyright (c) 2002-201
1
The ANGLE Project Authors. All rights reserved.
// Copyright (c) 2002-201
3
The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
...
...
@@ -10,8 +10,9 @@ TOutputESSL::TOutputESSL(TInfoSinkBase& objSink,
ShArrayIndexClampingStrategy
clampingStrategy
,
ShHashFunction64
hashFunction
,
NameMap
&
nameMap
,
TSymbolTable
&
symbolTable
)
:
TOutputGLSLBase
(
objSink
,
clampingStrategy
,
hashFunction
,
nameMap
,
symbolTable
)
TSymbolTable
&
symbolTable
,
int
shaderVersion
)
:
TOutputGLSLBase
(
objSink
,
clampingStrategy
,
hashFunction
,
nameMap
,
symbolTable
,
shaderVersion
)
{
}
...
...
src/compiler/OutputESSL.h
View file @
02f20dd8
//
// Copyright (c) 2002-201
1
The ANGLE Project Authors. All rights reserved.
// Copyright (c) 2002-201
3
The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
...
...
@@ -16,7 +16,8 @@ public:
ShArrayIndexClampingStrategy
clampingStrategy
,
ShHashFunction64
hashFunction
,
NameMap
&
nameMap
,
TSymbolTable
&
symbolTable
);
TSymbolTable
&
symbolTable
,
int
shaderVersion
);
protected
:
virtual
bool
writeVariablePrecision
(
TPrecision
precision
);
...
...
src/compiler/OutputGLSL.cpp
View file @
02f20dd8
//
// Copyright (c) 2002-201
1
The ANGLE Project Authors. All rights reserved.
// Copyright (c) 2002-201
3
The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
...
...
@@ -10,8 +10,9 @@ TOutputGLSL::TOutputGLSL(TInfoSinkBase& objSink,
ShArrayIndexClampingStrategy
clampingStrategy
,
ShHashFunction64
hashFunction
,
NameMap
&
nameMap
,
TSymbolTable
&
symbolTable
)
:
TOutputGLSLBase
(
objSink
,
clampingStrategy
,
hashFunction
,
nameMap
,
symbolTable
)
TSymbolTable
&
symbolTable
,
int
shaderVersion
)
:
TOutputGLSLBase
(
objSink
,
clampingStrategy
,
hashFunction
,
nameMap
,
symbolTable
,
shaderVersion
)
{
}
...
...
src/compiler/OutputGLSL.h
View file @
02f20dd8
//
// Copyright (c) 2002-201
1
The ANGLE Project Authors. All rights reserved.
// Copyright (c) 2002-201
3
The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
...
...
@@ -16,11 +16,12 @@ public:
ShArrayIndexClampingStrategy
clampingStrategy
,
ShHashFunction64
hashFunction
,
NameMap
&
nameMap
,
TSymbolTable
&
symbolTable
);
TSymbolTable
&
symbolTable
,
int
shaderVersion
);
protected
:
virtual
bool
writeVariablePrecision
(
TPrecision
);
virtual
bool
visitSymbol
(
TIntermSymbol
*
node
);
virtual
void
visitSymbol
(
TIntermSymbol
*
node
);
};
#endif // CROSSCOMPILERGLSL_OUTPUTGLSL_H_
src/compiler/OutputGLSLBase.cpp
View file @
02f20dd8
//
// Copyright (c) 2002-201
1
The ANGLE Project Authors. All rights reserved.
// Copyright (c) 2002-201
3
The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
...
...
@@ -43,14 +43,16 @@ TOutputGLSLBase::TOutputGLSLBase(TInfoSinkBase& objSink,
ShArrayIndexClampingStrategy
clampingStrategy
,
ShHashFunction64
hashFunction
,
NameMap
&
nameMap
,
TSymbolTable
&
symbolTable
)
TSymbolTable
&
symbolTable
,
int
shaderVersion
)
:
TIntermTraverser
(
true
,
true
,
true
),
mObjSink
(
objSink
),
mDeclaringVariables
(
false
),
mClampingStrategy
(
clampingStrategy
),
mHashFunction
(
hashFunction
),
mNameMap
(
nameMap
),
mSymbolTable
(
symbolTable
)
mSymbolTable
(
symbolTable
),
mShaderVersion
(
shaderVersion
)
{
}
...
...
@@ -256,7 +258,7 @@ bool TOutputGLSLBase::visitBinary(Visit visit, TIntermBinary* node)
const
TField
*
field
=
structure
->
fields
()[
index
->
getIConst
(
0
)];
TString
fieldName
=
field
->
name
();
if
(
!
mSymbolTable
.
findBuiltIn
(
structure
->
name
()))
if
(
!
mSymbolTable
.
findBuiltIn
(
structure
->
name
()
,
mShaderVersion
))
fieldName
=
hashName
(
fieldName
);
out
<<
fieldName
;
...
...
@@ -777,7 +779,7 @@ TString TOutputGLSLBase::hashName(const TString& name)
TString
TOutputGLSLBase
::
hashVariableName
(
const
TString
&
name
)
{
if
(
mSymbolTable
.
findBuiltIn
(
name
)
!=
NULL
)
if
(
mSymbolTable
.
findBuiltIn
(
name
,
mShaderVersion
)
!=
NULL
)
return
name
;
return
hashName
(
name
);
}
...
...
@@ -785,7 +787,7 @@ TString TOutputGLSLBase::hashVariableName(const TString& name)
TString
TOutputGLSLBase
::
hashFunctionName
(
const
TString
&
mangled_name
)
{
TString
name
=
TFunction
::
unmangleName
(
mangled_name
);
if
(
mSymbolTable
.
findBuiltIn
(
mangled_name
)
!=
NULL
||
name
==
"main"
)
if
(
mSymbolTable
.
findBuiltIn
(
mangled_name
,
mShaderVersion
)
!=
NULL
||
name
==
"main"
)
return
name
;
return
hashName
(
name
);
}
...
...
src/compiler/OutputGLSLBase.h
View file @
02f20dd8
//
// Copyright (c) 2002-201
1
The ANGLE Project Authors. All rights reserved.
// Copyright (c) 2002-201
3
The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
...
...
@@ -20,7 +20,8 @@ public:
ShArrayIndexClampingStrategy
clampingStrategy
,
ShHashFunction64
hashFunction
,
NameMap
&
nameMap
,
TSymbolTable
&
symbolTable
);
TSymbolTable
&
symbolTable
,
int
shaderVersion
);
protected
:
TInfoSinkBase
&
objSink
()
{
return
mObjSink
;
}
...
...
@@ -74,6 +75,8 @@ private:
NameMap
&
mNameMap
;
TSymbolTable
&
mSymbolTable
;
const
int
mShaderVersion
;
};
#endif // CROSSCOMPILERGLSL_OUTPUTGLSLBASE_H_
src/compiler/TranslatorESSL.cpp
View file @
02f20dd8
//
// Copyright (c) 2002-201
1
The ANGLE Project Authors. All rights reserved.
// Copyright (c) 2002-201
3
The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
...
...
@@ -26,7 +26,7 @@ void TranslatorESSL::translate(TIntermNode* root) {
getArrayBoundsClamper
().
OutputClampingFunctionDefinition
(
sink
);
// Write translated shader.
TOutputESSL
outputESSL
(
sink
,
getArrayIndexClampingStrategy
(),
getHashFunction
(),
getNameMap
(),
getSymbolTable
());
TOutputESSL
outputESSL
(
sink
,
getArrayIndexClampingStrategy
(),
getHashFunction
(),
getNameMap
(),
getSymbolTable
()
,
getShaderVersion
()
);
root
->
traverse
(
&
outputESSL
);
}
...
...
src/compiler/TranslatorGLSL.cpp
View file @
02f20dd8
//
// Copyright (c) 2002-201
0
The ANGLE Project Authors. All rights reserved.
// Copyright (c) 2002-201
3
The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
...
...
@@ -39,6 +39,6 @@ void TranslatorGLSL::translate(TIntermNode* root) {
getArrayBoundsClamper
().
OutputClampingFunctionDefinition
(
sink
);
// Write translated shader.
TOutputGLSL
outputGLSL
(
sink
,
getArrayIndexClampingStrategy
(),
getHashFunction
(),
getNameMap
(),
getSymbolTable
());
TOutputGLSL
outputGLSL
(
sink
,
getArrayIndexClampingStrategy
(),
getHashFunction
(),
getNameMap
(),
getSymbolTable
()
,
getShaderVersion
()
);
root
->
traverse
(
&
outputGLSL
);
}
src/compiler/VersionGLSL.h
View file @
02f20dd8
//
// Copyright (c) 2002-201
0
The ANGLE Project Authors. All rights reserved.
// Copyright (c) 2002-201
3
The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
...
...
@@ -24,6 +24,7 @@
// - matrix constructors taking matrix as argument.
// - array as "out" function parameters
//
// TODO: ES3 equivalent versions of GLSL
class
TVersionGLSL
:
public
TIntermTraverser
{
public
:
TVersionGLSL
(
ShShaderType
type
);
...
...
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