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
5d89d4d4
Commit
5d89d4d4
authored
Jan 08, 2017
by
John Kessenich
Committed by
GitHub
Jan 08, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #667 from slime73/Compiler-Warnings
Address several compiler warnings
parents
927608b3
5f316d9b
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
32 additions
and
30 deletions
+32
-30
SPVRemapper.h
SPIRV/SPVRemapper.h
+1
-0
iomapper.cpp
glslang/MachineIndependent/iomapper.cpp
+2
-2
localintermediate.h
glslang/MachineIndependent/localintermediate.h
+14
-13
PpContext.h
glslang/MachineIndependent/preprocessor/PpContext.h
+1
-1
propagateNoContraction.cpp
glslang/MachineIndependent/propagateNoContraction.cpp
+6
-6
reflection.h
glslang/MachineIndependent/reflection.h
+3
-3
hlslParseHelper.cpp
hlsl/hlslParseHelper.cpp
+4
-4
hlslParseHelper.h
hlsl/hlslParseHelper.h
+1
-1
No files found.
SPIRV/SPVRemapper.h
View file @
5d89d4d4
...
@@ -112,6 +112,7 @@ class spirvbin_t : public spirvbin_base_t
...
@@ -112,6 +112,7 @@ class spirvbin_t : public spirvbin_base_t
{
{
public
:
public
:
spirvbin_t
(
int
verbose
=
0
)
:
entryPoint
(
spv
::
NoResult
),
largestNewId
(
0
),
verbose
(
verbose
)
{
}
spirvbin_t
(
int
verbose
=
0
)
:
entryPoint
(
spv
::
NoResult
),
largestNewId
(
0
),
verbose
(
verbose
)
{
}
virtual
~
spirvbin_t
()
{
}
// remap on an existing binary in memory
// remap on an existing binary in memory
void
remap
(
std
::
vector
<
std
::
uint32_t
>&
spv
,
std
::
uint32_t
opts
=
DO_EVERYTHING
);
void
remap
(
std
::
vector
<
std
::
uint32_t
>&
spv
,
std
::
uint32_t
opts
=
DO_EVERYTHING
);
...
...
glslang/MachineIndependent/iomapper.cpp
View file @
5d89d4d4
...
@@ -168,8 +168,8 @@ public:
...
@@ -168,8 +168,8 @@ public:
struct
TResolverAdaptor
struct
TResolverAdaptor
{
{
TResolverAdaptor
(
EShLanguage
s
,
TIoMapResolver
&
r
,
TInfoSink
&
i
,
bool
&
e
)
TResolverAdaptor
(
EShLanguage
s
,
TIoMapResolver
&
r
,
TInfoSink
&
i
,
bool
&
e
)
:
resolver
(
r
)
:
stage
(
s
)
,
stage
(
s
)
,
resolver
(
r
)
,
infoSink
(
i
)
,
infoSink
(
i
)
,
error
(
e
)
,
error
(
e
)
{
{
...
...
glslang/MachineIndependent/localintermediate.h
View file @
5d89d4d4
...
@@ -139,22 +139,22 @@ class TVariable;
...
@@ -139,22 +139,22 @@ class TVariable;
class
TIntermediate
{
class
TIntermediate
{
public
:
public
:
explicit
TIntermediate
(
EShLanguage
l
,
int
v
=
0
,
EProfile
p
=
ENoProfile
)
:
explicit
TIntermediate
(
EShLanguage
l
,
int
v
=
0
,
EProfile
p
=
ENoProfile
)
:
source
(
EShSourceNone
),
language
(
l
),
profile
(
p
),
version
(
v
),
treeRoot
(
0
),
language
(
l
),
source
(
EShSourceNone
),
profile
(
p
),
version
(
v
),
treeRoot
(
0
),
numEntryPoints
(
0
),
numErrors
(
0
),
numPushConstants
(
0
),
recursive
(
false
),
numEntryPoints
(
0
),
numErrors
(
0
),
numPushConstants
(
0
),
recursive
(
false
),
invocations
(
TQualifier
::
layoutNotSet
),
vertices
(
TQualifier
::
layoutNotSet
),
inputPrimitive
(
ElgNone
),
outputPrimitive
(
ElgNone
),
invocations
(
TQualifier
::
layoutNotSet
),
vertices
(
TQualifier
::
layoutNotSet
),
inputPrimitive
(
ElgNone
),
outputPrimitive
(
ElgNone
),
pixelCenterInteger
(
false
),
originUpperLeft
(
false
),
pixelCenterInteger
(
false
),
originUpperLeft
(
false
),
vertexSpacing
(
EvsNone
),
vertexOrder
(
EvoNone
),
pointMode
(
false
),
earlyFragmentTests
(
false
),
depthLayout
(
EldNone
),
depthReplacing
(
false
),
blendEquations
(
0
),
vertexSpacing
(
EvsNone
),
vertexOrder
(
EvoNone
),
pointMode
(
false
),
earlyFragmentTests
(
false
),
depthLayout
(
EldNone
),
depthReplacing
(
false
),
blendEquations
(
0
),
multiStream
(
false
),
xfbMode
(
false
),
xfbMode
(
false
),
multiStream
(
false
),
#ifdef NV_EXTENSIONS
layoutOverrideCoverage
(
false
),
geoPassthroughEXT
(
false
),
#endif
shiftSamplerBinding
(
0
),
shiftSamplerBinding
(
0
),
shiftTextureBinding
(
0
),
shiftTextureBinding
(
0
),
shiftImageBinding
(
0
),
shiftImageBinding
(
0
),
shiftUboBinding
(
0
),
shiftUboBinding
(
0
),
autoMapBindings
(
false
),
autoMapBindings
(
false
),
flattenUniformArrays
(
false
),
flattenUniformArrays
(
false
),
#ifdef NV_EXTENSIONS
layoutOverrideCoverage
(
false
),
geoPassthroughEXT
(
false
),
#endif
useUnknownFormat
(
false
)
useUnknownFormat
(
false
)
{
{
localSize
[
0
]
=
1
;
localSize
[
0
]
=
1
;
...
@@ -422,13 +422,6 @@ protected:
...
@@ -422,13 +422,6 @@ protected:
EShSource
source
;
// source language, known a bit later
EShSource
source
;
// source language, known a bit later
std
::
string
entryPointName
;
std
::
string
entryPointName
;
std
::
string
entryPointMangledName
;
std
::
string
entryPointMangledName
;
unsigned
int
shiftSamplerBinding
;
unsigned
int
shiftTextureBinding
;
unsigned
int
shiftImageBinding
;
unsigned
int
shiftUboBinding
;
bool
autoMapBindings
;
bool
flattenUniformArrays
;
bool
useUnknownFormat
;
EProfile
profile
;
EProfile
profile
;
int
version
;
int
version
;
...
@@ -463,6 +456,14 @@ protected:
...
@@ -463,6 +456,14 @@ protected:
bool
geoPassthroughEXT
;
bool
geoPassthroughEXT
;
#endif
#endif
unsigned
int
shiftSamplerBinding
;
unsigned
int
shiftTextureBinding
;
unsigned
int
shiftImageBinding
;
unsigned
int
shiftUboBinding
;
bool
autoMapBindings
;
bool
flattenUniformArrays
;
bool
useUnknownFormat
;
typedef
std
::
list
<
TCall
>
TGraph
;
typedef
std
::
list
<
TCall
>
TGraph
;
TGraph
callGraph
;
TGraph
callGraph
;
...
...
glslang/MachineIndependent/preprocessor/PpContext.h
View file @
5d89d4d4
...
@@ -500,8 +500,8 @@ protected:
...
@@ -500,8 +500,8 @@ protected:
TPpContext
*
pp
)
TPpContext
*
pp
)
:
tInput
(
pp
),
:
tInput
(
pp
),
prologue_
(
prologue
),
prologue_
(
prologue
),
includedFile_
(
includedFile
),
epilogue_
(
epilogue
),
epilogue_
(
epilogue
),
includedFile_
(
includedFile
),
scanner
(
3
,
strings
,
lengths
,
names
,
0
,
0
,
true
),
scanner
(
3
,
strings
,
lengths
,
names
,
0
,
0
,
true
),
prevScanner
(
nullptr
),
prevScanner
(
nullptr
),
stringInput
(
pp
,
scanner
)
stringInput
(
pp
,
scanner
)
...
...
glslang/MachineIndependent/propagateNoContraction.cpp
View file @
5d89d4d4
...
@@ -272,9 +272,9 @@ TSymbolDefinitionCollectingTraverser::TSymbolDefinitionCollectingTraverser(
...
@@ -272,9 +272,9 @@ TSymbolDefinitionCollectingTraverser::TSymbolDefinitionCollectingTraverser(
ObjectAccesschainSet
*
precise_objects
,
ObjectAccesschainSet
*
precise_objects
,
std
::
unordered_set
<
glslang
::
TIntermBranch
*>*
precise_return_nodes
)
std
::
unordered_set
<
glslang
::
TIntermBranch
*>*
precise_return_nodes
)
:
TIntermTraverser
(
true
,
false
,
false
),
symbol_definition_mapping_
(
*
symbol_definition_mapping
),
:
TIntermTraverser
(
true
,
false
,
false
),
symbol_definition_mapping_
(
*
symbol_definition_mapping
),
precise_objects_
(
*
precise_objects
),
current_object_
(
),
precise_objects_
(
*
precise_objects
),
precise_return_nodes_
(
*
precise_return_nodes
),
accesschain_mapping_
(
*
accesschain_mapping
),
current_function_definition_node_
(
nullptr
),
current_object_
(),
accesschain_mapping_
(
*
accesschain_mapping
),
precise_return_nodes_
(
*
precise_return_nodes
)
{}
current_function_definition_node_
(
nullptr
)
{}
// Visits a symbol node, set the current_object_ to the
// Visits a symbol node, set the current_object_ to the
// current node symbol ID, and record a mapping from this node to the current
// current node symbol ID, and record a mapping from this node to the current
...
@@ -616,9 +616,9 @@ class TNoContractionPropagator : public glslang::TIntermTraverser {
...
@@ -616,9 +616,9 @@ class TNoContractionPropagator : public glslang::TIntermTraverser {
public
:
public
:
TNoContractionPropagator
(
ObjectAccesschainSet
*
precise_objects
,
TNoContractionPropagator
(
ObjectAccesschainSet
*
precise_objects
,
const
AccessChainMapping
&
accesschain_mapping
)
const
AccessChainMapping
&
accesschain_mapping
)
:
TIntermTraverser
(
true
,
false
,
false
),
remained_accesschain_
(),
:
TIntermTraverser
(
true
,
false
,
false
),
precise_objects_
(
*
precise_objects
),
a
ccesschain_mapping_
(
accesschain_mapping
),
precise_objects_
(
*
precise_objects
),
a
dded_precise_object_ids_
(
),
added_precise_object_ids_
(
)
{}
remained_accesschain_
(),
accesschain_mapping_
(
accesschain_mapping
)
{}
// Propagates 'precise' in the right nodes of a given assignment node with
// Propagates 'precise' in the right nodes of a given assignment node with
// access chain record from the assignee node to a 'precise' object it
// access chain record from the assignee node to a 'precise' object it
...
...
glslang/MachineIndependent/reflection.h
View file @
5d89d4d4
...
@@ -56,8 +56,8 @@ class TReflectionTraverser;
...
@@ -56,8 +56,8 @@ class TReflectionTraverser;
class
TObjectReflection
{
class
TObjectReflection
{
public
:
public
:
TObjectReflection
(
const
TString
&
pName
,
const
TType
&
pType
,
int
pOffset
,
int
pGLDefineType
,
int
pSize
,
int
pIndex
)
:
TObjectReflection
(
const
TString
&
pName
,
const
TType
&
pType
,
int
pOffset
,
int
pGLDefineType
,
int
pSize
,
int
pIndex
)
:
name
(
pName
),
type
(
pType
.
clone
()
),
name
(
pName
),
offset
(
pOffset
),
offset
(
pOffset
),
glDefineType
(
pGLDefineType
),
size
(
pSize
),
index
(
pIndex
)
{
}
glDefineType
(
pGLDefineType
),
size
(
pSize
),
index
(
pIndex
),
type
(
pType
.
clone
()
)
{
}
void
dump
()
const
{
void
dump
()
const
{
printf
(
"%s: offset %d, type %x, size %d, index %d, binding %d
\n
"
,
printf
(
"%s: offset %d, type %x, size %d, index %d, binding %d
\n
"
,
...
@@ -81,7 +81,7 @@ protected:
...
@@ -81,7 +81,7 @@ protected:
return
type
->
getQualifier
().
layoutBinding
;
return
type
->
getQualifier
().
layoutBinding
;
}
}
TObjectReflection
()
:
type
(
nullptr
),
offset
(
-
1
),
glDefineType
(
-
1
),
size
(
-
1
),
index
(
-
1
)
{
}
TObjectReflection
()
:
offset
(
-
1
),
glDefineType
(
-
1
),
size
(
-
1
),
index
(
-
1
),
type
(
nullptr
)
{
}
const
TType
*
type
;
const
TType
*
type
;
};
};
...
...
hlsl/hlslParseHelper.cpp
View file @
5d89d4d4
...
@@ -58,14 +58,14 @@ HlslParseContext::HlslParseContext(TSymbolTable& symbolTable, TIntermediate& int
...
@@ -58,14 +58,14 @@ HlslParseContext::HlslParseContext(TSymbolTable& symbolTable, TIntermediate& int
TParseContextBase
(
symbolTable
,
interm
,
parsingBuiltins
,
version
,
profile
,
spvVersion
,
language
,
infoSink
,
forwardCompatible
,
messages
),
TParseContextBase
(
symbolTable
,
interm
,
parsingBuiltins
,
version
,
profile
,
spvVersion
,
language
,
infoSink
,
forwardCompatible
,
messages
),
contextPragma
(
true
,
false
),
contextPragma
(
true
,
false
),
loopNestingLevel
(
0
),
annotationNestingLevel
(
0
),
structNestingLevel
(
0
),
controlFlowNestingLevel
(
0
),
loopNestingLevel
(
0
),
annotationNestingLevel
(
0
),
structNestingLevel
(
0
),
controlFlowNestingLevel
(
0
),
inEntryPoint
(
false
),
postEntryPointReturn
(
false
),
postEntryPointReturn
(
false
),
limits
(
resources
.
limits
),
limits
(
resources
.
limits
),
inEntryPoint
(
false
),
entryPointOutput
(
nullptr
),
entryPointOutput
(
nullptr
),
nextInLocation
(
0
),
nextOutLocation
(
0
),
sourceEntryPointName
(
sourceEntryPointName
),
builtInIoIndex
(
nullptr
),
builtInIoIndex
(
nullptr
),
builtInIoBase
(
nullptr
)
builtInIoBase
(
nullptr
),
nextInLocation
(
0
),
nextOutLocation
(
0
),
sourceEntryPointName
(
sourceEntryPointName
)
{
{
globalUniformDefaults
.
clear
();
globalUniformDefaults
.
clear
();
globalUniformDefaults
.
layoutMatrix
=
ElmRowMajor
;
globalUniformDefaults
.
layoutMatrix
=
ElmRowMajor
;
...
...
hlsl/hlslParseHelper.h
View file @
5d89d4d4
...
@@ -231,7 +231,7 @@ protected:
...
@@ -231,7 +231,7 @@ protected:
// Type sanitization: return existing sanitized (temporary) type if there is one, else make new one.
// Type sanitization: return existing sanitized (temporary) type if there is one, else make new one.
TType
*
sanitizeType
(
TType
*
);
TType
*
sanitizeType
(
TType
*
);
void
finish
();
// post-processing
void
finish
()
override
;
// post-processing
// Current state of parsing
// Current state of parsing
struct
TPragma
contextPragma
;
struct
TPragma
contextPragma
;
...
...
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