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
2b6008c9
Commit
2b6008c9
authored
Oct 08, 2013
by
Geoff Lang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge
36622943
from master.
Create a static translator project and allow the previous translator project to be used in component builds.
parent
7c697201
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
49 additions
and
43 deletions
+49
-43
samples.gyp
samples/samples.gyp
+2
-2
compiler.gypi
src/compiler.gypi
+35
-0
CodeGen.cpp
src/compiler/translator/CodeGen.cpp
+10
-6
CodeGenHLSL.cpp
src/compiler/translator/CodeGenHLSL.cpp
+0
-33
libGLESv2.gypi
src/libGLESv2.gypi
+1
-1
tests.gyp
tests/tests.gyp
+1
-1
No files found.
samples/samples.gyp
View file @
2b6008c9
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
{
{
'target_name': 'essl_to_glsl',
'target_name': 'essl_to_glsl',
'type': 'executable',
'type': 'executable',
'dependencies': [ '../src/angle.gyp:translator', ],
'dependencies': [ '../src/angle.gyp:translator
_static
', ],
'include_dirs': [ '../include', ],
'include_dirs': [ '../include', ],
'sources': [ '<!@(python enumerate_files.py translator -types *.cpp *.h)' ],
'sources': [ '<!@(python enumerate_files.py translator -types *.cpp *.h)' ],
},
},
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
{
{
'target_name': 'essl_to_hlsl',
'target_name': 'essl_to_hlsl',
'type': 'executable',
'type': 'executable',
'dependencies': [ '../src/angle.gyp:translator', ],
'dependencies': [ '../src/angle.gyp:translator
_static
', ],
'include_dirs':
'include_dirs':
[
[
'../include',
'../include',
...
...
src/compiler.gypi
View file @
2b6008c9
...
@@ -15,6 +15,34 @@
...
@@ -15,6 +15,34 @@
{
{
'target_name': 'translator',
'target_name': 'translator',
'type': '<(component)',
'dependencies': [ 'preprocessor' ],
'include_dirs':
[
'.',
'../include',
],
'defines':
[
'COMPILER_IMPLEMENTATION',
],
'sources': [ '<!@(python enumerate_files.py compiler/translator third_party/compiler common -types *.cpp *.h *.y *.l )', ],
'conditions':
[
['OS=="win"',
{
'msvs_disabled_warnings': [ 4267 ],
'sources/': [ [ 'exclude', 'compiler/translator/ossource_posix.cpp' ], ],
},
{ # else: posix
'sources/': [ [ 'exclude', 'compiler/translator/ossource_win.cpp' ], ],
}
],
],
},
{
'target_name': 'translator_static',
'type': 'static_library',
'type': 'static_library',
'dependencies': [ 'preprocessor' ],
'dependencies': [ 'preprocessor' ],
'include_dirs':
'include_dirs':
...
@@ -26,6 +54,13 @@
...
@@ -26,6 +54,13 @@
[
[
'COMPILER_IMPLEMENTATION',
'COMPILER_IMPLEMENTATION',
],
],
'direct_dependent_settings':
{
'defines':
[
'ANGLE_TRANSLATOR_STATIC',
],
},
'sources': [ '<!@(python enumerate_files.py compiler/translator third_party/compiler common -types *.cpp *.h *.y *.l )', ],
'sources': [ '<!@(python enumerate_files.py compiler/translator third_party/compiler common -types *.cpp *.h *.y *.l )', ],
'conditions':
'conditions':
[
[
...
...
src/compiler/translator/CodeGen
GLSL
.cpp
→
src/compiler/translator/CodeGen.cpp
View file @
2b6008c9
//
//
// Copyright (c) 20
02-2010
The ANGLE Project Authors. All rights reserved.
// Copyright (c) 20
13
The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// found in the LICENSE file.
//
//
#include "compiler/translator/TranslatorGLSL.h"
#include "compiler/translator/TranslatorESSL.h"
#include "compiler/translator/TranslatorESSL.h"
#include "compiler/translator/TranslatorGLSL.h"
#include "compiler/translator/TranslatorHLSL.h"
//
//
// This function must be provided to create the actual
// This function must be provided to create the actual
...
@@ -16,11 +17,14 @@ TCompiler* ConstructCompiler(
...
@@ -16,11 +17,14 @@ TCompiler* ConstructCompiler(
ShShaderType
type
,
ShShaderSpec
spec
,
ShShaderOutput
output
)
ShShaderType
type
,
ShShaderSpec
spec
,
ShShaderOutput
output
)
{
{
switch
(
output
)
{
switch
(
output
)
{
case
SH_GLSL_OUTPUT
:
case
SH_ESSL_OUTPUT
:
return
new
TranslatorGLSL
(
type
,
spec
);
case
SH_ESSL_OUTPUT
:
return
new
TranslatorESSL
(
type
,
spec
);
return
new
TranslatorESSL
(
type
,
spec
);
default:
case
SH_GLSL_OUTPUT
:
return
new
TranslatorGLSL
(
type
,
spec
);
case
SH_HLSL9_OUTPUT
:
case
SH_HLSL11_OUTPUT
:
return
new
TranslatorHLSL
(
type
,
spec
,
output
);
default:
return
NULL
;
return
NULL
;
}
}
}
}
...
...
src/compiler/translator/CodeGenHLSL.cpp
deleted
100644 → 0
View file @
7c697201
//
// Copyright (c) 2002-2013 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.
//
#include "compiler/translator/TranslatorHLSL.h"
//
// This function must be provided to create the actual
// compile object used by higher level code. It returns
// a subclass of TCompiler.
//
TCompiler
*
ConstructCompiler
(
ShShaderType
type
,
ShShaderSpec
spec
,
ShShaderOutput
output
)
{
switch
(
output
)
{
case
SH_HLSL9_OUTPUT
:
case
SH_HLSL11_OUTPUT
:
return
new
TranslatorHLSL
(
type
,
spec
,
output
);
default:
return
NULL
;
}
}
//
// Delete the compiler made by ConstructCompiler
//
void
DeleteCompiler
(
TCompiler
*
compiler
)
{
delete
compiler
;
}
src/libGLESv2.gypi
View file @
2b6008c9
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
{
{
'target_name': 'libGLESv2',
'target_name': 'libGLESv2',
'type': 'shared_library',
'type': 'shared_library',
'dependencies': [ 'translator' ],
'dependencies': [ 'translator
_static
' ],
'include_dirs':
'include_dirs':
[
[
'.',
'.',
...
...
tests/tests.gyp
View file @
2b6008c9
...
@@ -61,7 +61,7 @@
...
@@ -61,7 +61,7 @@
'type': 'executable',
'type': 'executable',
'dependencies':
'dependencies':
[
[
'../src/angle.gyp:translator',
'../src/angle.gyp:translator
_static
',
'gtest',
'gtest',
'gmock',
'gmock',
],
],
...
...
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