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
24a5d23d
Commit
24a5d23d
authored
Sep 10, 2019
by
Dan Sinclair
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unused params
parent
664ad418
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
10 deletions
+9
-10
Initialize.cpp
glslang/MachineIndependent/Initialize.cpp
+7
-8
Initialize.h
glslang/MachineIndependent/Initialize.h
+2
-2
No files found.
glslang/MachineIndependent/Initialize.cpp
View file @
24a5d23d
...
@@ -357,7 +357,7 @@ void AddTabledBuiltin(TString& decls, const BuiltInFunction& function)
...
@@ -357,7 +357,7 @@ void AddTabledBuiltin(TString& decls, const BuiltInFunction& function)
}
}
// See if the tabled versioning information allows the current version.
// See if the tabled versioning information allows the current version.
bool
ValidVersion
(
const
BuiltInFunction
&
function
,
int
version
,
EProfile
profile
,
const
SpvVersion
&
spvVersion
)
bool
ValidVersion
(
const
BuiltInFunction
&
function
,
int
version
,
EProfile
profile
)
{
{
#ifdef GLSLANG_WEB
#ifdef GLSLANG_WEB
// all entries in table are valid
// all entries in table are valid
...
@@ -395,11 +395,11 @@ void RelateTabledBuiltins(const BuiltInFunction* functions, TSymbolTable& symbol
...
@@ -395,11 +395,11 @@ void RelateTabledBuiltins(const BuiltInFunction* functions, TSymbolTable& symbol
}
// end anonymous namespace
}
// end anonymous namespace
// Add declarations for all tables of built-in functions.
// Add declarations for all tables of built-in functions.
void
TBuiltIns
::
addTabledBuiltins
(
int
version
,
EProfile
profile
,
const
SpvVersion
&
spvVersion
)
void
TBuiltIns
::
addTabledBuiltins
(
int
version
,
EProfile
profile
)
{
{
const
auto
forEachFunction
=
[
&
](
TString
&
decls
,
const
BuiltInFunction
*
function
)
{
const
auto
forEachFunction
=
[
&
](
TString
&
decls
,
const
BuiltInFunction
*
function
)
{
while
(
function
->
op
!=
EOpNull
)
{
while
(
function
->
op
!=
EOpNull
)
{
if
(
ValidVersion
(
*
function
,
version
,
profile
,
spvVersion
))
if
(
ValidVersion
(
*
function
,
version
,
profile
))
AddTabledBuiltin
(
decls
,
*
function
);
AddTabledBuiltin
(
decls
,
*
function
);
++
function
;
++
function
;
}
}
...
@@ -417,8 +417,7 @@ void TBuiltIns::addTabledBuiltins(int version, EProfile profile, const SpvVersio
...
@@ -417,8 +417,7 @@ void TBuiltIns::addTabledBuiltins(int version, EProfile profile, const SpvVersio
}
}
// Relate all tables of built-ins to the AST operators.
// Relate all tables of built-ins to the AST operators.
void
TBuiltIns
::
relateTabledBuiltins
(
int
version
,
EProfile
profile
,
const
SpvVersion
&
spvVersion
,
EShLanguage
stage
,
void
TBuiltIns
::
relateTabledBuiltins
(
TSymbolTable
&
symbolTable
)
TSymbolTable
&
symbolTable
)
{
{
RelateTabledBuiltins
(
BaseFunctions
,
symbolTable
);
RelateTabledBuiltins
(
BaseFunctions
,
symbolTable
);
RelateTabledBuiltins
(
DerivativeFunctions
,
symbolTable
);
RelateTabledBuiltins
(
DerivativeFunctions
,
symbolTable
);
...
@@ -485,7 +484,7 @@ TBuiltIns::~TBuiltIns()
...
@@ -485,7 +484,7 @@ TBuiltIns::~TBuiltIns()
//
//
void
TBuiltIns
::
initialize
(
int
version
,
EProfile
profile
,
const
SpvVersion
&
spvVersion
)
void
TBuiltIns
::
initialize
(
int
version
,
EProfile
profile
,
const
SpvVersion
&
spvVersion
)
{
{
addTabledBuiltins
(
version
,
profile
,
spvVersion
);
addTabledBuiltins
(
version
,
profile
);
//============================================================================
//============================================================================
//
//
...
@@ -6287,7 +6286,7 @@ void TBuiltIns::add2ndGenerationSamplingImaging(int version, EProfile profile, c
...
@@ -6287,7 +6286,7 @@ void TBuiltIns::add2ndGenerationSamplingImaging(int version, EProfile profile, c
continue
;
continue
;
// Loop over the bTypes
// Loop over the bTypes
for
(
in
t
bType
=
0
;
bType
<
sizeof
(
bTypes
)
/
sizeof
(
TBasicType
);
++
bType
)
{
for
(
size_
t
bType
=
0
;
bType
<
sizeof
(
bTypes
)
/
sizeof
(
TBasicType
);
++
bType
)
{
#ifndef GLSLANG_WEB
#ifndef GLSLANG_WEB
if
(
bTypes
[
bType
]
==
EbtFloat16
&&
(
profile
==
EEsProfile
||
version
<
450
))
if
(
bTypes
[
bType
]
==
EbtFloat16
&&
(
profile
==
EEsProfile
||
version
<
450
))
continue
;
continue
;
...
@@ -8957,7 +8956,7 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
...
@@ -8957,7 +8956,7 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
// operations.
// operations.
//
//
relateTabledBuiltins
(
version
,
profile
,
spvVersion
,
language
,
symbolTable
);
relateTabledBuiltins
(
symbolTable
);
symbolTable
.
relateToOperator
(
"matrixCompMult"
,
EOpMul
);
symbolTable
.
relateToOperator
(
"matrixCompMult"
,
EOpMul
);
// 120 and 150 are correct for both ES and desktop
// 120 and 150 are correct for both ES and desktop
...
...
glslang/MachineIndependent/Initialize.h
View file @
24a5d23d
...
@@ -91,8 +91,8 @@ public:
...
@@ -91,8 +91,8 @@ public:
void
identifyBuiltIns
(
int
version
,
EProfile
profile
,
const
SpvVersion
&
spvVersion
,
EShLanguage
language
,
TSymbolTable
&
symbolTable
,
const
TBuiltInResource
&
resources
);
void
identifyBuiltIns
(
int
version
,
EProfile
profile
,
const
SpvVersion
&
spvVersion
,
EShLanguage
language
,
TSymbolTable
&
symbolTable
,
const
TBuiltInResource
&
resources
);
protected
:
protected
:
void
addTabledBuiltins
(
int
version
,
EProfile
profile
,
const
SpvVersion
&
spvVersion
);
void
addTabledBuiltins
(
int
version
,
EProfile
profile
);
void
relateTabledBuiltins
(
int
version
,
EProfile
profile
,
const
SpvVersion
&
spvVersion
,
EShLanguage
,
TSymbolTable
&
);
void
relateTabledBuiltins
(
TSymbolTable
&
);
void
add2ndGenerationSamplingImaging
(
int
version
,
EProfile
profile
,
const
SpvVersion
&
spvVersion
);
void
add2ndGenerationSamplingImaging
(
int
version
,
EProfile
profile
,
const
SpvVersion
&
spvVersion
);
void
addSubpassSampling
(
TSampler
,
const
TString
&
typeName
,
int
version
,
EProfile
profile
);
void
addSubpassSampling
(
TSampler
,
const
TString
&
typeName
,
int
version
,
EProfile
profile
);
void
addQueryFunctions
(
TSampler
,
const
TString
&
typeName
,
int
version
,
EProfile
profile
);
void
addQueryFunctions
(
TSampler
,
const
TString
&
typeName
,
int
version
,
EProfile
profile
);
...
...
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