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
28ad350b
Commit
28ad350b
authored
Jan 18, 2016
by
John Kessenich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Memory: remove a part of the last merge request that causes crashes in multi-threaded mode.
parent
3e9add36
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
10 deletions
+2
-10
intermediate.h
glslang/Include/intermediate.h
+1
-3
Intermediate.cpp
glslang/MachineIndependent/Intermediate.cpp
+1
-7
No files found.
glslang/Include/intermediate.h
View file @
28ad350b
...
@@ -847,9 +847,7 @@ class TIntermAggregate : public TIntermOperator {
...
@@ -847,9 +847,7 @@ class TIntermAggregate : public TIntermOperator {
public
:
public
:
TIntermAggregate
()
:
TIntermOperator
(
EOpNull
),
userDefined
(
false
),
pragmaTable
(
0
)
{
}
TIntermAggregate
()
:
TIntermOperator
(
EOpNull
),
userDefined
(
false
),
pragmaTable
(
0
)
{
}
TIntermAggregate
(
TOperator
o
)
:
TIntermOperator
(
o
),
pragmaTable
(
0
)
{
}
TIntermAggregate
(
TOperator
o
)
:
TIntermOperator
(
o
),
pragmaTable
(
0
)
{
}
// Since pragmaTable is allocated with the PoolAllocator, we
~
TIntermAggregate
()
{
delete
pragmaTable
;
}
// only want to destroy it, not free the associated memory.
~
TIntermAggregate
()
{
pragmaTable
->~
TPragmaTable
();
}
virtual
TIntermAggregate
*
getAsAggregate
()
{
return
this
;
}
virtual
TIntermAggregate
*
getAsAggregate
()
{
return
this
;
}
virtual
const
TIntermAggregate
*
getAsAggregate
()
const
{
return
this
;
}
virtual
const
TIntermAggregate
*
getAsAggregate
()
const
{
return
this
;
}
virtual
void
setOperator
(
TOperator
o
)
{
op
=
o
;
}
virtual
void
setOperator
(
TOperator
o
)
{
op
=
o
;
}
...
...
glslang/MachineIndependent/Intermediate.cpp
View file @
28ad350b
...
@@ -1613,13 +1613,7 @@ TIntermTyped* TIntermediate::promoteConstantUnion(TBasicType promoteTo, TIntermC
...
@@ -1613,13 +1613,7 @@ TIntermTyped* TIntermediate::promoteConstantUnion(TBasicType promoteTo, TIntermC
void
TIntermAggregate
::
addToPragmaTable
(
const
TPragmaTable
&
pTable
)
void
TIntermAggregate
::
addToPragmaTable
(
const
TPragmaTable
&
pTable
)
{
{
assert
(
!
pragmaTable
);
assert
(
!
pragmaTable
);
pragmaTable
=
new
TPragmaTable
();
// We allocate this with the thread-pool allocator because the destructors
// for TIntermNode's are never called. When TIntermNodes are no longer
// needed, the pool allocator destroys all memory at once without
// destruction.
void
*
memory
=
GetThreadPoolAllocator
().
allocate
(
sizeof
(
TPragmaTable
));
pragmaTable
=
new
(
memory
)
TPragmaTable
();
*
pragmaTable
=
pTable
;
*
pragmaTable
=
pTable
;
}
}
...
...
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