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
94599669
Commit
94599669
authored
Aug 30, 2013
by
Jamie Madill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ensure struct varyings maintain the proper interpolation qualifier for the child fields.
TRAC #23749 Signed-off-by: Geoff Lang Signed-off-by: Nicolas Capens
parent
86a97a1a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
OutputHLSL.cpp
src/compiler/OutputHLSL.cpp
+4
-4
OutputHLSL.h
src/compiler/OutputHLSL.h
+1
-1
No files found.
src/compiler/OutputHLSL.cpp
View file @
94599669
...
@@ -635,7 +635,7 @@ void OutputHLSL::header()
...
@@ -635,7 +635,7 @@ void OutputHLSL::header()
varyings
+=
"static "
+
interpolationString
(
type
.
getQualifier
())
+
" "
+
typeString
(
type
)
+
" "
+
varyings
+=
"static "
+
interpolationString
(
type
.
getQualifier
())
+
" "
+
typeString
(
type
)
+
" "
+
decorate
(
name
)
+
arrayString
(
type
)
+
" = "
+
initializer
(
type
)
+
";
\n
"
;
decorate
(
name
)
+
arrayString
(
type
)
+
" = "
+
initializer
(
type
)
+
";
\n
"
;
declareVaryingToList
(
type
,
name
,
mActiveVaryings
);
declareVaryingToList
(
type
,
type
.
getQualifier
(),
name
,
mActiveVaryings
);
}
}
for
(
ReferencedSymbols
::
const_iterator
attribute
=
mReferencedAttributes
.
begin
();
attribute
!=
mReferencedAttributes
.
end
();
attribute
++
)
for
(
ReferencedSymbols
::
const_iterator
attribute
=
mReferencedAttributes
.
begin
();
attribute
!=
mReferencedAttributes
.
end
();
attribute
++
)
...
@@ -3646,11 +3646,11 @@ InterpolationType getInterpolationType(TQualifier qualifier)
...
@@ -3646,11 +3646,11 @@ InterpolationType getInterpolationType(TQualifier qualifier)
}
}
}
}
void
OutputHLSL
::
declareVaryingToList
(
const
TType
&
type
,
const
TString
&
name
,
std
::
vector
<
Varying
>&
fieldsOut
)
void
OutputHLSL
::
declareVaryingToList
(
const
TType
&
type
,
TQualifier
baseTypeQualifier
,
const
TString
&
name
,
std
::
vector
<
Varying
>&
fieldsOut
)
{
{
const
TStructure
*
structure
=
type
.
getStruct
();
const
TStructure
*
structure
=
type
.
getStruct
();
InterpolationType
interpolation
=
getInterpolationType
(
type
.
getQualifier
()
);
InterpolationType
interpolation
=
getInterpolationType
(
baseTypeQualifier
);
if
(
!
structure
)
if
(
!
structure
)
{
{
Varying
varying
(
glVariableType
(
type
),
glVariablePrecision
(
type
),
name
.
c_str
(),
(
unsigned
int
)
type
.
getArraySize
(),
interpolation
);
Varying
varying
(
glVariableType
(
type
),
glVariablePrecision
(
type
),
name
.
c_str
(),
(
unsigned
int
)
type
.
getArraySize
(),
interpolation
);
...
@@ -3664,7 +3664,7 @@ void OutputHLSL::declareVaryingToList(const TType &type, const TString &name, st
...
@@ -3664,7 +3664,7 @@ void OutputHLSL::declareVaryingToList(const TType &type, const TString &name, st
for
(
size_t
fieldIndex
=
0
;
fieldIndex
<
fields
.
size
();
fieldIndex
++
)
for
(
size_t
fieldIndex
=
0
;
fieldIndex
<
fields
.
size
();
fieldIndex
++
)
{
{
const
TField
&
field
=
*
fields
[
fieldIndex
];
const
TField
&
field
=
*
fields
[
fieldIndex
];
declareVaryingToList
(
*
field
.
type
(),
field
.
name
(),
structVarying
.
fields
);
declareVaryingToList
(
*
field
.
type
(),
baseTypeQualifier
,
field
.
name
(),
structVarying
.
fields
);
}
}
fieldsOut
.
push_back
(
structVarying
);
fieldsOut
.
push_back
(
structVarying
);
...
...
src/compiler/OutputHLSL.h
View file @
94599669
...
@@ -180,7 +180,7 @@ class OutputHLSL : public TIntermTraverser
...
@@ -180,7 +180,7 @@ class OutputHLSL : public TIntermTraverser
void
declareInterfaceBlockField
(
const
TType
&
type
,
const
TString
&
name
,
std
::
vector
<
InterfaceBlockField
>&
output
);
void
declareInterfaceBlockField
(
const
TType
&
type
,
const
TString
&
name
,
std
::
vector
<
InterfaceBlockField
>&
output
);
Uniform
declareUniformToList
(
const
TType
&
type
,
const
TString
&
name
,
int
registerIndex
,
std
::
vector
<
Uniform
>&
output
);
Uniform
declareUniformToList
(
const
TType
&
type
,
const
TString
&
name
,
int
registerIndex
,
std
::
vector
<
Uniform
>&
output
);
void
declareUniform
(
const
TType
&
type
,
const
TString
&
name
,
int
index
);
void
declareUniform
(
const
TType
&
type
,
const
TString
&
name
,
int
index
);
void
declareVaryingToList
(
const
TType
&
type
,
const
TString
&
name
,
std
::
vector
<
Varying
>&
fieldsOut
);
void
declareVaryingToList
(
const
TType
&
type
,
TQualifier
baseTypeQualifier
,
const
TString
&
name
,
std
::
vector
<
Varying
>&
fieldsOut
);
// Returns the uniform's register index
// Returns the uniform's register index
int
declareUniformAndAssignRegister
(
const
TType
&
type
,
const
TString
&
name
);
int
declareUniformAndAssignRegister
(
const
TType
&
type
,
const
TString
&
name
);
...
...
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