diff options
207 files changed, 10587 insertions, 10291 deletions
diff --git a/.gclient b/.gclient new file mode 100644 index 00000000..77bf7d28 --- /dev/null +++ b/.gclient @@ -0,0 +1,7 @@ +solutions = [ { + u'managed': False, + u'name': u'.', + u'url': u'https://chromium.googlesource.com/angle/angle', + u'custom_deps': { }, + u'deps_file': u'DEPS' +} ]
\ No newline at end of file diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..82531ad8 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,7 @@ +* text=auto +*.sln eol=crlf +*.vcxproj eol=crlf +*.vcxproj.filters eol=crlf +*.bat eol=crlf +*.rc eol=crlf +**/compiled/*.h eol=crlf @@ -13,3 +13,7 @@ debug.txt *.orig *.rej +# Files generated by gyp +src/build_angle.sln +src/*.vcxproj +src/*.vcxproj.filters @@ -13,6 +13,7 @@ TransGaming Inc. Adobe Systems Inc. Autodesk, Inc. +BlackBerry Limited Cloud Party, Inc. Intel Corporation Mozilla Corporation diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 00ebe7cf..fcb63152 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -1,76 +1,77 @@ -# This is the official list of people who can contribute
-# (and who have contributed) code to the ANGLE project
-# repository.
-# The AUTHORS file lists the copyright holders; this file
-# lists people. For example, Google employees are listed here
-# but not in AUTHORS, because Google holds the copyright.
-#
-
-TransGaming Inc.
- Nicolas Capens
- Daniel Koch
- Geoff Lang
- Andrew Lewycky
- Jamie Madill
- Gavriel State
- Shannon Woods
-
-Google Inc.
- Brent Austin
- Michael Bai
- John Bauman
- Peter Beverloo
- Steve Block
- Rachel Blum
- Eric Boren
- Henry Bridge
- Nat Duca
- Peter Kasting
- Vangelis Kokkevis
- Zhenyao Mo
- Daniel Nicoara
- Alastair Patrick
- Alok Priyadarshi
- Kenneth Russell
- Brian Salomon
- Gregg Tavares
- Jeff Timanus
- Ben Vanik
- Adrienne Walker
- thestig@chromium.org
- Justin Schuh
-
-Adobe Systems Inc.
- Alexandru Chiculita
- Steve Minns
- Max Vujovic
-
-Autodesk, Inc.
- Ranger Harke
-
-Cloud Party, Inc.
- Conor Dickinson
-
-Intel Corporation
- Jin Yang
- Andy Chen
- Josh Triplett
-
-Klarälvdalens Datakonsult AB
- Milian Wolff
-
-Mozilla Corp.
- Ehsan Akhgari
- Jeff Gilbert
- Mike Hommey
- Benoit Jacob
- Makoto Kato
- Vladimir Vukicevic
-
-Turbulenz
- Michael Braithwaite
-
-Ulrik Persson (ddefrostt)
-Mark Banner (standard8mbp)
-David Kilzer
-
+# This is the official list of people who can contribute +# (and who have contributed) code to the ANGLE project +# repository. +# The AUTHORS file lists the copyright holders; this file +# lists people. For example, Google employees are listed here +# but not in AUTHORS, because Google holds the copyright. +# + +TransGaming Inc. + Nicolas Capens + Daniel Koch + Geoff Lang + Andrew Lewycky + Jamie Madill + Gavriel State + Shannon Woods + +Google Inc. + Brent Austin + Michael Bai + John Bauman + Peter Beverloo + Steve Block + Rachel Blum + Eric Boren + Henry Bridge + Nat Duca + Peter Kasting + Vangelis Kokkevis + Zhenyao Mo + Daniel Nicoara + Alastair Patrick + Alok Priyadarshi + Kenneth Russell + Brian Salomon + Gregg Tavares + Jeff Timanus + Ben Vanik + Adrienne Walker + thestig@chromium.org + Justin Schuh + Scott Graham + +Adobe Systems Inc. + Alexandru Chiculita + Steve Minns + Max Vujovic + +Autodesk, Inc. + Ranger Harke + +Cloud Party, Inc. + Conor Dickinson + +Intel Corporation + Jin Yang + Andy Chen + Josh Triplett + +Klarälvdalens Datakonsult AB + Milian Wolff + +Mozilla Corp. + Ehsan Akhgari + Jeff Gilbert + Mike Hommey + Benoit Jacob + Makoto Kato + Vladimir Vukicevic + +Turbulenz + Michael Braithwaite + +Ulrik Persson (ddefrostt) +Mark Banner (standard8mbp) +David Kilzer + @@ -1,18 +1,18 @@ deps = { - "trunk/third_party/gyp": - "http://gyp.googlecode.com/svn/trunk@1564", + "third_party/gyp": + "http://gyp.googlecode.com/svn/trunk@1767", - "trunk/third_party/googletest": - "http://googletest.googlecode.com/svn/trunk@573", #release 1.6.0 + "third_party/googletest": + "http://googletest.googlecode.com/svn/trunk@629", - "trunk/third_party/googlemock": - "http://googlemock.googlecode.com/svn/trunk@387", #release 1.6.0 + "third_party/googlemock": + "http://googlemock.googlecode.com/svn/trunk@410", } hooks = [ { # A change to a .gyp, .gypi, or to GYP itself should run the generator. "pattern": ".", - "action": ["python", "trunk/build/gyp_angle"], + "action": ["python", "build/gyp_angle"], }, ] diff --git a/build/common.gypi b/build/common.gypi index fc9f2951..1c48170e 100644 --- a/build/common.gypi +++ b/build/common.gypi @@ -9,6 +9,8 @@ # angle_code is set to 0 for test code, sample code, and third party code. # When angle_code is 1, we build with additional warning flags on Mac and Linux. 'angle_code%': 0, + 'windows_sdk_path%': 'C:/Program Files (x86)/Windows Kits/8.0', + 'winsdk_arch%': 'x86', 'gcc_or_clang_warnings': [ '-Wall', '-Wchar-subscripts', @@ -59,6 +61,7 @@ 'MinimalRebuild': 'false', 'PreprocessorDefinitions': [ '_CRT_SECURE_NO_DEPRECATE', + '_SCL_SECURE_NO_DEPRECATE', '_HAS_EXCEPTIONS=0', '_WIN32_WINNT=0x0600', '_WINDOWS', @@ -80,12 +83,27 @@ # and utilities with console output. 'SubSystem': '1', # /SUBSYSTEM:CONSOLE 'AdditionalLibraryDirectories': [ - '$(ProgramFiles)/Windows Kits/8.0/Lib/win8/um/x86', + '<(windows_sdk_path)/Lib/win8/um/<(winsdk_arch)', + ], + 'AdditionalDependencies': [ + 'kernel32.lib', + 'gdi32.lib', + 'winspool.lib', + 'comdlg32.lib', + 'advapi32.lib', + 'shell32.lib', + 'ole32.lib', + 'oleaut32.lib', + 'user32.lib', + 'uuid.lib', + 'odbc32.lib', + 'odbccp32.lib', + 'delayimp.lib', ], }, 'VCLibrarianTool': { 'AdditionalLibraryDirectories': [ - '$(ProgramFiles)/Windows Kits/8.0/Lib/win8/um/x86', + '<(windows_sdk_path)/Lib/win8/um/<(winsdk_arch)', ], }, 'VCResourceCompilerTool': { @@ -93,8 +111,8 @@ }, }, 'msvs_system_include_dirs': [ - '$(ProgramFiles)/Windows Kits/8.0/Include/shared', - '$(ProgramFiles)/Windows Kits/8.0/Include/um', + '<(windows_sdk_path)/Include/shared', + '<(windows_sdk_path)/Include/um', ], }, # Common 'Debug': { diff --git a/build/gyp_angle b/build/gyp_angle index 2aa38a52..6533d367 100644 --- a/build/gyp_angle +++ b/build/gyp_angle @@ -25,7 +25,7 @@ if __name__ == '__main__': # Set the depth to get the top-level Makefile generated into the # correct directory. This only has an effect on Linux. args.append('--depth'); - args.append('./trunk'); + args.append('.'); # Add common.gypi to the include path. args.append('-I' + os.path.join(script_dir, 'common.gypi')) # Add all.gyp as the main gyp file to be generated. diff --git a/codereview.settings b/codereview.settings index de224f34..6b8615de 100644 --- a/codereview.settings +++ b/codereview.settings @@ -1,4 +1,4 @@ -# This file is used by gcl to get repository specific information.
-CODE_REVIEW_SERVER: codereview.appspot.com
-CC_LIST: angleproject-review@googlegroups.com
-VIEW_VC: http://code.google.com/p/angleproject/source/detail?r=
+# This file is used by gcl to get repository specific information. +CODE_REVIEW_SERVER: codereview.appspot.com +CC_LIST: angleproject-review@googlegroups.com +VIEW_VC: http://code.google.com/p/angleproject/source/detail?r= diff --git a/extensions/ANGLE_timer_query.txt b/extensions/ANGLE_timer_query.txt index 3cc38582..c1371ad8 100644 --- a/extensions/ANGLE_timer_query.txt +++ b/extensions/ANGLE_timer_query.txt @@ -1,591 +1,591 @@ -Name
-
- ANGLE_timer_query
-
-Name Strings
-
- GL_ANGLE_timer_query
-
-Contributors
-
- Contributors to ARB_occlusion_query
- Contributors to EXT_timer_query
- Contributors to ARB_timer_query
- Ben Vanik, Google Inc.
- Daniel Koch, TransGaming Inc.
-
-Contact
-
- Ben Vanik, Google Inc. (benvanik 'at' google 'dot' com)
-
-Status
-
- Draft
-
-Version
-
- Last Modified Date: Apr 28, 2011
- Author Revision: 1
-
-Number
-
- OpenGL ES Extension #??
-
-Dependencies
-
- OpenGL ES 2.0 is required.
-
- The extension is written against the OpenGL ES 2.0 specification.
-
-Overview
-
- Applications can benefit from accurate timing information in a number of
- different ways. During application development, timing information can
- help identify application or driver bottlenecks. At run time,
- applications can use timing information to dynamically adjust the amount
- of detail in a scene to achieve constant frame rates. OpenGL
- implementations have historically provided little to no useful timing
- information. Applications can get some idea of timing by reading timers
- on the CPU, but these timers are not synchronized with the graphics
- rendering pipeline. Reading a CPU timer does not guarantee the completion
- of a potentially large amount of graphics work accumulated before the
- timer is read, and will thus produce wildly inaccurate results.
- glFinish() can be used to determine when previous rendering commands have
- been completed, but will idle the graphics pipeline and adversely affect
- application performance.
-
- This extension provides a query mechanism that can be used to determine
- the amount of time it takes to fully complete a set of GL commands, and
- without stalling the rendering pipeline. It uses the query object
- mechanisms first introduced in the occlusion query extension, which allow
- time intervals to be polled asynchronously by the application.
-
-IP Status
-
- No known IP claims.
-
-New Procedures and Functions
-
- void GenQueriesANGLE(sizei n, uint *ids);
- void DeleteQueriesANGLE(sizei n, const uint *ids);
- boolean IsQueryANGLE(uint id);
- void BeginQueryANGLE(enum target, uint id);
- void EndQueryANGLE(enum target);
- void QueryCounterANGLE(uint id, enum target);
- void GetQueryivANGLE(enum target, enum pname, int *params);
- void GetQueryObjectivANGLE(uint id, enum pname, int *params);
- void GetQueryObjectuivANGLE(uint id, enum pname, uint *params);
- void GetQueryObjecti64vANGLE(uint id, enum pname, int64 *params);
- void GetQueryObjectui64vANGLE(uint id, enum pname, uint64 *params);
-
-New Tokens
-
- Accepted by the <pname> parameter of GetQueryivANGLE:
-
- QUERY_COUNTER_BITS_ANGLE 0x8864
- CURRENT_QUERY_ANGLE 0x8865
-
- Accepted by the <pname> parameter of GetQueryObjectivANGLE,
- GetQueryObjectuivANGLE, GetQueryObjecti64vANGLE, and
- GetQueryObjectui64vANGLE:
-
- QUERY_RESULT_ANGLE 0x8866
- QUERY_RESULT_AVAILABLE_ANGLE 0x8867
-
- Accepted by the <target> parameter of BeginQueryANGLE, EndQueryANGLE, and
- GetQueryivANGLE:
-
- TIME_ELAPSED_ANGLE 0x88BF
-
- Accepted by the <target> parameter of GetQueryivANGLE and
- QueryCounterANGLE:
-
- TIMESTAMP_ANGLE 0x8E28
-
-Additions to Chapter 2 of the OpenGL ES 2.0 Specification (OpenGL ES Operation)
-
- (Modify table 2.1, Correspondence of command suffix letters to GL argument)
- Add two new types:
-
- Letter Corresponding GL Type
- ------ ---------------------
- i64 int64ANGLE
- ui64 uint64ANGLE
-
- (Modify table 2.2, GL data types) Add two new types:
-
- GL Type Minimum Bit Width Description
- ------- ----------------- -----------------------------
- int64ANGLE 64 Signed 2's complement integer
- uint64ANGLE 64 Unsigned binary integer
-
-Additions to Chapter 5 of the OpenGL ES 2.0 Specification (Special Functions)
-
- Add a new section 5.3 "Timer Queries":
-
- "5.3 Timer Queries
-
- Timer queries use query objects to track the amount of time needed to
- fully complete a set of GL commands, or to determine the current time
- of the GL.
-
- Timer queries are associated with query objects. The command
-
- void GenQueriesANGLE(sizei n, uint *ids);
-
- returns <n> previously unused query object names in <ids>. These
- names are marked as used, but no object is associated with them until
- the first time they are used by BeginQueryANGLE. Query objects contain
- one piece of state, an integer result value. This result value is
- initialized to zero when the object is created. Any positive integer
- except for zero (which is reserved for the GL) is a valid query
- object name.
-
- Query objects are deleted by calling
-
- void DeleteQueriesANGLE(sizei n, const uint *ids);
-
- <ids> contains <n> names of query objects to be deleted. After a
- query object is deleted, its name is again unused. Unused names in
- <ids> are silently ignored.
- If an active query object is deleted its name immediately becomes unused,
- but the underlying object is not deleted until it is no longer active.
-
- A timer query can be started and finished by calling
-
- void BeginQueryANGLE(enum target, uint id);
- void EndQueryANGLE(enum target);
-
- where <target> is TIME_ELAPSED_ANGLE. If BeginQueryANGLE is called
- with an unused <id>, that name is marked as used and associated with
- a new query object.
-
- If BeginQueryANGLE is called with an <id> of zero, if the active query
- object name for <target> is non-zero, if <id> is the name of an existing
- query object whose type does not match <target>, or if <id> is the active
- query object name for any query type, the error INVALID_OPERATION is
- generated. If EndQueryANGLE is called while no query with the same target
- is in progress, an INVALID_OPERATION error is generated.
-
- When BeginQueryANGLE and EndQueryANGLE are called with a <target> of
- TIME_ELAPSED_ANGLE, the GL prepares to start and stop the timer used for
- timer queries. The timer is started or stopped when the effects from all
- previous commands on the GL client and server state and the framebuffer
- have been fully realized. The BeginQueryANGLE and EndQueryANGLE commands
- may return before the timer is actually started or stopped. When the timer
- query timer is finally stopped, the elapsed time (in nanoseconds) is
- written to the corresponding query object as the query result value, and
- the query result for that object is marked as available.
-
- If the elapsed time overflows the number of bits, <n>, available to hold
- elapsed time, its value becomes undefined. It is recommended, but not
- required, that implementations handle this overflow case by saturating at
- 2^n - 1.
-
- The necessary state is a single bit indicating whether an timer
- query is active, the identifier of the currently active timer
- query, and a counter keeping track of the time that has passed.
-
- When the command
-
- void QueryCounterANGLE(uint id, enum target);
-
- is called with <target> TIMESTAMP_ANGLE, the GL records the current time
- into the corresponding query object. The time is recorded after all
- previous commands on the GL client and server state and the framebuffer
- have been fully realized. When the time is recorded, the query result for
- that object is marked available. QueryCounterANGLE timer queries can be
- used within a BeginQueryANGLE / EndQueryANGLE block where the <target> is
- TIME_ELAPSED_ANGLE and it does not affect the result of that query object.
- The error INVALID_OPERATION is generated if the <id> is already in use
- within a BeginQueryANGLE/EndQueryANGLE block."
-
-Additions to Chapter 6 of the OpenGL ES 2.0 Specification (State and State
-Requests)
-
- Add a new section 6.1.9 "Timer Queries":
-
- "The command
-
- boolean IsQueryANGLE(uint id);
-
- returns TRUE if <id> is the name of a query object. If <id> is zero,
- or if <id> is a non-zero value that is not the name of a query
- object, IsQueryANGLE returns FALSE.
-
- Information about a query target can be queried with the command
-
- void GetQueryivANGLE(enum target, enum pname, int *params);
-
- <target> identifies the query target and can be TIME_ELAPSED_ANGLE or
- TIMESTAMP_ANGLE for timer queries.
-
- If <pname> is CURRENT_QUERY_ANGLE, the name of the currently active query
- for <target>, or zero if no query is active, will be placed in <params>.
-
- If <pname> is QUERY_COUNTER_BITS_ANGLE, the implementation-dependent number
- of bits used to hold the query result for <target> will be placed in
- <params>. The number of query counter bits may be zero, in which case
- the counter contains no useful information.
-
- For timer queries (TIME_ELAPSED_ANGLE and TIMESTAMP_ANGLE), if the number
- of bits is non-zero, the minimum number of bits allowed is 30 which
- will allow at least 1 second of timing.
-
- The state of a query object can be queried with the commands
-
- void GetQueryObjectivANGLE(uint id, enum pname, int *params);
- void GetQueryObjectuivANGLE(uint id, enum pname, uint *params);
- void GetQueryObjecti64vANGLE(uint id, enum pname, int64 *params);
- void GetQueryObjectui64vANGLE(uint id, enum pname, uint64 *params);
-
- If <id> is not the name of a query object, or if the query object
- named by <id> is currently active, then an INVALID_OPERATION error is
- generated.
-
- If <pname> is QUERY_RESULT_ANGLE, then the query object's result
- value is returned as a single integer in <params>. If the value is so
- large in magnitude that it cannot be represented with the requested type,
- then the nearest value representable using the requested type is
- returned. If the number of query counter bits for target is zero, then
- the result is returned as a single integer with the value zero.
-
- There may be an indeterminate delay before the above query returns. If
- <pname> is QUERY_RESULT_AVAILABLE_ANGLE, FALSE is returned if such a delay
- would be required; otherwise TRUE is returned. It must always be true
- that if any query object returns a result available of TRUE, all queries
- of the same type issued prior to that query must also return TRUE.
-
- Querying the state for a given timer query forces that timer query to
- complete within a finite amount of time.
-
- If multiple queries are issued on the same target and id prior to
- calling GetQueryObject[u]i[64]vANGLE, the result returned will always be
- from the last query issued. The results from any queries before the
- last one will be lost if the results are not retrieved before starting
- a new query on the same <target> and <id>."
-
-Errors
-
- The error INVALID_VALUE is generated if GenQueriesANGLE is called where
- <n> is negative.
-
- The error INVALID_VALUE is generated if DeleteQueriesANGLE is called
- where <n> is negative.
-
- The error INVALID_OPERATION is generated if BeginQueryANGLE is called
- when a query of the given <target> is already active.
-
- The error INVALID_OPERATION is generated if EndQueryANGLE is called
- when a query of the given <target> is not active.
-
- The error INVALID_OPERATION is generated if BeginQueryANGLE is called
- where <id> is zero.
-
- The error INVALID_OPERATION is generated if BeginQueryANGLE is called
- where <id> is the name of a query currently in progress.
-
- The error INVALID_OPERATION is generated if BeginQueryANGLE is called
- where <id> is the name of an existing query object whose type does not
- match <target>.
-
- The error INVALID_ENUM is generated if BeginQueryANGLE or EndQueryANGLE
- is called where <target> is not TIME_ELAPSED_ANGLE.
-
- The error INVALID_ENUM is generated if GetQueryivANGLE is called where
- <target> is not TIME_ELAPSED_ANGLE or TIMESTAMP_ANGLE.
-
- The error INVALID_ENUM is generated if GetQueryivANGLE is called where
- <pname> is not QUERY_COUNTER_BITS_ANGLE or CURRENT_QUERY_ANGLE.
-
- The error INVALID_ENUM is generated if QueryCounterANGLE is called where
- <target> is not TIMESTAMP_ANGLE.
-
- The error INVALID_OPERATION is generated if QueryCounterANGLE is called
- on a query object that is already in use inside a
- BeginQueryANGLE/EndQueryANGLE.
-
- The error INVALID_OPERATION is generated if GetQueryObjectivANGLE,
- GetQueryObjectuivANGLE, GetQueryObjecti64vANGLE, or
- GetQueryObjectui64vANGLE is called where <id> is not the name of a query
- object.
-
- The error INVALID_OPERATION is generated if GetQueryObjectivANGLE,
- GetQueryObjectuivANGLE, GetQueryObjecti64vANGLE, or
- GetQueryObjectui64vANGLE is called where <id> is the name of a currently
- active query object.
-
- The error INVALID_ENUM is generated if GetQueryObjectivANGLE,
- GetQueryObjectuivANGLE, GetQueryObjecti64vANGLE, or
- GetQueryObjectui64vANGLE is called where <pname> is not
- QUERY_RESULT_ANGLE or QUERY_RESULT_AVAILABLE_ANGLE.
-
-New State
-
- (Add a new table 6.xx, "Query Operations")
-
- Get Value Type Get Command Initial Value Description Sec
- --------- ---- ----------- ------------- ----------- ------
- - B - FALSE query active 5.3
- CURRENT_QUERY_ANGLE Z+ GetQueryivANGLE 0 active query ID 5.3
- QUERY_RESULT_ANGLE Z+ GetQueryObjectuivANGLE, 0 samples-passed count 5.3
- GetQueryObjectui64vANGLE
- QUERY_RESULT_AVAILABLE_ANGLE B GetQueryObjectivANGLE FALSE query result available 5.3
-
-New Implementation Dependent State
-
- (Add the following entry to table 6.18):
-
- Get Value Type Get Command Minimum Value Description Sec
- -------------------------- ---- ----------- ------------- ---------------- ------
- QUERY_COUNTER_BITS_ANGLE Z+ GetQueryivANGLE see 6.1.9 Number of bits in 6.1.9
- query counter
-
-Examples
-
- (1) Here is some rough sample code that demonstrates the intended usage
- of this extension.
-
- GLint queries[N];
- GLint available = 0;
- // timer queries can contain more than 32 bits of data, so always
- // query them using the 64 bit types to avoid overflow
- GLuint64ANGLE timeElapsed = 0;
-
- // Create a query object.
- glGenQueriesANGLE(N, queries);
-
- // Start query 1
- glBeginQueryANGLE(GL_TIME_ELAPSED_ANGLE, queries[0]);
-
- // Draw object 1
- ....
-
- // End query 1
- glEndQueryANGLE(GL_TIME_ELAPSED_ANGLE);
-
- ...
-
- // Start query N
- glBeginQueryANGLE(GL_TIME_ELAPSED_ANGLE, queries[N-1]);
-
- // Draw object N
- ....
-
- // End query N
- glEndQueryANGLE(GL_TIME_ELAPSED_ANGLE);
-
- // Wait for all results to become available
- while (!available) {
- glGetQueryObjectivANGLE(queries[N-1], GL_QUERY_RESULT_AVAILABLE_ANGLE, &available);
- }
-
- for (i = 0; i < N; i++) {
- // See how much time the rendering of object i took in nanoseconds.
- glGetQueryObjectui64vANGLE(queries[i], GL_QUERY_RESULT_ANGLE, &timeElapsed);
-
- // Do something useful with the time. Note that care should be
- // taken to use all significant bits of the result, not just the
- // least significant 32 bits.
- AdjustObjectLODBasedOnDrawTime(i, timeElapsed);
- }
-
- This example is sub-optimal in that it stalls at the end of every
- frame to wait for query results. Ideally, the collection of results
- would be delayed one frame to minimize the amount of time spent
- waiting for the GPU to finish rendering.
-
- (2) This example is basically the same as the example above but uses
- QueryCounter instead.
-
- GLint queries[N+1];
- GLint available = 0;
- // timer queries can contain more than 32 bits of data, so always
- // query them using the 64 bit types to avoid overflow
- GLuint64ANGLE timeStart, timeEnd, timeElapsed = 0;
-
- // Create a query object.
- glGenQueriesANGLE(N+1, queries);
-
- // Query current timestamp 1
- glQueryCounterANGLE(queries[0], GL_TIMESTAMP_ANGLE);
-
- // Draw object 1
- ....
-
- // Query current timestamp N
- glQueryCounterANGLE(queries[N-1], GL_TIMESTAMP_ANGLE);
-
- // Draw object N
- ....
-
- // Query current timestamp N+1
- glQueryCounterANGLE(queries[N], GL_TIMESTAMP_ANGLE);
-
- // Wait for all results to become available
- while (!available) {
- glGetQueryObjectivANGLE(queries[N], GL_QUERY_RESULT_AVAILABLE_ANGLE, &available);
- }
-
- for (i = 0; i < N; i++) {
- // See how much time the rendering of object i took in nanoseconds.
- glGetQueryObjectui64vANGLE(queries[i], GL_QUERY_RESULT_ANGLE, &timeStart);
- glGetQueryObjectui64vANGLE(queries[i+1], GL_QUERY_RESULT_ANGLE, &timeEnd);
- timeElapsed = timeEnd - timeStart;
-
- // Do something useful with the time. Note that care should be
- // taken to use all significant bits of the result, not just the
- // least significant 32 bits.
- AdjustObjectLODBasedOnDrawTime(i, timeElapsed);
- }
-
-Issues from EXT_timer_query
-
- (1) What time interval is being measured?
-
- RESOLVED: The timer starts when all commands prior to BeginQuery() have
- been fully executed. At that point, everything that should be drawn by
- those commands has been written to the framebuffer. The timer stops
- when all commands prior to EndQuery() have been fully executed.
-
- (2) What unit of time will time intervals be returned in?
-
- RESOLVED: Nanoseconds (10^-9 seconds). This unit of measurement allows
- for reasonably accurate timing of even small blocks of rendering
- commands. The granularity of the timer is implementation-dependent. A
- 32-bit query counter can express intervals of up to approximately 4
- seconds.
-
- (3) What should be the minimum number of counter bits for timer queries?
-
- RESOLVED: 30 bits, which will allow timing sections that take up to 1
- second to render.
-
- (4) How are counter results of more than 32 bits returned?
-
- RESOLVED: Via two new datatypes, int64ANGLE and uint64ANGLE, and their
- corresponding GetQueryObject entry points. These types hold integer
- values and have a minimum bit width of 64.
-
- (5) Should the extension measure total time elapsed between the full
- completion of the BeginQuery and EndQuery commands, or just time
- spent in the graphics library?
-
- RESOLVED: This extension will measure the total time elapsed between
- the full completion of these commands. Future extensions may implement
- a query to determine time elapsed at different stages of the graphics
- pipeline.
-
- (6) If multiple query types are supported, can multiple query types be
- active simultaneously?
-
- RESOLVED: Yes; an application may perform a timer query and another
- type of query simultaneously. An application can not perform multiple
- timer queries or multiple queries of other types simultaneously. An
- application also can not use the same query object for another query
- and a timer query simultaneously.
-
- (7) Do query objects have a query type permanently associated with them?
-
- RESOLVED: No. A single query object can be used to perform different
- types of queries, but not at the same time.
-
- Having a fixed type for each query object simplifies some aspects of the
- implementation -- not having to deal with queries with different result
- sizes, for example. It would also mean that BeginQuery() with a query
- object of the "wrong" type would result in an INVALID_OPERATION error.
-
- UPDATE: This resolution was relevant for EXT_timer_query and OpenGL 2.0.
- Since EXT_transform_feedback has since been incorporated into the core,
- the resolution is that BeginQuery will generate error INVALID_OPERATION
- if <id> represents a query object of a different type.
-
- (8) How predictable/repeatable are the results returned by the timer
- query?
-
- RESOLVED: In general, the amount of time needed to render the same
- primitives should be fairly constant. But there may be many other
- system issues (e.g., context switching on the CPU and GPU, virtual
- memory page faults, memory cache behavior on the CPU and GPU) that can
- cause times to vary wildly.
-
- Note that modern GPUs are generally highly pipelined, and may be
- processing different primitives in different pipeline stages
- simultaneously. In this extension, the timers start and stop when the
- BeginQuery/EndQuery commands reach the bottom of the rendering pipeline.
- What that means is that by the time the timer starts, the GL driver on
- the CPU may have started work on GL commands issued after BeginQuery,
- and the higher pipeline stages (e.g., vertex transformation) may have
- started as well.
-
- (9) What should the new 64 bit integer type be called?
-
- RESOLVED: The new types will be called GLint64ANGLE/GLuint64ANGLE. The new
- command suffixes will be i64 and ui64. These names clearly convey the
- minimum size of the types. These types are similar to the C99 standard
- type int_least64_t, but we use names similar to the C99 optional type
- int64_t for simplicity.
-
-Issues from ARB_timer_query
-
- (10) What about tile-based implementations? The effects of a command are
- not complete until the frame is completely rendered. Timing recorded
- before the frame is complete may not be what developers expect. Also
- the amount of time needed to render the same primitives is not
- consistent, which conflicts with issue (8) above. The time depends on
- how early or late in the scene it is placed.
-
- RESOLVED: The current language supports tile-based rendering okay as it
- is written. Developers are warned that using timers on tile-based
- implementation may not produce results they expect since rendering is not
- done in a linear order. Timing results are calculated when the frame is
- completed and may depend on how early or late in the scene it is placed.
-
- (11) Can the GL implementation use different clocks to implement the
- TIME_ELAPSED and TIMESTAMP queries?
-
- RESOLVED: Yes, the implemenation can use different internal clocks to
- implement TIME_ELAPSED and TIMESTAMP. If different clocks are
- used it is possible there is a slight discrepancy when comparing queries
- made from TIME_ELAPSED and TIMESTAMP; they may have slight
- differences when both are used to measure the same sequence. However, this
- is unlikely to affect real applications since comparing the two queries is
- not expected to be useful.
-
-Issues
-
- (12) What should we call this extension?
-
- RESOLVED: ANGLE_timer_query
-
- (13) Why is this done as a separate extension instead of just supporting
- ARB_timer_query?
-
- ARB_timer_query is written against OpenGL 3.2, which includes a lot of
- the required support for dealing with query objects. None of these
- functions or tokens exist in OpenGL ES, and as such have to be added in
- this specification.
-
- (14) How does this extension differ from ARB_timer_query?
-
- This extension contains most ARB_timer_query behavior unchanged as well
- as a subset of the query support required to use it from the core
- OpenGL 3.2 spec. It omits the glGetInteger(TIMESTAMP) functionality used to
- query the current time on the GPU, but the behavior for all remaining
- functionality taken from ARB_timer_query is the same.
-
- (15) Are query objects shareable between multiple contexts?
-
- RESOLVED: No. Query objects are lightweight and we normally share
- large data across contexts. Also, being able to share query objects
- across contexts is not particularly useful. In order to do the async
- query across contexts, a query on one context would have to be finished
- before the other context could query it.
-
-Revision History
-
- Revision 1, 2011/04/28
- - copied from revision 9 of ARB_timer_query and revision 7 of
- ARB_occlusion_query
- - removed language that was clearly not relevant to ES2
- - rebased changes against the OpenGL ES 2.0 specification
+Name + + ANGLE_timer_query + +Name Strings + + GL_ANGLE_timer_query + +Contributors + + Contributors to ARB_occlusion_query + Contributors to EXT_timer_query + Contributors to ARB_timer_query + Ben Vanik, Google Inc. + Daniel Koch, TransGaming Inc. + +Contact + + Ben Vanik, Google Inc. (benvanik 'at' google 'dot' com) + +Status + + Draft + +Version + + Last Modified Date: Apr 28, 2011 + Author Revision: 1 + +Number + + OpenGL ES Extension #?? + +Dependencies + + OpenGL ES 2.0 is required. + + The extension is written against the OpenGL ES 2.0 specification. + +Overview + + Applications can benefit from accurate timing information in a number of + different ways. During application development, timing information can + help identify application or driver bottlenecks. At run time, + applications can use timing information to dynamically adjust the amount + of detail in a scene to achieve constant frame rates. OpenGL + implementations have historically provided little to no useful timing + information. Applications can get some idea of timing by reading timers + on the CPU, but these timers are not synchronized with the graphics + rendering pipeline. Reading a CPU timer does not guarantee the completion + of a potentially large amount of graphics work accumulated before the + timer is read, and will thus produce wildly inaccurate results. + glFinish() can be used to determine when previous rendering commands have + been completed, but will idle the graphics pipeline and adversely affect + application performance. + + This extension provides a query mechanism that can be used to determine + the amount of time it takes to fully complete a set of GL commands, and + without stalling the rendering pipeline. It uses the query object + mechanisms first introduced in the occlusion query extension, which allow + time intervals to be polled asynchronously by the application. + +IP Status + + No known IP claims. + +New Procedures and Functions + + void GenQueriesANGLE(sizei n, uint *ids); + void DeleteQueriesANGLE(sizei n, const uint *ids); + boolean IsQueryANGLE(uint id); + void BeginQueryANGLE(enum target, uint id); + void EndQueryANGLE(enum target); + void QueryCounterANGLE(uint id, enum target); + void GetQueryivANGLE(enum target, enum pname, int *params); + void GetQueryObjectivANGLE(uint id, enum pname, int *params); + void GetQueryObjectuivANGLE(uint id, enum pname, uint *params); + void GetQueryObjecti64vANGLE(uint id, enum pname, int64 *params); + void GetQueryObjectui64vANGLE(uint id, enum pname, uint64 *params); + +New Tokens + + Accepted by the <pname> parameter of GetQueryivANGLE: + + QUERY_COUNTER_BITS_ANGLE 0x8864 + CURRENT_QUERY_ANGLE 0x8865 + + Accepted by the <pname> parameter of GetQueryObjectivANGLE, + GetQueryObjectuivANGLE, GetQueryObjecti64vANGLE, and + GetQueryObjectui64vANGLE: + + QUERY_RESULT_ANGLE 0x8866 + QUERY_RESULT_AVAILABLE_ANGLE 0x8867 + + Accepted by the <target> parameter of BeginQueryANGLE, EndQueryANGLE, and + GetQueryivANGLE: + + TIME_ELAPSED_ANGLE 0x88BF + + Accepted by the <target> parameter of GetQueryivANGLE and + QueryCounterANGLE: + + TIMESTAMP_ANGLE 0x8E28 + +Additions to Chapter 2 of the OpenGL ES 2.0 Specification (OpenGL ES Operation) + + (Modify table 2.1, Correspondence of command suffix letters to GL argument) + Add two new types: + + Letter Corresponding GL Type + ------ --------------------- + i64 int64ANGLE + ui64 uint64ANGLE + + (Modify table 2.2, GL data types) Add two new types: + + GL Type Minimum Bit Width Description + ------- ----------------- ----------------------------- + int64ANGLE 64 Signed 2's complement integer + uint64ANGLE 64 Unsigned binary integer + +Additions to Chapter 5 of the OpenGL ES 2.0 Specification (Special Functions) + + Add a new section 5.3 "Timer Queries": + + "5.3 Timer Queries + + Timer queries use query objects to track the amount of time needed to + fully complete a set of GL commands, or to determine the current time + of the GL. + + Timer queries are associated with query objects. The command + + void GenQueriesANGLE(sizei n, uint *ids); + + returns <n> previously unused query object names in <ids>. These + names are marked as used, but no object is associated with them until + the first time they are used by BeginQueryANGLE. Query objects contain + one piece of state, an integer result value. This result value is + initialized to zero when the object is created. Any positive integer + except for zero (which is reserved for the GL) is a valid query + object name. + + Query objects are deleted by calling + + void DeleteQueriesANGLE(sizei n, const uint *ids); + + <ids> contains <n> names of query objects to be deleted. After a + query object is deleted, its name is again unused. Unused names in + <ids> are silently ignored. + If an active query object is deleted its name immediately becomes unused, + but the underlying object is not deleted until it is no longer active. + + A timer query can be started and finished by calling + + void BeginQueryANGLE(enum target, uint id); + void EndQueryANGLE(enum target); + + where <target> is TIME_ELAPSED_ANGLE. If BeginQueryANGLE is called + with an unused <id>, that name is marked as used and associated with + a new query object. + + If BeginQueryANGLE is called with an <id> of zero, if the active query + object name for <target> is non-zero, if <id> is the name of an existing + query object whose type does not match <target>, or if <id> is the active + query object name for any query type, the error INVALID_OPERATION is + generated. If EndQueryANGLE is called while no query with the same target + is in progress, an INVALID_OPERATION error is generated. + + When BeginQueryANGLE and EndQueryANGLE are called with a <target> of + TIME_ELAPSED_ANGLE, the GL prepares to start and stop the timer used for + timer queries. The timer is started or stopped when the effects from all + previous commands on the GL client and server state and the framebuffer + have been fully realized. The BeginQueryANGLE and EndQueryANGLE commands + may return before the timer is actually started or stopped. When the timer + query timer is finally stopped, the elapsed time (in nanoseconds) is + written to the corresponding query object as the query result value, and + the query result for that object is marked as available. + + If the elapsed time overflows the number of bits, <n>, available to hold + elapsed time, its value becomes undefined. It is recommended, but not + required, that implementations handle this overflow case by saturating at + 2^n - 1. + + The necessary state is a single bit indicating whether an timer + query is active, the identifier of the currently active timer + query, and a counter keeping track of the time that has passed. + + When the command + + void QueryCounterANGLE(uint id, enum target); + + is called with <target> TIMESTAMP_ANGLE, the GL records the current time + into the corresponding query object. The time is recorded after all + previous commands on the GL client and server state and the framebuffer + have been fully realized. When the time is recorded, the query result for + that object is marked available. QueryCounterANGLE timer queries can be + used within a BeginQueryANGLE / EndQueryANGLE block where the <target> is + TIME_ELAPSED_ANGLE and it does not affect the result of that query object. + The error INVALID_OPERATION is generated if the <id> is already in use + within a BeginQueryANGLE/EndQueryANGLE block." + +Additions to Chapter 6 of the OpenGL ES 2.0 Specification (State and State +Requests) + + Add a new section 6.1.9 "Timer Queries": + + "The command + + boolean IsQueryANGLE(uint id); + + returns TRUE if <id> is the name of a query object. If <id> is zero, + or if <id> is a non-zero value that is not the name of a query + object, IsQueryANGLE returns FALSE. + + Information about a query target can be queried with the command + + void GetQueryivANGLE(enum target, enum pname, int *params); + + <target> identifies the query target and can be TIME_ELAPSED_ANGLE or + TIMESTAMP_ANGLE for timer queries. + + If <pname> is CURRENT_QUERY_ANGLE, the name of the currently active query + for <target>, or zero if no query is active, will be placed in <params>. + + If <pname> is QUERY_COUNTER_BITS_ANGLE, the implementation-dependent number + of bits used to hold the query result for <target> will be placed in + <params>. The number of query counter bits may be zero, in which case + the counter contains no useful information. + + For timer queries (TIME_ELAPSED_ANGLE and TIMESTAMP_ANGLE), if the number + of bits is non-zero, the minimum number of bits allowed is 30 which + will allow at least 1 second of timing. + + The state of a query object can be queried with the commands + + void GetQueryObjectivANGLE(uint id, enum pname, int *params); + void GetQueryObjectuivANGLE(uint id, enum pname, uint *params); + void GetQueryObjecti64vANGLE(uint id, enum pname, int64 *params); + void GetQueryObjectui64vANGLE(uint id, enum pname, uint64 *params); + + If <id> is not the name of a query object, or if the query object + named by <id> is currently active, then an INVALID_OPERATION error is + generated. + + If <pname> is QUERY_RESULT_ANGLE, then the query object's result + value is returned as a single integer in <params>. If the value is so + large in magnitude that it cannot be represented with the requested type, + then the nearest value representable using the requested type is + returned. If the number of query counter bits for target is zero, then + the result is returned as a single integer with the value zero. + + There may be an indeterminate delay before the above query returns. If + <pname> is QUERY_RESULT_AVAILABLE_ANGLE, FALSE is returned if such a delay + would be required; otherwise TRUE is returned. It must always be true + that if any query object returns a result available of TRUE, all queries + of the same type issued prior to that query must also return TRUE. + + Querying the state for a given timer query forces that timer query to + complete within a finite amount of time. + + If multiple queries are issued on the same target and id prior to + calling GetQueryObject[u]i[64]vANGLE, the result returned will always be + from the last query issued. The results from any queries before the + last one will be lost if the results are not retrieved before starting + a new query on the same <target> and <id>." + +Errors + + The error INVALID_VALUE is generated if GenQueriesANGLE is called where + <n> is negative. + + The error INVALID_VALUE is generated if DeleteQueriesANGLE is called + where <n> is negative. + + The error INVALID_OPERATION is generated if BeginQueryANGLE is called + when a query of the given <target> is already active. + + The error INVALID_OPERATION is generated if EndQueryANGLE is called + when a query of the given <target> is not active. + + The error INVALID_OPERATION is generated if BeginQueryANGLE is called + where <id> is zero. + + The error INVALID_OPERATION is generated if BeginQueryANGLE is called + where <id> is the name of a query currently in progress. + + The error INVALID_OPERATION is generated if BeginQueryANGLE is called + where <id> is the name of an existing query object whose type does not + match <target>. + + The error INVALID_ENUM is generated if BeginQueryANGLE or EndQueryANGLE + is called where <target> is not TIME_ELAPSED_ANGLE. + + The error INVALID_ENUM is generated if GetQueryivANGLE is called where + <target> is not TIME_ELAPSED_ANGLE or TIMESTAMP_ANGLE. + + The error INVALID_ENUM is generated if GetQueryivANGLE is called where + <pname> is not QUERY_COUNTER_BITS_ANGLE or CURRENT_QUERY_ANGLE. + + The error INVALID_ENUM is generated if QueryCounterANGLE is called where + <target> is not TIMESTAMP_ANGLE. + + The error INVALID_OPERATION is generated if QueryCounterANGLE is called + on a query object that is already in use inside a + BeginQueryANGLE/EndQueryANGLE. + + The error INVALID_OPERATION is generated if GetQueryObjectivANGLE, + GetQueryObjectuivANGLE, GetQueryObjecti64vANGLE, or + GetQueryObjectui64vANGLE is called where <id> is not the name of a query + object. + + The error INVALID_OPERATION is generated if GetQueryObjectivANGLE, + GetQueryObjectuivANGLE, GetQueryObjecti64vANGLE, or + GetQueryObjectui64vANGLE is called where <id> is the name of a currently + active query object. + + The error INVALID_ENUM is generated if GetQueryObjectivANGLE, + GetQueryObjectuivANGLE, GetQueryObjecti64vANGLE, or + GetQueryObjectui64vANGLE is called where <pname> is not + QUERY_RESULT_ANGLE or QUERY_RESULT_AVAILABLE_ANGLE. + +New State + + (Add a new table 6.xx, "Query Operations") + + Get Value Type Get Command Initial Value Description Sec + --------- ---- ----------- ------------- ----------- ------ + - B - FALSE query active 5.3 + CURRENT_QUERY_ANGLE Z+ GetQueryivANGLE 0 active query ID 5.3 + QUERY_RESULT_ANGLE Z+ GetQueryObjectuivANGLE, 0 samples-passed count 5.3 + GetQueryObjectui64vANGLE + QUERY_RESULT_AVAILABLE_ANGLE B GetQueryObjectivANGLE FALSE query result available 5.3 + +New Implementation Dependent State + + (Add the following entry to table 6.18): + + Get Value Type Get Command Minimum Value Description Sec + -------------------------- ---- ----------- ------------- ---------------- ------ + QUERY_COUNTER_BITS_ANGLE Z+ GetQueryivANGLE see 6.1.9 Number of bits in 6.1.9 + query counter + +Examples + + (1) Here is some rough sample code that demonstrates the intended usage + of this extension. + + GLint queries[N]; + GLint available = 0; + // timer queries can contain more than 32 bits of data, so always + // query them using the 64 bit types to avoid overflow + GLuint64ANGLE timeElapsed = 0; + + // Create a query object. + glGenQueriesANGLE(N, queries); + + // Start query 1 + glBeginQueryANGLE(GL_TIME_ELAPSED_ANGLE, queries[0]); + + // Draw object 1 + .... + + // End query 1 + glEndQueryANGLE(GL_TIME_ELAPSED_ANGLE); + + ... + + // Start query N + glBeginQueryANGLE(GL_TIME_ELAPSED_ANGLE, queries[N-1]); + + // Draw object N + .... + + // End query N + glEndQueryANGLE(GL_TIME_ELAPSED_ANGLE); + + // Wait for all results to become available + while (!available) { + glGetQueryObjectivANGLE(queries[N-1], GL_QUERY_RESULT_AVAILABLE_ANGLE, &available); + } + + for (i = 0; i < N; i++) { + // See how much time the rendering of object i took in nanoseconds. + glGetQueryObjectui64vANGLE(queries[i], GL_QUERY_RESULT_ANGLE, &timeElapsed); + + // Do something useful with the time. Note that care should be + // taken to use all significant bits of the result, not just the + // least significant 32 bits. + AdjustObjectLODBasedOnDrawTime(i, timeElapsed); + } + + This example is sub-optimal in that it stalls at the end of every + frame to wait for query results. Ideally, the collection of results + would be delayed one frame to minimize the amount of time spent + waiting for the GPU to finish rendering. + + (2) This example is basically the same as the example above but uses + QueryCounter instead. + + GLint queries[N+1]; + GLint available = 0; + // timer queries can contain more than 32 bits of data, so always + // query them using the 64 bit types to avoid overflow + GLuint64ANGLE timeStart, timeEnd, timeElapsed = 0; + + // Create a query object. + glGenQueriesANGLE(N+1, queries); + + // Query current timestamp 1 + glQueryCounterANGLE(queries[0], GL_TIMESTAMP_ANGLE); + + // Draw object 1 + .... + + // Query current timestamp N + glQueryCounterANGLE(queries[N-1], GL_TIMESTAMP_ANGLE); + + // Draw object N + .... + + // Query current timestamp N+1 + glQueryCounterANGLE(queries[N], GL_TIMESTAMP_ANGLE); + + // Wait for all results to become available + while (!available) { + glGetQueryObjectivANGLE(queries[N], GL_QUERY_RESULT_AVAILABLE_ANGLE, &available); + } + + for (i = 0; i < N; i++) { + // See how much time the rendering of object i took in nanoseconds. + glGetQueryObjectui64vANGLE(queries[i], GL_QUERY_RESULT_ANGLE, &timeStart); + glGetQueryObjectui64vANGLE(queries[i+1], GL_QUERY_RESULT_ANGLE, &timeEnd); + timeElapsed = timeEnd - timeStart; + + // Do something useful with the time. Note that care should be + // taken to use all significant bits of the result, not just the + // least significant 32 bits. + AdjustObjectLODBasedOnDrawTime(i, timeElapsed); + } + +Issues from EXT_timer_query + + (1) What time interval is being measured? + + RESOLVED: The timer starts when all commands prior to BeginQuery() have + been fully executed. At that point, everything that should be drawn by + those commands has been written to the framebuffer. The timer stops + when all commands prior to EndQuery() have been fully executed. + + (2) What unit of time will time intervals be returned in? + + RESOLVED: Nanoseconds (10^-9 seconds). This unit of measurement allows + for reasonably accurate timing of even small blocks of rendering + commands. The granularity of the timer is implementation-dependent. A + 32-bit query counter can express intervals of up to approximately 4 + seconds. + + (3) What should be the minimum number of counter bits for timer queries? + + RESOLVED: 30 bits, which will allow timing sections that take up to 1 + second to render. + + (4) How are counter results of more than 32 bits returned? + + RESOLVED: Via two new datatypes, int64ANGLE and uint64ANGLE, and their + corresponding GetQueryObject entry points. These types hold integer + values and have a minimum bit width of 64. + + (5) Should the extension measure total time elapsed between the full + completion of the BeginQuery and EndQuery commands, or just time + spent in the graphics library? + + RESOLVED: This extension will measure the total time elapsed between + the full completion of these commands. Future extensions may implement + a query to determine time elapsed at different stages of the graphics + pipeline. + + (6) If multiple query types are supported, can multiple query types be + active simultaneously? + + RESOLVED: Yes; an application may perform a timer query and another + type of query simultaneously. An application can not perform multiple + timer queries or multiple queries of other types simultaneously. An + application also can not use the same query object for another query + and a timer query simultaneously. + + (7) Do query objects have a query type permanently associated with them? + + RESOLVED: No. A single query object can be used to perform different + types of queries, but not at the same time. + + Having a fixed type for each query object simplifies some aspects of the + implementation -- not having to deal with queries with different result + sizes, for example. It would also mean that BeginQuery() with a query + object of the "wrong" type would result in an INVALID_OPERATION error. + + UPDATE: This resolution was relevant for EXT_timer_query and OpenGL 2.0. + Since EXT_transform_feedback has since been incorporated into the core, + the resolution is that BeginQuery will generate error INVALID_OPERATION + if <id> represents a query object of a different type. + + (8) How predictable/repeatable are the results returned by the timer + query? + + RESOLVED: In general, the amount of time needed to render the same + primitives should be fairly constant. But there may be many other + system issues (e.g., context switching on the CPU and GPU, virtual + memory page faults, memory cache behavior on the CPU and GPU) that can + cause times to vary wildly. + + Note that modern GPUs are generally highly pipelined, and may be + processing different primitives in different pipeline stages + simultaneously. In this extension, the timers start and stop when the + BeginQuery/EndQuery commands reach the bottom of the rendering pipeline. + What that means is that by the time the timer starts, the GL driver on + the CPU may have started work on GL commands issued after BeginQuery, + and the higher pipeline stages (e.g., vertex transformation) may have + started as well. + + (9) What should the new 64 bit integer type be called? + + RESOLVED: The new types will be called GLint64ANGLE/GLuint64ANGLE. The new + command suffixes will be i64 and ui64. These names clearly convey the + minimum size of the types. These types are similar to the C99 standard + type int_least64_t, but we use names similar to the C99 optional type + int64_t for simplicity. + +Issues from ARB_timer_query + + (10) What about tile-based implementations? The effects of a command are + not complete until the frame is completely rendered. Timing recorded + before the frame is complete may not be what developers expect. Also + the amount of time needed to render the same primitives is not + consistent, which conflicts with issue (8) above. The time depends on + how early or late in the scene it is placed. + + RESOLVED: The current language supports tile-based rendering okay as it + is written. Developers are warned that using timers on tile-based + implementation may not produce results they expect since rendering is not + done in a linear order. Timing results are calculated when the frame is + completed and may depend on how early or late in the scene it is placed. + + (11) Can the GL implementation use different clocks to implement the + TIME_ELAPSED and TIMESTAMP queries? + + RESOLVED: Yes, the implemenation can use different internal clocks to + implement TIME_ELAPSED and TIMESTAMP. If different clocks are + used it is possible there is a slight discrepancy when comparing queries + made from TIME_ELAPSED and TIMESTAMP; they may have slight + differences when both are used to measure the same sequence. However, this + is unlikely to affect real applications since comparing the two queries is + not expected to be useful. + +Issues + + (12) What should we call this extension? + + RESOLVED: ANGLE_timer_query + + (13) Why is this done as a separate extension instead of just supporting + ARB_timer_query? + + ARB_timer_query is written against OpenGL 3.2, which includes a lot of + the required support for dealing with query objects. None of these + functions or tokens exist in OpenGL ES, and as such have to be added in + this specification. + + (14) How does this extension differ from ARB_timer_query? + + This extension contains most ARB_timer_query behavior unchanged as well + as a subset of the query support required to use it from the core + OpenGL 3.2 spec. It omits the glGetInteger(TIMESTAMP) functionality used to + query the current time on the GPU, but the behavior for all remaining + functionality taken from ARB_timer_query is the same. + + (15) Are query objects shareable between multiple contexts? + + RESOLVED: No. Query objects are lightweight and we normally share + large data across contexts. Also, being able to share query objects + across contexts is not particularly useful. In order to do the async + query across contexts, a query on one context would have to be finished + before the other context could query it. + +Revision History + + Revision 1, 2011/04/28 + - copied from revision 9 of ARB_timer_query and revision 7 of + ARB_occlusion_query + - removed language that was clearly not relevant to ES2 + - rebased changes against the OpenGL ES 2.0 specification diff --git a/include/GLSLANG/ShaderLang.h b/include/GLSLANG/ShaderLang.h index 722ac649..addc7479 100644 --- a/include/GLSLANG/ShaderLang.h +++ b/include/GLSLANG/ShaderLang.h @@ -6,20 +6,20 @@ #ifndef _COMPILER_INTERFACE_INCLUDED_ #define _COMPILER_INTERFACE_INCLUDED_ -#if defined(COMPONENT_BUILD) +#if defined(COMPONENT_BUILD) && !defined(ANGLE_TRANSLATOR_STATIC) #if defined(_WIN32) || defined(_WIN64) -#if defined(COMPILER_IMPLEMENTATION) +#if defined(ANGLE_TRANSLATOR_IMPLEMENTATION) #define COMPILER_EXPORT __declspec(dllexport) #else #define COMPILER_EXPORT __declspec(dllimport) -#endif // defined(COMPILER_IMPLEMENTATION) +#endif // defined(ANGLE_TRANSLATOR_IMPLEMENTATION) -#else // defined(WIN32) +#else // defined(_WIN32) || defined(_WIN64) #define COMPILER_EXPORT __attribute__((visibility("default"))) #endif -#else // defined(COMPONENT_BUILD) +#else // defined(COMPONENT_BUILD) && !defined(ANGLE_TRANSLATOR_STATIC) #define COMPILER_EXPORT #endif @@ -37,7 +37,7 @@ extern "C" { // Version number for shader translation API. // It is incremented everytime the API changes. -#define ANGLE_SH_VERSION 110 +#define ANGLE_SH_VERSION 112 // // The names of the following enums have been derived by replacing GL prefix @@ -109,12 +109,21 @@ typedef enum { } ShDataType; typedef enum { + SH_PRECISION_HIGHP = 0x5001, + SH_PRECISION_MEDIUMP = 0x5002, + SH_PRECISION_LOWP = 0x5003, + SH_PRECISION_UNDEFINED = 0 +} ShPrecisionType; + +typedef enum { SH_INFO_LOG_LENGTH = 0x8B84, SH_OBJECT_CODE_LENGTH = 0x8B88, // GL_SHADER_SOURCE_LENGTH SH_ACTIVE_UNIFORMS = 0x8B86, SH_ACTIVE_UNIFORM_MAX_LENGTH = 0x8B87, SH_ACTIVE_ATTRIBUTES = 0x8B89, SH_ACTIVE_ATTRIBUTE_MAX_LENGTH = 0x8B8A, + SH_VARYINGS = 0x8BBB, + SH_VARYING_MAX_LENGTH = 0x8BBC, SH_MAPPED_NAME_MAX_LENGTH = 0x6000, SH_NAME_MAX_LENGTH = 0x6001, SH_HASHED_NAME_MAX_LENGTH = 0x6002, @@ -128,7 +137,7 @@ typedef enum { SH_VALIDATE_LOOP_INDEXING = 0x0001, SH_INTERMEDIATE_TREE = 0x0002, SH_OBJECT_CODE = 0x0004, - SH_ATTRIBUTES_UNIFORMS = 0x0008, + SH_VARIABLES = 0x0008, SH_LINE_DIRECTIVES = 0x0010, SH_SOURCE_PATH = 0x0020, SH_MAP_LONG_VARIABLE_NAMES = 0x0040, @@ -137,14 +146,14 @@ typedef enum { // This is needed only as a workaround for certain OpenGL driver bugs. SH_EMULATE_BUILT_IN_FUNCTIONS = 0x0100, - // This is an experimental flag to enforce restrictions that aim to prevent + // This is an experimental flag to enforce restrictions that aim to prevent // timing attacks. // It generates compilation errors for shaders that could expose sensitive // texture information via the timing channel. // To use this flag, you must compile the shader under the WebGL spec // (using the SH_WEBGL_SPEC flag). SH_TIMING_RESTRICTIONS = 0x0200, - + // This flag prints the dependency graph that is used to enforce timing // restrictions on fragment shaders. // This flag only has an effect if all of the following are true: @@ -154,6 +163,11 @@ typedef enum { SH_DEPENDENCY_GRAPH = 0x0400, // Enforce the GLSL 1.017 Appendix A section 7 packing restrictions. + // This flag only enforces (and can only enforce) the packing + // restrictions for uniform variables in both vertex and fragment + // shaders. ShCheckVariablesWithinPackingLimits() lets embedders + // enforce the packing restrictions for varying variables during + // program link time. SH_ENFORCE_PACKING_RESTRICTIONS = 0x0800, // This flag ensures all indirect (expression-based) array indexing @@ -169,6 +183,19 @@ typedef enum { // This flag limits the depth of the call stack. SH_LIMIT_CALL_STACK_DEPTH = 0x4000, + + // This flag initializes gl_Position to vec4(0.0, 0.0, 0.0, 1.0) at + // the beginning of the vertex shader, and has no effect in the + // fragment shader. It is intended as a workaround for drivers which + // incorrectly fail to link programs if gl_Position is not written. + SH_INIT_GL_POSITION = 0x8000, + + // This flag replaces + // "a && b" with "a ? b : false", + // "a || b" with "a ? true : b". + // This is to work around a MacOSX driver bug that |b| is executed + // independent of |a|'s value. + SH_UNFOLD_SHORT_CIRCUIT = 0x10000, } ShCompileOptions; // Defines alternate strategies for implementing array index clamping. @@ -247,7 +274,7 @@ COMPILER_EXPORT void ShInitBuiltInResources(ShBuiltInResources* resources); // // ShHandle held by but opaque to the driver. It is allocated, -// managed, and de-allocated by the compiler. It's contents +// managed, and de-allocated by the compiler. It's contents // are defined by and used by the compiler. // // If handle creation fails, 0 will be returned. @@ -294,9 +321,8 @@ COMPILER_EXPORT void ShDestruct(ShHandle handle); // Can be queried by calling ShGetInfoLog(). // SH_OBJECT_CODE: Translates intermediate tree to glsl or hlsl shader. // Can be queried by calling ShGetObjectCode(). -// SH_ATTRIBUTES_UNIFORMS: Extracts attributes and uniforms. -// Can be queried by calling ShGetActiveAttrib() and -// ShGetActiveUniform(). +// SH_VARIABLES: Extracts attributes, uniforms, and varyings. +// Can be queried by calling ShGetVariableInfo(). // COMPILER_EXPORT int ShCompile( const ShHandle handle, @@ -322,6 +348,9 @@ COMPILER_EXPORT int ShCompile( // SH_ACTIVE_UNIFORM_MAX_LENGTH: the length of the longest active uniform // variable name including the null // termination character. +// SH_VARYINGS: the number of varying variables. +// SH_VARYING_MAX_LENGTH: the length of the longest varying variable name +// including the null termination character. // SH_MAPPED_NAME_MAX_LENGTH: the length of the mapped variable name including // the null termination character. // SH_NAME_MAX_LENGTH: the max length of a user-defined name including the @@ -355,60 +384,44 @@ COMPILER_EXPORT void ShGetInfoLog(const ShHandle handle, char* infoLog); // ShGetInfo with SH_OBJECT_CODE_LENGTH. COMPILER_EXPORT void ShGetObjectCode(const ShHandle handle, char* objCode); -// Returns information about an active attribute variable. +// Returns information about a shader variable. // Parameters: // handle: Specifies the compiler -// index: Specifies the index of the attribute variable to be queried. +// variableType: Specifies the variable type; options include +// SH_ACTIVE_ATTRIBUTES, SH_ACTIVE_UNIFORMS, SH_VARYINGS. +// index: Specifies the index of the variable to be queried. // length: Returns the number of characters actually written in the string // indicated by name (excluding the null terminator) if a value other // than NULL is passed. -// size: Returns the size of the attribute variable. -// type: Returns the data type of the attribute variable. +// size: Returns the size of the variable. +// type: Returns the data type of the variable. +// precision: Returns the precision of the variable. +// staticUse: Returns 1 if the variable is accessed in a statement after +// pre-processing, whether or not run-time flow of control will +// cause that statement to be executed. +// Returns 0 otherwise. // name: Returns a null terminated string containing the name of the -// attribute variable. It is assumed that name has enough memory to -// accomodate the attribute variable name. The size of the buffer -// required to store the attribute variable name can be obtained by -// calling ShGetInfo with SH_ACTIVE_ATTRIBUTE_MAX_LENGTH. +// variable. It is assumed that name has enough memory to accormodate +// the variable name. The size of the buffer required to store the +// variable name can be obtained by calling ShGetInfo with +// SH_ACTIVE_ATTRIBUTE_MAX_LENGTH, SH_ACTIVE_UNIFORM_MAX_LENGTH, +// SH_VARYING_MAX_LENGTH. // mappedName: Returns a null terminated string containing the mapped name of -// the attribute variable, It is assumed that mappedName has enough -// memory (SH_MAPPED_NAME_MAX_LENGTH), or NULL if don't care -// about the mapped name. If the name is not mapped, then name and -// mappedName are the same. -COMPILER_EXPORT void ShGetActiveAttrib(const ShHandle handle, +// the variable, It is assumed that mappedName has enough memory +// (SH_MAPPED_NAME_MAX_LENGTH), or NULL if don't care about the +// mapped name. If the name is not mapped, then name and mappedName +// are the same. +COMPILER_EXPORT void ShGetVariableInfo(const ShHandle handle, + ShShaderInfo variableType, int index, size_t* length, int* size, ShDataType* type, + ShPrecisionType* precision, + int* staticUse, char* name, char* mappedName); -// Returns information about an active uniform variable. -// Parameters: -// handle: Specifies the compiler -// index: Specifies the index of the uniform variable to be queried. -// length: Returns the number of characters actually written in the string -// indicated by name (excluding the null terminator) if a value -// other than NULL is passed. -// size: Returns the size of the uniform variable. -// type: Returns the data type of the uniform variable. -// name: Returns a null terminated string containing the name of the -// uniform variable. It is assumed that name has enough memory to -// accomodate the uniform variable name. The size of the buffer required -// to store the uniform variable name can be obtained by calling -// ShGetInfo with SH_ACTIVE_UNIFORMS_MAX_LENGTH. -// mappedName: Returns a null terminated string containing the mapped name of -// the uniform variable, It is assumed that mappedName has enough -// memory (SH_MAPPED_NAME_MAX_LENGTH), or NULL if don't care -// about the mapped name. If the name is not mapped, then name and -// mappedName are the same. -COMPILER_EXPORT void ShGetActiveUniform(const ShHandle handle, - int index, - size_t* length, - int* size, - ShDataType* type, - char* name, - char* mappedName); - // Returns information about a name hashing entry from the latest compile. // Parameters: // handle: Specifies the compiler @@ -439,6 +452,25 @@ COMPILER_EXPORT void ShGetInfoPointer(const ShHandle handle, ShShaderInfo pname, void** params); +typedef struct +{ + ShDataType type; + int size; +} ShVariableInfo; + +// Returns 1 if the passed in variables pack in maxVectors following +// the packing rules from the GLSL 1.017 spec, Appendix A, section 7. +// Returns 0 otherwise. Also look at the SH_ENFORCE_PACKING_RESTRICTIONS +// flag above. +// Parameters: +// maxVectors: the available rows of registers. +// varInfoArray: an array of variable info (types and sizes). +// varInfoArraySize: the size of the variable array. +COMPILER_EXPORT int ShCheckVariablesWithinPackingLimits( + int maxVectors, + ShVariableInfo* varInfoArray, + size_t varInfoArraySize); + #ifdef __cplusplus } #endif diff --git a/include/KHR/khrplatform.h b/include/KHR/khrplatform.h index 8ec0d199..c9e6f17d 100644..100755 --- a/include/KHR/khrplatform.h +++ b/include/KHR/khrplatform.h @@ -26,7 +26,7 @@ /* Khronos platform-specific types and definitions. * - * $Revision: 9356 $ on $Date: 2009-10-21 02:52:25 -0700 (Wed, 21 Oct 2009) $ + * $Revision: 23298 $ on $Date: 2013-09-30 17:07:13 -0700 (Mon, 30 Sep 2013) $ * * Adopters may modify this file to suit their platform. Adopters are * encouraged to submit platform specific modifications to the Khronos @@ -221,10 +221,23 @@ typedef signed char khronos_int8_t; typedef unsigned char khronos_uint8_t; typedef signed short int khronos_int16_t; typedef unsigned short int khronos_uint16_t; + +/* + * Types that differ between LLP64 and LP64 architectures - in LLP64, + * pointers are 64 bits, but 'long' is still 32 bits. Win64 appears + * to be the only LLP64 architecture in current use. + */ +#ifdef _WIN64 +typedef signed long long int khronos_intptr_t; +typedef unsigned long long int khronos_uintptr_t; +typedef signed long long int khronos_ssize_t; +typedef unsigned long long int khronos_usize_t; +#else typedef signed long int khronos_intptr_t; typedef unsigned long int khronos_uintptr_t; typedef signed long int khronos_ssize_t; typedef unsigned long int khronos_usize_t; +#endif #if KHRONOS_SUPPORT_FLOAT /* diff --git a/samples/angle/Simple_Instancing/Simple_Instancing.vcxproj b/samples/angle/Simple_Instancing/Simple_Instancing.vcxproj index 35ffe807..38786f75 100644 --- a/samples/angle/Simple_Instancing/Simple_Instancing.vcxproj +++ b/samples/angle/Simple_Instancing/Simple_Instancing.vcxproj @@ -1,105 +1,105 @@ -<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{EB6E138B-9DE5-41E8-A127-3675AA2BA607}</ProjectGuid>
- <RootNamespace>Simple_Texture2D</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- <ProjectName>Simple_Instancing</ProjectName>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <EmbedManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</EmbedManifest>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>../../gles2_book/Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
- </ClCompile>
- <Link>
- <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>../../gles2_book/Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- </ClCompile>
- <Link>
- <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="Simple_Instancing.c" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\..\gles2_book\Common\esUtil.vcxproj">
- <Project>{47c93f52-ab4e-4ff9-8d4f-b38cd60a183f}</Project>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
+<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectGuid>{EB6E138B-9DE5-41E8-A127-3675AA2BA607}</ProjectGuid> + <RootNamespace>Simple_Texture2D</RootNamespace> + <Keyword>Win32Proj</Keyword> + <ProjectName>Simple_Instancing</ProjectName> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>NotSet</CharacterSet> + <WholeProgramOptimization>true</WholeProgramOptimization> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>NotSet</CharacterSet> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup> + <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental> + <EmbedManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</EmbedManifest> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>../../gles2_book/Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MinimalRebuild>true</MinimalRebuild> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>EditAndContinue</DebugInformationFormat> + </ClCompile> + <Link> + <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Console</SubSystem> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <DataExecutionPrevention> + </DataExecutionPrevention> + <TargetMachine>MachineX86</TargetMachine> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ClCompile> + <AdditionalIncludeDirectories>../../gles2_book/Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreaded</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + </ClCompile> + <Link> + <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Console</SubSystem> + <OptimizeReferences>true</OptimizeReferences> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <DataExecutionPrevention> + </DataExecutionPrevention> + <TargetMachine>MachineX86</TargetMachine> + </Link> + </ItemDefinitionGroup> + <ItemGroup> + <ClCompile Include="Simple_Instancing.c" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\..\gles2_book\Common\esUtil.vcxproj"> + <Project>{47c93f52-ab4e-4ff9-8d4f-b38cd60a183f}</Project> + </ProjectReference> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> </Project>
\ No newline at end of file diff --git a/samples/build_samples.gyp b/samples/build_samples.gyp index a70eb049..d79de06e 100644 --- a/samples/build_samples.gyp +++ b/samples/build_samples.gyp @@ -8,7 +8,7 @@ 'target_name': 'essl_to_glsl', 'type': 'executable', 'dependencies': [ - '../src/build_angle.gyp:translator_glsl', + '../src/build_angle.gyp:translator', ], 'include_dirs': [ '../include', @@ -25,7 +25,7 @@ 'target_name': 'essl_to_hlsl', 'type': 'executable', 'dependencies': [ - '../src/build_angle.gyp:translator_hlsl', + '../src/build_angle.gyp:translator', ], 'include_dirs': [ '../include', diff --git a/samples/gles2_book/Common/esUtil.vcxproj b/samples/gles2_book/Common/esUtil.vcxproj index 8619f2c3..9f058049 100644 --- a/samples/gles2_book/Common/esUtil.vcxproj +++ b/samples/gles2_book/Common/esUtil.vcxproj @@ -1,103 +1,103 @@ -<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{47C93F52-AB4E-4FF9-8D4F-B38CD60A183F}</ProjectGuid>
- <RootNamespace>esUtil</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>./;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>./;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="Win32\esUtil_TGA.c" />
- <ClCompile Include="Win32\esUtil_win32.c" />
- <ClCompile Include="esShader.c" />
- <ClCompile Include="esShapes.c" />
- <ClCompile Include="esTransform.c" />
- <ClCompile Include="esUtil.c" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="esUtil_win.h" />
- <ClInclude Include="esUtil.h" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\..\..\src\libEGL\libEGL.vcxproj">
- <Project>{e746fca9-64c3-433e-85e8-9a5a67ab7ed6}</Project>
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
- <Private>true</Private>
- <CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
- <LinkLibraryDependencies>true</LinkLibraryDependencies>
- <UseLibraryDependencyInputs>true</UseLibraryDependencyInputs>
- </ProjectReference>
- <ProjectReference Include="..\..\..\src\libGLESv2\libGLESv2.vcxproj">
- <Project>{b5871a7a-968c-42e3-a33b-981e6f448e78}</Project>
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
- <Private>true</Private>
- <CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
- <LinkLibraryDependencies>true</LinkLibraryDependencies>
- <UseLibraryDependencyInputs>true</UseLibraryDependencyInputs>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
+<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectGuid>{47C93F52-AB4E-4FF9-8D4F-B38CD60A183F}</ProjectGuid> + <RootNamespace>esUtil</RootNamespace> + <Keyword>Win32Proj</Keyword> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>StaticLibrary</ConfigurationType> + <CharacterSet>NotSet</CharacterSet> + <WholeProgramOptimization>true</WholeProgramOptimization> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>StaticLibrary</ConfigurationType> + <CharacterSet>NotSet</CharacterSet> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup> + <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>./;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MinimalRebuild>true</MinimalRebuild> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>EditAndContinue</DebugInformationFormat> + </ClCompile> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ClCompile> + <AdditionalIncludeDirectories>./;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreaded</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + </ClCompile> + </ItemDefinitionGroup> + <ItemGroup> + <ClCompile Include="Win32\esUtil_TGA.c" /> + <ClCompile Include="Win32\esUtil_win32.c" /> + <ClCompile Include="esShader.c" /> + <ClCompile Include="esShapes.c" /> + <ClCompile Include="esTransform.c" /> + <ClCompile Include="esUtil.c" /> + </ItemGroup> + <ItemGroup> + <ClInclude Include="esUtil_win.h" /> + <ClInclude Include="esUtil.h" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\..\..\src\libEGL\libEGL.vcxproj"> + <Project>{e746fca9-64c3-433e-85e8-9a5a67ab7ed6}</Project> + <ReferenceOutputAssembly>false</ReferenceOutputAssembly> + <Private>true</Private> + <CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies> + <LinkLibraryDependencies>true</LinkLibraryDependencies> + <UseLibraryDependencyInputs>true</UseLibraryDependencyInputs> + </ProjectReference> + <ProjectReference Include="..\..\..\src\libGLESv2\libGLESv2.vcxproj"> + <Project>{b5871a7a-968c-42e3-a33b-981e6f448e78}</Project> + <ReferenceOutputAssembly>false</ReferenceOutputAssembly> + <Private>true</Private> + <CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies> + <LinkLibraryDependencies>true</LinkLibraryDependencies> + <UseLibraryDependencyInputs>true</UseLibraryDependencyInputs> + </ProjectReference> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> </Project>
\ No newline at end of file diff --git a/samples/gles2_book/Common/esUtil.vcxproj.filters b/samples/gles2_book/Common/esUtil.vcxproj.filters index b2eb5846..0b81a0a6 100644 --- a/samples/gles2_book/Common/esUtil.vcxproj.filters +++ b/samples/gles2_book/Common/esUtil.vcxproj.filters @@ -1,39 +1,39 @@ -<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Win32">
- <UniqueIdentifier>{8b3de51d-fe0c-4a62-aa51-feb196406ff8}</UniqueIdentifier>
- </Filter>
- <Filter Include="Common">
- <UniqueIdentifier>{cdf112d8-e32a-47f8-8095-2b433bc4fc0f}</UniqueIdentifier>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="Win32\esUtil_TGA.c">
- <Filter>Win32</Filter>
- </ClCompile>
- <ClCompile Include="Win32\esUtil_win32.c">
- <Filter>Win32</Filter>
- </ClCompile>
- <ClCompile Include="esShader.c">
- <Filter>Common</Filter>
- </ClCompile>
- <ClCompile Include="esShapes.c">
- <Filter>Common</Filter>
- </ClCompile>
- <ClCompile Include="esTransform.c">
- <Filter>Common</Filter>
- </ClCompile>
- <ClCompile Include="esUtil.c">
- <Filter>Common</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="esUtil_win.h">
- <Filter>Win32</Filter>
- </ClInclude>
- <ClInclude Include="esUtil.h">
- <Filter>Common</Filter>
- </ClInclude>
- </ItemGroup>
+<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup> + <Filter Include="Win32"> + <UniqueIdentifier>{8b3de51d-fe0c-4a62-aa51-feb196406ff8}</UniqueIdentifier> + </Filter> + <Filter Include="Common"> + <UniqueIdentifier>{cdf112d8-e32a-47f8-8095-2b433bc4fc0f}</UniqueIdentifier> + </Filter> + </ItemGroup> + <ItemGroup> + <ClCompile Include="Win32\esUtil_TGA.c"> + <Filter>Win32</Filter> + </ClCompile> + <ClCompile Include="Win32\esUtil_win32.c"> + <Filter>Win32</Filter> + </ClCompile> + <ClCompile Include="esShader.c"> + <Filter>Common</Filter> + </ClCompile> + <ClCompile Include="esShapes.c"> + <Filter>Common</Filter> + </ClCompile> + <ClCompile Include="esTransform.c"> + <Filter>Common</Filter> + </ClCompile> + <ClCompile Include="esUtil.c"> + <Filter>Common</Filter> + </ClCompile> + </ItemGroup> + <ItemGroup> + <ClInclude Include="esUtil_win.h"> + <Filter>Win32</Filter> + </ClInclude> + <ClInclude Include="esUtil.h"> + <Filter>Common</Filter> + </ClInclude> + </ItemGroup> </Project>
\ No newline at end of file diff --git a/samples/gles2_book/Hello_Triangle/Hello_Triangle.vcxproj b/samples/gles2_book/Hello_Triangle/Hello_Triangle.vcxproj index 2267d937..9de57152 100644 --- a/samples/gles2_book/Hello_Triangle/Hello_Triangle.vcxproj +++ b/samples/gles2_book/Hello_Triangle/Hello_Triangle.vcxproj @@ -1,105 +1,105 @@ -<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{8278251F-6C1F-4D80-8499-FA7B590FAFE6}</ProjectGuid>
- <RootNamespace>Hello_Triangle</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <EmbedManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</EmbedManifest>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>../Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
- </ClCompile>
- <Link>
- <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>../Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- </ClCompile>
- <Link>
- <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="Hello_Triangle.c" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\Common\esUtil.vcxproj">
- <Project>{47c93f52-ab4e-4ff9-8d4f-b38cd60a183f}</Project>
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
+<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectGuid>{8278251F-6C1F-4D80-8499-FA7B590FAFE6}</ProjectGuid> + <RootNamespace>Hello_Triangle</RootNamespace> + <Keyword>Win32Proj</Keyword> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>NotSet</CharacterSet> + <WholeProgramOptimization>true</WholeProgramOptimization> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>NotSet</CharacterSet> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup> + <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental> + <EmbedManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</EmbedManifest> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>../Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MinimalRebuild>true</MinimalRebuild> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>EditAndContinue</DebugInformationFormat> + </ClCompile> + <Link> + <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Console</SubSystem> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <DataExecutionPrevention> + </DataExecutionPrevention> + <TargetMachine>MachineX86</TargetMachine> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ClCompile> + <AdditionalIncludeDirectories>../Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreaded</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + </ClCompile> + <Link> + <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Console</SubSystem> + <OptimizeReferences>true</OptimizeReferences> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <DataExecutionPrevention> + </DataExecutionPrevention> + <TargetMachine>MachineX86</TargetMachine> + </Link> + </ItemDefinitionGroup> + <ItemGroup> + <ClCompile Include="Hello_Triangle.c" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\Common\esUtil.vcxproj"> + <Project>{47c93f52-ab4e-4ff9-8d4f-b38cd60a183f}</Project> + <ReferenceOutputAssembly>false</ReferenceOutputAssembly> + </ProjectReference> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> </Project>
\ No newline at end of file diff --git a/samples/gles2_book/MipMap2D/MipMap2D.vcxproj b/samples/gles2_book/MipMap2D/MipMap2D.vcxproj index bc9dc4d1..da116d40 100644 --- a/samples/gles2_book/MipMap2D/MipMap2D.vcxproj +++ b/samples/gles2_book/MipMap2D/MipMap2D.vcxproj @@ -1,105 +1,105 @@ -<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{4E69AC1F-1C7A-4D58-917C-E764FBEB489A}</ProjectGuid>
- <RootNamespace>MipMap2D</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <EmbedManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</EmbedManifest>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>../Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
- </ClCompile>
- <Link>
- <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>../Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- </ClCompile>
- <Link>
- <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="MipMap2D.c" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\Common\esUtil.vcxproj">
- <Project>{47c93f52-ab4e-4ff9-8d4f-b38cd60a183f}</Project>
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
+<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectGuid>{4E69AC1F-1C7A-4D58-917C-E764FBEB489A}</ProjectGuid> + <RootNamespace>MipMap2D</RootNamespace> + <Keyword>Win32Proj</Keyword> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>NotSet</CharacterSet> + <WholeProgramOptimization>true</WholeProgramOptimization> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>NotSet</CharacterSet> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup> + <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental> + <EmbedManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</EmbedManifest> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>../Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MinimalRebuild>true</MinimalRebuild> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>EditAndContinue</DebugInformationFormat> + </ClCompile> + <Link> + <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Console</SubSystem> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <DataExecutionPrevention> + </DataExecutionPrevention> + <TargetMachine>MachineX86</TargetMachine> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ClCompile> + <AdditionalIncludeDirectories>../Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreaded</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + </ClCompile> + <Link> + <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Console</SubSystem> + <OptimizeReferences>true</OptimizeReferences> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <DataExecutionPrevention> + </DataExecutionPrevention> + <TargetMachine>MachineX86</TargetMachine> + </Link> + </ItemDefinitionGroup> + <ItemGroup> + <ClCompile Include="MipMap2D.c" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\Common\esUtil.vcxproj"> + <Project>{47c93f52-ab4e-4ff9-8d4f-b38cd60a183f}</Project> + <ReferenceOutputAssembly>false</ReferenceOutputAssembly> + </ProjectReference> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> </Project>
\ No newline at end of file diff --git a/samples/gles2_book/MultiTexture/MultiTexture.vcxproj b/samples/gles2_book/MultiTexture/MultiTexture.vcxproj index b0ee09c8..0edf5221 100644 --- a/samples/gles2_book/MultiTexture/MultiTexture.vcxproj +++ b/samples/gles2_book/MultiTexture/MultiTexture.vcxproj @@ -1,115 +1,115 @@ -<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{120CFF94-ED4B-4C5B-9587-9E40889F15F7}</ProjectGuid>
- <RootNamespace>MultiTexture</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <EmbedManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</EmbedManifest>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>../Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
- </ClCompile>
- <Link>
- <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- <PostBuildEvent>
- <Command>xcopy /D /Y basemap.tga "$(OutDir)"
-xcopy /D /Y lightmap.tga "$(OutDir)"
-</Command>
- </PostBuildEvent>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>../Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- </ClCompile>
- <Link>
- <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- <PostBuildEvent>
- <Command>xcopy /D /Y basemap.tga "$(OutDir)"
-xcopy /D /Y lightmap.tga "$(OutDir)"
-</Command>
- </PostBuildEvent>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="MultiTexture.c" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\Common\esUtil.vcxproj">
- <Project>{47c93f52-ab4e-4ff9-8d4f-b38cd60a183f}</Project>
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
+<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectGuid>{120CFF94-ED4B-4C5B-9587-9E40889F15F7}</ProjectGuid> + <RootNamespace>MultiTexture</RootNamespace> + <Keyword>Win32Proj</Keyword> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>NotSet</CharacterSet> + <WholeProgramOptimization>true</WholeProgramOptimization> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>NotSet</CharacterSet> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup> + <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental> + <EmbedManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</EmbedManifest> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>../Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MinimalRebuild>true</MinimalRebuild> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>EditAndContinue</DebugInformationFormat> + </ClCompile> + <Link> + <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Console</SubSystem> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <DataExecutionPrevention> + </DataExecutionPrevention> + <TargetMachine>MachineX86</TargetMachine> + </Link> + <PostBuildEvent> + <Command>xcopy /D /Y basemap.tga "$(OutDir)" +xcopy /D /Y lightmap.tga "$(OutDir)" +</Command> + </PostBuildEvent> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ClCompile> + <AdditionalIncludeDirectories>../Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreaded</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + </ClCompile> + <Link> + <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Console</SubSystem> + <OptimizeReferences>true</OptimizeReferences> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <DataExecutionPrevention> + </DataExecutionPrevention> + <TargetMachine>MachineX86</TargetMachine> + </Link> + <PostBuildEvent> + <Command>xcopy /D /Y basemap.tga "$(OutDir)" +xcopy /D /Y lightmap.tga "$(OutDir)" +</Command> + </PostBuildEvent> + </ItemDefinitionGroup> + <ItemGroup> + <ClCompile Include="MultiTexture.c" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\Common\esUtil.vcxproj"> + <Project>{47c93f52-ab4e-4ff9-8d4f-b38cd60a183f}</Project> + <ReferenceOutputAssembly>false</ReferenceOutputAssembly> + </ProjectReference> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> </Project>
\ No newline at end of file diff --git a/samples/gles2_book/MultipleRenderTargets/MultipleRenderTargets.vcxproj b/samples/gles2_book/MultipleRenderTargets/MultipleRenderTargets.vcxproj index 58ea2807..234512b1 100644 --- a/samples/gles2_book/MultipleRenderTargets/MultipleRenderTargets.vcxproj +++ b/samples/gles2_book/MultipleRenderTargets/MultipleRenderTargets.vcxproj @@ -1,105 +1,105 @@ -<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{DD670DCB-2554-4FAE-B7C9-D7F0C3087C10}</ProjectGuid>
- <RootNamespace>MultipleRenderTargets</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <EmbedManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</EmbedManifest>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>../Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
- </ClCompile>
- <Link>
- <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>../Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- </ClCompile>
- <Link>
- <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="MultipleRenderTargets.c" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\Common\esUtil.vcxproj">
- <Project>{47c93f52-ab4e-4ff9-8d4f-b38cd60a183f}</Project>
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
+<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectGuid>{DD670DCB-2554-4FAE-B7C9-D7F0C3087C10}</ProjectGuid> + <RootNamespace>MultipleRenderTargets</RootNamespace> + <Keyword>Win32Proj</Keyword> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>NotSet</CharacterSet> + <WholeProgramOptimization>true</WholeProgramOptimization> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>NotSet</CharacterSet> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup> + <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental> + <EmbedManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</EmbedManifest> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>../Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MinimalRebuild>true</MinimalRebuild> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>EditAndContinue</DebugInformationFormat> + </ClCompile> + <Link> + <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Console</SubSystem> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <DataExecutionPrevention> + </DataExecutionPrevention> + <TargetMachine>MachineX86</TargetMachine> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ClCompile> + <AdditionalIncludeDirectories>../Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreaded</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + </ClCompile> + <Link> + <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Console</SubSystem> + <OptimizeReferences>true</OptimizeReferences> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <DataExecutionPrevention> + </DataExecutionPrevention> + <TargetMachine>MachineX86</TargetMachine> + </Link> + </ItemDefinitionGroup> + <ItemGroup> + <ClCompile Include="MultipleRenderTargets.c" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\Common\esUtil.vcxproj"> + <Project>{47c93f52-ab4e-4ff9-8d4f-b38cd60a183f}</Project> + <ReferenceOutputAssembly>false</ReferenceOutputAssembly> + </ProjectReference> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> </Project>
\ No newline at end of file diff --git a/samples/gles2_book/ParticleSystem/ParticleSystem.vcxproj b/samples/gles2_book/ParticleSystem/ParticleSystem.vcxproj index 3e07a05f..60a6d6ae 100644 --- a/samples/gles2_book/ParticleSystem/ParticleSystem.vcxproj +++ b/samples/gles2_book/ParticleSystem/ParticleSystem.vcxproj @@ -1,111 +1,111 @@ -<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{B9E5BFFC-D843-4E0E-9D3E-23913A613473}</ProjectGuid>
- <RootNamespace>ParticleSystem</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <EmbedManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</EmbedManifest>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>../Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
- </ClCompile>
- <Link>
- <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- <PostBuildEvent>
- <Command>xcopy /D /Y smoke.tga "$(outDir)"</Command>
- </PostBuildEvent>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>../Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- </ClCompile>
- <Link>
- <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- <PostBuildEvent>
- <Command>xcopy /D /Y smoke.tga "$(outDir)"</Command>
- </PostBuildEvent>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="ParticleSystem.c" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\Common\esUtil.vcxproj">
- <Project>{47c93f52-ab4e-4ff9-8d4f-b38cd60a183f}</Project>
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
+<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectGuid>{B9E5BFFC-D843-4E0E-9D3E-23913A613473}</ProjectGuid> + <RootNamespace>ParticleSystem</RootNamespace> + <Keyword>Win32Proj</Keyword> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>NotSet</CharacterSet> + <WholeProgramOptimization>true</WholeProgramOptimization> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>NotSet</CharacterSet> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup> + <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental> + <EmbedManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</EmbedManifest> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>../Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MinimalRebuild>true</MinimalRebuild> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>EditAndContinue</DebugInformationFormat> + </ClCompile> + <Link> + <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Console</SubSystem> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <DataExecutionPrevention> + </DataExecutionPrevention> + <TargetMachine>MachineX86</TargetMachine> + </Link> + <PostBuildEvent> + <Command>xcopy /D /Y smoke.tga "$(outDir)"</Command> + </PostBuildEvent> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ClCompile> + <AdditionalIncludeDirectories>../Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreaded</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + </ClCompile> + <Link> + <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Console</SubSystem> + <OptimizeReferences>true</OptimizeReferences> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <DataExecutionPrevention> + </DataExecutionPrevention> + <TargetMachine>MachineX86</TargetMachine> + </Link> + <PostBuildEvent> + <Command>xcopy /D /Y smoke.tga "$(outDir)"</Command> + </PostBuildEvent> + </ItemDefinitionGroup> + <ItemGroup> + <ClCompile Include="ParticleSystem.c" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\Common\esUtil.vcxproj"> + <Project>{47c93f52-ab4e-4ff9-8d4f-b38cd60a183f}</Project> + <ReferenceOutputAssembly>false</ReferenceOutputAssembly> + </ProjectReference> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> </Project>
\ No newline at end of file diff --git a/samples/gles2_book/PostSubBuffer/PostSubBuffer.vcxproj b/samples/gles2_book/PostSubBuffer/PostSubBuffer.vcxproj index 488034b1..875d1632 100644 --- a/samples/gles2_book/PostSubBuffer/PostSubBuffer.vcxproj +++ b/samples/gles2_book/PostSubBuffer/PostSubBuffer.vcxproj @@ -1,105 +1,105 @@ -<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{667CE95F-5DD8-4495-8C18-5CA8A175B12D}</ProjectGuid>
- <RootNamespace>Simple_VertexShader</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <EmbedManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</EmbedManifest>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>../Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
- </ClCompile>
- <Link>
- <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>../Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- </ClCompile>
- <Link>
- <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="PostSubBuffer.c" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\Common\esUtil.vcxproj">
- <Project>{47c93f52-ab4e-4ff9-8d4f-b38cd60a183f}</Project>
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
+<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectGuid>{667CE95F-5DD8-4495-8C18-5CA8A175B12D}</ProjectGuid> + <RootNamespace>Simple_VertexShader</RootNamespace> + <Keyword>Win32Proj</Keyword> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>NotSet</CharacterSet> + <WholeProgramOptimization>true</WholeProgramOptimization> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>NotSet</CharacterSet> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup> + <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental> + <EmbedManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</EmbedManifest> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>../Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MinimalRebuild>true</MinimalRebuild> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>EditAndContinue</DebugInformationFormat> + </ClCompile> + <Link> + <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Console</SubSystem> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <DataExecutionPrevention> + </DataExecutionPrevention> + <TargetMachine>MachineX86</TargetMachine> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ClCompile> + <AdditionalIncludeDirectories>../Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreaded</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + </ClCompile> + <Link> + <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Console</SubSystem> + <OptimizeReferences>true</OptimizeReferences> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <DataExecutionPrevention> + </DataExecutionPrevention> + <TargetMachine>MachineX86</TargetMachine> + </Link> + </ItemDefinitionGroup> + <ItemGroup> + <ClCompile Include="PostSubBuffer.c" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\Common\esUtil.vcxproj"> + <Project>{47c93f52-ab4e-4ff9-8d4f-b38cd60a183f}</Project> + <ReferenceOutputAssembly>false</ReferenceOutputAssembly> + </ProjectReference> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> </Project>
\ No newline at end of file diff --git a/samples/gles2_book/Simple_Texture2D/Simple_Texture2D.vcxproj b/samples/gles2_book/Simple_Texture2D/Simple_Texture2D.vcxproj index 2e755bbd..d6210a36 100644 --- a/samples/gles2_book/Simple_Texture2D/Simple_Texture2D.vcxproj +++ b/samples/gles2_book/Simple_Texture2D/Simple_Texture2D.vcxproj @@ -1,105 +1,105 @@ -<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{2E54D748-781B-4DF2-A1DD-B9384A821810}</ProjectGuid>
- <RootNamespace>Simple_Texture2D</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <EmbedManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</EmbedManifest>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>../Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
- </ClCompile>
- <Link>
- <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>../Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- </ClCompile>
- <Link>
- <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="Simple_Texture2D.c" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\Common\esUtil.vcxproj">
- <Project>{47c93f52-ab4e-4ff9-8d4f-b38cd60a183f}</Project>
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
+<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectGuid>{2E54D748-781B-4DF2-A1DD-B9384A821810}</ProjectGuid> + <RootNamespace>Simple_Texture2D</RootNamespace> + <Keyword>Win32Proj</Keyword> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>NotSet</CharacterSet> + <WholeProgramOptimization>true</WholeProgramOptimization> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>NotSet</CharacterSet> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup> + <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental> + <EmbedManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</EmbedManifest> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>../Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MinimalRebuild>true</MinimalRebuild> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>EditAndContinue</DebugInformationFormat> + </ClCompile> + <Link> + <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Console</SubSystem> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <DataExecutionPrevention> + </DataExecutionPrevention> + <TargetMachine>MachineX86</TargetMachine> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ClCompile> + <AdditionalIncludeDirectories>../Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreaded</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + </ClCompile> + <Link> + <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Console</SubSystem> + <OptimizeReferences>true</OptimizeReferences> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <DataExecutionPrevention> + </DataExecutionPrevention> + <TargetMachine>MachineX86</TargetMachine> + </Link> + </ItemDefinitionGroup> + <ItemGroup> + <ClCompile Include="Simple_Texture2D.c" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\Common\esUtil.vcxproj"> + <Project>{47c93f52-ab4e-4ff9-8d4f-b38cd60a183f}</Project> + <ReferenceOutputAssembly>false</ReferenceOutputAssembly> + </ProjectReference> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> </Project>
\ No newline at end of file diff --git a/samples/gles2_book/Simple_TextureCubemap/Simple_TextureCubemap.vcxproj b/samples/gles2_book/Simple_TextureCubemap/Simple_TextureCubemap.vcxproj index df2bc01c..84e9be07 100644 --- a/samples/gles2_book/Simple_TextureCubemap/Simple_TextureCubemap.vcxproj +++ b/samples/gles2_book/Simple_TextureCubemap/Simple_TextureCubemap.vcxproj @@ -1,108 +1,108 @@ -<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{5EE56061-643D-406E-B42D-4299D2411056}</ProjectGuid>
- <RootNamespace>Simple_TextureCubemap</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <EmbedManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</EmbedManifest>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>../Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
- </ClCompile>
- <ProjectReference>
- <UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
- </ProjectReference>
- <Link>
- <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>../Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- </ClCompile>
- <Link>
- <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="Simple_TextureCubemap.c" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\Common\esUtil.vcxproj">
- <Project>{47c93f52-ab4e-4ff9-8d4f-b38cd60a183f}</Project>
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
+<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectGuid>{5EE56061-643D-406E-B42D-4299D2411056}</ProjectGuid> + <RootNamespace>Simple_TextureCubemap</RootNamespace> + <Keyword>Win32Proj</Keyword> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>NotSet</CharacterSet> + <WholeProgramOptimization>true</WholeProgramOptimization> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>NotSet</CharacterSet> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup> + <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental> + <EmbedManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</EmbedManifest> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>../Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MinimalRebuild>true</MinimalRebuild> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>EditAndContinue</DebugInformationFormat> + </ClCompile> + <ProjectReference> + <UseLibraryDependencyInputs>false</UseLibraryDependencyInputs> + </ProjectReference> + <Link> + <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Console</SubSystem> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <DataExecutionPrevention> + </DataExecutionPrevention> + <TargetMachine>MachineX86</TargetMachine> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ClCompile> + <AdditionalIncludeDirectories>../Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreaded</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + </ClCompile> + <Link> + <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Console</SubSystem> + <OptimizeReferences>true</OptimizeReferences> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <DataExecutionPrevention> + </DataExecutionPrevention> + <TargetMachine>MachineX86</TargetMachine> + </Link> + </ItemDefinitionGroup> + <ItemGroup> + <ClCompile Include="Simple_TextureCubemap.c" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\Common\esUtil.vcxproj"> + <Project>{47c93f52-ab4e-4ff9-8d4f-b38cd60a183f}</Project> + <ReferenceOutputAssembly>false</ReferenceOutputAssembly> + </ProjectReference> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> </Project>
\ No newline at end of file diff --git a/samples/gles2_book/Simple_VertexShader/Simple_VertexShader.vcxproj b/samples/gles2_book/Simple_VertexShader/Simple_VertexShader.vcxproj index b3a2928f..ed716768 100644 --- a/samples/gles2_book/Simple_VertexShader/Simple_VertexShader.vcxproj +++ b/samples/gles2_book/Simple_VertexShader/Simple_VertexShader.vcxproj @@ -1,105 +1,105 @@ -<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{667CE95F-5DD8-4395-8C18-5CA8A175B12D}</ProjectGuid>
- <RootNamespace>Simple_VertexShader</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <EmbedManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</EmbedManifest>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>../Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
- </ClCompile>
- <Link>
- <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>../Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- </ClCompile>
- <Link>
- <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="Simple_VertexShader.c" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\Common\esUtil.vcxproj">
- <Project>{47c93f52-ab4e-4ff9-8d4f-b38cd60a183f}</Project>
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
+<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectGuid>{667CE95F-5DD8-4395-8C18-5CA8A175B12D}</ProjectGuid> + <RootNamespace>Simple_VertexShader</RootNamespace> + <Keyword>Win32Proj</Keyword> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>NotSet</CharacterSet> + <WholeProgramOptimization>true</WholeProgramOptimization> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>NotSet</CharacterSet> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup> + <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental> + <EmbedManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</EmbedManifest> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>../Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MinimalRebuild>true</MinimalRebuild> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>EditAndContinue</DebugInformationFormat> + </ClCompile> + <Link> + <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Console</SubSystem> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <DataExecutionPrevention> + </DataExecutionPrevention> + <TargetMachine>MachineX86</TargetMachine> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ClCompile> + <AdditionalIncludeDirectories>../Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreaded</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + </ClCompile> + <Link> + <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Console</SubSystem> + <OptimizeReferences>true</OptimizeReferences> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <DataExecutionPrevention> + </DataExecutionPrevention> + <TargetMachine>MachineX86</TargetMachine> + </Link> + </ItemDefinitionGroup> + <ItemGroup> + <ClCompile Include="Simple_VertexShader.c" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\Common\esUtil.vcxproj"> + <Project>{47c93f52-ab4e-4ff9-8d4f-b38cd60a183f}</Project> + <ReferenceOutputAssembly>false</ReferenceOutputAssembly> + </ProjectReference> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> </Project>
\ No newline at end of file diff --git a/samples/gles2_book/Stencil_Test/Stencil_Test.vcxproj b/samples/gles2_book/Stencil_Test/Stencil_Test.vcxproj index 2b829a94..8891553f 100644 --- a/samples/gles2_book/Stencil_Test/Stencil_Test.vcxproj +++ b/samples/gles2_book/Stencil_Test/Stencil_Test.vcxproj @@ -1,97 +1,97 @@ -<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{EEACE995-26BC-4D56-A8B3-3E7A9AB3EB26}</ProjectGuid>
- <RootNamespace>Stencil_Test</RootNamespace>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>../Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
- <WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
- </ClCompile>
- <Link>
- <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>../Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
- <WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- </ClCompile>
- <Link>
- <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="Stencil_Test.c" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\Common\esUtil.vcxproj">
- <Project>{47c93f52-ab4e-4ff9-8d4f-b38cd60a183f}</Project>
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
+<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectGuid>{EEACE995-26BC-4D56-A8B3-3E7A9AB3EB26}</ProjectGuid> + <RootNamespace>Stencil_Test</RootNamespace> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>MultiByte</CharacterSet> + <WholeProgramOptimization>true</WholeProgramOptimization> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>MultiByte</CharacterSet> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup> + <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>../Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MinimalRebuild>true</MinimalRebuild> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>EditAndContinue</DebugInformationFormat> + </ClCompile> + <Link> + <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> + <GenerateDebugInformation>true</GenerateDebugInformation> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <DataExecutionPrevention> + </DataExecutionPrevention> + <TargetMachine>MachineX86</TargetMachine> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ClCompile> + <AdditionalIncludeDirectories>../Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreaded</RuntimeLibrary> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + </ClCompile> + <Link> + <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <GenerateDebugInformation>true</GenerateDebugInformation> + <OptimizeReferences>true</OptimizeReferences> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <DataExecutionPrevention> + </DataExecutionPrevention> + <TargetMachine>MachineX86</TargetMachine> + </Link> + </ItemDefinitionGroup> + <ItemGroup> + <ClCompile Include="Stencil_Test.c" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\Common\esUtil.vcxproj"> + <Project>{47c93f52-ab4e-4ff9-8d4f-b38cd60a183f}</Project> + <ReferenceOutputAssembly>false</ReferenceOutputAssembly> + </ProjectReference> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> </Project>
\ No newline at end of file diff --git a/samples/gles2_book/TextureWrap/TextureWrap.vcxproj b/samples/gles2_book/TextureWrap/TextureWrap.vcxproj index 076b8b67..eff3e117 100644 --- a/samples/gles2_book/TextureWrap/TextureWrap.vcxproj +++ b/samples/gles2_book/TextureWrap/TextureWrap.vcxproj @@ -1,105 +1,105 @@ -<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{CC1DE9A2-B456-4565-9C21-932253E969B9}</ProjectGuid>
- <RootNamespace>TextureWrap</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <EmbedManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</EmbedManifest>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>../Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
- </ClCompile>
- <Link>
- <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>../Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- </ClCompile>
- <Link>
- <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="TextureWrap.c" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\Common\esUtil.vcxproj">
- <Project>{47c93f52-ab4e-4ff9-8d4f-b38cd60a183f}</Project>
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
+<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectGuid>{CC1DE9A2-B456-4565-9C21-932253E969B9}</ProjectGuid> + <RootNamespace>TextureWrap</RootNamespace> + <Keyword>Win32Proj</Keyword> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>NotSet</CharacterSet> + <WholeProgramOptimization>true</WholeProgramOptimization> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>NotSet</CharacterSet> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup> + <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental> + <EmbedManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</EmbedManifest> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>../Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MinimalRebuild>true</MinimalRebuild> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>EditAndContinue</DebugInformationFormat> + </ClCompile> + <Link> + <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Console</SubSystem> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <DataExecutionPrevention> + </DataExecutionPrevention> + <TargetMachine>MachineX86</TargetMachine> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ClCompile> + <AdditionalIncludeDirectories>../Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreaded</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + </ClCompile> + <Link> + <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Console</SubSystem> + <OptimizeReferences>true</OptimizeReferences> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <DataExecutionPrevention> + </DataExecutionPrevention> + <TargetMachine>MachineX86</TargetMachine> + </Link> + </ItemDefinitionGroup> + <ItemGroup> + <ClCompile Include="TextureWrap.c" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\Common\esUtil.vcxproj"> + <Project>{47c93f52-ab4e-4ff9-8d4f-b38cd60a183f}</Project> + <ReferenceOutputAssembly>false</ReferenceOutputAssembly> + </ProjectReference> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> </Project>
\ No newline at end of file diff --git a/samples/samples.sln b/samples/samples.sln index 54d58541..9e0ab1f7 100644 --- a/samples/samples.sln +++ b/samples/samples.sln @@ -1,177 +1,167 @@ -Microsoft Visual Studio Solution File, Format Version 11.00
-# Visual C++ Express 2010
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "esUtil", "gles2_book\Common\esUtil.vcxproj", "{47C93F52-AB4E-4FF9-8D4F-B38CD60A183F}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Hello_Triangle", "gles2_book\Hello_Triangle\Hello_Triangle.vcxproj", "{8278251F-6C1F-4D80-8499-FA7B590FAFE6}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MipMap2D", "gles2_book\MipMap2D\MipMap2D.vcxproj", "{4E69AC1F-1C7A-4D58-917C-E764FBEB489A}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MultiTexture", "gles2_book\MultiTexture\MultiTexture.vcxproj", "{120CFF94-ED4B-4C5B-9587-9E40889F15F7}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ParticleSystem", "gles2_book\ParticleSystem\ParticleSystem.vcxproj", "{B9E5BFFC-D843-4E0E-9D3E-23913A613473}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Simple_Texture2D", "gles2_book\Simple_Texture2D\Simple_Texture2D.vcxproj", "{2E54D748-781B-4DF2-A1DD-B9384A821810}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Simple_TextureCubemap", "gles2_book\Simple_TextureCubemap\Simple_TextureCubemap.vcxproj", "{5EE56061-643D-406E-B42D-4299D2411056}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Simple_VertexShader", "gles2_book\Simple_VertexShader\Simple_VertexShader.vcxproj", "{667CE95F-5DD8-4395-8C18-5CA8A175B12D}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Stencil_Test", "gles2_book\Stencil_Test\Stencil_Test.vcxproj", "{EEACE995-26BC-4D56-A8B3-3E7A9AB3EB26}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TextureWrap", "gles2_book\TextureWrap\TextureWrap.vcxproj", "{CC1DE9A2-B456-4565-9C21-932253E969B9}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libEGL", "..\src\libEGL\libEGL.vcxproj", "{E746FCA9-64C3-433E-85E8-9A5A67AB7ED6}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libGLESv2", "..\src\libGLESv2\libGLESv2.vcxproj", "{B5871A7A-968C-42E3-A33B-981E6F448E78}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "translator_hlsl", "..\src\compiler\translator_hlsl.vcxproj", "{5620F0E4-6C43-49BC-A178-B804E1A0C3A7}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "essl_to_hlsl", "translator\essl_to_hlsl.vcxproj", "{E12EA115-EBC7-47C2-B651-30A0CE986025}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "translator_common", "..\src\compiler\translator_common.vcxproj", "{5B3A6DB8-1E7E-40D7-92B9-DA8AAE619FAD}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PostSubBuffer", "gles2_book\PostSubBuffer\PostSubBuffer.vcxproj", "{667CE95F-5DD8-4495-8C18-5CA8A175B12D}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "preprocessor", "..\src\compiler\preprocessor\preprocessor.vcxproj", "{FBE32DF3-0FB0-4F2F-A424-2C21BD7BC325}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Simple_Instancing", "angle\Simple_Instancing\Simple_Instancing.vcxproj", "{EB6E138B-9DE5-41E8-A127-3675AA2BA607}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MultipleRenderTargets", "gles2_book\MultipleRenderTargets\MultipleRenderTargets.vcxproj", "{DD670DCB-2554-4FAE-B7C9-D7F0C3087C10}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Win32 = Debug|Win32
- Debug|x64 = Debug|x64
- Release|Win32 = Release|Win32
- Release|x64 = Release|x64
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {47C93F52-AB4E-4FF9-8D4F-B38CD60A183F}.Debug|Win32.ActiveCfg = Debug|Win32
- {47C93F52-AB4E-4FF9-8D4F-B38CD60A183F}.Debug|Win32.Build.0 = Debug|Win32
- {47C93F52-AB4E-4FF9-8D4F-B38CD60A183F}.Debug|x64.ActiveCfg = Debug|Win32
- {47C93F52-AB4E-4FF9-8D4F-B38CD60A183F}.Release|Win32.ActiveCfg = Release|Win32
- {47C93F52-AB4E-4FF9-8D4F-B38CD60A183F}.Release|Win32.Build.0 = Release|Win32
- {47C93F52-AB4E-4FF9-8D4F-B38CD60A183F}.Release|x64.ActiveCfg = Release|Win32
- {8278251F-6C1F-4D80-8499-FA7B590FAFE6}.Debug|Win32.ActiveCfg = Debug|Win32
- {8278251F-6C1F-4D80-8499-FA7B590FAFE6}.Debug|Win32.Build.0 = Debug|Win32
- {8278251F-6C1F-4D80-8499-FA7B590FAFE6}.Debug|x64.ActiveCfg = Debug|Win32
- {8278251F-6C1F-4D80-8499-FA7B590FAFE6}.Release|Win32.ActiveCfg = Release|Win32
- {8278251F-6C1F-4D80-8499-FA7B590FAFE6}.Release|Win32.Build.0 = Release|Win32
- {8278251F-6C1F-4D80-8499-FA7B590FAFE6}.Release|x64.ActiveCfg = Release|Win32
- {4E69AC1F-1C7A-4D58-917C-E764FBEB489A}.Debug|Win32.ActiveCfg = Debug|Win32
- {4E69AC1F-1C7A-4D58-917C-E764FBEB489A}.Debug|Win32.Build.0 = Debug|Win32
- {4E69AC1F-1C7A-4D58-917C-E764FBEB489A}.Debug|x64.ActiveCfg = Debug|Win32
- {4E69AC1F-1C7A-4D58-917C-E764FBEB489A}.Release|Win32.ActiveCfg = Release|Win32
- {4E69AC1F-1C7A-4D58-917C-E764FBEB489A}.Release|Win32.Build.0 = Release|Win32
- {4E69AC1F-1C7A-4D58-917C-E764FBEB489A}.Release|x64.ActiveCfg = Release|Win32
- {120CFF94-ED4B-4C5B-9587-9E40889F15F7}.Debug|Win32.ActiveCfg = Debug|Win32
- {120CFF94-ED4B-4C5B-9587-9E40889F15F7}.Debug|Win32.Build.0 = Debug|Win32
- {120CFF94-ED4B-4C5B-9587-9E40889F15F7}.Debug|x64.ActiveCfg = Debug|Win32
- {120CFF94-ED4B-4C5B-9587-9E40889F15F7}.Release|Win32.ActiveCfg = Release|Win32
- {120CFF94-ED4B-4C5B-9587-9E40889F15F7}.Release|Win32.Build.0 = Release|Win32
- {120CFF94-ED4B-4C5B-9587-9E40889F15F7}.Release|x64.ActiveCfg = Release|Win32
- {B9E5BFFC-D843-4E0E-9D3E-23913A613473}.Debug|Win32.ActiveCfg = Debug|Win32
- {B9E5BFFC-D843-4E0E-9D3E-23913A613473}.Debug|Win32.Build.0 = Debug|Win32
- {B9E5BFFC-D843-4E0E-9D3E-23913A613473}.Debug|x64.ActiveCfg = Debug|Win32
- {B9E5BFFC-D843-4E0E-9D3E-23913A613473}.Release|Win32.ActiveCfg = Release|Win32
- {B9E5BFFC-D843-4E0E-9D3E-23913A613473}.Release|Win32.Build.0 = Release|Win32
- {B9E5BFFC-D843-4E0E-9D3E-23913A613473}.Release|x64.ActiveCfg = Release|Win32
- {2E54D748-781B-4DF2-A1DD-B9384A821810}.Debug|Win32.ActiveCfg = Debug|Win32
- {2E54D748-781B-4DF2-A1DD-B9384A821810}.Debug|Win32.Build.0 = Debug|Win32
- {2E54D748-781B-4DF2-A1DD-B9384A821810}.Debug|x64.ActiveCfg = Debug|Win32
- {2E54D748-781B-4DF2-A1DD-B9384A821810}.Release|Win32.ActiveCfg = Release|Win32
- {2E54D748-781B-4DF2-A1DD-B9384A821810}.Release|Win32.Build.0 = Release|Win32
- {2E54D748-781B-4DF2-A1DD-B9384A821810}.Release|x64.ActiveCfg = Release|Win32
- {5EE56061-643D-406E-B42D-4299D2411056}.Debug|Win32.ActiveCfg = Debug|Win32
- {5EE56061-643D-406E-B42D-4299D2411056}.Debug|Win32.Build.0 = Debug|Win32
- {5EE56061-643D-406E-B42D-4299D2411056}.Debug|x64.ActiveCfg = Debug|Win32
- {5EE56061-643D-406E-B42D-4299D2411056}.Release|Win32.ActiveCfg = Release|Win32
- {5EE56061-643D-406E-B42D-4299D2411056}.Release|Win32.Build.0 = Release|Win32
- {5EE56061-643D-406E-B42D-4299D2411056}.Release|x64.ActiveCfg = Release|Win32
- {667CE95F-5DD8-4395-8C18-5CA8A175B12D}.Debug|Win32.ActiveCfg = Debug|Win32
- {667CE95F-5DD8-4395-8C18-5CA8A175B12D}.Debug|Win32.Build.0 = Debug|Win32
- {667CE95F-5DD8-4395-8C18-5CA8A175B12D}.Debug|x64.ActiveCfg = Debug|Win32
- {667CE95F-5DD8-4395-8C18-5CA8A175B12D}.Release|Win32.ActiveCfg = Release|Win32
- {667CE95F-5DD8-4395-8C18-5CA8A175B12D}.Release|Win32.Build.0 = Release|Win32
- {667CE95F-5DD8-4395-8C18-5CA8A175B12D}.Release|x64.ActiveCfg = Release|Win32
- {EEACE995-26BC-4D56-A8B3-3E7A9AB3EB26}.Debug|Win32.ActiveCfg = Debug|Win32
- {EEACE995-26BC-4D56-A8B3-3E7A9AB3EB26}.Debug|Win32.Build.0 = Debug|Win32
- {EEACE995-26BC-4D56-A8B3-3E7A9AB3EB26}.Debug|x64.ActiveCfg = Debug|Win32
- {EEACE995-26BC-4D56-A8B3-3E7A9AB3EB26}.Release|Win32.ActiveCfg = Release|Win32
- {EEACE995-26BC-4D56-A8B3-3E7A9AB3EB26}.Release|Win32.Build.0 = Release|Win32
- {EEACE995-26BC-4D56-A8B3-3E7A9AB3EB26}.Release|x64.ActiveCfg = Release|Win32
- {CC1DE9A2-B456-4565-9C21-932253E969B9}.Debug|Win32.ActiveCfg = Debug|Win32
- {CC1DE9A2-B456-4565-9C21-932253E969B9}.Debug|Win32.Build.0 = Debug|Win32
- {CC1DE9A2-B456-4565-9C21-932253E969B9}.Debug|x64.ActiveCfg = Debug|Win32
- {CC1DE9A2-B456-4565-9C21-932253E969B9}.Release|Win32.ActiveCfg = Release|Win32
- {CC1DE9A2-B456-4565-9C21-932253E969B9}.Release|Win32.Build.0 = Release|Win32
- {CC1DE9A2-B456-4565-9C21-932253E969B9}.Release|x64.ActiveCfg = Release|Win32
- {E746FCA9-64C3-433E-85E8-9A5A67AB7ED6}.Debug|Win32.ActiveCfg = Debug|Win32
- {E746FCA9-64C3-433E-85E8-9A5A67AB7ED6}.Debug|Win32.Build.0 = Debug|Win32
- {E746FCA9-64C3-433E-85E8-9A5A67AB7ED6}.Debug|x64.ActiveCfg = Debug|x64
- {E746FCA9-64C3-433E-85E8-9A5A67AB7ED6}.Debug|x64.Build.0 = Debug|x64
- {E746FCA9-64C3-433E-85E8-9A5A67AB7ED6}.Release|Win32.ActiveCfg = Release|Win32
- {E746FCA9-64C3-433E-85E8-9A5A67AB7ED6}.Release|Win32.Build.0 = Release|Win32
- {E746FCA9-64C3-433E-85E8-9A5A67AB7ED6}.Release|x64.ActiveCfg = Release|x64
- {E746FCA9-64C3-433E-85E8-9A5A67AB7ED6}.Release|x64.Build.0 = Release|x64
- {B5871A7A-968C-42E3-A33B-981E6F448E78}.Debug|Win32.ActiveCfg = Debug|Win32
- {B5871A7A-968C-42E3-A33B-981E6F448E78}.Debug|Win32.Build.0 = Debug|Win32
- {B5871A7A-968C-42E3-A33B-981E6F448E78}.Debug|x64.ActiveCfg = Debug|x64
- {B5871A7A-968C-42E3-A33B-981E6F448E78}.Debug|x64.Build.0 = Debug|x64
- {B5871A7A-968C-42E3-A33B-981E6F448E78}.Release|Win32.ActiveCfg = Release|Win32
- {B5871A7A-968C-42E3-A33B-981E6F448E78}.Release|Win32.Build.0 = Release|Win32
- {B5871A7A-968C-42E3-A33B-981E6F448E78}.Release|x64.ActiveCfg = Release|x64
- {B5871A7A-968C-42E3-A33B-981E6F448E78}.Release|x64.Build.0 = Release|x64
- {5620F0E4-6C43-49BC-A178-B804E1A0C3A7}.Debug|Win32.ActiveCfg = Debug|Win32
- {5620F0E4-6C43-49BC-A178-B804E1A0C3A7}.Debug|Win32.Build.0 = Debug|Win32
- {5620F0E4-6C43-49BC-A178-B804E1A0C3A7}.Debug|x64.ActiveCfg = Debug|x64
- {5620F0E4-6C43-49BC-A178-B804E1A0C3A7}.Debug|x64.Build.0 = Debug|x64
- {5620F0E4-6C43-49BC-A178-B804E1A0C3A7}.Release|Win32.ActiveCfg = Release|Win32
- {5620F0E4-6C43-49BC-A178-B804E1A0C3A7}.Release|Win32.Build.0 = Release|Win32
- {5620F0E4-6C43-49BC-A178-B804E1A0C3A7}.Release|x64.ActiveCfg = Release|x64
- {5620F0E4-6C43-49BC-A178-B804E1A0C3A7}.Release|x64.Build.0 = Release|x64
- {E12EA115-EBC7-47C2-B651-30A0CE986025}.Debug|Win32.ActiveCfg = Debug|Win32
- {E12EA115-EBC7-47C2-B651-30A0CE986025}.Debug|Win32.Build.0 = Debug|Win32
- {E12EA115-EBC7-47C2-B651-30A0CE986025}.Debug|x64.ActiveCfg = Debug|Win32
- {E12EA115-EBC7-47C2-B651-30A0CE986025}.Release|Win32.ActiveCfg = Release|Win32
- {E12EA115-EBC7-47C2-B651-30A0CE986025}.Release|Win32.Build.0 = Release|Win32
- {E12EA115-EBC7-47C2-B651-30A0CE986025}.Release|x64.ActiveCfg = Release|Win32
- {5B3A6DB8-1E7E-40D7-92B9-DA8AAE619FAD}.Debug|Win32.ActiveCfg = Debug|Win32
- {5B3A6DB8-1E7E-40D7-92B9-DA8AAE619FAD}.Debug|Win32.Build.0 = Debug|Win32
- {5B3A6DB8-1E7E-40D7-92B9-DA8AAE619FAD}.Debug|x64.ActiveCfg = Debug|x64
- {5B3A6DB8-1E7E-40D7-92B9-DA8AAE619FAD}.Debug|x64.Build.0 = Debug|x64
- {5B3A6DB8-1E7E-40D7-92B9-DA8AAE619FAD}.Release|Win32.ActiveCfg = Release|Win32
- {5B3A6DB8-1E7E-40D7-92B9-DA8AAE619FAD}.Release|Win32.Build.0 = Release|Win32
- {5B3A6DB8-1E7E-40D7-92B9-DA8AAE619FAD}.Release|x64.ActiveCfg = Release|x64
- {5B3A6DB8-1E7E-40D7-92B9-DA8AAE619FAD}.Release|x64.Build.0 = Release|x64
- {667CE95F-5DD8-4495-8C18-5CA8A175B12D}.Debug|Win32.ActiveCfg = Debug|Win32
- {667CE95F-5DD8-4495-8C18-5CA8A175B12D}.Debug|Win32.Build.0 = Debug|Win32
- {667CE95F-5DD8-4495-8C18-5CA8A175B12D}.Debug|x64.ActiveCfg = Debug|Win32
- {667CE95F-5DD8-4495-8C18-5CA8A175B12D}.Release|Win32.ActiveCfg = Release|Win32
- {667CE95F-5DD8-4495-8C18-5CA8A175B12D}.Release|Win32.Build.0 = Release|Win32
- {667CE95F-5DD8-4495-8C18-5CA8A175B12D}.Release|x64.ActiveCfg = Release|Win32
- {FBE32DF3-0FB0-4F2F-A424-2C21BD7BC325}.Debug|Win32.ActiveCfg = Debug|Win32
- {FBE32DF3-0FB0-4F2F-A424-2C21BD7BC325}.Debug|Win32.Build.0 = Debug|Win32
- {FBE32DF3-0FB0-4F2F-A424-2C21BD7BC325}.Debug|x64.ActiveCfg = Debug|x64
- {FBE32DF3-0FB0-4F2F-A424-2C21BD7BC325}.Debug|x64.Build.0 = Debug|x64
- {FBE32DF3-0FB0-4F2F-A424-2C21BD7BC325}.Release|Win32.ActiveCfg = Release|Win32
- {FBE32DF3-0FB0-4F2F-A424-2C21BD7BC325}.Release|Win32.Build.0 = Release|Win32
- {FBE32DF3-0FB0-4F2F-A424-2C21BD7BC325}.Release|x64.ActiveCfg = Release|x64
- {FBE32DF3-0FB0-4F2F-A424-2C21BD7BC325}.Release|x64.Build.0 = Release|x64
- {EB6E138B-9DE5-41E8-A127-3675AA2BA607}.Debug|Win32.ActiveCfg = Debug|Win32
- {EB6E138B-9DE5-41E8-A127-3675AA2BA607}.Debug|Win32.Build.0 = Debug|Win32
- {EB6E138B-9DE5-41E8-A127-3675AA2BA607}.Debug|x64.ActiveCfg = Debug|Win32
- {EB6E138B-9DE5-41E8-A127-3675AA2BA607}.Release|Win32.ActiveCfg = Release|Win32
- {EB6E138B-9DE5-41E8-A127-3675AA2BA607}.Release|Win32.Build.0 = Release|Win32
- {EB6E138B-9DE5-41E8-A127-3675AA2BA607}.Release|x64.ActiveCfg = Release|Win32
- {DD670DCB-2554-4FAE-B7C9-D7F0C3087C10}.Debug|Win32.ActiveCfg = Debug|Win32
- {DD670DCB-2554-4FAE-B7C9-D7F0C3087C10}.Debug|Win32.Build.0 = Debug|Win32
- {DD670DCB-2554-4FAE-B7C9-D7F0C3087C10}.Debug|x64.ActiveCfg = Debug|Win32
- {DD670DCB-2554-4FAE-B7C9-D7F0C3087C10}.Release|Win32.ActiveCfg = Release|Win32
- {DD670DCB-2554-4FAE-B7C9-D7F0C3087C10}.Release|Win32.Build.0 = Release|Win32
- {DD670DCB-2554-4FAE-B7C9-D7F0C3087C10}.Release|x64.ActiveCfg = Release|Win32
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
+Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual C++ Express 2010 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "esUtil", "gles2_book\Common\esUtil.vcxproj", "{47C93F52-AB4E-4FF9-8D4F-B38CD60A183F}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Hello_Triangle", "gles2_book\Hello_Triangle\Hello_Triangle.vcxproj", "{8278251F-6C1F-4D80-8499-FA7B590FAFE6}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MipMap2D", "gles2_book\MipMap2D\MipMap2D.vcxproj", "{4E69AC1F-1C7A-4D58-917C-E764FBEB489A}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MultiTexture", "gles2_book\MultiTexture\MultiTexture.vcxproj", "{120CFF94-ED4B-4C5B-9587-9E40889F15F7}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ParticleSystem", "gles2_book\ParticleSystem\ParticleSystem.vcxproj", "{B9E5BFFC-D843-4E0E-9D3E-23913A613473}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Simple_Texture2D", "gles2_book\Simple_Texture2D\Simple_Texture2D.vcxproj", "{2E54D748-781B-4DF2-A1DD-B9384A821810}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Simple_TextureCubemap", "gles2_book\Simple_TextureCubemap\Simple_TextureCubemap.vcxproj", "{5EE56061-643D-406E-B42D-4299D2411056}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Simple_VertexShader", "gles2_book\Simple_VertexShader\Simple_VertexShader.vcxproj", "{667CE95F-5DD8-4395-8C18-5CA8A175B12D}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Stencil_Test", "gles2_book\Stencil_Test\Stencil_Test.vcxproj", "{EEACE995-26BC-4D56-A8B3-3E7A9AB3EB26}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TextureWrap", "gles2_book\TextureWrap\TextureWrap.vcxproj", "{CC1DE9A2-B456-4565-9C21-932253E969B9}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libEGL", "..\src\libEGL\libEGL.vcxproj", "{E746FCA9-64C3-433E-85E8-9A5A67AB7ED6}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libGLESv2", "..\src\libGLESv2\libGLESv2.vcxproj", "{B5871A7A-968C-42E3-A33B-981E6F448E78}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "essl_to_hlsl", "translator\essl_to_hlsl.vcxproj", "{E12EA115-EBC7-47C2-B651-30A0CE986025}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PostSubBuffer", "gles2_book\PostSubBuffer\PostSubBuffer.vcxproj", "{667CE95F-5DD8-4495-8C18-5CA8A175B12D}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "preprocessor", "..\src\compiler\preprocessor\preprocessor.vcxproj", "{FBE32DF3-0FB0-4F2F-A424-2C21BD7BC325}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Simple_Instancing", "angle\Simple_Instancing\Simple_Instancing.vcxproj", "{EB6E138B-9DE5-41E8-A127-3675AA2BA607}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MultipleRenderTargets", "gles2_book\MultipleRenderTargets\MultipleRenderTargets.vcxproj", "{DD670DCB-2554-4FAE-B7C9-D7F0C3087C10}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "translator", "..\src\compiler\translator.vcxproj", "{5B3A6DB8-1E7E-40D7-92B9-DA8AAE619FAD}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {47C93F52-AB4E-4FF9-8D4F-B38CD60A183F}.Debug|Win32.ActiveCfg = Debug|Win32 + {47C93F52-AB4E-4FF9-8D4F-B38CD60A183F}.Debug|Win32.Build.0 = Debug|Win32 + {47C93F52-AB4E-4FF9-8D4F-B38CD60A183F}.Debug|x64.ActiveCfg = Debug|Win32 + {47C93F52-AB4E-4FF9-8D4F-B38CD60A183F}.Release|Win32.ActiveCfg = Release|Win32 + {47C93F52-AB4E-4FF9-8D4F-B38CD60A183F}.Release|Win32.Build.0 = Release|Win32 + {47C93F52-AB4E-4FF9-8D4F-B38CD60A183F}.Release|x64.ActiveCfg = Release|Win32 + {8278251F-6C1F-4D80-8499-FA7B590FAFE6}.Debug|Win32.ActiveCfg = Debug|Win32 + {8278251F-6C1F-4D80-8499-FA7B590FAFE6}.Debug|Win32.Build.0 = Debug|Win32 + {8278251F-6C1F-4D80-8499-FA7B590FAFE6}.Debug|x64.ActiveCfg = Debug|Win32 + {8278251F-6C1F-4D80-8499-FA7B590FAFE6}.Release|Win32.ActiveCfg = Release|Win32 + {8278251F-6C1F-4D80-8499-FA7B590FAFE6}.Release|Win32.Build.0 = Release|Win32 + {8278251F-6C1F-4D80-8499-FA7B590FAFE6}.Release|x64.ActiveCfg = Release|Win32 + {4E69AC1F-1C7A-4D58-917C-E764FBEB489A}.Debug|Win32.ActiveCfg = Debug|Win32 + {4E69AC1F-1C7A-4D58-917C-E764FBEB489A}.Debug|Win32.Build.0 = Debug|Win32 + {4E69AC1F-1C7A-4D58-917C-E764FBEB489A}.Debug|x64.ActiveCfg = Debug|Win32 + {4E69AC1F-1C7A-4D58-917C-E764FBEB489A}.Release|Win32.ActiveCfg = Release|Win32 + {4E69AC1F-1C7A-4D58-917C-E764FBEB489A}.Release|Win32.Build.0 = Release|Win32 + {4E69AC1F-1C7A-4D58-917C-E764FBEB489A}.Release|x64.ActiveCfg = Release|Win32 + {120CFF94-ED4B-4C5B-9587-9E40889F15F7}.Debug|Win32.ActiveCfg = Debug|Win32 + {120CFF94-ED4B-4C5B-9587-9E40889F15F7}.Debug|Win32.Build.0 = Debug|Win32 + {120CFF94-ED4B-4C5B-9587-9E40889F15F7}.Debug|x64.ActiveCfg = Debug|Win32 + {120CFF94-ED4B-4C5B-9587-9E40889F15F7}.Release|Win32.ActiveCfg = Release|Win32 + {120CFF94-ED4B-4C5B-9587-9E40889F15F7}.Release|Win32.Build.0 = Release|Win32 + {120CFF94-ED4B-4C5B-9587-9E40889F15F7}.Release|x64.ActiveCfg = Release|Win32 + {B9E5BFFC-D843-4E0E-9D3E-23913A613473}.Debug|Win32.ActiveCfg = Debug|Win32 + {B9E5BFFC-D843-4E0E-9D3E-23913A613473}.Debug|Win32.Build.0 = Debug|Win32 + {B9E5BFFC-D843-4E0E-9D3E-23913A613473}.Debug|x64.ActiveCfg = Debug|Win32 + {B9E5BFFC-D843-4E0E-9D3E-23913A613473}.Release|Win32.ActiveCfg = Release|Win32 + {B9E5BFFC-D843-4E0E-9D3E-23913A613473}.Release|Win32.Build.0 = Release|Win32 + {B9E5BFFC-D843-4E0E-9D3E-23913A613473}.Release|x64.ActiveCfg = Release|Win32 + {2E54D748-781B-4DF2-A1DD-B9384A821810}.Debug|Win32.ActiveCfg = Debug|Win32 + {2E54D748-781B-4DF2-A1DD-B9384A821810}.Debug|Win32.Build.0 = Debug|Win32 + {2E54D748-781B-4DF2-A1DD-B9384A821810}.Debug|x64.ActiveCfg = Debug|Win32 + {2E54D748-781B-4DF2-A1DD-B9384A821810}.Release|Win32.ActiveCfg = Release|Win32 + {2E54D748-781B-4DF2-A1DD-B9384A821810}.Release|Win32.Build.0 = Release|Win32 + {2E54D748-781B-4DF2-A1DD-B9384A821810}.Release|x64.ActiveCfg = Release|Win32 + {5EE56061-643D-406E-B42D-4299D2411056}.Debug|Win32.ActiveCfg = Debug|Win32 + {5EE56061-643D-406E-B42D-4299D2411056}.Debug|Win32.Build.0 = Debug|Win32 + {5EE56061-643D-406E-B42D-4299D2411056}.Debug|x64.ActiveCfg = Debug|Win32 + {5EE56061-643D-406E-B42D-4299D2411056}.Release|Win32.ActiveCfg = Release|Win32 + {5EE56061-643D-406E-B42D-4299D2411056}.Release|Win32.Build.0 = Release|Win32 + {5EE56061-643D-406E-B42D-4299D2411056}.Release|x64.ActiveCfg = Release|Win32 + {667CE95F-5DD8-4395-8C18-5CA8A175B12D}.Debug|Win32.ActiveCfg = Debug|Win32 + {667CE95F-5DD8-4395-8C18-5CA8A175B12D}.Debug|Win32.Build.0 = Debug|Win32 + {667CE95F-5DD8-4395-8C18-5CA8A175B12D}.Debug|x64.ActiveCfg = Debug|Win32 + {667CE95F-5DD8-4395-8C18-5CA8A175B12D}.Release|Win32.ActiveCfg = Release|Win32 + {667CE95F-5DD8-4395-8C18-5CA8A175B12D}.Release|Win32.Build.0 = Release|Win32 + {667CE95F-5DD8-4395-8C18-5CA8A175B12D}.Release|x64.ActiveCfg = Release|Win32 + {EEACE995-26BC-4D56-A8B3-3E7A9AB3EB26}.Debug|Win32.ActiveCfg = Debug|Win32 + {EEACE995-26BC-4D56-A8B3-3E7A9AB3EB26}.Debug|Win32.Build.0 = Debug|Win32 + {EEACE995-26BC-4D56-A8B3-3E7A9AB3EB26}.Debug|x64.ActiveCfg = Debug|Win32 + {EEACE995-26BC-4D56-A8B3-3E7A9AB3EB26}.Release|Win32.ActiveCfg = Release|Win32 + {EEACE995-26BC-4D56-A8B3-3E7A9AB3EB26}.Release|Win32.Build.0 = Release|Win32 + {EEACE995-26BC-4D56-A8B3-3E7A9AB3EB26}.Release|x64.ActiveCfg = Release|Win32 + {CC1DE9A2-B456-4565-9C21-932253E969B9}.Debug|Win32.ActiveCfg = Debug|Win32 + {CC1DE9A2-B456-4565-9C21-932253E969B9}.Debug|Win32.Build.0 = Debug|Win32 + {CC1DE9A2-B456-4565-9C21-932253E969B9}.Debug|x64.ActiveCfg = Debug|Win32 + {CC1DE9A2-B456-4565-9C21-932253E969B9}.Release|Win32.ActiveCfg = Release|Win32 + {CC1DE9A2-B456-4565-9C21-932253E969B9}.Release|Win32.Build.0 = Release|Win32 + {CC1DE9A2-B456-4565-9C21-932253E969B9}.Release|x64.ActiveCfg = Release|Win32 + {E746FCA9-64C3-433E-85E8-9A5A67AB7ED6}.Debug|Win32.ActiveCfg = Debug|Win32 + {E746FCA9-64C3-433E-85E8-9A5A67AB7ED6}.Debug|Win32.Build.0 = Debug|Win32 + {E746FCA9-64C3-433E-85E8-9A5A67AB7ED6}.Debug|x64.ActiveCfg = Debug|x64 + {E746FCA9-64C3-433E-85E8-9A5A67AB7ED6}.Debug|x64.Build.0 = Debug|x64 + {E746FCA9-64C3-433E-85E8-9A5A67AB7ED6}.Release|Win32.ActiveCfg = Release|Win32 + {E746FCA9-64C3-433E-85E8-9A5A67AB7ED6}.Release|Win32.Build.0 = Release|Win32 + {E746FCA9-64C3-433E-85E8-9A5A67AB7ED6}.Release|x64.ActiveCfg = Release|x64 + {E746FCA9-64C3-433E-85E8-9A5A67AB7ED6}.Release|x64.Build.0 = Release|x64 + {B5871A7A-968C-42E3-A33B-981E6F448E78}.Debug|Win32.ActiveCfg = Debug|Win32 + {B5871A7A-968C-42E3-A33B-981E6F448E78}.Debug|Win32.Build.0 = Debug|Win32 + {B5871A7A-968C-42E3-A33B-981E6F448E78}.Debug|x64.ActiveCfg = Debug|x64 + {B5871A7A-968C-42E3-A33B-981E6F448E78}.Debug|x64.Build.0 = Debug|x64 + {B5871A7A-968C-42E3-A33B-981E6F448E78}.Release|Win32.ActiveCfg = Release|Win32 + {B5871A7A-968C-42E3-A33B-981E6F448E78}.Release|Win32.Build.0 = Release|Win32 + {B5871A7A-968C-42E3-A33B-981E6F448E78}.Release|x64.ActiveCfg = Release|x64 + {B5871A7A-968C-42E3-A33B-981E6F448E78}.Release|x64.Build.0 = Release|x64 + {E12EA115-EBC7-47C2-B651-30A0CE986025}.Debug|Win32.ActiveCfg = Debug|Win32 + {E12EA115-EBC7-47C2-B651-30A0CE986025}.Debug|Win32.Build.0 = Debug|Win32 + {E12EA115-EBC7-47C2-B651-30A0CE986025}.Debug|x64.ActiveCfg = Debug|Win32 + {E12EA115-EBC7-47C2-B651-30A0CE986025}.Release|Win32.ActiveCfg = Release|Win32 + {E12EA115-EBC7-47C2-B651-30A0CE986025}.Release|Win32.Build.0 = Release|Win32 + {E12EA115-EBC7-47C2-B651-30A0CE986025}.Release|x64.ActiveCfg = Release|Win32 + {667CE95F-5DD8-4495-8C18-5CA8A175B12D}.Debug|Win32.ActiveCfg = Debug|Win32 + {667CE95F-5DD8-4495-8C18-5CA8A175B12D}.Debug|Win32.Build.0 = Debug|Win32 + {667CE95F-5DD8-4495-8C18-5CA8A175B12D}.Debug|x64.ActiveCfg = Debug|Win32 + {667CE95F-5DD8-4495-8C18-5CA8A175B12D}.Release|Win32.ActiveCfg = Release|Win32 + {667CE95F-5DD8-4495-8C18-5CA8A175B12D}.Release|Win32.Build.0 = Release|Win32 + {667CE95F-5DD8-4495-8C18-5CA8A175B12D}.Release|x64.ActiveCfg = Release|Win32 + {FBE32DF3-0FB0-4F2F-A424-2C21BD7BC325}.Debug|Win32.ActiveCfg = Debug|Win32 + {FBE32DF3-0FB0-4F2F-A424-2C21BD7BC325}.Debug|Win32.Build.0 = Debug|Win32 + {FBE32DF3-0FB0-4F2F-A424-2C21BD7BC325}.Debug|x64.ActiveCfg = Debug|x64 + {FBE32DF3-0FB0-4F2F-A424-2C21BD7BC325}.Debug|x64.Build.0 = Debug|x64 + {FBE32DF3-0FB0-4F2F-A424-2C21BD7BC325}.Release|Win32.ActiveCfg = Release|Win32 + {FBE32DF3-0FB0-4F2F-A424-2C21BD7BC325}.Release|Win32.Build.0 = Release|Win32 + {FBE32DF3-0FB0-4F2F-A424-2C21BD7BC325}.Release|x64.ActiveCfg = Release|x64 + {FBE32DF3-0FB0-4F2F-A424-2C21BD7BC325}.Release|x64.Build.0 = Release|x64 + {EB6E138B-9DE5-41E8-A127-3675AA2BA607}.Debug|Win32.ActiveCfg = Debug|Win32 + {EB6E138B-9DE5-41E8-A127-3675AA2BA607}.Debug|Win32.Build.0 = Debug|Win32 + {EB6E138B-9DE5-41E8-A127-3675AA2BA607}.Debug|x64.ActiveCfg = Debug|Win32 + {EB6E138B-9DE5-41E8-A127-3675AA2BA607}.Release|Win32.ActiveCfg = Release|Win32 + {EB6E138B-9DE5-41E8-A127-3675AA2BA607}.Release|Win32.Build.0 = Release|Win32 + {EB6E138B-9DE5-41E8-A127-3675AA2BA607}.Release|x64.ActiveCfg = Release|Win32 + {DD670DCB-2554-4FAE-B7C9-D7F0C3087C10}.Debug|Win32.ActiveCfg = Debug|Win32 + {DD670DCB-2554-4FAE-B7C9-D7F0C3087C10}.Debug|Win32.Build.0 = Debug|Win32 + {DD670DCB-2554-4FAE-B7C9-D7F0C3087C10}.Debug|x64.ActiveCfg = Debug|Win32 + {DD670DCB-2554-4FAE-B7C9-D7F0C3087C10}.Release|Win32.ActiveCfg = Release|Win32 + {DD670DCB-2554-4FAE-B7C9-D7F0C3087C10}.Release|Win32.Build.0 = Release|Win32 + {DD670DCB-2554-4FAE-B7C9-D7F0C3087C10}.Release|x64.ActiveCfg = Release|Win32 + {5B3A6DB8-1E7E-40D7-92B9-DA8AAE619FAD}.Debug|Win32.ActiveCfg = Debug|Win32 + {5B3A6DB8-1E7E-40D7-92B9-DA8AAE619FAD}.Debug|Win32.Build.0 = Debug|Win32 + {5B3A6DB8-1E7E-40D7-92B9-DA8AAE619FAD}.Debug|x64.ActiveCfg = Debug|x64 + {5B3A6DB8-1E7E-40D7-92B9-DA8AAE619FAD}.Debug|x64.Build.0 = Debug|x64 + {5B3A6DB8-1E7E-40D7-92B9-DA8AAE619FAD}.Release|Win32.ActiveCfg = Release|Win32 + {5B3A6DB8-1E7E-40D7-92B9-DA8AAE619FAD}.Release|Win32.Build.0 = Release|Win32 + {5B3A6DB8-1E7E-40D7-92B9-DA8AAE619FAD}.Release|x64.ActiveCfg = Release|x64 + {5B3A6DB8-1E7E-40D7-92B9-DA8AAE619FAD}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/samples/translator/essl_to_glsl.vcproj b/samples/translator/essl_to_glsl.vcproj index 0a0c0977..027632ca 100644 --- a/samples/translator/essl_to_glsl.vcproj +++ b/samples/translator/essl_to_glsl.vcproj @@ -1,193 +1,193 @@ -<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="essl_to_glsl"
- ProjectGUID="{EADEBCCD-65ED-45D1-9E06-949A21EBAB9E}"
- RootNamespace="essl_to_glsl"
- Keyword="Win32Proj"
- TargetFrameworkVersion="196613"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="../../include"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="1"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- SubSystem="1"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="1"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- EnableIntrinsicFunctions="true"
- AdditionalIncludeDirectories="../../include"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS"
- RuntimeLibrary="0"
- EnableFunctionLevelLinking="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
- >
- <File
- RelativePath="..\..\src\common\debug.cpp"
- >
- </File>
- <File
- RelativePath=".\translator.cpp"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
- >
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
+<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="9.00" + Name="essl_to_glsl" + ProjectGUID="{EADEBCCD-65ED-45D1-9E06-949A21EBAB9E}" + RootNamespace="essl_to_glsl" + Keyword="Win32Proj" + TargetFrameworkVersion="196613" + > + <Platforms> + <Platform + Name="Win32" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory="$(SolutionDir)$(ConfigurationName)" + IntermediateDirectory="$(ConfigurationName)" + ConfigurationType="1" + CharacterSet="1" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="../../include" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS" + MinimalRebuild="true" + BasicRuntimeChecks="3" + RuntimeLibrary="1" + UsePrecompiledHeader="0" + WarningLevel="3" + DebugInformationFormat="4" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + LinkIncremental="2" + GenerateDebugInformation="true" + SubSystem="1" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory="$(SolutionDir)$(ConfigurationName)" + IntermediateDirectory="$(ConfigurationName)" + ConfigurationType="1" + CharacterSet="1" + WholeProgramOptimization="1" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + EnableIntrinsicFunctions="true" + AdditionalIncludeDirectories="../../include" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS" + RuntimeLibrary="0" + EnableFunctionLevelLinking="true" + UsePrecompiledHeader="0" + WarningLevel="3" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + LinkIncremental="1" + GenerateDebugInformation="true" + SubSystem="1" + OptimizeReferences="2" + EnableCOMDATFolding="2" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <Filter + Name="Source Files" + Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx" + UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" + > + <File + RelativePath="..\..\src\common\debug.cpp" + > + </File> + <File + RelativePath=".\translator.cpp" + > + </File> + </Filter> + <Filter + Name="Header Files" + Filter="h;hpp;hxx;hm;inl;inc;xsd" + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" + > + </Filter> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/samples/translator/essl_to_hlsl.vcxproj b/samples/translator/essl_to_hlsl.vcxproj index d7bbd8cd..de6a6a74 100644 --- a/samples/translator/essl_to_hlsl.vcxproj +++ b/samples/translator/essl_to_hlsl.vcxproj @@ -1,112 +1,104 @@ -<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{E12EA115-EBC7-47C2-B651-30A0CE986025}</ProjectGuid>
- <RootNamespace>essl_to_hlsl</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>Unicode</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>../../include;../../src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
- </ClCompile>
- <Link>
- <AdditionalDependencies>d3d9.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <Optimization>MaxSpeed</Optimization>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <AdditionalIncludeDirectories>../../include;../../src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- </ClCompile>
- <Link>
- <AdditionalDependencies>d3d9.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="..\..\src\common\debug.cpp" />
- <ClCompile Include="translator.cpp" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\..\src\compiler\preprocessor\preprocessor.vcxproj">
- <Project>{fbe32df3-0fb0-4f2f-a424-2c21bd7bc325}</Project>
- </ProjectReference>
- <ProjectReference Include="..\..\src\compiler\translator_common.vcxproj">
- <Project>{5b3a6db8-1e7e-40d7-92b9-da8aae619fad}</Project>
- </ProjectReference>
- <ProjectReference Include="..\..\src\compiler\translator_hlsl.vcxproj">
- <Project>{5620f0e4-6c43-49bc-a178-b804e1a0c3a7}</Project>
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
- <Private>true</Private>
- <CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
- <LinkLibraryDependencies>true</LinkLibraryDependencies>
- <UseLibraryDependencyInputs>true</UseLibraryDependencyInputs>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
+<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectGuid>{E12EA115-EBC7-47C2-B651-30A0CE986025}</ProjectGuid> + <RootNamespace>essl_to_hlsl</RootNamespace> + <Keyword>Win32Proj</Keyword> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>Unicode</CharacterSet> + <WholeProgramOptimization>true</WholeProgramOptimization> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup> + <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>../../include;../../src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MinimalRebuild>true</MinimalRebuild> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>EditAndContinue</DebugInformationFormat> + </ClCompile> + <Link> + <AdditionalDependencies>d3d9.lib;%(AdditionalDependencies)</AdditionalDependencies> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Console</SubSystem> + <TargetMachine>MachineX86</TargetMachine> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ClCompile> + <Optimization>MaxSpeed</Optimization> + <IntrinsicFunctions>true</IntrinsicFunctions> + <AdditionalIncludeDirectories>../../include;../../src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreaded</RuntimeLibrary> + <FunctionLevelLinking>true</FunctionLevelLinking> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + </ClCompile> + <Link> + <AdditionalDependencies>d3d9.lib;%(AdditionalDependencies)</AdditionalDependencies> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Console</SubSystem> + <OptimizeReferences>true</OptimizeReferences> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <TargetMachine>MachineX86</TargetMachine> + </Link> + </ItemDefinitionGroup> + <ItemGroup> + <ClCompile Include="..\..\src\common\debug.cpp" /> + <ClCompile Include="translator.cpp" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\..\src\compiler\preprocessor\preprocessor.vcxproj"> + <Project>{fbe32df3-0fb0-4f2f-a424-2c21bd7bc325}</Project> + </ProjectReference> + <ProjectReference Include="..\..\src\compiler\translator.vcxproj"> + <Project>{5b3a6db8-1e7e-40d7-92b9-da8aae619fad}</Project> + </ProjectReference> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> </Project>
\ No newline at end of file diff --git a/samples/translator/essl_to_hlsl.vcxproj.filters b/samples/translator/essl_to_hlsl.vcxproj.filters index b8a21af4..ddfed9ff 100644 --- a/samples/translator/essl_to_hlsl.vcxproj.filters +++ b/samples/translator/essl_to_hlsl.vcxproj.filters @@ -1,21 +1,21 @@ -<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
- <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="..\..\src\common\debug.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="translator.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
+<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup> + <Filter Include="Source Files"> + <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier> + <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions> + </Filter> + <Filter Include="Header Files"> + <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier> + <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions> + </Filter> + </ItemGroup> + <ItemGroup> + <ClCompile Include="..\..\src\common\debug.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="translator.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + </ItemGroup> </Project>
\ No newline at end of file diff --git a/samples/translator/translator.cpp b/samples/translator/translator.cpp index 98227712..81fcfa3e 100644 --- a/samples/translator/translator.cpp +++ b/samples/translator/translator.cpp @@ -83,7 +83,7 @@ int main(int argc, char* argv[]) case 'i': compileOptions |= SH_INTERMEDIATE_TREE; break; case 'm': compileOptions |= SH_MAP_LONG_VARIABLE_NAMES; break; case 'o': compileOptions |= SH_OBJECT_CODE; break; - case 'u': compileOptions |= SH_ATTRIBUTES_UNIFORMS; break; + case 'u': compileOptions |= SH_VARIABLES; break; case 'l': compileOptions |= SH_UNROLL_FOR_LOOP_WITH_INTEGER_INDEX; break; case 'e': compileOptions |= SH_EMULATE_BUILT_IN_FUNCTIONS; break; case 'd': compileOptions |= SH_DEPENDENCY_GRAPH; break; @@ -172,7 +172,7 @@ int main(int argc, char* argv[]) LogMsg("END", "COMPILER", numCompiles, "OBJ CODE"); printf("\n\n"); } - if (compiled && (compileOptions & SH_ATTRIBUTES_UNIFORMS)) { + if (compiled && (compileOptions & SH_VARIABLES)) { LogMsg("BEGIN", "COMPILER", numCompiles, "ACTIVE ATTRIBS"); PrintActiveVariables(compiler, SH_ACTIVE_ATTRIBUTES, (compileOptions & SH_MAP_LONG_VARIABLE_NAMES) != 0); LogMsg("END", "COMPILER", numCompiles, "ACTIVE ATTRIBS"); @@ -305,15 +305,17 @@ void PrintActiveVariables(ShHandle compiler, ShShaderInfo varType, bool mapLongV size_t activeVars = 0; int size = 0; ShDataType type = SH_NONE; + ShPrecisionType precision = SH_PRECISION_UNDEFINED; + int staticUse = 0; const char* typeName = NULL; ShGetInfo(compiler, varType, &activeVars); for (size_t i = 0; i < activeVars; ++i) { switch (varType) { case SH_ACTIVE_ATTRIBUTES: - ShGetActiveAttrib(compiler, static_cast<int>(i), NULL, &size, &type, name, mappedName); + ShGetVariableInfo(compiler, SH_ACTIVE_ATTRIBUTES, static_cast<int>(i), NULL, &size, &type, &precision, &staticUse, name, mappedName); break; case SH_ACTIVE_UNIFORMS: - ShGetActiveUniform(compiler, static_cast<int>(i), NULL, &size, &type, name, mappedName); + ShGetVariableInfo(compiler, SH_ACTIVE_UNIFORMS, static_cast<int>(i), NULL, &size, &type, &precision, &staticUse, name, mappedName); break; default: assert(0); } diff --git a/src/ANGLE.sln b/src/ANGLE.sln index 81c1382f..af932ac3 100644 --- a/src/ANGLE.sln +++ b/src/ANGLE.sln @@ -1,66 +1,56 @@ -
-Microsoft Visual Studio Solution File, Format Version 11.00
-# Visual C++ Express 2010
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libEGL", "libEGL\libEGL.vcxproj", "{E746FCA9-64C3-433E-85E8-9A5A67AB7ED6}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libGLESv2", "libGLESv2\libGLESv2.vcxproj", "{B5871A7A-968C-42E3-A33B-981E6F448E78}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "translator_hlsl", "compiler\translator_hlsl.vcxproj", "{5620F0E4-6C43-49BC-A178-B804E1A0C3A7}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "translator_common", "compiler\translator_common.vcxproj", "{5B3A6DB8-1E7E-40D7-92B9-DA8AAE619FAD}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "preprocessor", "compiler\preprocessor\preprocessor.vcxproj", "{FBE32DF3-0FB0-4F2F-A424-2C21BD7BC325}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Win32 = Debug|Win32
- Debug|x64 = Debug|x64
- Release|Win32 = Release|Win32
- Release|x64 = Release|x64
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {E746FCA9-64C3-433E-85E8-9A5A67AB7ED6}.Debug|Win32.ActiveCfg = Debug|Win32
- {E746FCA9-64C3-433E-85E8-9A5A67AB7ED6}.Debug|Win32.Build.0 = Debug|Win32
- {E746FCA9-64C3-433E-85E8-9A5A67AB7ED6}.Debug|x64.ActiveCfg = Debug|x64
- {E746FCA9-64C3-433E-85E8-9A5A67AB7ED6}.Debug|x64.Build.0 = Debug|x64
- {E746FCA9-64C3-433E-85E8-9A5A67AB7ED6}.Release|Win32.ActiveCfg = Release|Win32
- {E746FCA9-64C3-433E-85E8-9A5A67AB7ED6}.Release|Win32.Build.0 = Release|Win32
- {E746FCA9-64C3-433E-85E8-9A5A67AB7ED6}.Release|x64.ActiveCfg = Release|x64
- {E746FCA9-64C3-433E-85E8-9A5A67AB7ED6}.Release|x64.Build.0 = Release|x64
- {B5871A7A-968C-42E3-A33B-981E6F448E78}.Debug|Win32.ActiveCfg = Debug|Win32
- {B5871A7A-968C-42E3-A33B-981E6F448E78}.Debug|Win32.Build.0 = Debug|Win32
- {B5871A7A-968C-42E3-A33B-981E6F448E78}.Debug|x64.ActiveCfg = Debug|x64
- {B5871A7A-968C-42E3-A33B-981E6F448E78}.Debug|x64.Build.0 = Debug|x64
- {B5871A7A-968C-42E3-A33B-981E6F448E78}.Release|Win32.ActiveCfg = Release|Win32
- {B5871A7A-968C-42E3-A33B-981E6F448E78}.Release|Win32.Build.0 = Release|Win32
- {B5871A7A-968C-42E3-A33B-981E6F448E78}.Release|x64.ActiveCfg = Release|x64
- {B5871A7A-968C-42E3-A33B-981E6F448E78}.Release|x64.Build.0 = Release|x64
- {5620F0E4-6C43-49BC-A178-B804E1A0C3A7}.Debug|Win32.ActiveCfg = Debug|Win32
- {5620F0E4-6C43-49BC-A178-B804E1A0C3A7}.Debug|Win32.Build.0 = Debug|Win32
- {5620F0E4-6C43-49BC-A178-B804E1A0C3A7}.Debug|x64.ActiveCfg = Debug|x64
- {5620F0E4-6C43-49BC-A178-B804E1A0C3A7}.Debug|x64.Build.0 = Debug|x64
- {5620F0E4-6C43-49BC-A178-B804E1A0C3A7}.Release|Win32.ActiveCfg = Release|Win32
- {5620F0E4-6C43-49BC-A178-B804E1A0C3A7}.Release|Win32.Build.0 = Release|Win32
- {5620F0E4-6C43-49BC-A178-B804E1A0C3A7}.Release|x64.ActiveCfg = Release|x64
- {5620F0E4-6C43-49BC-A178-B804E1A0C3A7}.Release|x64.Build.0 = Release|x64
- {5B3A6DB8-1E7E-40D7-92B9-DA8AAE619FAD}.Debug|Win32.ActiveCfg = Debug|Win32
- {5B3A6DB8-1E7E-40D7-92B9-DA8AAE619FAD}.Debug|Win32.Build.0 = Debug|Win32
- {5B3A6DB8-1E7E-40D7-92B9-DA8AAE619FAD}.Debug|x64.ActiveCfg = Debug|x64
- {5B3A6DB8-1E7E-40D7-92B9-DA8AAE619FAD}.Debug|x64.Build.0 = Debug|x64
- {5B3A6DB8-1E7E-40D7-92B9-DA8AAE619FAD}.Release|Win32.ActiveCfg = Release|Win32
- {5B3A6DB8-1E7E-40D7-92B9-DA8AAE619FAD}.Release|Win32.Build.0 = Release|Win32
- {5B3A6DB8-1E7E-40D7-92B9-DA8AAE619FAD}.Release|x64.ActiveCfg = Release|x64
- {5B3A6DB8-1E7E-40D7-92B9-DA8AAE619FAD}.Release|x64.Build.0 = Release|x64
- {FBE32DF3-0FB0-4F2F-A424-2C21BD7BC325}.Debug|Win32.ActiveCfg = Debug|Win32
- {FBE32DF3-0FB0-4F2F-A424-2C21BD7BC325}.Debug|Win32.Build.0 = Debug|Win32
- {FBE32DF3-0FB0-4F2F-A424-2C21BD7BC325}.Debug|x64.ActiveCfg = Debug|x64
- {FBE32DF3-0FB0-4F2F-A424-2C21BD7BC325}.Debug|x64.Build.0 = Debug|x64
- {FBE32DF3-0FB0-4F2F-A424-2C21BD7BC325}.Release|Win32.ActiveCfg = Release|Win32
- {FBE32DF3-0FB0-4F2F-A424-2C21BD7BC325}.Release|Win32.Build.0 = Release|Win32
- {FBE32DF3-0FB0-4F2F-A424-2C21BD7BC325}.Release|x64.ActiveCfg = Release|x64
- {FBE32DF3-0FB0-4F2F-A424-2C21BD7BC325}.Release|x64.Build.0 = Release|x64
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
+ +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual C++ Express 2010 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libEGL", "libEGL\libEGL.vcxproj", "{E746FCA9-64C3-433E-85E8-9A5A67AB7ED6}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libGLESv2", "libGLESv2\libGLESv2.vcxproj", "{B5871A7A-968C-42E3-A33B-981E6F448E78}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "translator", "compiler\translator.vcxproj", "{5B3A6DB8-1E7E-40D7-92B9-DA8AAE619FAD}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "preprocessor", "compiler\preprocessor\preprocessor.vcxproj", "{FBE32DF3-0FB0-4F2F-A424-2C21BD7BC325}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {E746FCA9-64C3-433E-85E8-9A5A67AB7ED6}.Debug|Win32.ActiveCfg = Debug|Win32 + {E746FCA9-64C3-433E-85E8-9A5A67AB7ED6}.Debug|Win32.Build.0 = Debug|Win32 + {E746FCA9-64C3-433E-85E8-9A5A67AB7ED6}.Debug|x64.ActiveCfg = Debug|x64 + {E746FCA9-64C3-433E-85E8-9A5A67AB7ED6}.Debug|x64.Build.0 = Debug|x64 + {E746FCA9-64C3-433E-85E8-9A5A67AB7ED6}.Release|Win32.ActiveCfg = Release|Win32 + {E746FCA9-64C3-433E-85E8-9A5A67AB7ED6}.Release|Win32.Build.0 = Release|Win32 + {E746FCA9-64C3-433E-85E8-9A5A67AB7ED6}.Release|x64.ActiveCfg = Release|x64 + {E746FCA9-64C3-433E-85E8-9A5A67AB7ED6}.Release|x64.Build.0 = Release|x64 + {B5871A7A-968C-42E3-A33B-981E6F448E78}.Debug|Win32.ActiveCfg = Debug|Win32 + {B5871A7A-968C-42E3-A33B-981E6F448E78}.Debug|Win32.Build.0 = Debug|Win32 + {B5871A7A-968C-42E3-A33B-981E6F448E78}.Debug|x64.ActiveCfg = Debug|x64 + {B5871A7A-968C-42E3-A33B-981E6F448E78}.Debug|x64.Build.0 = Debug|x64 + {B5871A7A-968C-42E3-A33B-981E6F448E78}.Release|Win32.ActiveCfg = Release|Win32 + {B5871A7A-968C-42E3-A33B-981E6F448E78}.Release|Win32.Build.0 = Release|Win32 + {B5871A7A-968C-42E3-A33B-981E6F448E78}.Release|x64.ActiveCfg = Release|x64 + {B5871A7A-968C-42E3-A33B-981E6F448E78}.Release|x64.Build.0 = Release|x64 + {5B3A6DB8-1E7E-40D7-92B9-DA8AAE619FAD}.Debug|Win32.ActiveCfg = Debug|Win32 + {5B3A6DB8-1E7E-40D7-92B9-DA8AAE619FAD}.Debug|Win32.Build.0 = Debug|Win32 + {5B3A6DB8-1E7E-40D7-92B9-DA8AAE619FAD}.Debug|x64.ActiveCfg = Debug|x64 + {5B3A6DB8-1E7E-40D7-92B9-DA8AAE619FAD}.Debug|x64.Build.0 = Debug|x64 + {5B3A6DB8-1E7E-40D7-92B9-DA8AAE619FAD}.Release|Win32.ActiveCfg = Release|Win32 + {5B3A6DB8-1E7E-40D7-92B9-DA8AAE619FAD}.Release|Win32.Build.0 = Release|Win32 + {5B3A6DB8-1E7E-40D7-92B9-DA8AAE619FAD}.Release|x64.ActiveCfg = Release|x64 + {5B3A6DB8-1E7E-40D7-92B9-DA8AAE619FAD}.Release|x64.Build.0 = Release|x64 + {FBE32DF3-0FB0-4F2F-A424-2C21BD7BC325}.Debug|Win32.ActiveCfg = Debug|Win32 + {FBE32DF3-0FB0-4F2F-A424-2C21BD7BC325}.Debug|Win32.Build.0 = Debug|Win32 + {FBE32DF3-0FB0-4F2F-A424-2C21BD7BC325}.Debug|x64.ActiveCfg = Debug|x64 + {FBE32DF3-0FB0-4F2F-A424-2C21BD7BC325}.Debug|x64.Build.0 = Debug|x64 + {FBE32DF3-0FB0-4F2F-A424-2C21BD7BC325}.Release|Win32.ActiveCfg = Release|Win32 + {FBE32DF3-0FB0-4F2F-A424-2C21BD7BC325}.Release|Win32.Build.0 = Release|Win32 + {FBE32DF3-0FB0-4F2F-A424-2C21BD7BC325}.Release|x64.ActiveCfg = Release|x64 + {FBE32DF3-0FB0-4F2F-A424-2C21BD7BC325}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/build_angle.gypi b/src/build_angle.gypi index c91cce1b..d87ff4e6 100644 --- a/src/build_angle.gypi +++ b/src/build_angle.gypi @@ -5,68 +5,11 @@ { 'variables': { 'angle_code': 1, - }, - 'target_defaults': { - 'defines': [ - 'ANGLE_DISABLE_TRACE', - 'ANGLE_COMPILE_OPTIMIZATION_LEVEL=D3DCOMPILE_OPTIMIZATION_LEVEL1', - 'ANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ TEXT("d3dcompiler_46.dll"), TEXT("d3dcompiler_43.dll") }', - ], - }, - 'targets': [ - { - 'target_name': 'preprocessor', - 'type': 'static_library', - 'include_dirs': [ - ], - 'sources': [ - 'compiler/preprocessor/DiagnosticsBase.cpp', - 'compiler/preprocessor/DiagnosticsBase.h', - 'compiler/preprocessor/DirectiveHandlerBase.cpp', - 'compiler/preprocessor/DirectiveHandlerBase.h', - 'compiler/preprocessor/DirectiveParser.cpp', - 'compiler/preprocessor/DirectiveParser.h', - 'compiler/preprocessor/ExpressionParser.cpp', - 'compiler/preprocessor/ExpressionParser.h', - 'compiler/preprocessor/Input.cpp', - 'compiler/preprocessor/Input.h', - 'compiler/preprocessor/length_limits.h', - 'compiler/preprocessor/Lexer.cpp', - 'compiler/preprocessor/Lexer.h', - 'compiler/preprocessor/Macro.cpp', - 'compiler/preprocessor/Macro.h', - 'compiler/preprocessor/MacroExpander.cpp', - 'compiler/preprocessor/MacroExpander.h', - 'compiler/preprocessor/numeric_lex.h', - 'compiler/preprocessor/pp_utils.h', - 'compiler/preprocessor/Preprocessor.cpp', - 'compiler/preprocessor/Preprocessor.h', - 'compiler/preprocessor/SourceLocation.h', - 'compiler/preprocessor/Token.cpp', - 'compiler/preprocessor/Token.h', - 'compiler/preprocessor/Tokenizer.cpp', - 'compiler/preprocessor/Tokenizer.h', - ], - # TODO(jschuh): http://crbug.com/167187 - 'msvs_disabled_warnings': [ - 4267, - ], - }, - { - 'target_name': 'translator_common', - 'type': 'static_library', - 'dependencies': ['preprocessor'], - 'include_dirs': [ - '.', - '../include', - ], - 'defines': [ - 'COMPILER_IMPLEMENTATION', - ], - 'sources': [ + 'translator_sources': [ 'compiler/BaseTypes.h', 'compiler/BuiltInFunctionEmulator.cpp', 'compiler/BuiltInFunctionEmulator.h', + 'compiler/CodeGen.cpp', 'compiler/Common.h', 'compiler/Compiler.cpp', 'compiler/ConstantUnion.h', @@ -74,6 +17,8 @@ 'compiler/debug.h', 'compiler/DetectCallDepth.cpp', 'compiler/DetectCallDepth.h', + 'compiler/DetectDiscontinuity.cpp', + 'compiler/DetectDiscontinuity.h', 'compiler/Diagnostics.h', 'compiler/Diagnostics.cpp', 'compiler/DirectiveHandler.h', @@ -93,6 +38,8 @@ 'compiler/InitializeDll.cpp', 'compiler/InitializeDll.h', 'compiler/InitializeGlobals.h', + 'compiler/InitializeGLPosition.cpp', + 'compiler/InitializeGLPosition.h', 'compiler/InitializeParseContext.cpp', 'compiler/InitializeParseContext.h', 'compiler/Intermediate.cpp', @@ -104,9 +51,17 @@ 'compiler/MapLongVariableNames.h', 'compiler/MMap.h', 'compiler/osinclude.h', + 'compiler/OutputESSL.cpp', + 'compiler/OutputESSL.h', + 'compiler/OutputGLSLBase.cpp', + 'compiler/OutputGLSLBase.h', + 'compiler/OutputGLSL.cpp', + 'compiler/OutputGLSL.h', + 'compiler/OutputHLSL.cpp', + 'compiler/OutputHLSL.h', 'compiler/parseConst.cpp', - 'compiler/ParseHelper.cpp', - 'compiler/ParseHelper.h', + 'compiler/ParseContext.cpp', + 'compiler/ParseContext.h', 'compiler/PoolAlloc.cpp', 'compiler/PoolAlloc.h', 'compiler/QualifierAlive.cpp', @@ -114,10 +69,23 @@ 'compiler/RemoveTree.cpp', 'compiler/RemoveTree.h', 'compiler/RenameFunction.h', + 'compiler/SearchSymbol.cpp', + 'compiler/SearchSymbol.h', + 'compiler/ShaderLang.cpp', 'compiler/ShHandle.h', 'compiler/SymbolTable.cpp', 'compiler/SymbolTable.h', + 'compiler/TranslatorESSL.cpp', + 'compiler/TranslatorESSL.h', + 'compiler/TranslatorGLSL.cpp', + 'compiler/TranslatorGLSL.h', + 'compiler/TranslatorHLSL.cpp', + 'compiler/TranslatorHLSL.h', 'compiler/Types.h', + 'compiler/UnfoldShortCircuitAST.cpp', + 'compiler/UnfoldShortCircuitAST.h', + 'compiler/UnfoldShortCircuit.cpp', + 'compiler/UnfoldShortCircuit.h', 'compiler/Uniform.cpp', 'compiler/Uniform.h', 'compiler/util.cpp', @@ -128,6 +96,8 @@ 'compiler/VariableInfo.h', 'compiler/VariablePacker.cpp', 'compiler/VariablePacker.h', + 'compiler/VersionGLSL.cpp', + 'compiler/VersionGLSL.h', # Dependency graph 'compiler/depgraph/DependencyGraph.cpp', 'compiler/depgraph/DependencyGraph.h', @@ -144,10 +114,69 @@ 'third_party/compiler/ArrayBoundsClamper.cpp', 'third_party/compiler/ArrayBoundsClamper.h', ], + }, + 'target_defaults': { + 'defines': [ + 'ANGLE_DISABLE_TRACE', + 'ANGLE_COMPILE_OPTIMIZATION_LEVEL=D3DCOMPILE_OPTIMIZATION_LEVEL1', + 'ANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ TEXT("d3dcompiler_46.dll"), TEXT("d3dcompiler_43.dll") }', + ], + }, + 'targets': [ + { + 'target_name': 'preprocessor', + 'type': 'static_library', + 'include_dirs': [ + ], + 'sources': [ + 'compiler/preprocessor/DiagnosticsBase.cpp', + 'compiler/preprocessor/DiagnosticsBase.h', + 'compiler/preprocessor/DirectiveHandlerBase.cpp', + 'compiler/preprocessor/DirectiveHandlerBase.h', + 'compiler/preprocessor/DirectiveParser.cpp', + 'compiler/preprocessor/DirectiveParser.h', + 'compiler/preprocessor/ExpressionParser.cpp', + 'compiler/preprocessor/ExpressionParser.h', + 'compiler/preprocessor/Input.cpp', + 'compiler/preprocessor/Input.h', + 'compiler/preprocessor/length_limits.h', + 'compiler/preprocessor/Lexer.cpp', + 'compiler/preprocessor/Lexer.h', + 'compiler/preprocessor/Macro.cpp', + 'compiler/preprocessor/Macro.h', + 'compiler/preprocessor/MacroExpander.cpp', + 'compiler/preprocessor/MacroExpander.h', + 'compiler/preprocessor/numeric_lex.h', + 'compiler/preprocessor/pp_utils.h', + 'compiler/preprocessor/Preprocessor.cpp', + 'compiler/preprocessor/Preprocessor.h', + 'compiler/preprocessor/SourceLocation.h', + 'compiler/preprocessor/Token.cpp', + 'compiler/preprocessor/Token.h', + 'compiler/preprocessor/Tokenizer.cpp', + 'compiler/preprocessor/Tokenizer.h', + ], + # TODO(jschuh): http://crbug.com/167187 + 'msvs_disabled_warnings': [ + 4267, + ], + }, + { + 'target_name': 'translator', + 'type': '<(component)', + 'dependencies': ['preprocessor'], + 'include_dirs': [ + '.', + '../include', + ], + 'defines': [ + 'ANGLE_TRANSLATOR_IMPLEMENTATION', + ], + 'sources': ['<@(translator_sources)'], + # TODO(jschuh): http://crbug.com/167187 size_t -> int + 'msvs_disabled_warnings': [ 4267 ], 'conditions': [ ['OS=="win"', { - # TODO(jschuh): http://crbug.com/167187 size_t -> int - 'msvs_disabled_warnings': [ 4267 ], 'sources': ['compiler/ossource_win.cpp'], }, { # else: posix 'sources': ['compiler/ossource_posix.cpp'], @@ -155,71 +184,40 @@ ], }, { - 'target_name': 'translator_glsl', - 'type': '<(component)', - 'dependencies': ['translator_common'], + 'target_name': 'translator_static', + 'type': 'static_library', + 'dependencies': ['preprocessor'], 'include_dirs': [ '.', '../include', ], + 'direct_dependent_settings': { + 'defines': [ + 'ANGLE_TRANSLATOR_STATIC', + ], + }, 'defines': [ - 'COMPILER_IMPLEMENTATION', - ], - 'sources': [ - 'compiler/CodeGenGLSL.cpp', - 'compiler/OutputESSL.cpp', - 'compiler/OutputESSL.h', - 'compiler/OutputGLSLBase.cpp', - 'compiler/OutputGLSLBase.h', - 'compiler/OutputGLSL.cpp', - 'compiler/OutputGLSL.h', - 'compiler/ShaderLang.cpp', - 'compiler/TranslatorESSL.cpp', - 'compiler/TranslatorESSL.h', - 'compiler/TranslatorGLSL.cpp', - 'compiler/TranslatorGLSL.h', - 'compiler/VersionGLSL.cpp', - 'compiler/VersionGLSL.h', + 'ANGLE_TRANSLATOR_STATIC', ], + 'sources': ['<@(translator_sources)'], # TODO(jschuh): http://crbug.com/167187 size_t -> int 'msvs_disabled_warnings': [ 4267 ], + 'conditions': [ + ['OS=="win"', { + 'sources': ['compiler/ossource_win.cpp'], + }, { # else: posix + 'sources': ['compiler/ossource_posix.cpp'], + }], + ], }, ], 'conditions': [ ['OS=="win"', { 'targets': [ { - 'target_name': 'translator_hlsl', - 'type': '<(component)', - 'dependencies': ['translator_common'], - 'include_dirs': [ - '.', - '../include', - ], - 'defines': [ - 'COMPILER_IMPLEMENTATION', - ], - 'sources': [ - 'compiler/ShaderLang.cpp', - 'compiler/DetectDiscontinuity.cpp', - 'compiler/DetectDiscontinuity.h', - 'compiler/CodeGenHLSL.cpp', - 'compiler/OutputHLSL.cpp', - 'compiler/OutputHLSL.h', - 'compiler/TranslatorHLSL.cpp', - 'compiler/TranslatorHLSL.h', - 'compiler/UnfoldShortCircuit.cpp', - 'compiler/UnfoldShortCircuit.h', - 'compiler/SearchSymbol.cpp', - 'compiler/SearchSymbol.h', - ], - # TODO(jschuh): http://crbug.com/167187 size_t -> int - 'msvs_disabled_warnings': [ 4267 ], - }, - { 'target_name': 'libGLESv2', 'type': 'shared_library', - 'dependencies': ['translator_hlsl'], + 'dependencies': ['translator'], 'include_dirs': [ '.', '../include', @@ -228,9 +226,12 @@ 'sources': [ 'third_party/murmurhash/MurmurHash3.h', 'third_party/murmurhash/MurmurHash3.cpp', + 'third_party/trace_event/trace_event.h', 'common/angleutils.h', 'common/debug.cpp', 'common/debug.h', + 'common/event_tracer.cpp', + 'common/event_tracer.h', 'common/RefCountObject.cpp', 'common/RefCountObject.h', 'common/version.h', @@ -368,6 +369,14 @@ ], } }, + 'copies': [ + { + 'destination': '<(PRODUCT_DIR)', + 'files': [ + '<(windows_sdk_path)/Redist/D3D/<(winsdk_arch)/d3dcompiler_46.dll', + ], + }, + ], }, { 'target_name': 'libEGL', diff --git a/src/common/angleutils.h b/src/common/angleutils.h index 9761567f..7723f0fb 100644 --- a/src/common/angleutils.h +++ b/src/common/angleutils.h @@ -42,6 +42,20 @@ void SafeRelease(T& resource) } } +template <typename T> +void SafeDelete(T*& resource) +{ + delete resource; + resource = NULL; +} + +template <typename T> +void SafeDeleteArray(T*& resource) +{ + delete[] resource; + resource = NULL; +} + #if defined(_MSC_VER) #define snprintf _snprintf #endif diff --git a/src/common/debug.h b/src/common/debug.h index 23ee26d2..060b7272 100644 --- a/src/common/debug.h +++ b/src/common/debug.h @@ -99,8 +99,10 @@ namespace gl #define UNREACHABLE() ERR("\t! Unreachable reached: %s(%d)\n", __FUNCTION__, __LINE__) #endif -// A macro that determines whether an object has a given runtime type. -#if !defined(NDEBUG) && (!defined(_MSC_VER) || defined(_CPPRTTI)) +// A macro that determines whether an object has a given runtime type. MSVC uses _CPPRTTI. +// GCC uses __GXX_RTTI, but the macro was introduced in version 4.3, so we assume that all older +// versions support RTTI. +#if !defined(NDEBUG) && (!defined(_MSC_VER) || defined(_CPPRTTI)) && (!defined(__GNUC__) || __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 3) || defined(__GXX_RTTI)) #define HAS_DYNAMIC_TYPE(type, obj) (dynamic_cast<type >(obj) != NULL) #else #define HAS_DYNAMIC_TYPE(type, obj) true diff --git a/src/common/event_tracer.cpp b/src/common/event_tracer.cpp new file mode 100644 index 00000000..96cbb010 --- /dev/null +++ b/src/common/event_tracer.cpp @@ -0,0 +1,49 @@ +// Copyright (c) 2012 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 "common/event_tracer.h" + +namespace gl +{ + +GetCategoryEnabledFlagFunc g_getCategoryEnabledFlag; +AddTraceEventFunc g_addTraceEvent; + +} // namespace gl + +extern "C" { + +void __stdcall SetTraceFunctionPointers(GetCategoryEnabledFlagFunc getCategoryEnabledFlag, + AddTraceEventFunc addTraceEvent) +{ + gl::g_getCategoryEnabledFlag = getCategoryEnabledFlag; + gl::g_addTraceEvent = addTraceEvent; +} + +} // extern "C" + +namespace gl +{ + +const unsigned char* TraceGetTraceCategoryEnabledFlag(const char* name) +{ + if (g_getCategoryEnabledFlag) + { + return g_getCategoryEnabledFlag(name); + } + static unsigned char disabled = 0; + return &disabled; +} + +void TraceAddTraceEvent(char phase, const unsigned char* categoryGroupEnabled, const char* name, unsigned long long id, + int numArgs, const char** argNames, const unsigned char* argTypes, + const unsigned long long* argValues, unsigned char flags) +{ + if (g_addTraceEvent) + { + g_addTraceEvent(phase, categoryGroupEnabled, name, id, numArgs, argNames, argTypes, argValues, flags); + } +} + +} // namespace gl diff --git a/src/common/event_tracer.h b/src/common/event_tracer.h new file mode 100644 index 00000000..ae397e7d --- /dev/null +++ b/src/common/event_tracer.h @@ -0,0 +1,33 @@ +// Copyright (c) 2012 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. + +#ifndef COMMON_EVENT_TRACER_H_ +#define COMMON_EVENT_TRACER_H_ + +extern "C" { + +typedef const unsigned char* (*GetCategoryEnabledFlagFunc)(const char* name); +typedef void (*AddTraceEventFunc)(char phase, const unsigned char* categoryGroupEnabled, const char* name, + unsigned long long id, int numArgs, const char** argNames, + const unsigned char* argTypes, const unsigned long long* argValues, + unsigned char flags); + +// extern "C" so that it has a reasonable name for GetProcAddress. +void __stdcall SetTraceFunctionPointers(GetCategoryEnabledFlagFunc get_category_enabled_flag, + AddTraceEventFunc add_trace_event_func); + +} + +namespace gl +{ + +const unsigned char* TraceGetTraceCategoryEnabledFlag(const char* name); + +void TraceAddTraceEvent(char phase, const unsigned char* categoryGroupEnabled, const char* name, unsigned long long id, + int numArgs, const char** argNames, const unsigned char* argTypes, + const unsigned long long* argValues, unsigned char flags); + +} + +#endif // COMMON_EVENT_TRACER_H_ diff --git a/src/common/version.h b/src/common/version.h index 0353fb48..eb028574 100644 --- a/src/common/version.h +++ b/src/common/version.h @@ -1,7 +1,7 @@ #define MAJOR_VERSION 1 #define MINOR_VERSION 2 #define BUILD_VERSION 0 -#define BUILD_REVISION 2431 +#define BUILD_REVISION 2451 #define STRINGIFY(x) #x #define MACRO_STRINGIFY(x) STRINGIFY(x) diff --git a/src/compiler/CodeGenGLSL.cpp b/src/compiler/CodeGen.cpp index 226bf8f0..24f21b87 100644 --- a/src/compiler/CodeGenGLSL.cpp +++ b/src/compiler/CodeGen.cpp @@ -4,8 +4,9 @@ // found in the LICENSE file. // -#include "compiler/TranslatorGLSL.h" #include "compiler/TranslatorESSL.h" +#include "compiler/TranslatorGLSL.h" +#include "compiler/TranslatorHLSL.h" // // This function must be provided to create the actual @@ -16,10 +17,13 @@ TCompiler* ConstructCompiler( ShShaderType type, ShShaderSpec spec, ShShaderOutput output) { switch (output) { - case SH_GLSL_OUTPUT: - return new TranslatorGLSL(type, spec); case SH_ESSL_OUTPUT: return new TranslatorESSL(type, spec); + 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; } diff --git a/src/compiler/CodeGenHLSL.cpp b/src/compiler/CodeGenHLSL.cpp deleted file mode 100644 index 637ccc5e..00000000 --- a/src/compiler/CodeGenHLSL.cpp +++ /dev/null @@ -1,33 +0,0 @@ -// -// 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/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; -} diff --git a/src/compiler/Compiler.cpp b/src/compiler/Compiler.cpp index 3e80d96a..54ca7082 100644 --- a/src/compiler/Compiler.cpp +++ b/src/compiler/Compiler.cpp @@ -8,11 +8,13 @@ #include "compiler/DetectCallDepth.h" #include "compiler/ForLoopUnroll.h" #include "compiler/Initialize.h" +#include "compiler/InitializeGLPosition.h" #include "compiler/InitializeParseContext.h" #include "compiler/MapLongVariableNames.h" -#include "compiler/ParseHelper.h" +#include "compiler/ParseContext.h" #include "compiler/RenameFunction.h" #include "compiler/ShHandle.h" +#include "compiler/UnfoldShortCircuitAST.h" #include "compiler/ValidateLimitations.h" #include "compiler/VariablePacker.h" #include "compiler/depgraph/DependencyGraph.h" @@ -29,19 +31,32 @@ bool isWebGLBasedSpec(ShShaderSpec spec) namespace { class TScopedPoolAllocator { public: - TScopedPoolAllocator(TPoolAllocator* allocator, bool pushPop) - : mAllocator(allocator), mPushPopAllocator(pushPop) { - if (mPushPopAllocator) mAllocator->push(); + TScopedPoolAllocator(TPoolAllocator* allocator) : mAllocator(allocator) { + mAllocator->push(); SetGlobalPoolAllocator(mAllocator); } ~TScopedPoolAllocator() { SetGlobalPoolAllocator(NULL); - if (mPushPopAllocator) mAllocator->pop(); + mAllocator->pop(); } private: TPoolAllocator* mAllocator; - bool mPushPopAllocator; +}; + +class TScopedSymbolTableLevel { +public: + TScopedSymbolTableLevel(TSymbolTable* table) : mTable(table) { + ASSERT(mTable->atBuiltInLevel()); + mTable->push(); + } + ~TScopedSymbolTableLevel() { + while (!mTable->atBuiltInLevel()) + mTable->pop(); + } + +private: + TSymbolTable* mTable; }; } // namespace @@ -81,7 +96,8 @@ bool TCompiler::Init(const ShBuiltInResources& resources) resources.MaxFragmentUniformVectors; maxExpressionComplexity = resources.MaxExpressionComplexity; maxCallStackDepth = resources.MaxCallStackDepth; - TScopedPoolAllocator scopedAlloc(&allocator, false); + + SetGlobalPoolAllocator(&allocator); // Generate built-in symbol table. if (!InitBuiltInSymbolTable(resources)) @@ -101,7 +117,7 @@ bool TCompiler::compile(const char* const shaderStrings[], size_t numStrings, int compileOptions) { - TScopedPoolAllocator scopedAlloc(&allocator, true); + TScopedPoolAllocator scopedAlloc(&allocator); clearResults(); if (numStrings == 0) @@ -129,11 +145,7 @@ bool TCompiler::compile(const char* const shaderStrings[], // We preserve symbols at the built-in level from compile-to-compile. // Start pushing the user-defined symbols at global level. - symbolTable.push(); - if (!symbolTable.atGlobalLevel()) { - infoSink.info.prefix(EPrefixInternalError); - infoSink.info << "Wrong symbol table level"; - } + TScopedSymbolTableLevel scopedSymbolLevel(&symbolTable); // Parse shader. bool success = @@ -178,8 +190,19 @@ bool TCompiler::compile(const char* const shaderStrings[], if (success && (compileOptions & SH_MAP_LONG_VARIABLE_NAMES) && hashFunction == NULL) mapLongVariableNames(root); - if (success && (compileOptions & SH_ATTRIBUTES_UNIFORMS)) { - collectAttribsUniforms(root); + if (success && shaderType == SH_VERTEX_SHADER && (compileOptions & SH_INIT_GL_POSITION)) { + InitializeGLPosition initGLPosition; + root->traverse(&initGLPosition); + } + + if (success && (compileOptions & SH_UNFOLD_SHORT_CIRCUIT)) { + UnfoldShortCircuitAST unfoldShortCircuit; + root->traverse(&unfoldShortCircuit); + unfoldShortCircuit.updateTree(); + } + + if (success && (compileOptions & SH_VARIABLES)) { + collectVariables(root); if (compileOptions & SH_ENFORCE_PACKING_RESTRICTIONS) { success = enforcePackingRestrictions(); if (!success) { @@ -198,10 +221,6 @@ bool TCompiler::compile(const char* const shaderStrings[], // Cleanup memory. intermediate.remove(parseContext.treeRoot); - // Ensure symbol table is returned to the built-in level, - // throwing away all but the built-ins. - while (!symbolTable.atBuiltInLevel()) - symbolTable.pop(); return success; } @@ -225,6 +244,11 @@ bool TCompiler::InitBuiltInSymbolTable(const ShBuiltInResources &resources) floatingPoint.matrix = false; floatingPoint.array = false; + TPublicType sampler; + sampler.size = 1; + sampler.matrix = false; + sampler.array = false; + switch(shaderType) { case SH_FRAGMENT_SHADER: @@ -236,6 +260,13 @@ bool TCompiler::InitBuiltInSymbolTable(const ShBuiltInResources &resources) break; default: assert(false && "Language not supported"); } + // We set defaults for all the sampler types, even those that are + // only available if an extension exists. + for (int samplerType = EbtGuardSamplerBegin + 1; + samplerType < EbtGuardSamplerEnd; ++samplerType) { + sampler.type = static_cast<TBasicType>(samplerType); + symbolTable.setDefaultPrecision(sampler, EbpLow); + } InsertBuiltInFunctions(shaderType, shaderSpec, resources, symbolTable); @@ -253,6 +284,7 @@ void TCompiler::clearResults() attribs.clear(); uniforms.clear(); + varyings.clear(); builtInFunctionEmulator.Cleanup(); @@ -358,9 +390,9 @@ bool TCompiler::enforceVertexShaderTimingRestrictions(TIntermNode* root) return restrictor.numErrors() == 0; } -void TCompiler::collectAttribsUniforms(TIntermNode* root) +void TCompiler::collectVariables(TIntermNode* root) { - CollectAttribsUniforms collect(attribs, uniforms, hashFunction); + CollectVariables collect(attribs, uniforms, varyings, hashFunction); root->traverse(&collect); } diff --git a/src/compiler/DetectDiscontinuity.cpp b/src/compiler/DetectDiscontinuity.cpp index 7c3b68a0..8cfe49ba 100644 --- a/src/compiler/DetectDiscontinuity.cpp +++ b/src/compiler/DetectDiscontinuity.cpp @@ -10,7 +10,7 @@ #include "compiler/DetectDiscontinuity.h" -#include "compiler/ParseHelper.h" +#include "compiler/ParseContext.h" namespace sh { diff --git a/src/compiler/Diagnostics.cpp b/src/compiler/Diagnostics.cpp index 8a38c41a..1c1b9b5e 100644 --- a/src/compiler/Diagnostics.cpp +++ b/src/compiler/Diagnostics.cpp @@ -30,11 +30,11 @@ void TDiagnostics::writeInfo(Severity severity, TPrefixType prefix = EPrefixNone; switch (severity) { - case ERROR: + case PP_ERROR: ++mNumErrors; prefix = EPrefixError; break; - case WARNING: + case PP_WARNING: ++mNumWarnings; prefix = EPrefixWarning; break; diff --git a/src/compiler/DirectiveHandler.cpp b/src/compiler/DirectiveHandler.cpp index d1f6ab3a..6d3d831a 100644 --- a/src/compiler/DirectiveHandler.cpp +++ b/src/compiler/DirectiveHandler.cpp @@ -39,7 +39,7 @@ TDirectiveHandler::~TDirectiveHandler() void TDirectiveHandler::handleError(const pp::SourceLocation& loc, const std::string& msg) { - mDiagnostics.writeInfo(pp::Diagnostics::ERROR, loc, msg, "", ""); + mDiagnostics.writeInfo(pp::Diagnostics::PP_ERROR, loc, msg, "", ""); } void TDirectiveHandler::handlePragma(const pp::SourceLocation& loc, @@ -73,12 +73,12 @@ void TDirectiveHandler::handlePragma(const pp::SourceLocation& loc, } else { - mDiagnostics.report(pp::Diagnostics::UNRECOGNIZED_PRAGMA, loc, name); + mDiagnostics.report(pp::Diagnostics::PP_UNRECOGNIZED_PRAGMA, loc, name); return; } if (invalidValue) - mDiagnostics.writeInfo(pp::Diagnostics::ERROR, loc, + mDiagnostics.writeInfo(pp::Diagnostics::PP_ERROR, loc, "invalid pragma value", value, "'on' or 'off' expected"); } @@ -92,7 +92,7 @@ void TDirectiveHandler::handleExtension(const pp::SourceLocation& loc, TBehavior behaviorVal = getBehavior(behavior); if (behaviorVal == EBhUndefined) { - mDiagnostics.writeInfo(pp::Diagnostics::ERROR, loc, + mDiagnostics.writeInfo(pp::Diagnostics::PP_ERROR, loc, "behavior", name, "invalid"); return; } @@ -101,13 +101,13 @@ void TDirectiveHandler::handleExtension(const pp::SourceLocation& loc, { if (behaviorVal == EBhRequire) { - mDiagnostics.writeInfo(pp::Diagnostics::ERROR, loc, + mDiagnostics.writeInfo(pp::Diagnostics::PP_ERROR, loc, "extension", name, "cannot have 'require' behavior"); } else if (behaviorVal == EBhEnable) { - mDiagnostics.writeInfo(pp::Diagnostics::ERROR, loc, + mDiagnostics.writeInfo(pp::Diagnostics::PP_ERROR, loc, "extension", name, "cannot have 'enable' behavior"); } @@ -127,15 +127,15 @@ void TDirectiveHandler::handleExtension(const pp::SourceLocation& loc, return; } - pp::Diagnostics::Severity severity = pp::Diagnostics::ERROR; + pp::Diagnostics::Severity severity = pp::Diagnostics::PP_ERROR; switch (behaviorVal) { case EBhRequire: - severity = pp::Diagnostics::ERROR; + severity = pp::Diagnostics::PP_ERROR; break; case EBhEnable: case EBhWarn: case EBhDisable: - severity = pp::Diagnostics::WARNING; + severity = pp::Diagnostics::PP_WARNING; break; default: UNREACHABLE(); @@ -155,7 +155,7 @@ void TDirectiveHandler::handleVersion(const pp::SourceLocation& loc, std::stringstream stream; stream << version; std::string str = stream.str(); - mDiagnostics.writeInfo(pp::Diagnostics::ERROR, loc, + mDiagnostics.writeInfo(pp::Diagnostics::PP_ERROR, loc, "version number", str, "not supported"); } } diff --git a/src/compiler/ForLoopUnroll.h b/src/compiler/ForLoopUnroll.h index e800e25b..738b7692 100644 --- a/src/compiler/ForLoopUnroll.h +++ b/src/compiler/ForLoopUnroll.h @@ -4,6 +4,9 @@ // found in the LICENSE file. // +#ifndef COMPILER_FORLOOPUNROLL_H_ +#define COMPILER_FORLOOPUNROLL_H_ + #include "compiler/intermediate.h" struct TLoopIndexInfo { @@ -46,3 +49,4 @@ private: TVector<TLoopIndexInfo> mLoopIndexStack; }; +#endif diff --git a/src/compiler/InfoSink.h b/src/compiler/InfoSink.h index 68888381..be0ddffe 100644 --- a/src/compiler/InfoSink.h +++ b/src/compiler/InfoSink.h @@ -8,6 +8,7 @@ #define _INFOSINK_INCLUDED_ #include <math.h> +#include <stdlib.h> #include "compiler/Common.h" // Returns the fractional part of the given floating-point number. diff --git a/src/compiler/InitializeGLPosition.cpp b/src/compiler/InitializeGLPosition.cpp new file mode 100644 index 00000000..e0193e39 --- /dev/null +++ b/src/compiler/InitializeGLPosition.cpp @@ -0,0 +1,61 @@ +// +// 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/InitializeGLPosition.h" +#include "compiler/debug.h" + +bool InitializeGLPosition::visitAggregate(Visit visit, TIntermAggregate* node) +{ + bool visitChildren = !mCodeInserted; + switch (node->getOp()) + { + case EOpSequence: break; + case EOpFunction: + { + // Function definition. + ASSERT(visit == PreVisit); + if (node->getName() == "main(") + { + TIntermSequence &sequence = node->getSequence(); + ASSERT((sequence.size() == 1) || (sequence.size() == 2)); + TIntermAggregate *body = NULL; + if (sequence.size() == 1) + { + body = new TIntermAggregate(EOpSequence); + sequence.push_back(body); + } + else + { + body = sequence[1]->getAsAggregate(); + } + ASSERT(body); + insertCode(body->getSequence()); + mCodeInserted = true; + } + break; + } + default: visitChildren = false; break; + } + return visitChildren; +} + +void InitializeGLPosition::insertCode(TIntermSequence& sequence) +{ + TIntermBinary *binary = new TIntermBinary(EOpAssign); + sequence.insert(sequence.begin(), binary); + + TIntermSymbol *left = new TIntermSymbol( + 0, "gl_Position", TType(EbtFloat, EbpUndefined, EvqPosition, 4)); + binary->setLeft(left); + + ConstantUnion *u = new ConstantUnion[4]; + for (int ii = 0; ii < 3; ++ii) + u[ii].setFConst(0.0f); + u[3].setFConst(1.0f); + TIntermConstantUnion *right = new TIntermConstantUnion( + u, TType(EbtFloat, EbpUndefined, EvqConst, 4)); + binary->setRight(right); +} diff --git a/src/compiler/InitializeGLPosition.h b/src/compiler/InitializeGLPosition.h new file mode 100644 index 00000000..1b11075a --- /dev/null +++ b/src/compiler/InitializeGLPosition.h @@ -0,0 +1,33 @@ +// +// 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. +// + +#ifndef COMPILER_INITIALIZE_GL_POSITION_H_ +#define COMPILER_INITIALIZE_GL_POSITION_H_ + +#include "compiler/intermediate.h" + +class InitializeGLPosition : public TIntermTraverser +{ +public: + InitializeGLPosition() : mCodeInserted(false) { } + +protected: + virtual bool visitBinary(Visit visit, TIntermBinary* node) { return false; } + virtual bool visitUnary(Visit visit, TIntermUnary* node) { return false; } + virtual bool visitSelection(Visit visit, TIntermSelection* node) { return false; } + virtual bool visitLoop(Visit visit, TIntermLoop* node) { return false; } + virtual bool visitBranch(Visit visit, TIntermBranch* node) { return false; } + + virtual bool visitAggregate(Visit visit, TIntermAggregate* node); + +private: + // Insert AST node in the beginning of main() for "gl_Position = vec4(0.0, 0.0, 0.0, 1.0);". + void insertCode(TIntermSequence& sequence); + + bool mCodeInserted; +}; + +#endif // COMPILER_INITIALIZE_GL_POSITION_H_ diff --git a/src/compiler/IntermTraverse.cpp b/src/compiler/IntermTraverse.cpp index a13877f1..9a691da7 100644 --- a/src/compiler/IntermTraverse.cpp +++ b/src/compiler/IntermTraverse.cpp @@ -23,271 +23,237 @@ // // Traversal functions for terminals are straighforward.... // -void TIntermSymbol::traverse(TIntermTraverser* it) +void TIntermSymbol::traverse(TIntermTraverser *it) { - it->visitSymbol(this); + it->visitSymbol(this); } -void TIntermConstantUnion::traverse(TIntermTraverser* it) +void TIntermConstantUnion::traverse(TIntermTraverser *it) { - it->visitConstantUnion(this); + it->visitConstantUnion(this); } // // Traverse a binary node. // -void TIntermBinary::traverse(TIntermTraverser* it) +void TIntermBinary::traverse(TIntermTraverser *it) { - bool visit = true; - - // - // visit the node before children if pre-visiting. - // - if(it->preVisit) - { - visit = it->visitBinary(PreVisit, this); - } - - // - // Visit the children, in the right order. - // - if(visit) - { - it->incrementDepth(); - - if(it->rightToLeft) - { - if(right) - { - right->traverse(it); - } - - if(it->inVisit) - { - visit = it->visitBinary(InVisit, this); - } - - if(visit && left) - { - left->traverse(it); - } - } - else - { - if(left) - { - left->traverse(it); - } - - if(it->inVisit) - { - visit = it->visitBinary(InVisit, this); - } - - if(visit && right) - { - right->traverse(it); - } - } - - it->decrementDepth(); - } - - // - // Visit the node after the children, if requested and the traversal - // hasn't been cancelled yet. - // - if(visit && it->postVisit) - { - it->visitBinary(PostVisit, this); - } + bool visit = true; + + // + // visit the node before children if pre-visiting. + // + if (it->preVisit) + visit = it->visitBinary(PreVisit, this); + + // + // Visit the children, in the right order. + // + if (visit) + { + it->incrementDepth(this); + + if (it->rightToLeft) + { + if (right) + right->traverse(it); + + if (it->inVisit) + visit = it->visitBinary(InVisit, this); + + if (visit && left) + left->traverse(it); + } + else + { + if (left) + left->traverse(it); + + if (it->inVisit) + visit = it->visitBinary(InVisit, this); + + if (visit && right) + right->traverse(it); + } + + it->decrementDepth(); + } + + // + // Visit the node after the children, if requested and the traversal + // hasn't been cancelled yet. + // + if (visit && it->postVisit) + it->visitBinary(PostVisit, this); } // // Traverse a unary node. Same comments in binary node apply here. // -void TIntermUnary::traverse(TIntermTraverser* it) +void TIntermUnary::traverse(TIntermTraverser *it) { - bool visit = true; - - if (it->preVisit) - visit = it->visitUnary(PreVisit, this); - - if (visit) { - it->incrementDepth(); - operand->traverse(it); - it->decrementDepth(); - } - - if (visit && it->postVisit) - it->visitUnary(PostVisit, this); + bool visit = true; + + if (it->preVisit) + visit = it->visitUnary(PreVisit, this); + + if (visit) { + it->incrementDepth(this); + operand->traverse(it); + it->decrementDepth(); + } + + if (visit && it->postVisit) + it->visitUnary(PostVisit, this); } // // Traverse an aggregate node. Same comments in binary node apply here. // -void TIntermAggregate::traverse(TIntermTraverser* it) +void TIntermAggregate::traverse(TIntermTraverser *it) { - bool visit = true; - - if(it->preVisit) - { - visit = it->visitAggregate(PreVisit, this); - } - - if(visit) - { - it->incrementDepth(); - - if(it->rightToLeft) - { - for(TIntermSequence::reverse_iterator sit = sequence.rbegin(); sit != sequence.rend(); sit++) - { - (*sit)->traverse(it); - - if(visit && it->inVisit) - { - if(*sit != sequence.front()) - { - visit = it->visitAggregate(InVisit, this); - } - } - } - } - else - { - for(TIntermSequence::iterator sit = sequence.begin(); sit != sequence.end(); sit++) - { - (*sit)->traverse(it); - - if(visit && it->inVisit) - { - if(*sit != sequence.back()) - { - visit = it->visitAggregate(InVisit, this); - } - } - } - } - - it->decrementDepth(); - } - - if(visit && it->postVisit) - { - it->visitAggregate(PostVisit, this); - } + bool visit = true; + + if (it->preVisit) + visit = it->visitAggregate(PreVisit, this); + + if (visit) + { + it->incrementDepth(this); + + if (it->rightToLeft) + { + for (TIntermSequence::reverse_iterator sit = sequence.rbegin(); sit != sequence.rend(); sit++) + { + (*sit)->traverse(it); + + if (visit && it->inVisit) + { + if (*sit != sequence.front()) + visit = it->visitAggregate(InVisit, this); + } + } + } + else + { + for (TIntermSequence::iterator sit = sequence.begin(); sit != sequence.end(); sit++) + { + (*sit)->traverse(it); + + if (visit && it->inVisit) + { + if (*sit != sequence.back()) + visit = it->visitAggregate(InVisit, this); + } + } + } + + it->decrementDepth(); + } + + if (visit && it->postVisit) + it->visitAggregate(PostVisit, this); } // // Traverse a selection node. Same comments in binary node apply here. // -void TIntermSelection::traverse(TIntermTraverser* it) +void TIntermSelection::traverse(TIntermTraverser *it) { - bool visit = true; - - if (it->preVisit) - visit = it->visitSelection(PreVisit, this); - - if (visit) { - it->incrementDepth(); - if (it->rightToLeft) { - if (falseBlock) - falseBlock->traverse(it); - if (trueBlock) - trueBlock->traverse(it); - condition->traverse(it); - } else { - condition->traverse(it); - if (trueBlock) - trueBlock->traverse(it); - if (falseBlock) - falseBlock->traverse(it); - } - it->decrementDepth(); - } - - if (visit && it->postVisit) - it->visitSelection(PostVisit, this); + bool visit = true; + + if (it->preVisit) + visit = it->visitSelection(PreVisit, this); + + if (visit) { + it->incrementDepth(this); + if (it->rightToLeft) { + if (falseBlock) + falseBlock->traverse(it); + if (trueBlock) + trueBlock->traverse(it); + condition->traverse(it); + } else { + condition->traverse(it); + if (trueBlock) + trueBlock->traverse(it); + if (falseBlock) + falseBlock->traverse(it); + } + it->decrementDepth(); + } + + if (visit && it->postVisit) + it->visitSelection(PostVisit, this); } // // Traverse a loop node. Same comments in binary node apply here. // -void TIntermLoop::traverse(TIntermTraverser* it) +void TIntermLoop::traverse(TIntermTraverser *it) { - bool visit = true; - - if(it->preVisit) - { - visit = it->visitLoop(PreVisit, this); - } - - if(visit) - { - it->incrementDepth(); - - if(it->rightToLeft) - { - if(expr) - { - expr->traverse(it); - } - - if(body) - { - body->traverse(it); - } - - if(cond) - { - cond->traverse(it); - } - } - else - { - if(cond) - { - cond->traverse(it); - } - - if(body) - { - body->traverse(it); - } - - if(expr) - { - expr->traverse(it); - } - } - - it->decrementDepth(); - } - - if(visit && it->postVisit) - { - it->visitLoop(PostVisit, this); - } + bool visit = true; + + if (it->preVisit) + visit = it->visitLoop(PreVisit, this); + + if (visit) + { + it->incrementDepth(this); + + if (it->rightToLeft) + { + if (expr) + expr->traverse(it); + + if (body) + body->traverse(it); + + if (cond) + cond->traverse(it); + + if (init) + init->traverse(it); + } + else + { + if (init) + init->traverse(it); + + if (cond) + cond->traverse(it); + + if (body) + body->traverse(it); + + if (expr) + expr->traverse(it); + } + + it->decrementDepth(); + } + + if (visit && it->postVisit) + it->visitLoop(PostVisit, this); } // // Traverse a branch node. Same comments in binary node apply here. // -void TIntermBranch::traverse(TIntermTraverser* it) +void TIntermBranch::traverse(TIntermTraverser *it) { - bool visit = true; - - if (it->preVisit) - visit = it->visitBranch(PreVisit, this); - - if (visit && expression) { - it->incrementDepth(); - expression->traverse(it); - it->decrementDepth(); - } - - if (visit && it->postVisit) - it->visitBranch(PostVisit, this); + bool visit = true; + + if (it->preVisit) + visit = it->visitBranch(PreVisit, this); + + if (visit && expression) { + it->incrementDepth(this); + expression->traverse(it); + it->decrementDepth(); + } + + if (visit && it->postVisit) + it->visitBranch(PostVisit, this); } diff --git a/src/compiler/Intermediate.cpp b/src/compiler/Intermediate.cpp index 3b662218..ef858215 100644 --- a/src/compiler/Intermediate.cpp +++ b/src/compiler/Intermediate.cpp @@ -19,11 +19,13 @@ bool CompareStructure(const TType& leftNodeType, ConstantUnion* rightUnionArray, ConstantUnion* leftUnionArray); -static TPrecision GetHigherPrecision( TPrecision left, TPrecision right ){ +static TPrecision GetHigherPrecision(TPrecision left, TPrecision right) +{ return left > right ? left : right; } -const char* getOperatorString(TOperator op) { +const char* getOperatorString(TOperator op) +{ switch (op) { case EOpInitialize: return "="; case EOpAssign: return "="; @@ -742,12 +744,67 @@ void TIntermediate::remove(TIntermNode* root) // //////////////////////////////////////////////////////////////// +#define REPLACE_IF_IS(node, type, original, replacement) \ + if (node == original) { \ + node = static_cast<type *>(replacement); \ + return true; \ + } + +bool TIntermLoop::replaceChildNode( + TIntermNode *original, TIntermNode *replacement) +{ + REPLACE_IF_IS(init, TIntermNode, original, replacement); + REPLACE_IF_IS(cond, TIntermTyped, original, replacement); + REPLACE_IF_IS(expr, TIntermTyped, original, replacement); + REPLACE_IF_IS(body, TIntermNode, original, replacement); + return false; +} + +bool TIntermBranch::replaceChildNode( + TIntermNode *original, TIntermNode *replacement) +{ + REPLACE_IF_IS(expression, TIntermTyped, original, replacement); + return false; +} + +bool TIntermBinary::replaceChildNode( + TIntermNode *original, TIntermNode *replacement) +{ + REPLACE_IF_IS(left, TIntermTyped, original, replacement); + REPLACE_IF_IS(right, TIntermTyped, original, replacement); + return false; +} + +bool TIntermUnary::replaceChildNode( + TIntermNode *original, TIntermNode *replacement) +{ + REPLACE_IF_IS(operand, TIntermTyped, original, replacement); + return false; +} + +bool TIntermAggregate::replaceChildNode( + TIntermNode *original, TIntermNode *replacement) +{ + for (size_t ii = 0; ii < sequence.size(); ++ii) + { + REPLACE_IF_IS(sequence[ii], TIntermNode, original, replacement); + } + return false; +} + +bool TIntermSelection::replaceChildNode( + TIntermNode *original, TIntermNode *replacement) +{ + REPLACE_IF_IS(condition, TIntermTyped, original, replacement); + REPLACE_IF_IS(trueBlock, TIntermNode, original, replacement); + REPLACE_IF_IS(falseBlock, TIntermNode, original, replacement); + return false; +} + // // Say whether or not an operation node changes the value of a variable. // -// Returns true if state is modified. -// -bool TIntermOperator::modifiesState() const +bool TIntermOperator::isAssignment() const { switch (op) { case EOpPostIncrement: @@ -796,6 +853,7 @@ bool TIntermOperator::isConstructor() const return false; } } + // // Make sure the type of a unary operator is appropriate for its // combination of operation and operand type. diff --git a/src/compiler/MapLongVariableNames.cpp b/src/compiler/MapLongVariableNames.cpp index a41d20f4..077ef5d7 100644 --- a/src/compiler/MapLongVariableNames.cpp +++ b/src/compiler/MapLongVariableNames.cpp @@ -102,13 +102,6 @@ void MapLongVariableNames::visitSymbol(TIntermSymbol* symbol) } } -bool MapLongVariableNames::visitLoop(Visit, TIntermLoop* node) -{ - if (node->getInit()) - node->getInit()->traverse(this); - return true; -} - TString MapLongVariableNames::mapGlobalLongName(const TString& name) { ASSERT(mGlobalMap); diff --git a/src/compiler/MapLongVariableNames.h b/src/compiler/MapLongVariableNames.h index d6352acb..fd2ff826 100644 --- a/src/compiler/MapLongVariableNames.h +++ b/src/compiler/MapLongVariableNames.h @@ -48,7 +48,6 @@ public: MapLongVariableNames(LongNameMap* globalMap); virtual void visitSymbol(TIntermSymbol*); - virtual bool visitLoop(Visit, TIntermLoop*); private: TString mapGlobalLongName(const TString& name); diff --git a/src/compiler/NodeSearch.h b/src/compiler/NodeSearch.h new file mode 100644 index 00000000..27e471db --- /dev/null +++ b/src/compiler/NodeSearch.h @@ -0,0 +1,78 @@ +// +// 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. +// +// NodeSearch.h: Utilities for searching translator node graphs +// + +#ifndef TRANSLATOR_NODESEARCH_H_ +#define TRANSLATOR_NODESEARCH_H_ + +namespace sh +{ + +template <class Parent> +class NodeSearchTraverser : public TIntermTraverser +{ + public: + NodeSearchTraverser() + : mFound(false) + {} + + bool found() const { return mFound; } + + static bool search(TIntermNode *node) + { + Parent searchTraverser; + node->traverse(&searchTraverser); + return searchTraverser.found(); + } + + protected: + bool mFound; +}; + +class FindDiscard : public NodeSearchTraverser<FindDiscard> +{ + public: + virtual bool visitBranch(Visit visit, TIntermBranch *node) + { + switch (node->getFlowOp()) + { + case EOpKill: + mFound = true; + break; + + default: break; + } + + return !mFound; + } +}; + +class FindSideEffectRewriting : public NodeSearchTraverser<FindSideEffectRewriting> +{ + public: + virtual bool visitBinary(Visit visit, TIntermBinary *node) + { + switch (node->getOp()) + { + case EOpLogicalOr: + case EOpLogicalAnd: + if (node->getRight()->hasSideEffects()) + { + mFound = true; + } + break; + + default: break; + } + + return !mFound; + } +}; + +} + +#endif // TRANSLATOR_NODESEARCH_H_ diff --git a/src/compiler/OutputGLSLBase.cpp b/src/compiler/OutputGLSLBase.cpp index d677c756..b90bd67e 100644 --- a/src/compiler/OutputGLSLBase.cpp +++ b/src/compiler/OutputGLSLBase.cpp @@ -435,7 +435,7 @@ bool TOutputGLSLBase::visitSelection(Visit visit, TIntermSelection* node) node->getCondition()->traverse(this); out << ")\n"; - incrementDepth(); + incrementDepth(node); visitCodeBlock(node->getTrueBlock()); if (node->getFalseBlock()) @@ -460,7 +460,7 @@ bool TOutputGLSLBase::visitAggregate(Visit visit, TIntermAggregate* node) // Scope the sequences except when at the global scope. if (depth > 0) out << "{\n"; - incrementDepth(); + incrementDepth(node); const TIntermSequence& sequence = node->getSequence(); for (TIntermSequence::const_iterator iter = sequence.begin(); iter != sequence.end(); ++iter) @@ -498,7 +498,7 @@ bool TOutputGLSLBase::visitAggregate(Visit visit, TIntermAggregate* node) writeVariableType(node->getType()); out << " " << hashFunctionName(node->getName()); - incrementDepth(); + incrementDepth(node); // Function definition node contains one or two children nodes // representing function parameters and function body. The latter // is not present in case of empty function bodies. @@ -638,7 +638,7 @@ bool TOutputGLSLBase::visitLoop(Visit visit, TIntermLoop* node) { TInfoSinkBase& out = objSink(); - incrementDepth(); + incrementDepth(node); // Loop header. TLoopType loopType = node->getType(); if (loopType == ELoopFor) // for loop diff --git a/src/compiler/OutputGLSLBase.h b/src/compiler/OutputGLSLBase.h index df4ad68c..69868c09 100644 --- a/src/compiler/OutputGLSLBase.h +++ b/src/compiler/OutputGLSLBase.h @@ -11,7 +11,7 @@ #include "compiler/ForLoopUnroll.h" #include "compiler/intermediate.h" -#include "compiler/ParseHelper.h" +#include "compiler/ParseContext.h" class TOutputGLSLBase : public TIntermTraverser { diff --git a/src/compiler/OutputHLSL.cpp b/src/compiler/OutputHLSL.cpp index 79a373eb..53799dff 100644 --- a/src/compiler/OutputHLSL.cpp +++ b/src/compiler/OutputHLSL.cpp @@ -12,6 +12,7 @@ #include "compiler/InfoSink.h" #include "compiler/SearchSymbol.h" #include "compiler/UnfoldShortCircuit.h" +#include "compiler/NodeSearch.h" #include <algorithm> #include <cfloat> @@ -72,6 +73,7 @@ OutputHLSL::OutputHLSL(TParseContext &context, const ShBuiltInResources& resourc mUsesAtan2_2 = false; mUsesAtan2_3 = false; mUsesAtan2_4 = false; + mUsesDiscardRewriting = false; mNumRenderTargets = resources.EXT_draw_buffers ? resources.MaxDrawBuffers : 1; @@ -196,6 +198,11 @@ void OutputHLSL::header() attributes += "static " + typeString(type) + " " + decorate(name) + arrayString(type) + " = " + initializer(type) + ";\n"; } + if (mUsesDiscardRewriting) + { + out << "#define ANGLE_USES_DISCARD_REWRITING" << "\n"; + } + if (shaderType == SH_FRAGMENT_SHADER) { TExtensionBehavior::const_iterator iter = mContext.extensionBehavior().find("GL_EXT_draw_buffers"); @@ -1299,15 +1306,31 @@ bool OutputHLSL::visitBinary(Visit visit, TIntermBinary *node) case EOpMatrixTimesVector: outputTriplet(visit, "mul(transpose(", "), ", ")"); break; case EOpMatrixTimesMatrix: outputTriplet(visit, "transpose(mul(transpose(", "), transpose(", ")))"); break; case EOpLogicalOr: - out << "s" << mUnfoldShortCircuit->getNextTemporaryIndex(); - return false; + if (node->getRight()->hasSideEffects()) + { + out << "s" << mUnfoldShortCircuit->getNextTemporaryIndex(); + return false; + } + else + { + outputTriplet(visit, "(", " || ", ")"); + return true; + } case EOpLogicalXor: mUsesXor = true; outputTriplet(visit, "xor(", ", ", ")"); break; case EOpLogicalAnd: - out << "s" << mUnfoldShortCircuit->getNextTemporaryIndex(); - return false; + if (node->getRight()->hasSideEffects()) + { + out << "s" << mUnfoldShortCircuit->getNextTemporaryIndex(); + return false; + } + else + { + outputTriplet(visit, "(", " && ", ")"); + return true; + } default: UNREACHABLE(); } @@ -1944,7 +1967,7 @@ bool OutputHLSL::visitSelection(Visit visit, TIntermSelection *node) { mUnfoldShortCircuit->traverse(node->getCondition()); - out << "if("; + out << "if ("; node->getCondition()->traverse(this); @@ -1953,9 +1976,14 @@ bool OutputHLSL::visitSelection(Visit visit, TIntermSelection *node) outputLineDirective(node->getLine().first_line); out << "{\n"; + bool discard = false; + if (node->getTrueBlock()) { traverseStatements(node->getTrueBlock()); + + // Detect true discard + discard = (discard || FindDiscard::search(node->getTrueBlock())); } outputLineDirective(node->getLine().first_line); @@ -1973,6 +2001,15 @@ bool OutputHLSL::visitSelection(Visit visit, TIntermSelection *node) outputLineDirective(node->getFalseBlock()->getLine().first_line); out << ";\n}\n"; + + // Detect false discard + discard = (discard || FindDiscard::search(node->getFalseBlock())); + } + + // ANGLE issue 486: Detect problematic conditional discard + if (discard && FindSideEffectRewriting::search(node)) + { + mUsesDiscardRewriting = true; } } @@ -2070,7 +2107,9 @@ bool OutputHLSL::visitBranch(Visit visit, TIntermBranch *node) switch (node->getFlowOp()) { - case EOpKill: outputTriplet(visit, "discard;\n", "", ""); break; + case EOpKill: + outputTriplet(visit, "discard;\n", "", ""); + break; case EOpBreak: if (visit == PreVisit) { @@ -2293,7 +2332,7 @@ bool OutputHLSL::handleExcessiveLoop(TIntermLoop *node) if (!firstLoopFragment) { - out << "if(!Break"; + out << "if (!Break"; index->traverse(this); out << ") {\n"; } diff --git a/src/compiler/OutputHLSL.h b/src/compiler/OutputHLSL.h index cde41207..586a76fb 100644 --- a/src/compiler/OutputHLSL.h +++ b/src/compiler/OutputHLSL.h @@ -15,7 +15,7 @@ #include <GLES2/gl2.h> #include "compiler/intermediate.h" -#include "compiler/ParseHelper.h" +#include "compiler/ParseContext.h" #include "compiler/Uniform.h" namespace sh @@ -125,6 +125,7 @@ class OutputHLSL : public TIntermTraverser bool mUsesAtan2_2; bool mUsesAtan2_3; bool mUsesAtan2_4; + bool mUsesDiscardRewriting; int mNumRenderTargets; diff --git a/src/compiler/ParseHelper.cpp b/src/compiler/ParseContext.cpp index a4787a1c..4db9c034 100644 --- a/src/compiler/ParseHelper.cpp +++ b/src/compiler/ParseContext.cpp @@ -4,7 +4,7 @@ // found in the LICENSE file. // -#include "compiler/ParseHelper.h" +#include "compiler/ParseContext.h" #include <stdarg.h> #include <stdio.h> @@ -182,7 +182,7 @@ void TParseContext::error(const TSourceLoc& loc, pp::SourceLocation srcLoc; srcLoc.file = loc.first_file; srcLoc.line = loc.first_line; - diagnostics.writeInfo(pp::Diagnostics::ERROR, + diagnostics.writeInfo(pp::Diagnostics::PP_ERROR, srcLoc, reason, token, extraInfo); } @@ -193,7 +193,7 @@ void TParseContext::warning(const TSourceLoc& loc, pp::SourceLocation srcLoc; srcLoc.file = loc.first_file; srcLoc.line = loc.first_line; - diagnostics.writeInfo(pp::Diagnostics::WARNING, + diagnostics.writeInfo(pp::Diagnostics::PP_WARNING, srcLoc, reason, token, extraInfo); } @@ -1429,11 +1429,13 @@ bool TParseContext::structNestingErrorCheck(const TSourceLoc& line, const TField // We're already inside a structure definition at this point, so add // one to the field's struct nesting. if (1 + field.type()->getDeepestStructNesting() > kWebGLMaxStructNesting) { - std::stringstream extraInfoStream; - extraInfoStream << "Reference of struct type " << field.name() - << " exceeds maximum struct nesting of " << kWebGLMaxStructNesting; - std::string extraInfo = extraInfoStream.str(); - error(line, "", "", extraInfo.c_str()); + std::stringstream reasonStream; + reasonStream << "Reference of struct type " + << field.type()->getStruct()->name().c_str() + << " exceeds maximum allowed nesting level of " + << kWebGLMaxStructNesting; + std::string reason = reasonStream.str(); + error(line, reason.c_str(), field.name().c_str(), ""); return true; } diff --git a/src/compiler/ParseHelper.h b/src/compiler/ParseContext.h index c2b3c3f7..c2b3c3f7 100644 --- a/src/compiler/ParseHelper.h +++ b/src/compiler/ParseContext.h diff --git a/src/compiler/SearchSymbol.h b/src/compiler/SearchSymbol.h index 6bc0b90f..224bc77c 100644 --- a/src/compiler/SearchSymbol.h +++ b/src/compiler/SearchSymbol.h @@ -10,7 +10,7 @@ #define COMPILER_SEARCHSYMBOL_H_ #include "compiler/intermediate.h" -#include "compiler/ParseHelper.h" +#include "compiler/ParseContext.h" namespace sh { diff --git a/src/compiler/ShHandle.h b/src/compiler/ShHandle.h index eaf6f687..873580a9 100644 --- a/src/compiler/ShHandle.h +++ b/src/compiler/ShHandle.h @@ -70,6 +70,7 @@ public: TInfoSink& getInfoSink() { return infoSink; } const TVariableInfoList& getAttribs() const { return attribs; } const TVariableInfoList& getUniforms() const { return uniforms; } + const TVariableInfoList& getVaryings() const { return varyings; } int getMappedNameMaxLength() const; ShHashFunction64 getHashFunction() const { return hashFunction; } @@ -90,8 +91,8 @@ protected: // Returns true if the given shader does not exceed the minimum // functionality mandated in GLSL 1.0 spec Appendix A. bool validateLimitations(TIntermNode* root); - // Collect info for all attribs and uniforms. - void collectAttribsUniforms(TIntermNode* root); + // Collect info for all attribs, uniforms, varyings. + void collectVariables(TIntermNode* root); // Map long variable names into shorter ones. void mapLongVariableNames(TIntermNode* root); // Translate to object code. @@ -142,6 +143,7 @@ private: TInfoSink infoSink; // Output sink. TVariableInfoList attribs; // Active attributes in the compiled shader. TVariableInfoList uniforms; // Active uniforms in the compiled shader. + TVariableInfoList varyings; // Varyings in the compiled shader. // Cached copy of the ref-counted singleton. LongNameMap* longNameMap; diff --git a/src/compiler/ShaderLang.cpp b/src/compiler/ShaderLang.cpp index 147894e0..42cd5cc5 100644 --- a/src/compiler/ShaderLang.cpp +++ b/src/compiler/ShaderLang.cpp @@ -15,20 +15,25 @@ #include "compiler/preprocessor/length_limits.h" #include "compiler/ShHandle.h" #include "compiler/TranslatorHLSL.h" +#include "compiler/VariablePacker.h" // // This is the platform independent interface between an OGL driver // and the shading language compiler. // -static bool checkActiveUniformAndAttribMaxLengths(const ShHandle handle, - size_t expectedValue) +static bool checkVariableMaxLengths(const ShHandle handle, + size_t expectedValue) { size_t activeUniformLimit = 0; ShGetInfo(handle, SH_ACTIVE_UNIFORM_MAX_LENGTH, &activeUniformLimit); size_t activeAttribLimit = 0; ShGetInfo(handle, SH_ACTIVE_ATTRIBUTE_MAX_LENGTH, &activeAttribLimit); - return (expectedValue == activeUniformLimit && expectedValue == activeAttribLimit); + size_t varyingLimit = 0; + ShGetInfo(handle, SH_VARYING_MAX_LENGTH, &varyingLimit); + return (expectedValue == activeUniformLimit && + expectedValue == activeAttribLimit && + expectedValue == varyingLimit); } static bool checkMappedNameMaxLength(const ShHandle handle, size_t expectedValue) @@ -38,52 +43,6 @@ static bool checkMappedNameMaxLength(const ShHandle handle, size_t expectedValue return (expectedValue == mappedNameMaxLength); } -static void getVariableInfo(ShShaderInfo varType, - const ShHandle handle, - int index, - size_t* length, - int* size, - ShDataType* type, - char* name, - char* mappedName) -{ - if (!handle || !size || !type || !name) - return; - ASSERT((varType == SH_ACTIVE_ATTRIBUTES) || - (varType == SH_ACTIVE_UNIFORMS)); - - TShHandleBase* base = reinterpret_cast<TShHandleBase*>(handle); - TCompiler* compiler = base->getAsCompiler(); - if (compiler == 0) - return; - - const TVariableInfoList& varList = varType == SH_ACTIVE_ATTRIBUTES ? - compiler->getAttribs() : compiler->getUniforms(); - if (index < 0 || index >= static_cast<int>(varList.size())) - return; - - const TVariableInfo& varInfo = varList[index]; - if (length) *length = varInfo.name.size(); - *size = varInfo.size; - *type = varInfo.type; - - // This size must match that queried by - // SH_ACTIVE_UNIFORM_MAX_LENGTH and SH_ACTIVE_ATTRIBUTE_MAX_LENGTH - // in ShGetInfo, below. - size_t activeUniformAndAttribLength = 1 + MAX_SYMBOL_NAME_LEN; - ASSERT(checkActiveUniformAndAttribMaxLengths(handle, activeUniformAndAttribLength)); - strncpy(name, varInfo.name.c_str(), activeUniformAndAttribLength); - name[activeUniformAndAttribLength - 1] = 0; - if (mappedName) { - // This size must match that queried by - // SH_MAPPED_NAME_MAX_LENGTH in ShGetInfo, below. - size_t maxMappedNameLength = 1 + MAX_SYMBOL_NAME_LEN; - ASSERT(checkMappedNameMaxLength(handle, maxMappedNameLength)); - strncpy(mappedName, varInfo.mappedName.c_str(), maxMappedNameLength); - mappedName[maxMappedNameLength - 1] = 0; - } -} - // // Driver must call this first, once, before doing any other compiler operations. // Subsequent calls to this function are no-op. @@ -220,6 +179,12 @@ void ShGetInfo(const ShHandle handle, ShShaderInfo pname, size_t* params) case SH_ACTIVE_ATTRIBUTE_MAX_LENGTH: *params = 1 + MAX_SYMBOL_NAME_LEN; break; + case SH_VARYINGS: + *params = compiler->getVaryings().size(); + break; + case SH_VARYING_MAX_LENGTH: + *params = 1 + MAX_SYMBOL_NAME_LEN; + break; case SH_MAPPED_NAME_MAX_LENGTH: // Use longer length than MAX_SHORTENED_IDENTIFIER_SIZE to // handle array and struct dereferences. @@ -277,28 +242,71 @@ void ShGetObjectCode(const ShHandle handle, char* objCode) strcpy(objCode, infoSink.obj.c_str()); } -void ShGetActiveAttrib(const ShHandle handle, +void ShGetVariableInfo(const ShHandle handle, + ShShaderInfo varType, int index, size_t* length, int* size, ShDataType* type, + ShPrecisionType* precision, + int* staticUse, char* name, char* mappedName) { - getVariableInfo(SH_ACTIVE_ATTRIBUTES, - handle, index, length, size, type, name, mappedName); -} + if (!handle || !size || !type || !precision || !staticUse || !name) + return; + ASSERT((varType == SH_ACTIVE_ATTRIBUTES) || + (varType == SH_ACTIVE_UNIFORMS) || + (varType == SH_VARYINGS)); -void ShGetActiveUniform(const ShHandle handle, - int index, - size_t* length, - int* size, - ShDataType* type, - char* name, - char* mappedName) -{ - getVariableInfo(SH_ACTIVE_UNIFORMS, - handle, index, length, size, type, name, mappedName); + TShHandleBase* base = reinterpret_cast<TShHandleBase*>(handle); + TCompiler* compiler = base->getAsCompiler(); + if (compiler == 0) + return; + + const TVariableInfoList& varList = + varType == SH_ACTIVE_ATTRIBUTES ? compiler->getAttribs() : + (varType == SH_ACTIVE_UNIFORMS ? compiler->getUniforms() : + compiler->getVaryings()); + if (index < 0 || index >= static_cast<int>(varList.size())) + return; + + const TVariableInfo& varInfo = varList[index]; + if (length) *length = varInfo.name.size(); + *size = varInfo.size; + *type = varInfo.type; + switch (varInfo.precision) { + case EbpLow: + *precision = SH_PRECISION_LOWP; + break; + case EbpMedium: + *precision = SH_PRECISION_MEDIUMP; + break; + case EbpHigh: + *precision = SH_PRECISION_HIGHP; + break; + default: + // Some types does not support precision, for example, boolean. + *precision = SH_PRECISION_UNDEFINED; + break; + } + *staticUse = varInfo.staticUse ? 1 : 0; + + // This size must match that queried by + // SH_ACTIVE_UNIFORM_MAX_LENGTH, SH_ACTIVE_ATTRIBUTE_MAX_LENGTH, SH_VARYING_MAX_LENGTH + // in ShGetInfo, below. + size_t variableLength = 1 + MAX_SYMBOL_NAME_LEN; + ASSERT(checkVariableMaxLengths(handle, variableLength)); + strncpy(name, varInfo.name.c_str(), variableLength); + name[variableLength - 1] = 0; + if (mappedName) { + // This size must match that queried by + // SH_MAPPED_NAME_MAX_LENGTH in ShGetInfo, below. + size_t maxMappedNameLength = 1 + MAX_SYMBOL_NAME_LEN; + ASSERT(checkMappedNameMaxLength(handle, maxMappedNameLength)); + strncpy(mappedName, varInfo.mappedName.c_str(), maxMappedNameLength); + mappedName[maxMappedNameLength - 1] = 0; + } } void ShGetNameHashingEntry(const ShHandle handle, @@ -361,3 +369,19 @@ void ShGetInfoPointer(const ShHandle handle, ShShaderInfo pname, void** params) default: UNREACHABLE(); } } + +int ShCheckVariablesWithinPackingLimits( + int maxVectors, ShVariableInfo* varInfoArray, size_t varInfoArraySize) +{ + if (varInfoArraySize == 0) + return 1; + ASSERT(varInfoArray); + TVariableInfoList variables; + for (size_t ii = 0; ii < varInfoArraySize; ++ii) + { + TVariableInfo var(varInfoArray[ii].type, varInfoArray[ii].size); + variables.push_back(var); + } + VariablePacker packer; + return packer.CheckVariablesWithinPackingLimits(maxVectors, variables) ? 1 : 0; +} diff --git a/src/compiler/SymbolTable.cpp b/src/compiler/SymbolTable.cpp index 51180aff..a7ce2168 100644 --- a/src/compiler/SymbolTable.cpp +++ b/src/compiler/SymbolTable.cpp @@ -206,3 +206,11 @@ void TSymbolTableLevel::relateToExtension(const char* name, const TString& ext) symbol->relateToExtension(ext); } } + +TSymbolTable::~TSymbolTable() +{ + for (size_t i = 0; i < table.size(); ++i) + delete table[i]; + for (size_t i = 0; i < precisionStack.size(); ++i) + delete precisionStack[i]; +} diff --git a/src/compiler/SymbolTable.h b/src/compiler/SymbolTable.h index f9a7948a..bebad4b9 100644 --- a/src/compiler/SymbolTable.h +++ b/src/compiler/SymbolTable.h @@ -42,7 +42,7 @@ class TSymbol { public: POOL_ALLOCATOR_NEW_DELETE(); - TSymbol(const TString *n) : name(n) { } + TSymbol(const TString* n) : uniqueId(0), name(n) { } virtual ~TSymbol() { /* don't delete name, it's from the pool */ } const TString& getName() const { return *name; } @@ -58,8 +58,8 @@ public: private: DISALLOW_COPY_AND_ASSIGN(TSymbol); + int uniqueId; // For real comparing during code generation const TString *name; - unsigned int uniqueId; // For real comparing during code generation TString extension; }; @@ -187,7 +187,6 @@ public: typedef const tLevel::value_type tLevelPair; typedef std::pair<tLevel::iterator, bool> tInsertResult; - POOL_ALLOCATOR_NEW_DELETE(); TSymbolTableLevel() { } ~TSymbolTableLevel(); @@ -196,8 +195,7 @@ public: // // returning true means symbol was added to the table // - tInsertResult result; - result = level.insert(tLevelPair(name, &symbol)); + tInsertResult result = level.insert(tLevelPair(name, &symbol)); return result.second; } @@ -244,13 +242,7 @@ public: // that the symbol table has not been preloaded with built-ins. // } - - ~TSymbolTable() - { - // level 0 is always built In symbols, so we never pop that out - while (table.size() > 1) - pop(); - } + ~TSymbolTable(); // // When the symbol table is initialized with the built-ins, there should @@ -263,13 +255,15 @@ public: void push() { table.push_back(new TSymbolTableLevel); - precisionStack.push_back( PrecisionStackLevel() ); + precisionStack.push_back(new PrecisionStackLevel); } void pop() - { - delete table[currentLevel()]; - table.pop_back(); + { + delete table.back(); + table.pop_back(); + + delete precisionStack.back(); precisionStack.pop_back(); } @@ -324,16 +318,11 @@ public: return symbol; } - TSymbol *findBuiltIn(const TString &name) + TSymbol* findBuiltIn(const TString &name) { return table[0]->find(name); } - TSymbolTableLevel* getGlobalLevel() { - assert(table.size() >= 2); - return table[1]; - } - TSymbolTableLevel* getOuterLevel() { assert(table.size() >= 2); return table[currentLevel() - 1]; @@ -345,31 +334,29 @@ public: void relateToExtension(const char* name, const TString& ext) { table[0]->relateToExtension(name, ext); } - int getMaxSymbolId() { return uniqueId; } void dump(TInfoSink &infoSink) const; - bool setDefaultPrecision( const TPublicType& type, TPrecision prec ){ - if (IsSampler(type.type)) - return true; // Skip sampler types for the time being - if (type.type != EbtFloat && type.type != EbtInt) - return false; // Only set default precision for int/float + bool setDefaultPrecision(const TPublicType& type, TPrecision prec) { + if (!supportsPrecision(type.type)) + return false; if (type.size != 1 || type.matrix || type.array) return false; // Not allowed to set for aggregate types int indexOfLastElement = static_cast<int>(precisionStack.size()) - 1; - precisionStack[indexOfLastElement][type.type] = prec; // Uses map operator [], overwrites the current value + (*precisionStack[indexOfLastElement])[type.type] = prec; // Uses map operator [], overwrites the current value return true; } // Searches down the precisionStack for a precision qualifier for the specified TBasicType - TPrecision getDefaultPrecision( TBasicType type){ - if( type != EbtFloat && type != EbtInt ) return EbpUndefined; + TPrecision getDefaultPrecision(TBasicType type) { + if (!supportsPrecision(type)) + return EbpUndefined; int level = static_cast<int>(precisionStack.size()) - 1; - assert( level >= 0); // Just to be safe. Should not happen. + assert(level >= 0); // Just to be safe. Should not happen. PrecisionStackLevel::iterator it; TPrecision prec = EbpUndefined; // If we dont find anything we return this. Should we error check this? - while( level >= 0 ){ - it = precisionStack[level].find( type ); - if( it != precisionStack[level].end() ){ + while (level >= 0) { + it = precisionStack[level]->find(type); + if (it != precisionStack[level]->end()) { prec = (*it).second; break; } @@ -378,13 +365,18 @@ public: return prec; } -protected: +private: int currentLevel() const { return static_cast<int>(table.size()) - 1; } - std::vector<TSymbolTableLevel*> table; - typedef std::map< TBasicType, TPrecision > PrecisionStackLevel; - std::vector< PrecisionStackLevel > precisionStack; + bool supportsPrecision(TBasicType type) { + // Only supports precision for int, float, and sampler types. + return type == EbtFloat || type == EbtInt || IsSampler(type); + } + int uniqueId; // for unique identification in code generation + std::vector<TSymbolTableLevel*> table; + typedef TMap<TBasicType, TPrecision> PrecisionStackLevel; + std::vector<PrecisionStackLevel*> precisionStack; }; #endif // _SYMBOL_TABLE_INCLUDED_ diff --git a/src/compiler/Types.h b/src/compiler/Types.h index 505fa8e3..75560ddc 100644 --- a/src/compiler/Types.h +++ b/src/compiler/Types.h @@ -1,5 +1,5 @@ // -// Copyright (c) 2002-2012 The ANGLE Project Authors. All rights reserved. +// 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. // @@ -95,7 +95,7 @@ class TType public: POOL_ALLOCATOR_NEW_DELETE(); TType() {} - TType(TBasicType t, TPrecision p, TQualifier q = EvqTemporary, int s = 1, bool m = false, bool a = false) : + TType(TBasicType t, TPrecision p, TQualifier q = EvqTemporary, unsigned char s = 1, bool m = false, bool a = false) : type(t), precision(p), qualifier(q), size(s), matrix(m), array(a), arraySize(0), structure(0) { } @@ -116,7 +116,7 @@ public: // One-dimensional size of single instance type int getNominalSize() const { return size; } - void setNominalSize(int s) { size = s; } + void setNominalSize(unsigned char s) { size = s; } // Full size of single instance of type size_t getObjectSize() const; @@ -234,12 +234,12 @@ public: private: TString buildMangledName() const; - TBasicType type : 6; + TBasicType type; TPrecision precision; - TQualifier qualifier : 7; - int size : 8; // size of vector or matrix, not size of array - unsigned int matrix : 1; - unsigned int array : 1; + TQualifier qualifier; + unsigned char size; + bool matrix; + bool array; int arraySize; TStructure* structure; // 0 unless this is a struct @@ -261,7 +261,7 @@ struct TPublicType TBasicType type; TQualifier qualifier; TPrecision precision; - int size; // size of vector or matrix, not size of array + unsigned char size; // size of vector or matrix, not size of array bool matrix; bool array; int arraySize; @@ -281,7 +281,7 @@ struct TPublicType line = ln; } - void setAggregate(int s, bool m = false) + void setAggregate(unsigned char s, bool m = false) { size = s; matrix = m; diff --git a/src/compiler/UnfoldShortCircuit.cpp b/src/compiler/UnfoldShortCircuit.cpp index 47f0afca..5cfdd323 100644 --- a/src/compiler/UnfoldShortCircuit.cpp +++ b/src/compiler/UnfoldShortCircuit.cpp @@ -31,6 +31,14 @@ bool UnfoldShortCircuit::visitBinary(Visit visit, TIntermBinary *node) { TInfoSinkBase &out = mOutputHLSL->getBodyStream(); + // If our right node doesn't have side effects, we know we don't need to unfold this + // expression: there will be no short-circuiting side effects to avoid + // (note: unfolding doesn't depend on the left node -- it will always be evaluated) + if (!node->getRight()->hasSideEffects()) + { + return true; + } + switch (node->getOp()) { case EOpLogicalOr: @@ -49,7 +57,7 @@ bool UnfoldShortCircuit::visitBinary(Visit visit, TIntermBinary *node) mTemporaryIndex = i + 1; node->getLeft()->traverse(mOutputHLSL); out << ";\n"; - out << "if(!s" << i << ")\n" + out << "if (!s" << i << ")\n" "{\n"; mTemporaryIndex = i + 1; node->getRight()->traverse(this); @@ -80,7 +88,7 @@ bool UnfoldShortCircuit::visitBinary(Visit visit, TIntermBinary *node) mTemporaryIndex = i + 1; node->getLeft()->traverse(mOutputHLSL); out << ";\n"; - out << "if(s" << i << ")\n" + out << "if (s" << i << ")\n" "{\n"; mTemporaryIndex = i + 1; node->getRight()->traverse(this); @@ -115,7 +123,7 @@ bool UnfoldShortCircuit::visitSelection(Visit visit, TIntermSelection *node) mTemporaryIndex = i + 1; node->getCondition()->traverse(this); - out << "if("; + out << "if ("; mTemporaryIndex = i + 1; node->getCondition()->traverse(mOutputHLSL); out << ")\n" diff --git a/src/compiler/UnfoldShortCircuit.h b/src/compiler/UnfoldShortCircuit.h index cb176a5f..ae2989fa 100644 --- a/src/compiler/UnfoldShortCircuit.h +++ b/src/compiler/UnfoldShortCircuit.h @@ -10,7 +10,7 @@ #define COMPILER_UNFOLDSHORTCIRCUIT_H_ #include "compiler/intermediate.h" -#include "compiler/ParseHelper.h" +#include "compiler/ParseContext.h" namespace sh { diff --git a/src/compiler/UnfoldShortCircuitAST.cpp b/src/compiler/UnfoldShortCircuitAST.cpp new file mode 100644 index 00000000..a19bceae --- /dev/null +++ b/src/compiler/UnfoldShortCircuitAST.cpp @@ -0,0 +1,81 @@ +// +// 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/UnfoldShortCircuitAST.h" + +namespace +{ + +// "x || y" is equivalent to "x ? true : y". +TIntermSelection *UnfoldOR(TIntermTyped *x, TIntermTyped *y) +{ + const TType boolType(EbtBool, EbpUndefined); + ConstantUnion *u = new ConstantUnion; + u->setBConst(true); + TIntermConstantUnion *trueNode = new TIntermConstantUnion( + u, TType(EbtBool, EbpUndefined, EvqConst, 1)); + return new TIntermSelection(x, trueNode, y, boolType); +} + +// "x && y" is equivalent to "x ? y : false". +TIntermSelection *UnfoldAND(TIntermTyped *x, TIntermTyped *y) +{ + const TType boolType(EbtBool, EbpUndefined); + ConstantUnion *u = new ConstantUnion; + u->setBConst(false); + TIntermConstantUnion *falseNode = new TIntermConstantUnion( + u, TType(EbtBool, EbpUndefined, EvqConst, 1)); + return new TIntermSelection(x, y, falseNode, boolType); +} + +} // namespace anonymous + +bool UnfoldShortCircuitAST::visitBinary(Visit visit, TIntermBinary *node) +{ + TIntermSelection *replacement = NULL; + + switch (node->getOp()) + { + case EOpLogicalOr: + replacement = UnfoldOR(node->getLeft(), node->getRight()); + break; + case EOpLogicalAnd: + replacement = UnfoldAND(node->getLeft(), node->getRight()); + break; + default: + break; + } + if (replacement) + { + replacements.push_back( + NodeUpdateEntry(getParentNode(), node, replacement)); + } + return true; +} + +void UnfoldShortCircuitAST::updateTree() +{ + for (size_t ii = 0; ii < replacements.size(); ++ii) + { + const NodeUpdateEntry& entry = replacements[ii]; + ASSERT(entry.parent); + bool replaced = entry.parent->replaceChildNode( + entry.original, entry.replacement); + ASSERT(replaced); + + // In AST traversing, a parent is visited before its children. + // After we replace a node, if an immediate child is to + // be replaced, we need to make sure we don't update the replaced + // node; instead, we update the replacement node. + for (size_t jj = ii + 1; jj < replacements.size(); ++jj) + { + NodeUpdateEntry& entry2 = replacements[jj]; + if (entry2.parent == entry.original) + entry2.parent = entry.replacement; + } + } +} + diff --git a/src/compiler/UnfoldShortCircuitAST.h b/src/compiler/UnfoldShortCircuitAST.h new file mode 100644 index 00000000..cfc50066 --- /dev/null +++ b/src/compiler/UnfoldShortCircuitAST.h @@ -0,0 +1,51 @@ +// +// 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. +// +// UnfoldShortCircuitAST is an AST traverser to replace short-circuiting +// operations with ternary operations. +// + +#ifndef COMPILER_UNFOLD_SHORT_CIRCUIT_AST_H_ +#define COMPILER_UNFOLD_SHORT_CIRCUIT_AST_H_ + +#include "common/angleutils.h" +#include "compiler/intermediate.h" + +// This traverser identifies all the short circuit binary nodes that need to +// be replaced, and creates the corresponding replacement nodes. However, +// the actual replacements happen after the traverse through updateTree(). + +class UnfoldShortCircuitAST : public TIntermTraverser +{ + public: + UnfoldShortCircuitAST() { } + + virtual bool visitBinary(Visit visit, TIntermBinary *); + + void updateTree(); + + private: + struct NodeUpdateEntry + { + NodeUpdateEntry(TIntermNode *_parent, + TIntermNode *_original, + TIntermNode *_replacement) + : parent(_parent), + original(_original), + replacement(_replacement) {} + + TIntermNode *parent; + TIntermNode *original; + TIntermNode *replacement; + }; + + // During traversing, save all the replacements that need to happen; + // then replace them by calling updateNodes(). + std::vector<NodeUpdateEntry> replacements; + + DISALLOW_COPY_AND_ASSIGN(UnfoldShortCircuitAST); +}; + +#endif // COMPILER_UNFOLD_SHORT_CIRCUIT_AST_H_ diff --git a/src/compiler/Uniform.cpp b/src/compiler/Uniform.cpp index dcf3af1b..f367db2b 100644 --- a/src/compiler/Uniform.cpp +++ b/src/compiler/Uniform.cpp @@ -1,21 +1,21 @@ -//
-// Copyright (c) 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/Uniform.h"
-
-namespace sh
-{
-
-Uniform::Uniform(GLenum type, GLenum precision, const char *name, int arraySize, int registerIndex)
-{
- this->type = type;
- this->precision = precision;
- this->name = name;
- this->arraySize = arraySize;
- this->registerIndex = registerIndex;
-}
-
-}
+// +// Copyright (c) 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/Uniform.h" + +namespace sh +{ + +Uniform::Uniform(GLenum type, GLenum precision, const char *name, int arraySize, int registerIndex) +{ + this->type = type; + this->precision = precision; + this->name = name; + this->arraySize = arraySize; + this->registerIndex = registerIndex; +} + +} diff --git a/src/compiler/Uniform.h b/src/compiler/Uniform.h index 2ffd51ee..4c53ffa7 100644 --- a/src/compiler/Uniform.h +++ b/src/compiler/Uniform.h @@ -1,35 +1,35 @@ -//
-// Copyright (c) 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.
-//
-
-#ifndef COMPILER_UNIFORM_H_
-#define COMPILER_UNIFORM_H_
-
-#include <string>
-#include <vector>
-
-#define GL_APICALL
-#include <GLES2/gl2.h>
-
-namespace sh
-{
-
-struct Uniform
-{
- Uniform(GLenum type, GLenum precision, const char *name, int arraySize, int registerIndex);
-
- GLenum type;
- GLenum precision;
- std::string name;
- unsigned int arraySize;
-
- int registerIndex;
-};
-
-typedef std::vector<Uniform> ActiveUniforms;
-
-}
-
-#endif // COMPILER_UNIFORM_H_
+// +// Copyright (c) 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. +// + +#ifndef COMPILER_UNIFORM_H_ +#define COMPILER_UNIFORM_H_ + +#include <string> +#include <vector> + +#define GL_APICALL +#include <GLES2/gl2.h> + +namespace sh +{ + +struct Uniform +{ + Uniform(GLenum type, GLenum precision, const char *name, int arraySize, int registerIndex); + + GLenum type; + GLenum precision; + std::string name; + unsigned int arraySize; + + int registerIndex; +}; + +typedef std::vector<Uniform> ActiveUniforms; + +} + +#endif // COMPILER_UNIFORM_H_ diff --git a/src/compiler/ValidateLimitations.cpp b/src/compiler/ValidateLimitations.cpp index 736ceeae..64969c48 100644 --- a/src/compiler/ValidateLimitations.cpp +++ b/src/compiler/ValidateLimitations.cpp @@ -7,7 +7,7 @@ #include "compiler/ValidateLimitations.h" #include "compiler/InfoSink.h" #include "compiler/InitializeParseContext.h" -#include "compiler/ParseHelper.h" +#include "compiler/ParseContext.h" namespace { bool IsLoopIndex(const TIntermSymbol* symbol, const TLoopStack& stack) { @@ -457,7 +457,7 @@ bool ValidateLimitations::validateFunctionCall(TIntermAggregate* node) bool ValidateLimitations::validateOperation(TIntermOperator* node, TIntermNode* operand) { // Check if loop index is modified in the loop body. - if (!withinLoopBody() || !node->modifiesState()) + if (!withinLoopBody() || !node->isAssignment()) return true; const TIntermSymbol* symbol = operand->getAsSymbolNode(); diff --git a/src/compiler/VariableInfo.cpp b/src/compiler/VariableInfo.cpp index 84db807a..f3f7b1ef 100644 --- a/src/compiler/VariableInfo.cpp +++ b/src/compiler/VariableInfo.cpp @@ -6,15 +6,17 @@ #include "compiler/VariableInfo.h" -static TString arrayBrackets(int index) +namespace { + +TString arrayBrackets(int index) { TStringStream stream; stream << "[" << index << "]"; return stream.str(); } -// Returns the data type for an attribute or uniform. -static ShDataType getVariableDataType(const TType& type) +// Returns the data type for an attribute, uniform, or varying. +ShDataType getVariableDataType(const TType& type) { switch (type.getBasicType()) { case EbtFloat: @@ -70,22 +72,22 @@ static ShDataType getVariableDataType(const TType& type) return SH_NONE; } -static void getBuiltInVariableInfo(const TType& type, - const TString& name, - const TString& mappedName, - TVariableInfoList& infoList); -static void getUserDefinedVariableInfo(const TType& type, - const TString& name, - const TString& mappedName, - TVariableInfoList& infoList, - ShHashFunction64 hashFunction); - -// Returns info for an attribute or uniform. -static void getVariableInfo(const TType& type, +void getBuiltInVariableInfo(const TType& type, const TString& name, const TString& mappedName, - TVariableInfoList& infoList, - ShHashFunction64 hashFunction) + TVariableInfoList& infoList); +void getUserDefinedVariableInfo(const TType& type, + const TString& name, + const TString& mappedName, + TVariableInfoList& infoList, + ShHashFunction64 hashFunction); + +// Returns info for an attribute, uniform, or varying. +void getVariableInfo(const TType& type, + const TString& name, + const TString& mappedName, + TVariableInfoList& infoList, + ShHashFunction64 hashFunction) { if (type.getBasicType() == EbtStruct) { if (type.isArray()) { @@ -119,6 +121,7 @@ void getBuiltInVariableInfo(const TType& type, varInfo.mappedName = mappedName.c_str(); varInfo.size = 1; } + varInfo.precision = type.getPrecision(); varInfo.type = getVariableDataType(type); infoList.push_back(varInfo); } @@ -143,75 +146,144 @@ void getUserDefinedVariableInfo(const TType& type, } } +TVariableInfo* findVariable(const TType& type, + const TString& name, + TVariableInfoList& infoList) +{ + // TODO(zmo): optimize this function. + TString myName = name; + if (type.isArray()) + myName += "[0]"; + for (size_t ii = 0; ii < infoList.size(); ++ii) + { + if (infoList[ii].name.c_str() == myName) + return &(infoList[ii]); + } + return NULL; +} + +} // namespace anonymous + TVariableInfo::TVariableInfo() + : type(SH_NONE), + size(0), + precision(EbpUndefined), + staticUse(false) { } TVariableInfo::TVariableInfo(ShDataType type, int size) : type(type), - size(size) + size(size), + precision(EbpUndefined), + staticUse(false) { } -CollectAttribsUniforms::CollectAttribsUniforms(TVariableInfoList& attribs, - TVariableInfoList& uniforms, - ShHashFunction64 hashFunction) +CollectVariables::CollectVariables(TVariableInfoList& attribs, + TVariableInfoList& uniforms, + TVariableInfoList& varyings, + ShHashFunction64 hashFunction) : mAttribs(attribs), mUniforms(uniforms), + mVaryings(varyings), + mPointCoordAdded(false), + mFrontFacingAdded(false), + mFragCoordAdded(false), mHashFunction(hashFunction) { } -// We are only interested in attribute and uniform variable declaration. -void CollectAttribsUniforms::visitSymbol(TIntermSymbol*) -{ -} - -void CollectAttribsUniforms::visitConstantUnion(TIntermConstantUnion*) -{ -} - -bool CollectAttribsUniforms::visitBinary(Visit, TIntermBinary*) +// We want to check whether a uniform/varying is statically used +// because we only count the used ones in packing computing. +// Also, gl_FragCoord, gl_PointCoord, and gl_FrontFacing count +// toward varying counting if they are statically used in a fragment +// shader. +void CollectVariables::visitSymbol(TIntermSymbol* symbol) { - return false; -} - -bool CollectAttribsUniforms::visitUnary(Visit, TIntermUnary*) -{ - return false; -} - -bool CollectAttribsUniforms::visitSelection(Visit, TIntermSelection*) -{ - return false; + ASSERT(symbol != NULL); + TVariableInfo* var = NULL; + switch (symbol->getQualifier()) + { + case EvqVaryingOut: + case EvqInvariantVaryingOut: + case EvqVaryingIn: + case EvqInvariantVaryingIn: + var = findVariable(symbol->getType(), symbol->getSymbol(), mVaryings); + break; + case EvqUniform: + var = findVariable(symbol->getType(), symbol->getSymbol(), mUniforms); + break; + case EvqFragCoord: + if (!mFragCoordAdded) { + TVariableInfo info; + info.name = "gl_FragCoord"; + info.mappedName = "gl_FragCoord"; + info.type = SH_FLOAT_VEC4; + info.size = 1; + info.precision = EbpMedium; // Use mediump as it doesn't really matter. + info.staticUse = true; + mVaryings.push_back(info); + mFragCoordAdded = true; + } + return; + case EvqFrontFacing: + if (!mFrontFacingAdded) { + TVariableInfo info; + info.name = "gl_FrontFacing"; + info.mappedName = "gl_FrontFacing"; + info.type = SH_BOOL; + info.size = 1; + info.precision = EbpUndefined; + info.staticUse = true; + mVaryings.push_back(info); + mFrontFacingAdded = true; + } + return; + case EvqPointCoord: + if (!mPointCoordAdded) { + TVariableInfo info; + info.name = "gl_PointCoord"; + info.mappedName = "gl_PointCoord"; + info.type = SH_FLOAT_VEC2; + info.size = 1; + info.precision = EbpMedium; // Use mediump as it doesn't really matter. + info.staticUse = true; + mVaryings.push_back(info); + mPointCoordAdded = true; + } + return; + default: + break; + } + if (var) + var->staticUse = true; } -bool CollectAttribsUniforms::visitAggregate(Visit, TIntermAggregate* node) +bool CollectVariables::visitAggregate(Visit, TIntermAggregate* node) { - bool visitChildren = false; + bool visitChildren = true; switch (node->getOp()) { - case EOpSequence: - // We need to visit sequence children to get to variable declarations. - visitChildren = true; - break; case EOpDeclaration: { const TIntermSequence& sequence = node->getSequence(); TQualifier qualifier = sequence.front()->getAsTyped()->getQualifier(); - if (qualifier == EvqAttribute || qualifier == EvqUniform) + if (qualifier == EvqAttribute || qualifier == EvqUniform || + qualifier == EvqVaryingIn || qualifier == EvqVaryingOut || + qualifier == EvqInvariantVaryingIn || qualifier == EvqInvariantVaryingOut) { - TVariableInfoList& infoList = qualifier == EvqAttribute ? - mAttribs : mUniforms; + TVariableInfoList& infoList = qualifier == EvqAttribute ? mAttribs : + (qualifier == EvqUniform ? mUniforms : mVaryings); for (TIntermSequence::const_iterator i = sequence.begin(); i != sequence.end(); ++i) { const TIntermSymbol* variable = (*i)->getAsSymbolNode(); // The only case in which the sequence will not contain a // TIntermSymbol node is initialization. It will contain a - // TInterBinary node in that case. Since attributes and unifroms - // cannot be initialized in a shader, we must have only - // TIntermSymbol nodes in the sequence. + // TInterBinary node in that case. Since attributes, uniforms, + // and varyings cannot be initialized in a shader, we must have + // only TIntermSymbol nodes in the sequence. ASSERT(variable != NULL); TString processedSymbol; if (mHashFunction == NULL) @@ -223,6 +295,7 @@ bool CollectAttribsUniforms::visitAggregate(Visit, TIntermAggregate* node) processedSymbol, infoList, mHashFunction); + visitChildren = false; } } break; @@ -233,13 +306,3 @@ bool CollectAttribsUniforms::visitAggregate(Visit, TIntermAggregate* node) return visitChildren; } -bool CollectAttribsUniforms::visitLoop(Visit, TIntermLoop*) -{ - return false; -} - -bool CollectAttribsUniforms::visitBranch(Visit, TIntermBranch*) -{ - return false; -} - diff --git a/src/compiler/VariableInfo.h b/src/compiler/VariableInfo.h index 4130a589..3c7f2a5f 100644 --- a/src/compiler/VariableInfo.h +++ b/src/compiler/VariableInfo.h @@ -20,28 +20,30 @@ struct TVariableInfo { TPersistString mappedName; ShDataType type; int size; + TPrecision precision; + bool staticUse; }; typedef std::vector<TVariableInfo> TVariableInfoList; -// Traverses intermediate tree to collect all attributes and uniforms. -class CollectAttribsUniforms : public TIntermTraverser { +// Traverses intermediate tree to collect all attributes, uniforms, varyings. +class CollectVariables : public TIntermTraverser { public: - CollectAttribsUniforms(TVariableInfoList& attribs, - TVariableInfoList& uniforms, - ShHashFunction64 hashFunction); + CollectVariables(TVariableInfoList& attribs, + TVariableInfoList& uniforms, + TVariableInfoList& varyings, + ShHashFunction64 hashFunction); virtual void visitSymbol(TIntermSymbol*); - virtual void visitConstantUnion(TIntermConstantUnion*); - virtual bool visitBinary(Visit, TIntermBinary*); - virtual bool visitUnary(Visit, TIntermUnary*); - virtual bool visitSelection(Visit, TIntermSelection*); virtual bool visitAggregate(Visit, TIntermAggregate*); - virtual bool visitLoop(Visit, TIntermLoop*); - virtual bool visitBranch(Visit, TIntermBranch*); private: TVariableInfoList& mAttribs; TVariableInfoList& mUniforms; + TVariableInfoList& mVaryings; + + bool mPointCoordAdded; + bool mFrontFacingAdded; + bool mFragCoordAdded; ShHashFunction64 mHashFunction; }; diff --git a/src/compiler/debug.cpp b/src/compiler/debug.cpp index 53778bd3..6a7b0425 100644 --- a/src/compiler/debug.cpp +++ b/src/compiler/debug.cpp @@ -12,7 +12,7 @@ #include <stdio.h> #include "compiler/InitializeParseContext.h" -#include "compiler/ParseHelper.h" +#include "compiler/ParseContext.h" static const int kTraceBufferLen = 1024; diff --git a/src/compiler/depgraph/DependencyGraphBuilder.cpp b/src/compiler/depgraph/DependencyGraphBuilder.cpp index d586cfd0..026e6d57 100644 --- a/src/compiler/depgraph/DependencyGraphBuilder.cpp +++ b/src/compiler/depgraph/DependencyGraphBuilder.cpp @@ -94,7 +94,7 @@ void TDependencyGraphBuilder::visitSymbol(TIntermSymbol* intermSymbol) bool TDependencyGraphBuilder::visitBinary(Visit visit, TIntermBinary* intermBinary) { TOperator op = intermBinary->getOp(); - if (op == EOpInitialize || intermBinary->modifiesState()) + if (op == EOpInitialize || intermBinary->isAssignment()) visitAssignment(intermBinary); else if (op == EOpLogicalAnd || op == EOpLogicalOr) visitLogicalOp(intermBinary); diff --git a/src/compiler/glslang.l b/src/compiler/glslang.l index 40498750..430f8ca1 100644 --- a/src/compiler/glslang.l +++ b/src/compiler/glslang.l @@ -37,7 +37,7 @@ WHICH GENERATES THE GLSL ES LEXER (glslang_lex.cpp). %{ #include "compiler/glslang.h" -#include "compiler/ParseHelper.h" +#include "compiler/ParseContext.h" #include "compiler/preprocessor/Token.h" #include "compiler/util.h" #include "glslang_tab.h" @@ -57,6 +57,8 @@ WHICH GENERATES THE GLSL ES LEXER (glslang_lex.cpp). static yy_size_t string_input(char* buf, yy_size_t max_size, yyscan_t yyscanner); static int check_type(yyscan_t yyscanner); static int reserved_word(yyscan_t yyscanner); +static int int_constant(yyscan_t yyscanner); +static int float_constant(yyscan_t yyscanner); %} %option noyywrap nounput never-interactive @@ -189,13 +191,13 @@ O [0-7] return check_type(yyscanner); } -0[xX]{H}+ { yylval->lex.i = static_cast<int>(strtol(yytext, 0, 0)); return INTCONSTANT; } -0{O}+ { yylval->lex.i = static_cast<int>(strtol(yytext, 0, 0)); return INTCONSTANT; } -{D}+ { yylval->lex.i = static_cast<int>(strtol(yytext, 0, 0)); return INTCONSTANT; } +0[xX]{H}+ { return int_constant(yyscanner); } +0{O}+ { return int_constant(yyscanner); } +{D}+ { return int_constant(yyscanner); } -{D}+{E} { yylval->lex.f = static_cast<float>(atof_dot(yytext)); return FLOATCONSTANT; } -{D}+"."{D}*({E})? { yylval->lex.f = static_cast<float>(atof_dot(yytext)); return FLOATCONSTANT; } -"."{D}+({E})? { yylval->lex.f = static_cast<float>(atof_dot(yytext)); return FLOATCONSTANT; } +{D}+{E} { return float_constant(yyscanner); } +{D}+"."{D}*({E})? { return float_constant(yyscanner); } +"."{D}+({E})? { return float_constant(yyscanner); } "+=" { return ADD_ASSIGN; } "-=" { return SUB_ASSIGN; } @@ -288,6 +290,27 @@ int reserved_word(yyscan_t yyscanner) { return 0; } +void yyerror(YYLTYPE* lloc, TParseContext* context, const char* reason) { + context->error(*lloc, reason, yyget_text(context->scanner)); + context->recover(); +} + +int int_constant(yyscan_t yyscanner) { + struct yyguts_t* yyg = (struct yyguts_t*) yyscanner; + + if (!atoi_clamp(yytext, &(yylval->lex.i))) + yyextra->warning(*yylloc, "Integer overflow", yytext, ""); + return INTCONSTANT; +} + +int float_constant(yyscan_t yyscanner) { + struct yyguts_t* yyg = (struct yyguts_t*) yyscanner; + + if (!atof_clamp(yytext, &(yylval->lex.f))) + yyextra->warning(*yylloc, "Float overflow", yytext, ""); + return FLOATCONSTANT; +} + int glslang_initialize(TParseContext* context) { yyscan_t scanner = NULL; if (yylex_init_extra(context, &scanner)) @@ -316,6 +339,7 @@ int glslang_scan(size_t count, const char* const string[], const int length[], // Initialize preprocessor. if (!context->preprocessor.init(count, string, length)) return 1; + context->preprocessor.setMaxTokenLength(SH_MAX_TOKEN_LENGTH); // Define extension macros. const TExtensionBehavior& extBehavior = context->extensionBehavior(); diff --git a/src/compiler/glslang.y b/src/compiler/glslang.y index 0e8c3c3b..a8dceb40 100644 --- a/src/compiler/glslang.y +++ b/src/compiler/glslang.y @@ -35,7 +35,7 @@ WHICH GENERATES THE GLSL ES PARSER (glslang_tab.cpp AND glslang_tab.h). #endif #include "compiler/SymbolTable.h" -#include "compiler/ParseHelper.h" +#include "compiler/ParseContext.h" #include "GLSLANG/ShaderLang.h" #define YYENABLE_NLS 0 @@ -51,6 +51,7 @@ WHICH GENERATES THE GLSL ES PARSER (glslang_tab.cpp AND glslang_tab.h). %code requires { #define YYLTYPE TSourceLoc #define YYLTYPE_IS_DECLARED 1 +#define SH_MAX_TOKEN_LENGTH 256 // WebGL spec. } %union { @@ -85,7 +86,7 @@ WHICH GENERATES THE GLSL ES PARSER (glslang_tab.cpp AND glslang_tab.h). %{ extern int yylex(YYSTYPE* yylval, YYLTYPE* yylloc, void* yyscanner); -static void yyerror(YYLTYPE* yylloc, TParseContext* context, const char* reason); +extern void yyerror(YYLTYPE* yylloc, TParseContext* context, const char* reason); #define YYLLOC_DEFAULT(Current, Rhs, N) \ do { \ @@ -227,14 +228,6 @@ primary_expression $$ = $1; } | INTCONSTANT { - // - // INT_TYPE is only 16-bit plus sign bit for vertex/fragment shaders, - // check for overflow for constants - // - if (abs($1.i) >= (1 << 16)) { - context->error(@1, " integer constant overflow", ""); - context->recover(); - } ConstantUnion *unionArray = new ConstantUnion[1]; unionArray->setIConst($1.i); $$ = context->intermediate.addConstantUnion(unionArray, TType(EbtInt, EbpUndefined, EvqConst), @1); @@ -2004,11 +1997,6 @@ function_definition %% -void yyerror(YYLTYPE* yylloc, TParseContext* context, const char* reason) { - context->error(*yylloc, reason, ""); - context->recover(); -} - int glslang_parse(TParseContext* context) { return yyparse(context); } diff --git a/src/compiler/glslang_lex.cpp b/src/compiler/glslang_lex.cpp index 9f95521f..de3d82bc 100644 --- a/src/compiler/glslang_lex.cpp +++ b/src/compiler/glslang_lex.cpp @@ -782,7 +782,7 @@ WHICH GENERATES THE GLSL ES LEXER (glslang_lex.cpp). */ #include "compiler/glslang.h" -#include "compiler/ParseHelper.h" +#include "compiler/ParseContext.h" #include "compiler/preprocessor/Token.h" #include "compiler/util.h" #include "glslang_tab.h" @@ -802,6 +802,8 @@ WHICH GENERATES THE GLSL ES LEXER (glslang_lex.cpp). static yy_size_t string_input(char* buf, yy_size_t max_size, yyscan_t yyscanner); static int check_type(yyscan_t yyscanner); static int reserved_word(yyscan_t yyscanner); +static int int_constant(yyscan_t yyscanner); +static int float_constant(yyscan_t yyscanner); #define INITIAL 0 @@ -1500,27 +1502,27 @@ YY_RULE_SETUP YY_BREAK case 94: YY_RULE_SETUP -{ yylval->lex.i = static_cast<int>(strtol(yytext, 0, 0)); return INTCONSTANT; } +{ return int_constant(yyscanner); } YY_BREAK case 95: YY_RULE_SETUP -{ yylval->lex.i = static_cast<int>(strtol(yytext, 0, 0)); return INTCONSTANT; } +{ return int_constant(yyscanner); } YY_BREAK case 96: YY_RULE_SETUP -{ yylval->lex.i = static_cast<int>(strtol(yytext, 0, 0)); return INTCONSTANT; } +{ return int_constant(yyscanner); } YY_BREAK case 97: YY_RULE_SETUP -{ yylval->lex.f = static_cast<float>(atof_dot(yytext)); return FLOATCONSTANT; } +{ return float_constant(yyscanner); } YY_BREAK case 98: YY_RULE_SETUP -{ yylval->lex.f = static_cast<float>(atof_dot(yytext)); return FLOATCONSTANT; } +{ return float_constant(yyscanner); } YY_BREAK case 99: YY_RULE_SETUP -{ yylval->lex.f = static_cast<float>(atof_dot(yytext)); return FLOATCONSTANT; } +{ return float_constant(yyscanner); } YY_BREAK case 100: YY_RULE_SETUP @@ -2897,6 +2899,27 @@ int reserved_word(yyscan_t yyscanner) { return 0; } +void yyerror(YYLTYPE* lloc, TParseContext* context, const char* reason) { + context->error(*lloc, reason, yyget_text(context->scanner)); + context->recover(); +} + +int int_constant(yyscan_t yyscanner) { + struct yyguts_t* yyg = (struct yyguts_t*) yyscanner; + + if (!atoi_clamp(yytext, &(yylval->lex.i))) + yyextra->warning(*yylloc, "Integer overflow", yytext, ""); + return INTCONSTANT; +} + +int float_constant(yyscan_t yyscanner) { + struct yyguts_t* yyg = (struct yyguts_t*) yyscanner; + + if (!atof_clamp(yytext, &(yylval->lex.f))) + yyextra->warning(*yylloc, "Float overflow", yytext, ""); + return FLOATCONSTANT; +} + int glslang_initialize(TParseContext* context) { yyscan_t scanner = NULL; if (yylex_init_extra(context,&scanner)) @@ -2925,6 +2948,7 @@ int glslang_scan(size_t count, const char* const string[], const int length[], // Initialize preprocessor. if (!context->preprocessor.init(count, string, length)) return 1; + context->preprocessor.setMaxTokenLength(SH_MAX_TOKEN_LENGTH); // Define extension macros. const TExtensionBehavior& extBehavior = context->extensionBehavior(); diff --git a/src/compiler/glslang_tab.cpp b/src/compiler/glslang_tab.cpp index 7afd4ca8..1f2e8903 100644 --- a/src/compiler/glslang_tab.cpp +++ b/src/compiler/glslang_tab.cpp @@ -85,7 +85,7 @@ #endif #include "compiler/SymbolTable.h" -#include "compiler/ParseHelper.h" +#include "compiler/ParseContext.h" #include "GLSLANG/ShaderLang.h" #define YYENABLE_NLS 0 @@ -126,6 +126,7 @@ extern int yydebug; #define YYLTYPE TSourceLoc #define YYLTYPE_IS_DECLARED 1 +#define SH_MAX_TOKEN_LENGTH 256 // WebGL spec. @@ -307,7 +308,7 @@ int yyparse (); extern int yylex(YYSTYPE* yylval, YYLTYPE* yylloc, void* yyscanner); -static void yyerror(YYLTYPE* yylloc, TParseContext* context, const char* reason); +extern void yyerror(YYLTYPE* yylloc, TParseContext* context, const char* reason); #define YYLLOC_DEFAULT(Current, Rhs, N) \ do { \ @@ -713,27 +714,27 @@ static const yytype_int16 yyrhs[] = /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { - 0, 179, 179, 180, 183, 226, 229, 242, 247, 252, - 258, 261, 264, 267, 362, 372, 385, 393, 493, 496, - 504, 507, 513, 517, 524, 530, 539, 547, 602, 612, - 615, 625, 635, 656, 657, 658, 663, 664, 672, 683, - 684, 692, 703, 707, 708, 718, 728, 738, 751, 752, - 762, 775, 779, 783, 787, 788, 801, 802, 815, 816, - 829, 830, 847, 848, 861, 862, 863, 864, 865, 869, - 872, 883, 891, 918, 923, 937, 992, 995, 1002, 1010, - 1031, 1052, 1062, 1090, 1095, 1105, 1110, 1120, 1123, 1126, - 1129, 1135, 1142, 1145, 1167, 1185, 1209, 1232, 1236, 1254, - 1262, 1294, 1314, 1335, 1344, 1367, 1370, 1376, 1384, 1392, - 1400, 1410, 1417, 1420, 1423, 1429, 1432, 1447, 1451, 1455, - 1459, 1463, 1468, 1473, 1478, 1483, 1488, 1493, 1498, 1503, - 1508, 1513, 1518, 1523, 1527, 1531, 1539, 1547, 1551, 1564, - 1564, 1578, 1578, 1587, 1590, 1606, 1639, 1643, 1649, 1656, - 1671, 1675, 1679, 1680, 1686, 1687, 1688, 1689, 1690, 1694, - 1695, 1695, 1695, 1705, 1706, 1710, 1710, 1711, 1711, 1716, - 1719, 1729, 1732, 1738, 1739, 1743, 1751, 1755, 1765, 1770, - 1787, 1787, 1792, 1792, 1799, 1799, 1807, 1810, 1816, 1819, - 1825, 1829, 1836, 1843, 1850, 1857, 1868, 1877, 1881, 1888, - 1891, 1897, 1897 + 0, 180, 180, 181, 184, 227, 230, 243, 248, 253, + 259, 262, 265, 268, 363, 373, 386, 394, 494, 497, + 505, 508, 514, 518, 525, 531, 540, 548, 603, 613, + 616, 626, 636, 657, 658, 659, 664, 665, 673, 684, + 685, 693, 704, 708, 709, 719, 729, 739, 752, 753, + 763, 776, 780, 784, 788, 789, 802, 803, 816, 817, + 830, 831, 848, 849, 862, 863, 864, 865, 866, 870, + 873, 884, 892, 919, 924, 938, 993, 996, 1003, 1011, + 1032, 1053, 1063, 1091, 1096, 1106, 1111, 1121, 1124, 1127, + 1130, 1136, 1143, 1146, 1168, 1186, 1210, 1233, 1237, 1255, + 1263, 1295, 1315, 1336, 1345, 1368, 1371, 1377, 1385, 1393, + 1401, 1411, 1418, 1421, 1424, 1430, 1433, 1448, 1452, 1456, + 1460, 1464, 1469, 1474, 1479, 1484, 1489, 1494, 1499, 1504, + 1509, 1514, 1519, 1524, 1528, 1532, 1540, 1548, 1552, 1565, + 1565, 1579, 1579, 1588, 1591, 1607, 1640, 1644, 1650, 1657, + 1672, 1676, 1680, 1681, 1687, 1688, 1689, 1690, 1691, 1695, + 1696, 1696, 1696, 1706, 1707, 1711, 1711, 1712, 1712, 1717, + 1720, 1730, 1733, 1739, 1740, 1744, 1752, 1756, 1766, 1771, + 1788, 1788, 1793, 1793, 1800, 1800, 1808, 1811, 1817, 1820, + 1826, 1830, 1837, 1844, 1851, 1858, 1869, 1878, 1882, 1889, + 1892, 1898, 1898 }; #endif @@ -2297,14 +2298,6 @@ yyreduce: case 6: { - // - // INT_TYPE is only 16-bit plus sign bit for vertex/fragment shaders, - // check for overflow for constants - // - if (abs((yyvsp[(1) - (1)].lex).i) >= (1 << 16)) { - context->error((yylsp[(1) - (1)]), " integer constant overflow", ""); - context->recover(); - } ConstantUnion *unionArray = new ConstantUnion[1]; unionArray->setIConst((yyvsp[(1) - (1)].lex).i); (yyval.interm.intermTypedNode) = context->intermediate.addConstantUnion(unionArray, TType(EbtInt, EbpUndefined, EvqConst), (yylsp[(1) - (1)])); @@ -4872,11 +4865,6 @@ yyreturn: -void yyerror(YYLTYPE* yylloc, TParseContext* context, const char* reason) { - context->error(*yylloc, reason, ""); - context->recover(); -} - int glslang_parse(TParseContext* context) { return yyparse(context); } diff --git a/src/compiler/glslang_tab.h b/src/compiler/glslang_tab.h index 2f0f1106..07d0b15f 100644 --- a/src/compiler/glslang_tab.h +++ b/src/compiler/glslang_tab.h @@ -44,6 +44,7 @@ extern int yydebug; #define YYLTYPE TSourceLoc #define YYLTYPE_IS_DECLARED 1 +#define SH_MAX_TOKEN_LENGTH 256 // WebGL spec. diff --git a/src/compiler/intermediate.h b/src/compiler/intermediate.h index 738621fe..3f2ea145 100644 --- a/src/compiler/intermediate.h +++ b/src/compiler/intermediate.h @@ -227,6 +227,11 @@ public: virtual TIntermSymbol* getAsSymbolNode() { return 0; } virtual TIntermLoop* getAsLoopNode() { return 0; } + // Replace a child node. Return true if |original| is a child + // node and it is replaced; otherwise, return false. + virtual bool replaceChildNode( + TIntermNode *original, TIntermNode *replacement) = 0; + protected: TSourceLoc line; }; @@ -247,6 +252,8 @@ public: TIntermTyped(const TType& t) : type(t) { } virtual TIntermTyped* getAsTyped() { return this; } + virtual bool hasSideEffects() const = 0; + void setType(const TType& t) { type = t; } const TType& getType() const { return type; } TType* getTypePointer() { return &type; } @@ -295,6 +302,8 @@ public: virtual TIntermLoop* getAsLoopNode() { return this; } virtual void traverse(TIntermTraverser*); + virtual bool replaceChildNode( + TIntermNode *original, TIntermNode *replacement); TLoopType getType() const { return type; } TIntermNode* getInit() { return init; } @@ -325,6 +334,8 @@ public: expression(e) { } virtual void traverse(TIntermTraverser*); + virtual bool replaceChildNode( + TIntermNode *original, TIntermNode *replacement); TOperator getFlowOp() { return flowOp; } TIntermTyped* getExpression() { return expression; } @@ -345,6 +356,8 @@ public: TIntermSymbol(int i, const TString& sym, const TType& t) : TIntermTyped(t), id(i) { symbol = sym; originalSymbol = sym; } + virtual bool hasSideEffects() const { return false; } + int getId() const { return id; } const TString& getSymbol() const { return symbol; } @@ -355,6 +368,7 @@ public: virtual void traverse(TIntermTraverser*); virtual TIntermSymbol* getAsSymbolNode() { return this; } + virtual bool replaceChildNode(TIntermNode *, TIntermNode *) { return false; } protected: int id; @@ -366,14 +380,17 @@ class TIntermConstantUnion : public TIntermTyped { public: TIntermConstantUnion(ConstantUnion *unionPointer, const TType& t) : TIntermTyped(t), unionArrayPointer(unionPointer) { } + virtual bool hasSideEffects() const { return false; } + ConstantUnion* getUnionArrayPointer() const { return unionArrayPointer; } - int getIConst(int index) const { return unionArrayPointer ? unionArrayPointer[index].getIConst() : 0; } - float getFConst(int index) const { return unionArrayPointer ? unionArrayPointer[index].getFConst() : 0.0f; } - bool getBConst(int index) const { return unionArrayPointer ? unionArrayPointer[index].getBConst() : false; } + int getIConst(size_t index) const { return unionArrayPointer ? unionArrayPointer[index].getIConst() : 0; } + float getFConst(size_t index) const { return unionArrayPointer ? unionArrayPointer[index].getFConst() : 0.0f; } + bool getBConst(size_t index) const { return unionArrayPointer ? unionArrayPointer[index].getBConst() : false; } virtual TIntermConstantUnion* getAsConstantUnion() { return this; } virtual void traverse(TIntermTraverser*); + virtual bool replaceChildNode(TIntermNode *, TIntermNode *) { return false; } TIntermTyped* fold(TOperator, TIntermTyped*, TInfoSink&); @@ -389,9 +406,11 @@ public: TOperator getOp() const { return op; } void setOp(TOperator o) { op = o; } - bool modifiesState() const; + bool isAssignment() const; bool isConstructor() const; + virtual bool hasSideEffects() const { return isAssignment(); } + protected: TIntermOperator(TOperator o) : TIntermTyped(TType(EbtFloat, EbpUndefined)), op(o) {} TIntermOperator(TOperator o, TType& t) : TIntermTyped(t), op(o) {} @@ -407,6 +426,10 @@ public: virtual TIntermBinary* getAsBinaryNode() { return this; } virtual void traverse(TIntermTraverser*); + virtual bool replaceChildNode( + TIntermNode *original, TIntermNode *replacement); + + virtual bool hasSideEffects() const { return (isAssignment() || left->hasSideEffects() || right->hasSideEffects()); } void setLeft(TIntermTyped* n) { left = n; } void setRight(TIntermTyped* n) { right = n; } @@ -435,6 +458,10 @@ public: virtual void traverse(TIntermTraverser*); virtual TIntermUnary* getAsUnaryNode() { return this; } + virtual bool replaceChildNode( + TIntermNode *original, TIntermNode *replacement); + + virtual bool hasSideEffects() const { return (isAssignment() || operand->hasSideEffects()); } void setOperand(TIntermTyped* o) { operand = o; } TIntermTyped* getOperand() { return operand; } @@ -465,6 +492,11 @@ public: virtual TIntermAggregate* getAsAggregate() { return this; } virtual void traverse(TIntermTraverser*); + virtual bool replaceChildNode( + TIntermNode *original, TIntermNode *replacement); + + // Conservatively assume function calls and other aggregate operators have side-effects + virtual bool hasSideEffects() const { return true; } TIntermSequence& getSequence() { return sequence; } @@ -508,6 +540,11 @@ public: TIntermTyped(type), condition(cond), trueBlock(trueB), falseBlock(falseB) {} virtual void traverse(TIntermTraverser*); + virtual bool replaceChildNode( + TIntermNode *original, TIntermNode *replacement); + + // Conservatively assume selections have side-effects + virtual bool hasSideEffects() const { return true; } bool usesTernaryOperator() const { return getBasicType() != EbtVoid; } TIntermNode* getCondition() const { return condition; } @@ -547,7 +584,7 @@ public: rightToLeft(rightToLeft), depth(0), maxDepth(0) {} - virtual ~TIntermTraverser() {}; + virtual ~TIntermTraverser() {} virtual void visitSymbol(TIntermSymbol*) {} virtual void visitConstantUnion(TIntermConstantUnion*) {} @@ -559,8 +596,24 @@ public: virtual bool visitBranch(Visit visit, TIntermBranch*) {return true;} int getMaxDepth() const {return maxDepth;} - void incrementDepth() {depth++; maxDepth = std::max(maxDepth, depth); } - void decrementDepth() {depth--;} + + void incrementDepth(TIntermNode *current) + { + depth++; + maxDepth = std::max(maxDepth, depth); + path.push_back(current); + } + + void decrementDepth() + { + depth--; + path.pop_back(); + } + + TIntermNode *getParentNode() + { + return path.size() == 0 ? NULL : path.back(); + } // Return the original name if hash function pointer is NULL; // otherwise return the hashed name. @@ -574,6 +627,9 @@ public: protected: int depth; int maxDepth; + + // All the nodes from root to the current node's parent during traversing. + TVector<TIntermNode *> path; }; #endif // __INTERMEDIATE_H diff --git a/src/compiler/parseConst.cpp b/src/compiler/parseConst.cpp index 1cc5db8d..65ed115c 100644 --- a/src/compiler/parseConst.cpp +++ b/src/compiler/parseConst.cpp @@ -4,7 +4,7 @@ // found in the LICENSE file. // -#include "compiler/ParseHelper.h" +#include "compiler/ParseContext.h" // // Use this class to carry along data from node to node in diff --git a/src/compiler/preprocessor/DiagnosticsBase.cpp b/src/compiler/preprocessor/DiagnosticsBase.cpp index 3e22e1f1..a7ce862b 100644 --- a/src/compiler/preprocessor/DiagnosticsBase.cpp +++ b/src/compiler/preprocessor/DiagnosticsBase.cpp @@ -25,14 +25,14 @@ void Diagnostics::report(ID id, Diagnostics::Severity Diagnostics::severity(ID id) { - if ((id > ERROR_BEGIN) && (id < ERROR_END)) - return ERROR; + if ((id > PP_ERROR_BEGIN) && (id < PP_ERROR_END)) + return PP_ERROR; - if ((id > WARNING_BEGIN) && (id < WARNING_END)) - return WARNING; + if ((id > PP_WARNING_BEGIN) && (id < PP_WARNING_END)) + return PP_WARNING; assert(false); - return ERROR; + return PP_ERROR; } std::string Diagnostics::message(ID id) @@ -40,82 +40,82 @@ std::string Diagnostics::message(ID id) switch (id) { // Errors begin. - case INTERNAL_ERROR: + case PP_INTERNAL_ERROR: return "internal error"; - case OUT_OF_MEMORY: + case PP_OUT_OF_MEMORY: return "out of memory"; - case INVALID_CHARACTER: + case PP_INVALID_CHARACTER: return "invalid character"; - case INVALID_NUMBER: + case PP_INVALID_NUMBER: return "invalid number"; - case INTEGER_OVERFLOW: + case PP_INTEGER_OVERFLOW: return "integer overflow"; - case FLOAT_OVERFLOW: + case PP_FLOAT_OVERFLOW: return "float overflow"; - case TOKEN_TOO_LONG: + case PP_TOKEN_TOO_LONG: return "token too long"; - case INVALID_EXPRESSION: + case PP_INVALID_EXPRESSION: return "invalid expression"; - case DIVISION_BY_ZERO: + case PP_DIVISION_BY_ZERO: return "division by zero"; - case EOF_IN_COMMENT: + case PP_EOF_IN_COMMENT: return "unexpected end of file found in comment"; - case UNEXPECTED_TOKEN: + case PP_UNEXPECTED_TOKEN: return "unexpected token"; - case DIRECTIVE_INVALID_NAME: + case PP_DIRECTIVE_INVALID_NAME: return "invalid directive name"; - case MACRO_NAME_RESERVED: + case PP_MACRO_NAME_RESERVED: return "macro name is reserved"; - case MACRO_REDEFINED: + case PP_MACRO_REDEFINED: return "macro redefined"; - case MACRO_PREDEFINED_REDEFINED: + case PP_MACRO_PREDEFINED_REDEFINED: return "predefined macro redefined"; - case MACRO_PREDEFINED_UNDEFINED: + case PP_MACRO_PREDEFINED_UNDEFINED: return "predefined macro undefined"; - case MACRO_UNTERMINATED_INVOCATION: + case PP_MACRO_UNTERMINATED_INVOCATION: return "unterminated macro invocation"; - case MACRO_TOO_FEW_ARGS: + case PP_MACRO_TOO_FEW_ARGS: return "Not enough arguments for macro"; - case MACRO_TOO_MANY_ARGS: + case PP_MACRO_TOO_MANY_ARGS: return "Too many arguments for macro"; - case CONDITIONAL_ENDIF_WITHOUT_IF: + case PP_CONDITIONAL_ENDIF_WITHOUT_IF: return "unexpected #endif found without a matching #if"; - case CONDITIONAL_ELSE_WITHOUT_IF: + case PP_CONDITIONAL_ELSE_WITHOUT_IF: return "unexpected #else found without a matching #if"; - case CONDITIONAL_ELSE_AFTER_ELSE: + case PP_CONDITIONAL_ELSE_AFTER_ELSE: return "unexpected #else found after another #else"; - case CONDITIONAL_ELIF_WITHOUT_IF: + case PP_CONDITIONAL_ELIF_WITHOUT_IF: return "unexpected #elif found without a matching #if"; - case CONDITIONAL_ELIF_AFTER_ELSE: + case PP_CONDITIONAL_ELIF_AFTER_ELSE: return "unexpected #elif found after #else"; - case CONDITIONAL_UNTERMINATED: + case PP_CONDITIONAL_UNTERMINATED: return "unexpected end of file found in conditional block"; - case INVALID_EXTENSION_NAME: + case PP_INVALID_EXTENSION_NAME: return "invalid extension name"; - case INVALID_EXTENSION_BEHAVIOR: + case PP_INVALID_EXTENSION_BEHAVIOR: return "invalid extension behavior"; - case INVALID_EXTENSION_DIRECTIVE: + case PP_INVALID_EXTENSION_DIRECTIVE: return "invalid extension directive"; - case INVALID_VERSION_NUMBER: + case PP_INVALID_VERSION_NUMBER: return "invalid version number"; - case INVALID_VERSION_DIRECTIVE: + case PP_INVALID_VERSION_DIRECTIVE: return "invalid version directive"; - case VERSION_NOT_FIRST_STATEMENT: + case PP_VERSION_NOT_FIRST_STATEMENT: return "#version directive must occur before anything else, " "except for comments and white space"; - case INVALID_LINE_NUMBER: + case PP_INVALID_LINE_NUMBER: return "invalid line number"; - case INVALID_FILE_NUMBER: + case PP_INVALID_FILE_NUMBER: return "invalid file number"; - case INVALID_LINE_DIRECTIVE: + case PP_INVALID_LINE_DIRECTIVE: return "invalid line directive"; // Errors end. // Warnings begin. - case EOF_IN_DIRECTIVE: + case PP_EOF_IN_DIRECTIVE: return "unexpected end of file found in directive"; - case CONDITIONAL_UNEXPECTED_TOKEN: + case PP_CONDITIONAL_UNEXPECTED_TOKEN: return "unexpected token after conditional expression"; - case UNRECOGNIZED_PRAGMA: + case PP_UNRECOGNIZED_PRAGMA: return "unrecognized pragma"; // Warnings end. default: diff --git a/src/compiler/preprocessor/DiagnosticsBase.h b/src/compiler/preprocessor/DiagnosticsBase.h index 07bc4118..2c8c5391 100644 --- a/src/compiler/preprocessor/DiagnosticsBase.h +++ b/src/compiler/preprocessor/DiagnosticsBase.h @@ -21,53 +21,53 @@ class Diagnostics public: enum Severity { - ERROR, - WARNING + PP_ERROR, + PP_WARNING }; enum ID { - ERROR_BEGIN, - INTERNAL_ERROR, - OUT_OF_MEMORY, - INVALID_CHARACTER, - INVALID_NUMBER, - INTEGER_OVERFLOW, - FLOAT_OVERFLOW, - TOKEN_TOO_LONG, - INVALID_EXPRESSION, - DIVISION_BY_ZERO, - EOF_IN_COMMENT, - UNEXPECTED_TOKEN, - DIRECTIVE_INVALID_NAME, - MACRO_NAME_RESERVED, - MACRO_REDEFINED, - MACRO_PREDEFINED_REDEFINED, - MACRO_PREDEFINED_UNDEFINED, - MACRO_UNTERMINATED_INVOCATION, - MACRO_TOO_FEW_ARGS, - MACRO_TOO_MANY_ARGS, - CONDITIONAL_ENDIF_WITHOUT_IF, - CONDITIONAL_ELSE_WITHOUT_IF, - CONDITIONAL_ELSE_AFTER_ELSE, - CONDITIONAL_ELIF_WITHOUT_IF, - CONDITIONAL_ELIF_AFTER_ELSE, - CONDITIONAL_UNTERMINATED, - INVALID_EXTENSION_NAME, - INVALID_EXTENSION_BEHAVIOR, - INVALID_EXTENSION_DIRECTIVE, - INVALID_VERSION_NUMBER, - INVALID_VERSION_DIRECTIVE, - VERSION_NOT_FIRST_STATEMENT, - INVALID_LINE_NUMBER, - INVALID_FILE_NUMBER, - INVALID_LINE_DIRECTIVE, - ERROR_END, + PP_ERROR_BEGIN, + PP_INTERNAL_ERROR, + PP_OUT_OF_MEMORY, + PP_INVALID_CHARACTER, + PP_INVALID_NUMBER, + PP_INTEGER_OVERFLOW, + PP_FLOAT_OVERFLOW, + PP_TOKEN_TOO_LONG, + PP_INVALID_EXPRESSION, + PP_DIVISION_BY_ZERO, + PP_EOF_IN_COMMENT, + PP_UNEXPECTED_TOKEN, + PP_DIRECTIVE_INVALID_NAME, + PP_MACRO_NAME_RESERVED, + PP_MACRO_REDEFINED, + PP_MACRO_PREDEFINED_REDEFINED, + PP_MACRO_PREDEFINED_UNDEFINED, + PP_MACRO_UNTERMINATED_INVOCATION, + PP_MACRO_TOO_FEW_ARGS, + PP_MACRO_TOO_MANY_ARGS, + PP_CONDITIONAL_ENDIF_WITHOUT_IF, + PP_CONDITIONAL_ELSE_WITHOUT_IF, + PP_CONDITIONAL_ELSE_AFTER_ELSE, + PP_CONDITIONAL_ELIF_WITHOUT_IF, + PP_CONDITIONAL_ELIF_AFTER_ELSE, + PP_CONDITIONAL_UNTERMINATED, + PP_INVALID_EXTENSION_NAME, + PP_INVALID_EXTENSION_BEHAVIOR, + PP_INVALID_EXTENSION_DIRECTIVE, + PP_INVALID_VERSION_NUMBER, + PP_INVALID_VERSION_DIRECTIVE, + PP_VERSION_NOT_FIRST_STATEMENT, + PP_INVALID_LINE_NUMBER, + PP_INVALID_FILE_NUMBER, + PP_INVALID_LINE_DIRECTIVE, + PP_ERROR_END, - WARNING_BEGIN, - EOF_IN_DIRECTIVE, - CONDITIONAL_UNEXPECTED_TOKEN, - UNRECOGNIZED_PRAGMA, - WARNING_END + PP_WARNING_BEGIN, + PP_EOF_IN_DIRECTIVE, + PP_CONDITIONAL_UNEXPECTED_TOKEN, + PP_UNRECOGNIZED_PRAGMA, + PP_WARNING_END }; virtual ~Diagnostics(); diff --git a/src/compiler/preprocessor/DirectiveParser.cpp b/src/compiler/preprocessor/DirectiveParser.cpp index 94dfdf51..ebec7980 100644 --- a/src/compiler/preprocessor/DirectiveParser.cpp +++ b/src/compiler/preprocessor/DirectiveParser.cpp @@ -172,7 +172,7 @@ class DefinedParser : public Lexer if (token->type != Token::IDENTIFIER) { - mDiagnostics->report(Diagnostics::UNEXPECTED_TOKEN, + mDiagnostics->report(Diagnostics::PP_UNEXPECTED_TOKEN, token->location, token->text); skipUntilEOD(mLexer, token); return; @@ -185,7 +185,7 @@ class DefinedParser : public Lexer mLexer->lex(token); if (token->type != ')') { - mDiagnostics->report(Diagnostics::UNEXPECTED_TOKEN, + mDiagnostics->report(Diagnostics::PP_UNEXPECTED_TOKEN, token->location, token->text); skipUntilEOD(mLexer, token); return; @@ -233,7 +233,7 @@ void DirectiveParser::lex(Token* token) if (!mConditionalStack.empty()) { const ConditionalBlock& block = mConditionalStack.back(); - mDiagnostics->report(Diagnostics::CONDITIONAL_UNTERMINATED, + mDiagnostics->report(Diagnostics::PP_CONDITIONAL_UNTERMINATED, block.location, block.type); } break; @@ -268,7 +268,7 @@ void DirectiveParser::parseDirective(Token* token) switch(directive) { case DIRECTIVE_NONE: - mDiagnostics->report(Diagnostics::DIRECTIVE_INVALID_NAME, + mDiagnostics->report(Diagnostics::PP_DIRECTIVE_INVALID_NAME, token->location, token->text); skipUntilEOD(mTokenizer, token); break; @@ -319,7 +319,7 @@ void DirectiveParser::parseDirective(Token* token) skipUntilEOD(mTokenizer, token); if (token->type == Token::LAST) { - mDiagnostics->report(Diagnostics::EOF_IN_DIRECTIVE, + mDiagnostics->report(Diagnostics::PP_EOF_IN_DIRECTIVE, token->location, token->text); } } @@ -331,19 +331,19 @@ void DirectiveParser::parseDefine(Token* token) mTokenizer->lex(token); if (token->type != Token::IDENTIFIER) { - mDiagnostics->report(Diagnostics::UNEXPECTED_TOKEN, + mDiagnostics->report(Diagnostics::PP_UNEXPECTED_TOKEN, token->location, token->text); return; } if (isMacroPredefined(token->text, *mMacroSet)) { - mDiagnostics->report(Diagnostics::MACRO_PREDEFINED_REDEFINED, + mDiagnostics->report(Diagnostics::PP_MACRO_PREDEFINED_REDEFINED, token->location, token->text); return; } if (isMacroNameReserved(token->text)) { - mDiagnostics->report(Diagnostics::MACRO_NAME_RESERVED, + mDiagnostics->report(Diagnostics::PP_MACRO_NAME_RESERVED, token->location, token->text); return; } @@ -368,7 +368,7 @@ void DirectiveParser::parseDefine(Token* token) if (token->type != ')') { - mDiagnostics->report(Diagnostics::UNEXPECTED_TOKEN, + mDiagnostics->report(Diagnostics::PP_UNEXPECTED_TOKEN, token->location, token->text); return; @@ -396,7 +396,7 @@ void DirectiveParser::parseDefine(Token* token) MacroSet::const_iterator iter = mMacroSet->find(macro.name); if (iter != mMacroSet->end() && !macro.equals(iter->second)) { - mDiagnostics->report(Diagnostics::MACRO_REDEFINED, + mDiagnostics->report(Diagnostics::PP_MACRO_REDEFINED, token->location, macro.name); return; @@ -411,7 +411,7 @@ void DirectiveParser::parseUndef(Token* token) mTokenizer->lex(token); if (token->type != Token::IDENTIFIER) { - mDiagnostics->report(Diagnostics::UNEXPECTED_TOKEN, + mDiagnostics->report(Diagnostics::PP_UNEXPECTED_TOKEN, token->location, token->text); return; } @@ -421,7 +421,7 @@ void DirectiveParser::parseUndef(Token* token) { if (iter->second.predefined) { - mDiagnostics->report(Diagnostics::MACRO_PREDEFINED_UNDEFINED, + mDiagnostics->report(Diagnostics::PP_MACRO_PREDEFINED_UNDEFINED, token->location, token->text); } else @@ -457,7 +457,7 @@ void DirectiveParser::parseElse(Token* token) if (mConditionalStack.empty()) { - mDiagnostics->report(Diagnostics::CONDITIONAL_ELSE_WITHOUT_IF, + mDiagnostics->report(Diagnostics::PP_CONDITIONAL_ELSE_WITHOUT_IF, token->location, token->text); skipUntilEOD(mTokenizer, token); return; @@ -472,7 +472,7 @@ void DirectiveParser::parseElse(Token* token) } if (block.foundElseGroup) { - mDiagnostics->report(Diagnostics::CONDITIONAL_ELSE_AFTER_ELSE, + mDiagnostics->report(Diagnostics::PP_CONDITIONAL_ELSE_AFTER_ELSE, token->location, token->text); skipUntilEOD(mTokenizer, token); return; @@ -486,7 +486,7 @@ void DirectiveParser::parseElse(Token* token) mTokenizer->lex(token); if (!isEOD(token)) { - mDiagnostics->report(Diagnostics::CONDITIONAL_UNEXPECTED_TOKEN, + mDiagnostics->report(Diagnostics::PP_CONDITIONAL_UNEXPECTED_TOKEN, token->location, token->text); skipUntilEOD(mTokenizer, token); } @@ -498,7 +498,7 @@ void DirectiveParser::parseElif(Token* token) if (mConditionalStack.empty()) { - mDiagnostics->report(Diagnostics::CONDITIONAL_ELIF_WITHOUT_IF, + mDiagnostics->report(Diagnostics::PP_CONDITIONAL_ELIF_WITHOUT_IF, token->location, token->text); skipUntilEOD(mTokenizer, token); return; @@ -513,7 +513,7 @@ void DirectiveParser::parseElif(Token* token) } if (block.foundElseGroup) { - mDiagnostics->report(Diagnostics::CONDITIONAL_ELIF_AFTER_ELSE, + mDiagnostics->report(Diagnostics::PP_CONDITIONAL_ELIF_AFTER_ELSE, token->location, token->text); skipUntilEOD(mTokenizer, token); return; @@ -538,7 +538,7 @@ void DirectiveParser::parseEndif(Token* token) if (mConditionalStack.empty()) { - mDiagnostics->report(Diagnostics::CONDITIONAL_ENDIF_WITHOUT_IF, + mDiagnostics->report(Diagnostics::PP_CONDITIONAL_ENDIF_WITHOUT_IF, token->location, token->text); skipUntilEOD(mTokenizer, token); return; @@ -550,7 +550,7 @@ void DirectiveParser::parseEndif(Token* token) mTokenizer->lex(token); if (!isEOD(token)) { - mDiagnostics->report(Diagnostics::CONDITIONAL_UNEXPECTED_TOKEN, + mDiagnostics->report(Diagnostics::PP_CONDITIONAL_UNEXPECTED_TOKEN, token->location, token->text); skipUntilEOD(mTokenizer, token); } @@ -618,7 +618,7 @@ void DirectiveParser::parsePragma(Token* token) (state == RIGHT_PAREN + 1)); // With value. if (!valid) { - mDiagnostics->report(Diagnostics::UNRECOGNIZED_PRAGMA, + mDiagnostics->report(Diagnostics::PP_UNRECOGNIZED_PRAGMA, token->location, name); } else if (state > PRAGMA_NAME) // Do not notify for empty pragma. @@ -650,7 +650,7 @@ void DirectiveParser::parseExtension(Token* token) case EXT_NAME: if (valid && (token->type != Token::IDENTIFIER)) { - mDiagnostics->report(Diagnostics::INVALID_EXTENSION_NAME, + mDiagnostics->report(Diagnostics::PP_INVALID_EXTENSION_NAME, token->location, token->text); valid = false; } @@ -659,7 +659,7 @@ void DirectiveParser::parseExtension(Token* token) case COLON: if (valid && (token->type != ':')) { - mDiagnostics->report(Diagnostics::UNEXPECTED_TOKEN, + mDiagnostics->report(Diagnostics::PP_UNEXPECTED_TOKEN, token->location, token->text); valid = false; } @@ -667,7 +667,7 @@ void DirectiveParser::parseExtension(Token* token) case EXT_BEHAVIOR: if (valid && (token->type != Token::IDENTIFIER)) { - mDiagnostics->report(Diagnostics::INVALID_EXTENSION_BEHAVIOR, + mDiagnostics->report(Diagnostics::PP_INVALID_EXTENSION_BEHAVIOR, token->location, token->text); valid = false; } @@ -676,7 +676,7 @@ void DirectiveParser::parseExtension(Token* token) default: if (valid) { - mDiagnostics->report(Diagnostics::UNEXPECTED_TOKEN, + mDiagnostics->report(Diagnostics::PP_UNEXPECTED_TOKEN, token->location, token->text); valid = false; } @@ -686,7 +686,7 @@ void DirectiveParser::parseExtension(Token* token) } if (valid && (state != EXT_BEHAVIOR + 1)) { - mDiagnostics->report(Diagnostics::INVALID_EXTENSION_DIRECTIVE, + mDiagnostics->report(Diagnostics::PP_INVALID_EXTENSION_DIRECTIVE, token->location, token->text); valid = false; } @@ -700,7 +700,7 @@ void DirectiveParser::parseVersion(Token* token) if (mPastFirstStatement) { - mDiagnostics->report(Diagnostics::VERSION_NOT_FIRST_STATEMENT, + mDiagnostics->report(Diagnostics::PP_VERSION_NOT_FIRST_STATEMENT, token->location, token->text); skipUntilEOD(mTokenizer, token); return; @@ -723,13 +723,13 @@ void DirectiveParser::parseVersion(Token* token) case VERSION_NUMBER: if (valid && (token->type != Token::CONST_INT)) { - mDiagnostics->report(Diagnostics::INVALID_VERSION_NUMBER, + mDiagnostics->report(Diagnostics::PP_INVALID_VERSION_NUMBER, token->location, token->text); valid = false; } if (valid && !token->iValue(&version)) { - mDiagnostics->report(Diagnostics::INTEGER_OVERFLOW, + mDiagnostics->report(Diagnostics::PP_INTEGER_OVERFLOW, token->location, token->text); valid = false; } @@ -737,7 +737,7 @@ void DirectiveParser::parseVersion(Token* token) default: if (valid) { - mDiagnostics->report(Diagnostics::UNEXPECTED_TOKEN, + mDiagnostics->report(Diagnostics::PP_UNEXPECTED_TOKEN, token->location, token->text); valid = false; } @@ -747,7 +747,7 @@ void DirectiveParser::parseVersion(Token* token) } if (valid && (state != VERSION_NUMBER + 1)) { - mDiagnostics->report(Diagnostics::INVALID_VERSION_DIRECTIVE, + mDiagnostics->report(Diagnostics::PP_INVALID_VERSION_DIRECTIVE, token->location, token->text); valid = false; } @@ -778,13 +778,13 @@ void DirectiveParser::parseLine(Token* token) case LINE_NUMBER: if (valid && (token->type != Token::CONST_INT)) { - mDiagnostics->report(Diagnostics::INVALID_LINE_NUMBER, + mDiagnostics->report(Diagnostics::PP_INVALID_LINE_NUMBER, token->location, token->text); valid = false; } if (valid && !token->iValue(&line)) { - mDiagnostics->report(Diagnostics::INTEGER_OVERFLOW, + mDiagnostics->report(Diagnostics::PP_INTEGER_OVERFLOW, token->location, token->text); valid = false; } @@ -792,13 +792,13 @@ void DirectiveParser::parseLine(Token* token) case FILE_NUMBER: if (valid && (token->type != Token::CONST_INT)) { - mDiagnostics->report(Diagnostics::INVALID_FILE_NUMBER, + mDiagnostics->report(Diagnostics::PP_INVALID_FILE_NUMBER, token->location, token->text); valid = false; } if (valid && !token->iValue(&file)) { - mDiagnostics->report(Diagnostics::INTEGER_OVERFLOW, + mDiagnostics->report(Diagnostics::PP_INTEGER_OVERFLOW, token->location, token->text); valid = false; } @@ -806,7 +806,7 @@ void DirectiveParser::parseLine(Token* token) default: if (valid) { - mDiagnostics->report(Diagnostics::UNEXPECTED_TOKEN, + mDiagnostics->report(Diagnostics::PP_UNEXPECTED_TOKEN, token->location, token->text); valid = false; } @@ -817,7 +817,7 @@ void DirectiveParser::parseLine(Token* token) if (valid && (state != FILE_NUMBER) && (state != FILE_NUMBER + 1)) { - mDiagnostics->report(Diagnostics::INVALID_LINE_DIRECTIVE, + mDiagnostics->report(Diagnostics::PP_INVALID_LINE_DIRECTIVE, token->location, token->text); valid = false; } @@ -893,7 +893,7 @@ int DirectiveParser::parseExpressionIf(Token* token) // Warn if there are tokens after #if expression. if (!isEOD(token)) { - mDiagnostics->report(Diagnostics::CONDITIONAL_UNEXPECTED_TOKEN, + mDiagnostics->report(Diagnostics::PP_CONDITIONAL_UNEXPECTED_TOKEN, token->location, token->text); skipUntilEOD(mTokenizer, token); } @@ -909,7 +909,7 @@ int DirectiveParser::parseExpressionIfdef(Token* token) mTokenizer->lex(token); if (token->type != Token::IDENTIFIER) { - mDiagnostics->report(Diagnostics::UNEXPECTED_TOKEN, + mDiagnostics->report(Diagnostics::PP_UNEXPECTED_TOKEN, token->location, token->text); skipUntilEOD(mTokenizer, token); return 0; @@ -922,7 +922,7 @@ int DirectiveParser::parseExpressionIfdef(Token* token) mTokenizer->lex(token); if (!isEOD(token)) { - mDiagnostics->report(Diagnostics::CONDITIONAL_UNEXPECTED_TOKEN, + mDiagnostics->report(Diagnostics::PP_CONDITIONAL_UNEXPECTED_TOKEN, token->location, token->text); skipUntilEOD(mTokenizer, token); } diff --git a/src/compiler/preprocessor/ExpressionParser.cpp b/src/compiler/preprocessor/ExpressionParser.cpp index 67966e95..2d374961 100644 --- a/src/compiler/preprocessor/ExpressionParser.cpp +++ b/src/compiler/preprocessor/ExpressionParser.cpp @@ -92,6 +92,12 @@ #include "ExpressionParser.h" +#if defined(_MSC_VER) +#include <malloc.h> +#else +#include <stdlib.h> +#endif + #include <cassert> #include <sstream> @@ -1581,7 +1587,7 @@ yyreduce: std::ostringstream stream; stream << (yyvsp[(1) - (3)]) << " % " << (yyvsp[(3) - (3)]); std::string text = stream.str(); - context->diagnostics->report(pp::Diagnostics::DIVISION_BY_ZERO, + context->diagnostics->report(pp::Diagnostics::PP_DIVISION_BY_ZERO, context->token->location, text.c_str()); YYABORT; @@ -1598,7 +1604,7 @@ yyreduce: std::ostringstream stream; stream << (yyvsp[(1) - (3)]) << " / " << (yyvsp[(3) - (3)]); std::string text = stream.str(); - context->diagnostics->report(pp::Diagnostics::DIVISION_BY_ZERO, + context->diagnostics->report(pp::Diagnostics::PP_DIVISION_BY_ZERO, context->token->location, text.c_str()); YYABORT; @@ -1897,7 +1903,7 @@ int yylex(YYSTYPE* lvalp, Context* context) unsigned int val = 0; if (!token->uValue(&val)) { - context->diagnostics->report(pp::Diagnostics::INTEGER_OVERFLOW, + context->diagnostics->report(pp::Diagnostics::PP_INTEGER_OVERFLOW, token->location, token->text); } *lvalp = static_cast<YYSTYPE>(val); @@ -1938,7 +1944,7 @@ int yylex(YYSTYPE* lvalp, Context* context) void yyerror(Context* context, const char* reason) { - context->diagnostics->report(pp::Diagnostics::INVALID_EXPRESSION, + context->diagnostics->report(pp::Diagnostics::PP_INVALID_EXPRESSION, context->token->location, reason); } @@ -1966,12 +1972,12 @@ bool ExpressionParser::parse(Token* token, int* result) break; case 2: - mDiagnostics->report(Diagnostics::OUT_OF_MEMORY, token->location, ""); + mDiagnostics->report(Diagnostics::PP_OUT_OF_MEMORY, token->location, ""); break; default: assert(false); - mDiagnostics->report(Diagnostics::INTERNAL_ERROR, token->location, ""); + mDiagnostics->report(Diagnostics::PP_INTERNAL_ERROR, token->location, ""); break; } diff --git a/src/compiler/preprocessor/ExpressionParser.y b/src/compiler/preprocessor/ExpressionParser.y index b6d3143e..27ed6ad5 100644 --- a/src/compiler/preprocessor/ExpressionParser.y +++ b/src/compiler/preprocessor/ExpressionParser.y @@ -33,6 +33,12 @@ WHICH GENERATES THE GLSL ES preprocessor expression parser. #include "ExpressionParser.h" +#if defined(_MSC_VER) +#include <malloc.h> +#else +#include <stdlib.h> +#endif + #include <cassert> #include <sstream> diff --git a/src/compiler/preprocessor/MacroExpander.cpp b/src/compiler/preprocessor/MacroExpander.cpp index 1116c516..b789260a 100644 --- a/src/compiler/preprocessor/MacroExpander.cpp +++ b/src/compiler/preprocessor/MacroExpander.cpp @@ -254,7 +254,7 @@ bool MacroExpander::collectMacroArgs(const Macro& macro, if (token.type == Token::LAST) { - mDiagnostics->report(Diagnostics::MACRO_UNTERMINATED_INVOCATION, + mDiagnostics->report(Diagnostics::PP_MACRO_UNTERMINATED_INVOCATION, identifier.location, identifier.text); // Do not lose EOF token. ungetToken(token); @@ -302,8 +302,8 @@ bool MacroExpander::collectMacroArgs(const Macro& macro, if (args->size() != params.size()) { Diagnostics::ID id = args->size() < macro.parameters.size() ? - Diagnostics::MACRO_TOO_FEW_ARGS : - Diagnostics::MACRO_TOO_MANY_ARGS; + Diagnostics::PP_MACRO_TOO_FEW_ARGS : + Diagnostics::PP_MACRO_TOO_MANY_ARGS; mDiagnostics->report(id, identifier.location, identifier.text); return false; } diff --git a/src/compiler/preprocessor/Preprocessor.cpp b/src/compiler/preprocessor/Preprocessor.cpp index 5ffc6420..580ffba4 100644 --- a/src/compiler/preprocessor/Preprocessor.cpp +++ b/src/compiler/preprocessor/Preprocessor.cpp @@ -81,6 +81,11 @@ void Preprocessor::predefineMacro(const char* name, int value) mImpl->macroSet[name] = macro; } +void Preprocessor::setMaxTokenLength(size_t maxLength) +{ + mImpl->tokenizer.setMaxTokenLength(maxLength); +} + void Preprocessor::lex(Token* token) { bool validToken = false; @@ -95,40 +100,12 @@ void Preprocessor::lex(Token* token) case Token::PP_HASH: assert(false); break; - case Token::CONST_INT: - { - int val = 0; - if (!token->iValue(&val)) - { - // Do not mark the token as invalid. - // Just emit the diagnostic and reset value to 0. - mImpl->diagnostics->report(Diagnostics::INTEGER_OVERFLOW, - token->location, token->text); - token->text.assign("0"); - } - validToken = true; - break; - } - case Token::CONST_FLOAT: - { - float val = 0; - if (!token->fValue(&val)) - { - // Do not mark the token as invalid. - // Just emit the diagnostic and reset value to 0.0. - mImpl->diagnostics->report(Diagnostics::FLOAT_OVERFLOW, - token->location, token->text); - token->text.assign("0.0"); - } - validToken = true; - break; - } case Token::PP_NUMBER: - mImpl->diagnostics->report(Diagnostics::INVALID_NUMBER, + mImpl->diagnostics->report(Diagnostics::PP_INVALID_NUMBER, token->location, token->text); break; case Token::PP_OTHER: - mImpl->diagnostics->report(Diagnostics::INVALID_CHARACTER, + mImpl->diagnostics->report(Diagnostics::PP_INVALID_CHARACTER, token->location, token->text); break; default: diff --git a/src/compiler/preprocessor/Preprocessor.h b/src/compiler/preprocessor/Preprocessor.h index 7b70180f..9a90d79a 100644 --- a/src/compiler/preprocessor/Preprocessor.h +++ b/src/compiler/preprocessor/Preprocessor.h @@ -37,6 +37,12 @@ class Preprocessor bool init(size_t count, const char* const string[], const int length[]); // Adds a pre-defined macro. void predefineMacro(const char* name, int value); + // Sets maximum allowed token length. + // If token length exceeds this limit, + // the token text will be truncated to the given maximum length, and + // TOKEN_TOO_LONG diagnostic will be generated. + // The maximum length defaults to 256. + void setMaxTokenLength(size_t maxLength); void lex(Token* token); diff --git a/src/compiler/preprocessor/Tokenizer.cpp b/src/compiler/preprocessor/Tokenizer.cpp index 6f426780..21f11041 100644 --- a/src/compiler/preprocessor/Tokenizer.cpp +++ b/src/compiler/preprocessor/Tokenizer.cpp @@ -1143,7 +1143,7 @@ case YY_STATE_EOF(COMMENT): if (YY_START == COMMENT) { - yyextra->diagnostics->report(pp::Diagnostics::EOF_IN_COMMENT, + yyextra->diagnostics->report(pp::Diagnostics::PP_EOF_IN_COMMENT, pp::SourceLocation(yyfileno, yylineno), ""); } @@ -2290,11 +2290,9 @@ void ppfree (void * ptr , yyscan_t yyscanner) namespace pp { -// TODO(alokp): Maximum token length should ideally be specified by -// the preprocessor client, i.e., the compiler. -const size_t Tokenizer::kMaxTokenLength = 256; - -Tokenizer::Tokenizer(Diagnostics* diagnostics) : mHandle(0) +Tokenizer::Tokenizer(Diagnostics* diagnostics) + : mHandle(0), + mMaxTokenLength(256) { mContext.diagnostics = diagnostics; } @@ -2327,11 +2325,11 @@ void Tokenizer::setLineNumber(int line) void Tokenizer::lex(Token* token) { token->type = pplex(&token->text,&token->location,mHandle); - if (token->text.size() > kMaxTokenLength) + if (token->text.size() > mMaxTokenLength) { - mContext.diagnostics->report(Diagnostics::TOKEN_TOO_LONG, + mContext.diagnostics->report(Diagnostics::PP_TOKEN_TOO_LONG, token->location, token->text); - token->text.erase(kMaxTokenLength); + token->text.erase(mMaxTokenLength); } token->flags = 0; diff --git a/src/compiler/preprocessor/Tokenizer.h b/src/compiler/preprocessor/Tokenizer.h index 7a6fa87b..9d131f86 100644 --- a/src/compiler/preprocessor/Tokenizer.h +++ b/src/compiler/preprocessor/Tokenizer.h @@ -32,13 +32,13 @@ class Tokenizer : public Lexer bool leadingSpace; bool lineStart; }; - static const std::size_t kMaxTokenLength; Tokenizer(Diagnostics* diagnostics); ~Tokenizer(); bool init(size_t count, const char* const string[], const int length[]); + void setMaxTokenLength(size_t maxLength) { mMaxTokenLength = maxLength; } void setFileNumber(int file); void setLineNumber(int line); @@ -51,6 +51,7 @@ class Tokenizer : public Lexer void* mHandle; // Scanner handle. Context mContext; // Scanner extra. + size_t mMaxTokenLength; }; } // namespace pp diff --git a/src/compiler/preprocessor/Tokenizer.l b/src/compiler/preprocessor/Tokenizer.l index fc81d84f..01f0177b 100644 --- a/src/compiler/preprocessor/Tokenizer.l +++ b/src/compiler/preprocessor/Tokenizer.l @@ -267,11 +267,9 @@ FRACTIONAL_CONSTANT ({DIGIT}*"."{DIGIT}+)|({DIGIT}+".") namespace pp { -// TODO(alokp): Maximum token length should ideally be specified by -// the preprocessor client, i.e., the compiler. -const size_t Tokenizer::kMaxTokenLength = 256; - -Tokenizer::Tokenizer(Diagnostics* diagnostics) : mHandle(0) +Tokenizer::Tokenizer(Diagnostics* diagnostics) + : mHandle(0), + mMaxTokenLength(256) { mContext.diagnostics = diagnostics; } @@ -304,11 +302,11 @@ void Tokenizer::setLineNumber(int line) void Tokenizer::lex(Token* token) { token->type = yylex(&token->text, &token->location, mHandle); - if (token->text.size() > kMaxTokenLength) + if (token->text.size() > mMaxTokenLength) { mContext.diagnostics->report(Diagnostics::TOKEN_TOO_LONG, token->location, token->text); - token->text.erase(kMaxTokenLength); + token->text.erase(mMaxTokenLength); } token->flags = 0; diff --git a/src/compiler/preprocessor/preprocessor.vcxproj b/src/compiler/preprocessor/preprocessor.vcxproj index ca8530b5..14f701b0 100644 --- a/src/compiler/preprocessor/preprocessor.vcxproj +++ b/src/compiler/preprocessor/preprocessor.vcxproj @@ -1,172 +1,172 @@ -<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{FBE32DF3-0FB0-4F2F-A424-2C21BD7BC325}</ProjectGuid>
- <RootNamespace>preprocessor</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <CharacterSet>Unicode</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <CharacterSet>Unicode</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level4</WarningLevel>
- <TreatWarningAsError>true</TreatWarningAsError>
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
- <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level4</WarningLevel>
- <TreatWarningAsError>true</TreatWarningAsError>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;4718;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <Optimization>MaxSpeed</Optimization>
- <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
- <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;_SECURE_SCL=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level4</WarningLevel>
- <TreatWarningAsError>true</TreatWarningAsError>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;4718;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>MaxSpeed</Optimization>
- <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
- <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;_SECURE_SCL=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level4</WarningLevel>
- <TreatWarningAsError>true</TreatWarningAsError>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;4718;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="DiagnosticsBase.cpp" />
- <ClCompile Include="DirectiveHandlerBase.cpp" />
- <ClCompile Include="DirectiveParser.cpp" />
- <ClCompile Include="ExpressionParser.cpp" />
- <ClCompile Include="Input.cpp" />
- <ClCompile Include="Lexer.cpp" />
- <ClCompile Include="Macro.cpp" />
- <ClCompile Include="MacroExpander.cpp" />
- <ClCompile Include="Preprocessor.cpp" />
- <ClCompile Include="Token.cpp" />
- <ClCompile Include="Tokenizer.cpp" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="length_limits.h" />
- <ClInclude Include="DiagnosticsBase.h" />
- <ClInclude Include="DirectiveHandlerBase.h" />
- <ClInclude Include="DirectiveParser.h" />
- <ClInclude Include="ExpressionParser.h" />
- <ClInclude Include="Input.h" />
- <ClInclude Include="Lexer.h" />
- <ClInclude Include="Macro.h" />
- <ClInclude Include="MacroExpander.h" />
- <ClInclude Include="numeric_lex.h" />
- <ClInclude Include="pp_utils.h" />
- <ClInclude Include="Preprocessor.h" />
- <ClInclude Include="SourceLocation.h" />
- <ClInclude Include="Token.h" />
- <ClInclude Include="Tokenizer.h" />
- </ItemGroup>
- <ItemGroup>
- <None Include="Tokenizer.l" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
+<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Debug|x64"> + <Configuration>Debug</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|x64"> + <Configuration>Release</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectGuid>{FBE32DF3-0FB0-4F2F-A424-2C21BD7BC325}</ProjectGuid> + <RootNamespace>preprocessor</RootNamespace> + <Keyword>Win32Proj</Keyword> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>StaticLibrary</ConfigurationType> + <CharacterSet>Unicode</CharacterSet> + <WholeProgramOptimization>true</WholeProgramOptimization> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>StaticLibrary</ConfigurationType> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> + <ConfigurationType>StaticLibrary</ConfigurationType> + <CharacterSet>Unicode</CharacterSet> + <WholeProgramOptimization>true</WholeProgramOptimization> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> + <ConfigurationType>StaticLibrary</ConfigurationType> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup> + <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ClCompile> + <Optimization>Disabled</Optimization> + <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MinimalRebuild>true</MinimalRebuild> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level4</WarningLevel> + <TreatWarningAsError>true</TreatWarningAsError> + <DebugInformationFormat>EditAndContinue</DebugInformationFormat> + <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings> + </ClCompile> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <Midl> + <TargetEnvironment>X64</TargetEnvironment> + </Midl> + <ClCompile> + <Optimization>Disabled</Optimization> + <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MinimalRebuild>true</MinimalRebuild> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level4</WarningLevel> + <TreatWarningAsError>true</TreatWarningAsError> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;4718;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings> + </ClCompile> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ClCompile> + <Optimization>MaxSpeed</Optimization> + <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion> + <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;_SECURE_SCL=0;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreaded</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level4</WarningLevel> + <TreatWarningAsError>true</TreatWarningAsError> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;4718;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings> + </ClCompile> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <Midl> + <TargetEnvironment>X64</TargetEnvironment> + </Midl> + <ClCompile> + <Optimization>MaxSpeed</Optimization> + <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion> + <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;_SECURE_SCL=0;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreaded</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level4</WarningLevel> + <TreatWarningAsError>true</TreatWarningAsError> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;4718;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings> + </ClCompile> + </ItemDefinitionGroup> + <ItemGroup> + <ClCompile Include="DiagnosticsBase.cpp" /> + <ClCompile Include="DirectiveHandlerBase.cpp" /> + <ClCompile Include="DirectiveParser.cpp" /> + <ClCompile Include="ExpressionParser.cpp" /> + <ClCompile Include="Input.cpp" /> + <ClCompile Include="Lexer.cpp" /> + <ClCompile Include="Macro.cpp" /> + <ClCompile Include="MacroExpander.cpp" /> + <ClCompile Include="Preprocessor.cpp" /> + <ClCompile Include="Token.cpp" /> + <ClCompile Include="Tokenizer.cpp" /> + </ItemGroup> + <ItemGroup> + <ClInclude Include="length_limits.h" /> + <ClInclude Include="DiagnosticsBase.h" /> + <ClInclude Include="DirectiveHandlerBase.h" /> + <ClInclude Include="DirectiveParser.h" /> + <ClInclude Include="ExpressionParser.h" /> + <ClInclude Include="Input.h" /> + <ClInclude Include="Lexer.h" /> + <ClInclude Include="Macro.h" /> + <ClInclude Include="MacroExpander.h" /> + <ClInclude Include="numeric_lex.h" /> + <ClInclude Include="pp_utils.h" /> + <ClInclude Include="Preprocessor.h" /> + <ClInclude Include="SourceLocation.h" /> + <ClInclude Include="Token.h" /> + <ClInclude Include="Tokenizer.h" /> + </ItemGroup> + <ItemGroup> + <None Include="Tokenizer.l" /> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> </Project>
\ No newline at end of file diff --git a/src/compiler/preprocessor/preprocessor.vcxproj.filters b/src/compiler/preprocessor/preprocessor.vcxproj.filters index 4ac202f4..8c8da868 100644 --- a/src/compiler/preprocessor/preprocessor.vcxproj.filters +++ b/src/compiler/preprocessor/preprocessor.vcxproj.filters @@ -1,100 +1,100 @@ -<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
- <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="DirectiveParser.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="ExpressionParser.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="Input.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="Lexer.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="Macro.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="MacroExpander.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="Preprocessor.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="Token.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="Tokenizer.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="DiagnosticsBase.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="DirectiveHandlerBase.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="DirectiveParser.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="ExpressionParser.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="Input.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="Lexer.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="Macro.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="MacroExpander.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="numeric_lex.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="pp_utils.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="Preprocessor.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="SourceLocation.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="Token.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="Tokenizer.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="length_limits.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="DiagnosticsBase.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="DirectiveHandlerBase.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="Tokenizer.l">
- <Filter>Source Files</Filter>
- </None>
- </ItemGroup>
+<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup> + <Filter Include="Source Files"> + <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier> + <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions> + </Filter> + <Filter Include="Header Files"> + <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier> + <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions> + </Filter> + </ItemGroup> + <ItemGroup> + <ClCompile Include="DirectiveParser.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="ExpressionParser.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="Input.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="Lexer.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="Macro.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="MacroExpander.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="Preprocessor.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="Token.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="Tokenizer.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="DiagnosticsBase.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="DirectiveHandlerBase.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + </ItemGroup> + <ItemGroup> + <ClInclude Include="DirectiveParser.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="ExpressionParser.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="Input.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="Lexer.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="Macro.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="MacroExpander.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="numeric_lex.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="pp_utils.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="Preprocessor.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="SourceLocation.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="Token.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="Tokenizer.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="length_limits.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="DiagnosticsBase.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="DirectiveHandlerBase.h"> + <Filter>Header Files</Filter> + </ClInclude> + </ItemGroup> + <ItemGroup> + <None Include="Tokenizer.l"> + <Filter>Source Files</Filter> + </None> + </ItemGroup> </Project>
\ No newline at end of file diff --git a/src/compiler/timing/RestrictFragmentShaderTiming.cpp b/src/compiler/timing/RestrictFragmentShaderTiming.cpp index 538b731b..b9d2bab1 100644 --- a/src/compiler/timing/RestrictFragmentShaderTiming.cpp +++ b/src/compiler/timing/RestrictFragmentShaderTiming.cpp @@ -5,7 +5,7 @@ // #include "compiler/InfoSink.h" -#include "compiler/ParseHelper.h" +#include "compiler/ParseContext.h" #include "compiler/depgraph/DependencyGraphOutput.h" #include "compiler/timing/RestrictFragmentShaderTiming.h" diff --git a/src/compiler/translator_common.vcxproj b/src/compiler/translator.vcxproj index 38000943..54d71a1d 100644 --- a/src/compiler/translator_common.vcxproj +++ b/src/compiler/translator.vcxproj @@ -1,273 +1,304 @@ -<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{5B3A6DB8-1E7E-40D7-92B9-DA8AAE619FAD}</ProjectGuid>
- <RootNamespace>compiler</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\common\</IntDir>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\common\</IntDir>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>$(ProjectDir);$(ProjectDir)../;$(ProjectDir)../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level4</WarningLevel>
- <TreatWarningAsError>true</TreatWarningAsError>
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
- <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;4718;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>$(ProjectDir);$(ProjectDir)../;$(ProjectDir)../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level4</WarningLevel>
- <TreatWarningAsError>true</TreatWarningAsError>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4267;4512;4702;4718;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <Optimization>MaxSpeed</Optimization>
- <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
- <AdditionalIncludeDirectories>$(ProjectDir);$(ProjectDir)../;$(ProjectDir)../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;_SECURE_SCL=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level4</WarningLevel>
- <TreatWarningAsError>true</TreatWarningAsError>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;4718;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>MaxSpeed</Optimization>
- <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
- <AdditionalIncludeDirectories>$(ProjectDir);$(ProjectDir)../;$(ProjectDir)../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;_SECURE_SCL=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level4</WarningLevel>
- <TreatWarningAsError>true</TreatWarningAsError>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4267;4512;4702;4718;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="BuiltInFunctionEmulator.cpp" />
- <ClCompile Include="Compiler.cpp" />
- <ClCompile Include="debug.cpp" />
- <ClCompile Include="DetectCallDepth.cpp" />
- <ClCompile Include="Diagnostics.cpp" />
- <ClCompile Include="DirectiveHandler.cpp" />
- <ClCompile Include="ForLoopUnroll.cpp" />
- <ClCompile Include="InfoSink.cpp" />
- <ClCompile Include="Initialize.cpp" />
- <ClCompile Include="InitializeDll.cpp" />
- <ClCompile Include="InitializeParseContext.cpp" />
- <ClCompile Include="Intermediate.cpp" />
- <ClCompile Include="intermOut.cpp" />
- <ClCompile Include="IntermTraverse.cpp" />
- <ClCompile Include="MapLongVariableNames.cpp" />
- <ClCompile Include="ossource_win.cpp" />
- <ClCompile Include="parseConst.cpp" />
- <ClCompile Include="ParseHelper.cpp" />
- <ClCompile Include="PoolAlloc.cpp" />
- <ClCompile Include="QualifierAlive.cpp" />
- <ClCompile Include="RemoveTree.cpp" />
- <ClCompile Include="ShaderLang.cpp" />
- <ClCompile Include="SymbolTable.cpp" />
- <ClCompile Include="util.cpp" />
- <ClCompile Include="ValidateLimitations.cpp" />
- <ClCompile Include="VariableInfo.cpp" />
- <ClCompile Include="VariablePacker.cpp" />
- <ClCompile Include="glslang_lex.cpp" />
- <ClCompile Include="glslang_tab.cpp" />
- <ClCompile Include="depgraph\DependencyGraph.cpp" />
- <ClCompile Include="depgraph\DependencyGraphBuilder.cpp" />
- <ClCompile Include="depgraph\DependencyGraphOutput.cpp" />
- <ClCompile Include="depgraph\DependencyGraphTraverse.cpp" />
- <ClCompile Include="timing\RestrictFragmentShaderTiming.cpp" />
- <ClCompile Include="timing\RestrictVertexShaderTiming.cpp" />
- <ClCompile Include="..\third_party\compiler\ArrayBoundsClamper.cpp" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="glslang.l">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- </Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- </Command>
- <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalInputs)</AdditionalInputs>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- </Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- </Command>
- <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalInputs)</AdditionalInputs>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- </Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- </Command>
- <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalInputs)</AdditionalInputs>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- </Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- </Command>
- <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalInputs)</AdditionalInputs>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(Outputs)</Outputs>
- </CustomBuild>
- <CustomBuild Include="glslang.y">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- </Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- </Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- </Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- </Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- </Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- </Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- </Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- </Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="BaseTypes.h" />
- <ClInclude Include="BuiltInFunctionEmulator.h" />
- <ClInclude Include="Common.h" />
- <ClInclude Include="ConstantUnion.h" />
- <ClInclude Include="debug.h" />
- <ClInclude Include="DetectCallDepth.h" />
- <ClInclude Include="Diagnostics.h" />
- <ClInclude Include="DirectiveHandler.h" />
- <ClInclude Include="ForLoopUnroll.h" />
- <ClInclude Include="HashNames.h" />
- <ClInclude Include="InfoSink.h" />
- <ClInclude Include="Initialize.h" />
- <ClInclude Include="InitializeDll.h" />
- <ClInclude Include="InitializeGlobals.h" />
- <ClInclude Include="InitializeParseContext.h" />
- <ClInclude Include="intermediate.h" />
- <ClInclude Include="localintermediate.h" />
- <ClInclude Include="MapLongVariableNames.h" />
- <ClInclude Include="MMap.h" />
- <ClInclude Include="osinclude.h" />
- <ClInclude Include="ParseHelper.h" />
- <ClInclude Include="PoolAlloc.h" />
- <ClInclude Include="QualifierAlive.h" />
- <ClInclude Include="RemoveTree.h" />
- <ClInclude Include="RenameFunction.h" />
- <ClInclude Include="..\..\include\GLSLANG\ShaderLang.h" />
- <ClInclude Include="ShHandle.h" />
- <ClInclude Include="SymbolTable.h" />
- <ClInclude Include="Types.h" />
- <ClInclude Include="util.h" />
- <ClInclude Include="ValidateLimitations.h" />
- <ClInclude Include="VariableInfo.h" />
- <ClInclude Include="VariablePacker.h" />
- <ClInclude Include="glslang_tab.h" />
- <ClInclude Include="timing\RestrictFragmentShaderTiming.h" />
- <ClInclude Include="timing\RestrictVertexShaderTiming.h" />
- <ClInclude Include="depgraph\DependencyGraph.h" />
- <ClInclude Include="depgraph\DependencyGraphBuilder.h" />
- <ClInclude Include="depgraph\DependencyGraphOutput.h" />
- <ClInclude Include="..\third_party\compiler\ArrayBoundsClamper.h" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Debug|x64"> + <Configuration>Debug</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|x64"> + <Configuration>Release</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectGuid>{5B3A6DB8-1E7E-40D7-92B9-DA8AAE619FAD}</ProjectGuid> + <RootNamespace>compiler</RootNamespace> + <Keyword>Win32Proj</Keyword> + <ProjectName>translator</ProjectName> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>StaticLibrary</ConfigurationType> + <CharacterSet>NotSet</CharacterSet> + <WholeProgramOptimization>true</WholeProgramOptimization> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>StaticLibrary</ConfigurationType> + <CharacterSet>NotSet</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> + <ConfigurationType>StaticLibrary</ConfigurationType> + <CharacterSet>NotSet</CharacterSet> + <WholeProgramOptimization>true</WholeProgramOptimization> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> + <ConfigurationType>StaticLibrary</ConfigurationType> + <CharacterSet>NotSet</CharacterSet> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup> + <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\common\</IntDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\common\</IntDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>$(ProjectDir);$(ProjectDir)../;$(ProjectDir)../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MinimalRebuild>true</MinimalRebuild> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level4</WarningLevel> + <TreatWarningAsError>true</TreatWarningAsError> + <DebugInformationFormat>EditAndContinue</DebugInformationFormat> + <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;4718;%(DisableSpecificWarnings)</DisableSpecificWarnings> + </ClCompile> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <Midl> + <TargetEnvironment>X64</TargetEnvironment> + </Midl> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>$(ProjectDir);$(ProjectDir)../;$(ProjectDir)../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MinimalRebuild>true</MinimalRebuild> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level4</WarningLevel> + <TreatWarningAsError>true</TreatWarningAsError> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4267;4512;4702;4718;%(DisableSpecificWarnings)</DisableSpecificWarnings> + </ClCompile> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ClCompile> + <Optimization>MaxSpeed</Optimization> + <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion> + <AdditionalIncludeDirectories>$(ProjectDir);$(ProjectDir)../;$(ProjectDir)../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;_SECURE_SCL=0;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreaded</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level4</WarningLevel> + <TreatWarningAsError>true</TreatWarningAsError> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;4718;%(DisableSpecificWarnings)</DisableSpecificWarnings> + </ClCompile> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <Midl> + <TargetEnvironment>X64</TargetEnvironment> + </Midl> + <ClCompile> + <Optimization>MaxSpeed</Optimization> + <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion> + <AdditionalIncludeDirectories>$(ProjectDir);$(ProjectDir)../;$(ProjectDir)../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;_SECURE_SCL=0;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreaded</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level4</WarningLevel> + <TreatWarningAsError>true</TreatWarningAsError> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4267;4512;4702;4718;%(DisableSpecificWarnings)</DisableSpecificWarnings> + </ClCompile> + </ItemDefinitionGroup> + <ItemGroup> + <ClCompile Include="BuiltInFunctionEmulator.cpp" /> + <ClCompile Include="CodeGen.cpp" /> + <ClCompile Include="Compiler.cpp" /> + <ClCompile Include="debug.cpp" /> + <ClCompile Include="DetectCallDepth.cpp" /> + <ClCompile Include="DetectDiscontinuity.cpp" /> + <ClCompile Include="Diagnostics.cpp" /> + <ClCompile Include="DirectiveHandler.cpp" /> + <ClCompile Include="ForLoopUnroll.cpp" /> + <ClCompile Include="InfoSink.cpp" /> + <ClCompile Include="Initialize.cpp" /> + <ClCompile Include="InitializeDll.cpp" /> + <ClCompile Include="InitializeGLPosition.cpp" /> + <ClCompile Include="InitializeParseContext.cpp" /> + <ClCompile Include="Intermediate.cpp" /> + <ClCompile Include="intermOut.cpp" /> + <ClCompile Include="IntermTraverse.cpp" /> + <ClCompile Include="MapLongVariableNames.cpp" /> + <ClCompile Include="ossource_win.cpp" /> + <ClCompile Include="OutputESSL.cpp" /> + <ClCompile Include="OutputGLSL.cpp" /> + <ClCompile Include="OutputGLSLBase.cpp" /> + <ClCompile Include="OutputHLSL.cpp" /> + <ClCompile Include="parseConst.cpp" /> + <ClCompile Include="ParseContext.cpp" /> + <ClCompile Include="PoolAlloc.cpp" /> + <ClCompile Include="QualifierAlive.cpp" /> + <ClCompile Include="RemoveTree.cpp" /> + <ClCompile Include="SearchSymbol.cpp" /> + <ClCompile Include="ShaderLang.cpp" /> + <ClCompile Include="SymbolTable.cpp" /> + <ClCompile Include="TranslatorESSL.cpp" /> + <ClCompile Include="TranslatorGLSL.cpp" /> + <ClCompile Include="TranslatorHLSL.cpp" /> + <ClCompile Include="UnfoldShortCircuit.cpp" /> + <ClCompile Include="UnfoldShortCircuitAST.cpp" /> + <ClCompile Include="Uniform.cpp" /> + <ClCompile Include="util.cpp" /> + <ClCompile Include="ValidateLimitations.cpp" /> + <ClCompile Include="VariableInfo.cpp" /> + <ClCompile Include="VariablePacker.cpp" /> + <ClCompile Include="glslang_lex.cpp" /> + <ClCompile Include="glslang_tab.cpp" /> + <ClCompile Include="depgraph\DependencyGraph.cpp" /> + <ClCompile Include="depgraph\DependencyGraphBuilder.cpp" /> + <ClCompile Include="depgraph\DependencyGraphOutput.cpp" /> + <ClCompile Include="depgraph\DependencyGraphTraverse.cpp" /> + <ClCompile Include="timing\RestrictFragmentShaderTiming.cpp" /> + <ClCompile Include="timing\RestrictVertexShaderTiming.cpp" /> + <ClCompile Include="..\third_party\compiler\ArrayBoundsClamper.cpp" /> + <ClCompile Include="VersionGLSL.cpp" /> + </ItemGroup> + <ItemGroup> + <CustomBuild Include="glslang.l"> + <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + </Message> + <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + </Command> + <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalInputs)</AdditionalInputs> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(Outputs)</Outputs> + <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + </Message> + <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + </Command> + <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalInputs)</AdditionalInputs> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(Outputs)</Outputs> + <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + </Message> + <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + </Command> + <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalInputs)</AdditionalInputs> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(Outputs)</Outputs> + <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + </Message> + <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + </Command> + <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalInputs)</AdditionalInputs> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(Outputs)</Outputs> + </CustomBuild> + <CustomBuild Include="glslang.y"> + <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + </Message> + <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + </Command> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(Outputs)</Outputs> + <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + </Message> + <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + </Command> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(Outputs)</Outputs> + <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + </Message> + <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + </Command> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(Outputs)</Outputs> + <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + </Message> + <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + </Command> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(Outputs)</Outputs> + </CustomBuild> + </ItemGroup> + <ItemGroup> + <ClInclude Include="BaseTypes.h" /> + <ClInclude Include="BuiltInFunctionEmulator.h" /> + <ClInclude Include="Common.h" /> + <ClInclude Include="ConstantUnion.h" /> + <ClInclude Include="debug.h" /> + <ClInclude Include="DetectCallDepth.h" /> + <ClInclude Include="DetectDiscontinuity.h" /> + <ClInclude Include="Diagnostics.h" /> + <ClInclude Include="DirectiveHandler.h" /> + <ClInclude Include="ForLoopUnroll.h" /> + <ClInclude Include="HashNames.h" /> + <ClInclude Include="InfoSink.h" /> + <ClInclude Include="Initialize.h" /> + <ClInclude Include="InitializeDll.h" /> + <ClInclude Include="InitializeGlobals.h" /> + <ClInclude Include="InitializeGLPosition.h" /> + <ClInclude Include="InitializeParseContext.h" /> + <ClInclude Include="intermediate.h" /> + <ClInclude Include="localintermediate.h" /> + <ClInclude Include="MapLongVariableNames.h" /> + <ClInclude Include="MMap.h" /> + <ClInclude Include="NodeSearch.h" /> + <ClInclude Include="osinclude.h" /> + <ClInclude Include="OutputESSL.h" /> + <ClInclude Include="OutputGLSL.h" /> + <ClInclude Include="OutputGLSLBase.h" /> + <ClInclude Include="OutputHLSL.h" /> + <ClInclude Include="ParseContext.h" /> + <ClInclude Include="PoolAlloc.h" /> + <ClInclude Include="QualifierAlive.h" /> + <ClInclude Include="RemoveTree.h" /> + <ClInclude Include="RenameFunction.h" /> + <ClInclude Include="..\..\include\GLSLANG\ShaderLang.h" /> + <ClInclude Include="SearchSymbol.h" /> + <ClInclude Include="ShHandle.h" /> + <ClInclude Include="SymbolTable.h" /> + <ClInclude Include="TranslatorESSL.h" /> + <ClInclude Include="TranslatorGLSL.h" /> + <ClInclude Include="TranslatorHLSL.h" /> + <ClInclude Include="Types.h" /> + <ClInclude Include="UnfoldShortCircuit.h" /> + <ClInclude Include="UnfoldShortCircuitAST.h" /> + <ClInclude Include="Uniform.h" /> + <ClInclude Include="util.h" /> + <ClInclude Include="ValidateLimitations.h" /> + <ClInclude Include="VariableInfo.h" /> + <ClInclude Include="VariablePacker.h" /> + <ClInclude Include="glslang_tab.h" /> + <ClInclude Include="timing\RestrictFragmentShaderTiming.h" /> + <ClInclude Include="timing\RestrictVertexShaderTiming.h" /> + <ClInclude Include="depgraph\DependencyGraph.h" /> + <ClInclude Include="depgraph\DependencyGraphBuilder.h" /> + <ClInclude Include="depgraph\DependencyGraphOutput.h" /> + <ClInclude Include="..\third_party\compiler\ArrayBoundsClamper.h" /> + <ClInclude Include="VersionGLSL.h" /> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> +</Project>
\ No newline at end of file diff --git a/src/compiler/translator_common.vcxproj.filters b/src/compiler/translator.vcxproj.filters index e5692b44..1df6c7c2 100644 --- a/src/compiler/translator_common.vcxproj.filters +++ b/src/compiler/translator.vcxproj.filters @@ -1,271 +1,361 @@ -<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
- <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Source Files\generated">
- <UniqueIdentifier>{eb8da157-b29c-43c3-880d-54679e176dc5}</UniqueIdentifier>
- </Filter>
- <Filter Include="Source Files\depgraph">
- <UniqueIdentifier>{b5410d3a-c3c8-4ae6-843a-b000d652632e}</UniqueIdentifier>
- </Filter>
- <Filter Include="Source Files\timing">
- <UniqueIdentifier>{a9847611-dcd5-4c89-8262-a22b96c7c98d}</UniqueIdentifier>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Header Files\generated">
- <UniqueIdentifier>{094f7115-35d3-4c63-870c-ab5f393dc2c2}</UniqueIdentifier>
- </Filter>
- <Filter Include="Header Files\timing">
- <UniqueIdentifier>{5f5742e9-15e1-43b4-b1e7-0c118be14e04}</UniqueIdentifier>
- </Filter>
- <Filter Include="Header Files\depgraph">
- <UniqueIdentifier>{c4007e35-3c11-44d6-95f7-bb81db528068}</UniqueIdentifier>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="BuiltInFunctionEmulator.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="Compiler.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="debug.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="DetectCallDepth.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="Diagnostics.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="DirectiveHandler.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="ForLoopUnroll.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="InfoSink.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="Initialize.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="InitializeDll.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="InitializeParseContext.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="Intermediate.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="intermOut.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="IntermTraverse.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="MapLongVariableNames.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="ossource_win.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="parseConst.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="ParseHelper.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="PoolAlloc.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="QualifierAlive.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="RemoveTree.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="ShaderLang.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="SymbolTable.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="util.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="ValidateLimitations.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="VariableInfo.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="VariablePacker.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="glslang_lex.cpp">
- <Filter>Source Files\generated</Filter>
- </ClCompile>
- <ClCompile Include="glslang_tab.cpp">
- <Filter>Source Files\generated</Filter>
- </ClCompile>
- <ClCompile Include="depgraph\DependencyGraph.cpp">
- <Filter>Source Files\depgraph</Filter>
- </ClCompile>
- <ClCompile Include="depgraph\DependencyGraphBuilder.cpp">
- <Filter>Source Files\depgraph</Filter>
- </ClCompile>
- <ClCompile Include="depgraph\DependencyGraphOutput.cpp">
- <Filter>Source Files\depgraph</Filter>
- </ClCompile>
- <ClCompile Include="depgraph\DependencyGraphTraverse.cpp">
- <Filter>Source Files\depgraph</Filter>
- </ClCompile>
- <ClCompile Include="timing\RestrictFragmentShaderTiming.cpp">
- <Filter>Source Files\timing</Filter>
- </ClCompile>
- <ClCompile Include="timing\RestrictVertexShaderTiming.cpp">
- <Filter>Source Files\timing</Filter>
- </ClCompile>
- <ClCompile Include="ArrayBoundsClamper.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="BaseTypes.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="BuiltInFunctionEmulator.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="Common.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="ConstantUnion.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="debug.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="DetectCallDepth.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="Diagnostics.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="DirectiveHandler.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="ForLoopUnroll.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="InfoSink.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="Initialize.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="InitializeDll.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="InitializeGlobals.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="InitializeParseContext.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="intermediate.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="localintermediate.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="MapLongVariableNames.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="MMap.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="osinclude.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="ParseHelper.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="PoolAlloc.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="QualifierAlive.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="RemoveTree.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="RenameFunction.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\..\include\GLSLANG\ShaderLang.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="ShHandle.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="SymbolTable.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="Types.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="util.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="ValidateLimitations.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="VariableInfo.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="VariablePacker.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="glslang_tab.h">
- <Filter>Header Files\generated</Filter>
- </ClInclude>
- <ClInclude Include="timing\RestrictFragmentShaderTiming.h">
- <Filter>Header Files\timing</Filter>
- </ClInclude>
- <ClInclude Include="timing\RestrictVertexShaderTiming.h">
- <Filter>Header Files\timing</Filter>
- </ClInclude>
- <ClInclude Include="depgraph\DependencyGraph.h">
- <Filter>Header Files\depgraph</Filter>
- </ClInclude>
- <ClInclude Include="depgraph\DependencyGraphBuilder.h">
- <Filter>Header Files\depgraph</Filter>
- </ClInclude>
- <ClInclude Include="depgraph\DependencyGraphOutput.h">
- <Filter>Header Files\depgraph</Filter>
- </ClInclude>
- <ClInclude Include="HashNames.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="ArrayBoundsClamper.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="glslang.l">
- <Filter>Source Files</Filter>
- </CustomBuild>
- <CustomBuild Include="glslang.y">
- <Filter>Source Files</Filter>
- </CustomBuild>
- </ItemGroup>
+<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup> + <Filter Include="Source Files"> + <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier> + <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions> + </Filter> + <Filter Include="Source Files\generated"> + <UniqueIdentifier>{eb8da157-b29c-43c3-880d-54679e176dc5}</UniqueIdentifier> + </Filter> + <Filter Include="Source Files\depgraph"> + <UniqueIdentifier>{b5410d3a-c3c8-4ae6-843a-b000d652632e}</UniqueIdentifier> + </Filter> + <Filter Include="Source Files\timing"> + <UniqueIdentifier>{a9847611-dcd5-4c89-8262-a22b96c7c98d}</UniqueIdentifier> + </Filter> + <Filter Include="Header Files"> + <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier> + <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions> + </Filter> + <Filter Include="Header Files\generated"> + <UniqueIdentifier>{094f7115-35d3-4c63-870c-ab5f393dc2c2}</UniqueIdentifier> + </Filter> + <Filter Include="Header Files\timing"> + <UniqueIdentifier>{5f5742e9-15e1-43b4-b1e7-0c118be14e04}</UniqueIdentifier> + </Filter> + <Filter Include="Header Files\depgraph"> + <UniqueIdentifier>{c4007e35-3c11-44d6-95f7-bb81db528068}</UniqueIdentifier> + </Filter> + </ItemGroup> + <ItemGroup> + <ClCompile Include="BuiltInFunctionEmulator.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="Compiler.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="debug.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="DetectCallDepth.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="Diagnostics.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="DirectiveHandler.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="ForLoopUnroll.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="InfoSink.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="Initialize.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="InitializeDll.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="InitializeParseContext.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="Intermediate.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="intermOut.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="IntermTraverse.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="MapLongVariableNames.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="ossource_win.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="parseConst.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="PoolAlloc.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="QualifierAlive.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="RemoveTree.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="ShaderLang.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="SymbolTable.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="util.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="ValidateLimitations.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="VariableInfo.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="VariablePacker.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="glslang_lex.cpp"> + <Filter>Source Files\generated</Filter> + </ClCompile> + <ClCompile Include="glslang_tab.cpp"> + <Filter>Source Files\generated</Filter> + </ClCompile> + <ClCompile Include="depgraph\DependencyGraph.cpp"> + <Filter>Source Files\depgraph</Filter> + </ClCompile> + <ClCompile Include="depgraph\DependencyGraphBuilder.cpp"> + <Filter>Source Files\depgraph</Filter> + </ClCompile> + <ClCompile Include="depgraph\DependencyGraphOutput.cpp"> + <Filter>Source Files\depgraph</Filter> + </ClCompile> + <ClCompile Include="depgraph\DependencyGraphTraverse.cpp"> + <Filter>Source Files\depgraph</Filter> + </ClCompile> + <ClCompile Include="timing\RestrictFragmentShaderTiming.cpp"> + <Filter>Source Files\timing</Filter> + </ClCompile> + <ClCompile Include="timing\RestrictVertexShaderTiming.cpp"> + <Filter>Source Files\timing</Filter> + </ClCompile> + <ClCompile Include="..\third_party\compiler\ArrayBoundsClamper.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="InitializeGLPosition.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="DetectDiscontinuity.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="OutputHLSL.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="SearchSymbol.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="TranslatorHLSL.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="UnfoldShortCircuit.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="Uniform.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="CodeGen.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="TranslatorGLSL.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="TranslatorESSL.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="OutputESSL.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="OutputGLSL.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="OutputGLSLBase.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="VersionGLSL.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="UnfoldShortCircuitAST.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="ParseContext.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + </ItemGroup> + <ItemGroup> + <ClInclude Include="BaseTypes.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="BuiltInFunctionEmulator.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="Common.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="ConstantUnion.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="debug.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="DetectCallDepth.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="Diagnostics.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="DirectiveHandler.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="ForLoopUnroll.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="InfoSink.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="Initialize.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="InitializeDll.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="InitializeGlobals.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="InitializeParseContext.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="intermediate.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="localintermediate.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="MapLongVariableNames.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="MMap.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="osinclude.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="PoolAlloc.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="QualifierAlive.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="RemoveTree.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="RenameFunction.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\..\include\GLSLANG\ShaderLang.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="ShHandle.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="SymbolTable.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="Types.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="util.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="ValidateLimitations.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="VariableInfo.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="VariablePacker.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="glslang_tab.h"> + <Filter>Header Files\generated</Filter> + </ClInclude> + <ClInclude Include="timing\RestrictFragmentShaderTiming.h"> + <Filter>Header Files\timing</Filter> + </ClInclude> + <ClInclude Include="timing\RestrictVertexShaderTiming.h"> + <Filter>Header Files\timing</Filter> + </ClInclude> + <ClInclude Include="depgraph\DependencyGraph.h"> + <Filter>Header Files\depgraph</Filter> + </ClInclude> + <ClInclude Include="depgraph\DependencyGraphBuilder.h"> + <Filter>Header Files\depgraph</Filter> + </ClInclude> + <ClInclude Include="depgraph\DependencyGraphOutput.h"> + <Filter>Header Files\depgraph</Filter> + </ClInclude> + <ClInclude Include="HashNames.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="InitializeGLPosition.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\third_party\compiler\ArrayBoundsClamper.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="DetectDiscontinuity.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="OutputHLSL.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="SearchSymbol.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="TranslatorHLSL.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="UnfoldShortCircuit.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="Uniform.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="TranslatorGLSL.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="TranslatorESSL.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="OutputESSL.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="OutputGLSL.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="OutputGLSLBase.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="VersionGLSL.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="UnfoldShortCircuitAST.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="ParseContext.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="NodeSearch.h"> + <Filter>Header Files</Filter> + </ClInclude> + </ItemGroup> + <ItemGroup> + <CustomBuild Include="glslang.l"> + <Filter>Source Files</Filter> + </CustomBuild> + <CustomBuild Include="glslang.y"> + <Filter>Source Files</Filter> + </CustomBuild> + </ItemGroup> </Project>
\ No newline at end of file diff --git a/src/compiler/translator_hlsl.vcxproj b/src/compiler/translator_hlsl.vcxproj deleted file mode 100644 index 0aade59a..00000000 --- a/src/compiler/translator_hlsl.vcxproj +++ /dev/null @@ -1,164 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{5620F0E4-6C43-49BC-A178-B804E1A0C3A7}</ProjectGuid>
- <RootNamespace>CrossCompilerHLSL</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <CharacterSet>Unicode</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <CharacterSet>Unicode</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\hlsl\</IntDir>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\hlsl\</IntDir>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>$(ProjectDir)../;$(ProjectDir)../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level4</WarningLevel>
- <TreatWarningAsError>true</TreatWarningAsError>
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
- <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <Optimization>MaxSpeed</Optimization>
- <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <AdditionalIncludeDirectories>$(ProjectDir)../;$(ProjectDir)../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;NOMINMAX;_SECURE_SCL=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level4</WarningLevel>
- <TreatWarningAsError>true</TreatWarningAsError>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>$(ProjectDir)../;$(ProjectDir)../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level4</WarningLevel>
- <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <TreatWarningAsError>true</TreatWarningAsError>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>MaxSpeed</Optimization>
- <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <AdditionalIncludeDirectories>$(ProjectDir)../;$(ProjectDir)../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;NOMINMAX;_SECURE_SCL=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level4</WarningLevel>
- <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <TreatWarningAsError>true</TreatWarningAsError>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="CodeGenHLSL.cpp" />
- <ClCompile Include="DetectDiscontinuity.cpp" />
- <ClCompile Include="OutputHLSL.cpp" />
- <ClCompile Include="SearchSymbol.cpp" />
- <ClCompile Include="TranslatorHLSL.cpp" />
- <ClCompile Include="UnfoldShortCircuit.cpp" />
- <ClCompile Include="Uniform.cpp" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="DetectDiscontinuity.h" />
- <ClInclude Include="OutputHLSL.h" />
- <ClInclude Include="SearchSymbol.h" />
- <ClInclude Include="TranslatorHLSL.h" />
- <ClInclude Include="UnfoldShortCircuit.h" />
- <ClInclude Include="Uniform.h" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project>
\ No newline at end of file diff --git a/src/compiler/translator_hlsl.vcxproj.filters b/src/compiler/translator_hlsl.vcxproj.filters deleted file mode 100644 index f4824dc1..00000000 --- a/src/compiler/translator_hlsl.vcxproj.filters +++ /dev/null @@ -1,56 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
- <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="CodeGenHLSL.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="DetectDiscontinuity.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="OutputHLSL.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="SearchSymbol.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="TranslatorHLSL.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="UnfoldShortCircuit.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="Uniform.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="DetectDiscontinuity.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="OutputHLSL.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="SearchSymbol.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="TranslatorHLSL.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="UnfoldShortCircuit.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="Uniform.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
-</Project>
\ No newline at end of file diff --git a/src/compiler/util.cpp b/src/compiler/util.cpp index b46e4d0e..d6e5eeed 100644 --- a/src/compiler/util.cpp +++ b/src/compiler/util.cpp @@ -4,30 +4,25 @@ // found in the LICENSE file. // -#include <math.h> -#include <stdlib.h> +#include "compiler/util.h" -#include "util.h" +#include <limits> -#ifdef _MSC_VER - #include <locale.h> -#else - #include <sstream> -#endif +#include "compiler/preprocessor/numeric_lex.h" -double atof_dot(const char *str) +bool atof_clamp(const char *str, float *value) { -#ifdef _MSC_VER - _locale_t l = _create_locale(LC_NUMERIC, "C"); - double result = _atof_l(str, l); - _free_locale(l); - return result; -#else - double result; - std::istringstream s(str); - std::locale l("C"); - s.imbue(l); - s >> result; - return result; -#endif + bool success = pp::numeric_lex_float(str, value); + if (!success) + *value = std::numeric_limits<float>::max(); + return success; } + +bool atoi_clamp(const char *str, int *value) +{ + bool success = pp::numeric_lex_int(str, value); + if (!success) + *value = std::numeric_limits<int>::max(); + return success; +} + diff --git a/src/compiler/util.h b/src/compiler/util.h index 35288b73..dc69f390 100644 --- a/src/compiler/util.h +++ b/src/compiler/util.h @@ -7,15 +7,14 @@ #ifndef COMPILER_UTIL_H #define COMPILER_UTIL_H -#ifdef __cplusplus -extern "C" { -#endif +// atof_clamp is like atof but +// 1. it forces C locale, i.e. forcing '.' as decimal point. +// 2. it clamps the value to -FLT_MAX or FLT_MAX if overflow happens. +// Return false if overflow happens. +extern bool atof_clamp(const char *str, float *value); -// atof_dot is like atof but forcing C locale, i.e. forcing '.' as decimal point. -double atof_dot(const char *str); - -#ifdef __cplusplus -} // end extern "C" -#endif +// If overflow happens, clamp the value to INT_MIN or INT_MAX. +// Return false if overflow happens. +extern bool atoi_clamp(const char *str, int *value); #endif // COMPILER_UTIL_H diff --git a/src/libEGL/Surface.cpp b/src/libEGL/Surface.cpp index 539c4c62..01b40171 100644 --- a/src/libEGL/Surface.cpp +++ b/src/libEGL/Surface.cpp @@ -10,6 +10,8 @@ #include <tchar.h> +#include <algorithm> + #include "libEGL/Surface.h" #include "common/debug.h" @@ -309,6 +311,13 @@ bool Surface::checkForOutOfDateSwapChain() int clientHeight = client.bottom - client.top; bool sizeDirty = clientWidth != getWidth() || clientHeight != getHeight(); + if (IsIconic(getWindowHandle())) + { + // The window is automatically resized to 150x22 when it's minimized, but the swapchain shouldn't be resized + // because that's not a useful size to render to. + sizeDirty = false; + } + if (mSwapIntervalDirty) { resetSwapChain(clientWidth, clientHeight); diff --git a/src/libEGL/libEGL.cpp b/src/libEGL/libEGL.cpp index 6e10c392..320670da 100644 --- a/src/libEGL/libEGL.cpp +++ b/src/libEGL/libEGL.cpp @@ -819,13 +819,21 @@ EGLContext __stdcall eglCreateContext(EGLDisplay dpy, EGLConfig config, EGLConte return egl::error(EGL_BAD_CONFIG, EGL_NO_CONTEXT); } - if (share_context && static_cast<gl::Context*>(share_context)->isResetNotificationEnabled() != reset_notification) + gl::Context *sharedContextPtr = (share_context != EGL_NO_CONTEXT ? static_cast<gl::Context*>(share_context) : NULL); + + if (sharedContextPtr != NULL && sharedContextPtr->isResetNotificationEnabled() != reset_notification) { return egl::error(EGL_BAD_MATCH, EGL_NO_CONTEXT); } egl::Display *display = static_cast<egl::Display*>(dpy); + // Can not share contexts between displays + if (sharedContextPtr != NULL && sharedContextPtr->getRenderer() != display->getRenderer()) + { + return egl::error(EGL_BAD_MATCH, EGL_NO_CONTEXT); + } + if (!validateConfig(display, config)) { return EGL_NO_CONTEXT; diff --git a/src/libEGL/libEGL.vcxproj b/src/libEGL/libEGL.vcxproj index b6bc1efb..2406d12e 100644 --- a/src/libEGL/libEGL.vcxproj +++ b/src/libEGL/libEGL.vcxproj @@ -1,258 +1,258 @@ -<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{E746FCA9-64C3-433E-85E8-9A5A67AB7ED6}</ProjectGuid>
- <RootNamespace>libEGL</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>Unicode</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>Unicode</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(LibraryPath)</LibraryPath>
- <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(DXSDK_DIR)\lib\x86;$(LibraryPath)</LibraryPath>
- <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(LibraryPath)</LibraryPath>
- <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(LibraryPath)</LibraryPath>
- <IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(DXSDK_DIR)\include;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSdkDir)include;$(FrameworkSDKDir)\include;</IncludePath>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>$(ProjectDir)/..; $(ProjectDir)/../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBEGL_EXPORTS;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level4</WarningLevel>
- <TreatWarningAsError>true</TreatWarningAsError>
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
- <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- </ClCompile>
- <Link>
- <AdditionalDependencies>d3d9.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <ModuleDefinitionFile>libEGL.def</ModuleDefinitionFile>
- <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Windows</SubSystem>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- <PostBuildEvent>
- <Command>%40echo on
-mkdir "$(ProjectDir)..\..\lib\$(Configuration)\"
-copy "$(OutDir)libEGL.dll" "$(ProjectDir)..\..\lib\$(Configuration)\"
-copy "$(OutDir)libEGL.lib" "$(ProjectDir)..\..\lib\$(Configuration)\"
-%40echo off
-</Command>
- </PostBuildEvent>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <Optimization>MaxSpeed</Optimization>
- <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
- <AdditionalIncludeDirectories>$(ProjectDir)/..; $(ProjectDir)/../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>ANGLE_DISABLE_TRACE;WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBEGL_EXPORTS;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;_SECURE_SCL=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level4</WarningLevel>
- <TreatWarningAsError>true</TreatWarningAsError>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- </ClCompile>
- <Link>
- <AdditionalDependencies>d3d9.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <ModuleDefinitionFile>libEGL.def</ModuleDefinitionFile>
- <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Windows</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- <PostBuildEvent>
- <Command>%40echo on
-mkdir "$(ProjectDir)..\..\lib\$(Configuration)\"
-copy "$(OutDir)libEGL.dll" "$(ProjectDir)..\..\lib\$(Configuration)\"
-copy "$(OutDir)libEGL.lib" "$(ProjectDir)..\..\lib\$(Configuration)\"
-%40echo off
-</Command>
- </PostBuildEvent>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>$(ProjectDir)/..; $(ProjectDir)/../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBEGL_EXPORTS;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level4</WarningLevel>
- <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <TreatWarningAsError>true</TreatWarningAsError>
- </ClCompile>
- <Link>
- <AdditionalDependencies>d3d9.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <ModuleDefinitionFile>libEGL.def</ModuleDefinitionFile>
- <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Windows</SubSystem>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- <PostBuildEvent>
- <Command>%40echo on
-mkdir "$(ProjectDir)..\..\lib\$(Configuration)\"
-copy "$(OutDir)libEGL.dll" "$(ProjectDir)..\..\lib\$(Configuration)\"
-copy "$(OutDir)libEGL.lib" "$(ProjectDir)..\..\lib\$(Configuration)\"
-%40echo off
-</Command>
- </PostBuildEvent>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>MaxSpeed</Optimization>
- <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
- <AdditionalIncludeDirectories>$(ProjectDir)/..; $(ProjectDir)/../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBEGL_EXPORTS;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;_SECURE_SCL=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level4</WarningLevel>
- <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <TreatWarningAsError>true</TreatWarningAsError>
- </ClCompile>
- <Link>
- <AdditionalDependencies>d3d9.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <ModuleDefinitionFile>libEGL.def</ModuleDefinitionFile>
- <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Windows</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- <PostBuildEvent>
- <Command>%40echo on
-mkdir "$(ProjectDir)..\..\lib\$(Configuration)\"
-copy "$(OutDir)libEGL.dll" "$(ProjectDir)..\..\lib\$(Configuration)\"
-copy "$(OutDir)libEGL.lib" "$(ProjectDir)..\..\lib\$(Configuration)\"
-%40echo off
-</Command>
- </PostBuildEvent>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="Config.cpp" />
- <ClCompile Include="..\Common\debug.cpp" />
- <ClCompile Include="Display.cpp" />
- <ClCompile Include="libEGL.cpp" />
- <ClCompile Include="main.cpp" />
- <ClCompile Include="Surface.cpp" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="Config.h" />
- <ClInclude Include="Display.h" />
- <ClInclude Include="..\..\include\EGL\egl.h" />
- <ClInclude Include="..\..\include\EGL\eglext.h" />
- <ClInclude Include="..\..\include\EGL\eglplatform.h" />
- <ClInclude Include="main.h" />
- <ClInclude Include="resource.h" />
- <ClInclude Include="Surface.h" />
- <ClInclude Include="..\common\version.h" />
- </ItemGroup>
- <ItemGroup>
- <None Include="libEGL.def" />
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="libEGL.rc" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\libGLESv2\libGLESv2.vcxproj">
- <Project>{b5871a7a-968c-42e3-a33b-981e6f448e78}</Project>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
+<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Debug|x64"> + <Configuration>Debug</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|x64"> + <Configuration>Release</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectGuid>{E746FCA9-64C3-433E-85E8-9A5A67AB7ED6}</ProjectGuid> + <RootNamespace>libEGL</RootNamespace> + <Keyword>Win32Proj</Keyword> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <CharacterSet>Unicode</CharacterSet> + <WholeProgramOptimization>true</WholeProgramOptimization> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <CharacterSet>Unicode</CharacterSet> + <WholeProgramOptimization>true</WholeProgramOptimization> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup> + <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental> + <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(LibraryPath)</LibraryPath> + <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(DXSDK_DIR)\lib\x86;$(LibraryPath)</LibraryPath> + <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(LibraryPath)</LibraryPath> + <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(LibraryPath)</LibraryPath> + <IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(DXSDK_DIR)\include;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSdkDir)include;$(FrameworkSDKDir)\include;</IncludePath> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>$(ProjectDir)/..; $(ProjectDir)/../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBEGL_EXPORTS;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MinimalRebuild>true</MinimalRebuild> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level4</WarningLevel> + <TreatWarningAsError>true</TreatWarningAsError> + <DebugInformationFormat>EditAndContinue</DebugInformationFormat> + <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;4996;%(DisableSpecificWarnings)</DisableSpecificWarnings> + </ClCompile> + <Link> + <AdditionalDependencies>d3d9.lib;%(AdditionalDependencies)</AdditionalDependencies> + <ModuleDefinitionFile>libEGL.def</ModuleDefinitionFile> + <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Windows</SubSystem> + <DataExecutionPrevention> + </DataExecutionPrevention> + <TargetMachine>MachineX86</TargetMachine> + </Link> + <PostBuildEvent> + <Command>%40echo on +mkdir "$(ProjectDir)..\..\lib\$(Configuration)\" +copy "$(OutDir)libEGL.dll" "$(ProjectDir)..\..\lib\$(Configuration)\" +copy "$(OutDir)libEGL.lib" "$(ProjectDir)..\..\lib\$(Configuration)\" +%40echo off +</Command> + </PostBuildEvent> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ClCompile> + <Optimization>MaxSpeed</Optimization> + <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion> + <AdditionalIncludeDirectories>$(ProjectDir)/..; $(ProjectDir)/../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>ANGLE_DISABLE_TRACE;WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBEGL_EXPORTS;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;_SECURE_SCL=0;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreaded</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level4</WarningLevel> + <TreatWarningAsError>true</TreatWarningAsError> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;4996;%(DisableSpecificWarnings)</DisableSpecificWarnings> + </ClCompile> + <Link> + <AdditionalDependencies>d3d9.lib;%(AdditionalDependencies)</AdditionalDependencies> + <ModuleDefinitionFile>libEGL.def</ModuleDefinitionFile> + <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Windows</SubSystem> + <OptimizeReferences>true</OptimizeReferences> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <DataExecutionPrevention> + </DataExecutionPrevention> + <TargetMachine>MachineX86</TargetMachine> + </Link> + <PostBuildEvent> + <Command>%40echo on +mkdir "$(ProjectDir)..\..\lib\$(Configuration)\" +copy "$(OutDir)libEGL.dll" "$(ProjectDir)..\..\lib\$(Configuration)\" +copy "$(OutDir)libEGL.lib" "$(ProjectDir)..\..\lib\$(Configuration)\" +%40echo off +</Command> + </PostBuildEvent> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <Midl> + <TargetEnvironment>X64</TargetEnvironment> + </Midl> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>$(ProjectDir)/..; $(ProjectDir)/../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBEGL_EXPORTS;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MinimalRebuild>true</MinimalRebuild> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level4</WarningLevel> + <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;4996;%(DisableSpecificWarnings)</DisableSpecificWarnings> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + <TreatWarningAsError>true</TreatWarningAsError> + </ClCompile> + <Link> + <AdditionalDependencies>d3d9.lib;%(AdditionalDependencies)</AdditionalDependencies> + <ModuleDefinitionFile>libEGL.def</ModuleDefinitionFile> + <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Windows</SubSystem> + <DataExecutionPrevention> + </DataExecutionPrevention> + <TargetMachine>MachineX64</TargetMachine> + </Link> + <PostBuildEvent> + <Command>%40echo on +mkdir "$(ProjectDir)..\..\lib\$(Configuration)\" +copy "$(OutDir)libEGL.dll" "$(ProjectDir)..\..\lib\$(Configuration)\" +copy "$(OutDir)libEGL.lib" "$(ProjectDir)..\..\lib\$(Configuration)\" +%40echo off +</Command> + </PostBuildEvent> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <Midl> + <TargetEnvironment>X64</TargetEnvironment> + </Midl> + <ClCompile> + <Optimization>MaxSpeed</Optimization> + <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion> + <AdditionalIncludeDirectories>$(ProjectDir)/..; $(ProjectDir)/../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBEGL_EXPORTS;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;_SECURE_SCL=0;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreaded</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level4</WarningLevel> + <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;4996;%(DisableSpecificWarnings)</DisableSpecificWarnings> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + <TreatWarningAsError>true</TreatWarningAsError> + </ClCompile> + <Link> + <AdditionalDependencies>d3d9.lib;%(AdditionalDependencies)</AdditionalDependencies> + <ModuleDefinitionFile>libEGL.def</ModuleDefinitionFile> + <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Windows</SubSystem> + <OptimizeReferences>true</OptimizeReferences> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <DataExecutionPrevention> + </DataExecutionPrevention> + <TargetMachine>MachineX64</TargetMachine> + </Link> + <PostBuildEvent> + <Command>%40echo on +mkdir "$(ProjectDir)..\..\lib\$(Configuration)\" +copy "$(OutDir)libEGL.dll" "$(ProjectDir)..\..\lib\$(Configuration)\" +copy "$(OutDir)libEGL.lib" "$(ProjectDir)..\..\lib\$(Configuration)\" +%40echo off +</Command> + </PostBuildEvent> + </ItemDefinitionGroup> + <ItemGroup> + <ClCompile Include="Config.cpp" /> + <ClCompile Include="..\Common\debug.cpp" /> + <ClCompile Include="Display.cpp" /> + <ClCompile Include="libEGL.cpp" /> + <ClCompile Include="main.cpp" /> + <ClCompile Include="Surface.cpp" /> + </ItemGroup> + <ItemGroup> + <ClInclude Include="Config.h" /> + <ClInclude Include="Display.h" /> + <ClInclude Include="..\..\include\EGL\egl.h" /> + <ClInclude Include="..\..\include\EGL\eglext.h" /> + <ClInclude Include="..\..\include\EGL\eglplatform.h" /> + <ClInclude Include="main.h" /> + <ClInclude Include="resource.h" /> + <ClInclude Include="Surface.h" /> + <ClInclude Include="..\common\version.h" /> + </ItemGroup> + <ItemGroup> + <None Include="libEGL.def" /> + </ItemGroup> + <ItemGroup> + <ResourceCompile Include="libEGL.rc" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\libGLESv2\libGLESv2.vcxproj"> + <Project>{b5871a7a-968c-42e3-a33b-981e6f448e78}</Project> + </ProjectReference> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> </Project>
\ No newline at end of file diff --git a/src/libEGL/libEGL.vcxproj.filters b/src/libEGL/libEGL.vcxproj.filters index 860e1690..e78b94fc 100644 --- a/src/libEGL/libEGL.vcxproj.filters +++ b/src/libEGL/libEGL.vcxproj.filters @@ -1,68 +1,68 @@ -<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
- <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="Config.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\debug.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="Display.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="libEGL.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="main.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="Surface.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="Config.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="Display.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\..\include\EGL\egl.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\..\include\EGL\eglext.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\..\include\EGL\eglplatform.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="main.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="resource.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="Surface.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\common\version.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="libEGL.rc" />
- </ItemGroup>
- <ItemGroup>
- <None Include="libEGL.def" />
- </ItemGroup>
+<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup> + <Filter Include="Source Files"> + <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier> + <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions> + </Filter> + <Filter Include="Header Files"> + <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier> + <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions> + </Filter> + </ItemGroup> + <ItemGroup> + <ClCompile Include="Config.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\Common\debug.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="Display.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="libEGL.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="main.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="Surface.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + </ItemGroup> + <ItemGroup> + <ClInclude Include="Config.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="Display.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\..\include\EGL\egl.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\..\include\EGL\eglext.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\..\include\EGL\eglplatform.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="main.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="resource.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="Surface.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\common\version.h"> + <Filter>Header Files</Filter> + </ClInclude> + </ItemGroup> + <ItemGroup> + <ResourceCompile Include="libEGL.rc" /> + </ItemGroup> + <ItemGroup> + <None Include="libEGL.def" /> + </ItemGroup> </Project>
\ No newline at end of file diff --git a/src/libGLESv2/Buffer.cpp b/src/libGLESv2/Buffer.cpp index a64fbad4..c007d5d9 100644 --- a/src/libGLESv2/Buffer.cpp +++ b/src/libGLESv2/Buffer.cpp @@ -72,7 +72,7 @@ rx::BufferStorage *Buffer::getStorage() const return mBufferStorage; } -unsigned int Buffer::size() +unsigned int Buffer::size() const { return mBufferStorage->getSize(); } diff --git a/src/libGLESv2/Buffer.h b/src/libGLESv2/Buffer.h index 3f9fe8f8..4048f4b9 100644 --- a/src/libGLESv2/Buffer.h +++ b/src/libGLESv2/Buffer.h @@ -39,7 +39,7 @@ class Buffer : public RefCountObject GLenum usage() const; rx::BufferStorage *getStorage() const; - unsigned int size(); + unsigned int size() const; rx::StaticVertexBufferInterface *getStaticVertexBuffer(); rx::StaticIndexBufferInterface *getStaticIndexBuffer(); diff --git a/src/libGLESv2/constants.h b/src/libGLESv2/Constants.h index 9f24d66a..9f24d66a 100644 --- a/src/libGLESv2/constants.h +++ b/src/libGLESv2/Constants.h diff --git a/src/libGLESv2/Context.cpp b/src/libGLESv2/Context.cpp index e084db1a..fba4104d 100644 --- a/src/libGLESv2/Context.cpp +++ b/src/libGLESv2/Context.cpp @@ -1812,6 +1812,8 @@ void Context::applyTextures(SamplerType type) { ProgramBinary *programBinary = getCurrentProgramBinary(); + FramebufferTextureSerialSet boundFramebufferTextures = getBoundFramebufferTextureSerials(); + // Range of Direct3D samplers of given sampler type int samplerCount = (type == SAMPLER_PIXEL) ? MAX_TEXTURE_IMAGE_UNITS : mRenderer->getMaxVertexTextureImageUnits(); int samplerRange = programBinary->getUsedSamplerRange(type); @@ -1825,7 +1827,8 @@ void Context::applyTextures(SamplerType type) TextureType textureType = programBinary->getSamplerTextureType(type, samplerIndex); Texture *texture = getSamplerTexture(textureUnit, textureType); - if (texture->isSamplerComplete()) + if (texture->isSamplerComplete() && + boundFramebufferTextures.find(texture->getTextureSerial()) == boundFramebufferTextures.end()) { SamplerState samplerState; texture->getSamplerState(&samplerState); @@ -2655,6 +2658,29 @@ const char *Context::getRendererString() const return mRendererString; } +Context::FramebufferTextureSerialSet Context::getBoundFramebufferTextureSerials() +{ + FramebufferTextureSerialSet set; + + Framebuffer *drawFramebuffer = getDrawFramebuffer(); + for (unsigned int i = 0; i < IMPLEMENTATION_MAX_DRAW_BUFFERS; i++) + { + Renderbuffer *renderBuffer = drawFramebuffer->getColorbuffer(i); + if (renderBuffer && renderBuffer->getTextureSerial() != 0) + { + set.insert(renderBuffer->getTextureSerial()); + } + } + + Renderbuffer *depthStencilBuffer = drawFramebuffer->getDepthOrStencilbuffer(); + if (depthStencilBuffer && depthStencilBuffer->getTextureSerial() != 0) + { + set.insert(depthStencilBuffer->getTextureSerial()); + } + + return set; +} + void Context::blitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask) diff --git a/src/libGLESv2/Context.h b/src/libGLESv2/Context.h index 9c222be2..09eede9f 100644 --- a/src/libGLESv2/Context.h +++ b/src/libGLESv2/Context.h @@ -18,6 +18,7 @@ #include <string> #include <map> +#include <set> #ifdef _MSC_VER #include <hash_map> #else @@ -37,7 +38,6 @@ class Renderer; namespace egl { -class Display; class Surface; } @@ -398,6 +398,8 @@ class Context GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask); + rx::Renderer *getRenderer() { return mRenderer; } + private: DISALLOW_COPY_AND_ASSIGN(Context); @@ -419,6 +421,9 @@ class Context void initExtensionString(); void initRendererString(); + typedef std::set<unsigned> FramebufferTextureSerialSet; + FramebufferTextureSerialSet getBoundFramebufferTextureSerials(); + rx::Renderer *const mRenderer; State mState; diff --git a/src/libGLESv2/Framebuffer.h b/src/libGLESv2/Framebuffer.h index b54e008d..50bfd4fd 100644 --- a/src/libGLESv2/Framebuffer.h +++ b/src/libGLESv2/Framebuffer.h @@ -12,7 +12,7 @@ #include "common/angleutils.h" #include "common/RefCountObject.h" -#include "constants.h" +#include "Constants.h" namespace rx { diff --git a/src/libGLESv2/ProgramBinary.cpp b/src/libGLESv2/ProgramBinary.cpp index 135facd8..ee0ec8e0 100644 --- a/src/libGLESv2/ProgramBinary.cpp +++ b/src/libGLESv2/ProgramBinary.cpp @@ -34,6 +34,11 @@ std::string str(int i) return buffer; } +static rx::D3DWorkaroundType DiscardWorkaround(bool usesDiscard) +{ + return (usesDiscard ? rx::ANGLE_D3D_WORKAROUND_SM3_OPTIMIZER : rx::ANGLE_D3D_WORKAROUND_NONE); +} + UniformLocation::UniformLocation(const std::string &name, unsigned int element, unsigned int index) : name(name), element(element), index(index) { @@ -1647,6 +1652,8 @@ bool ProgramBinary::load(InfoLog &infoLog, const void *binary, GLsizei length) stream.read(&mSemanticIndex[i]); } + initAttributesByLayout(); + for (unsigned int i = 0; i < MAX_TEXTURE_IMAGE_UNITS; ++i) { stream.read(&mSamplersPS[i].active); @@ -1960,13 +1967,13 @@ bool ProgramBinary::link(InfoLog &infoLog, const AttributeBindings &attributeBin if (success) { - mVertexExecutable = mRenderer->compileToExecutable(infoLog, vertexHLSL.c_str(), rx::SHADER_VERTEX); - mPixelExecutable = mRenderer->compileToExecutable(infoLog, pixelHLSL.c_str(), rx::SHADER_PIXEL); + mVertexExecutable = mRenderer->compileToExecutable(infoLog, vertexHLSL.c_str(), rx::SHADER_VERTEX, DiscardWorkaround(vertexShader->mUsesDiscardRewriting)); + mPixelExecutable = mRenderer->compileToExecutable(infoLog, pixelHLSL.c_str(), rx::SHADER_PIXEL, DiscardWorkaround(fragmentShader->mUsesDiscardRewriting)); if (usesGeometryShader()) { std::string geometryHLSL = generateGeometryShaderHLSL(registers, packing, fragmentShader, vertexShader); - mGeometryExecutable = mRenderer->compileToExecutable(infoLog, geometryHLSL.c_str(), rx::SHADER_GEOMETRY); + mGeometryExecutable = mRenderer->compileToExecutable(infoLog, geometryHLSL.c_str(), rx::SHADER_GEOMETRY, rx::ANGLE_D3D_WORKAROUND_NONE); } if (!mVertexExecutable || !mPixelExecutable || (usesGeometryShader() && !mGeometryExecutable)) @@ -2053,6 +2060,8 @@ bool ProgramBinary::linkAttributes(InfoLog &infoLog, const AttributeBindings &at } } + initAttributesByLayout(); + return true; } @@ -2579,12 +2588,6 @@ struct AttributeSorter AttributeSorter(const int (&semanticIndices)[MAX_VERTEX_ATTRIBS]) : originalIndices(semanticIndices) { - for (int i = 0; i < MAX_VERTEX_ATTRIBS; i++) - { - indices[i] = i; - } - - std::sort(&indices[0], &indices[MAX_VERTEX_ATTRIBS], *this); } bool operator()(int a, int b) @@ -2592,27 +2595,32 @@ struct AttributeSorter return originalIndices[a] == -1 ? false : originalIndices[a] < originalIndices[b]; } - int indices[MAX_VERTEX_ATTRIBS]; const int (&originalIndices)[MAX_VERTEX_ATTRIBS]; }; -void ProgramBinary::sortAttributesByLayout(rx::TranslatedAttribute attributes[MAX_VERTEX_ATTRIBS], int sortedSemanticIndices[MAX_VERTEX_ATTRIBS]) const +void ProgramBinary::initAttributesByLayout() { - AttributeSorter sorter(mSemanticIndex); + for (int i = 0; i < MAX_VERTEX_ATTRIBS; i++) + { + mAttributesByLayout[i] = i; + } - int oldIndices[MAX_VERTEX_ATTRIBS]; + std::sort(&mAttributesByLayout[0], &mAttributesByLayout[MAX_VERTEX_ATTRIBS], AttributeSorter(mSemanticIndex)); +} + +void ProgramBinary::sortAttributesByLayout(rx::TranslatedAttribute attributes[MAX_VERTEX_ATTRIBS], int sortedSemanticIndices[MAX_VERTEX_ATTRIBS]) const +{ rx::TranslatedAttribute oldTranslatedAttributes[MAX_VERTEX_ATTRIBS]; for (int i = 0; i < MAX_VERTEX_ATTRIBS; i++) { - oldIndices[i] = mSemanticIndex[i]; oldTranslatedAttributes[i] = attributes[i]; } for (int i = 0; i < MAX_VERTEX_ATTRIBS; i++) { - int oldIndex = sorter.indices[i]; - sortedSemanticIndices[i] = oldIndices[oldIndex]; + int oldIndex = mAttributesByLayout[i]; + sortedSemanticIndices[i] = mSemanticIndex[oldIndex]; attributes[i] = oldTranslatedAttributes[oldIndex]; } } diff --git a/src/libGLESv2/ProgramBinary.h b/src/libGLESv2/ProgramBinary.h index 2386c0bd..d6320863 100644 --- a/src/libGLESv2/ProgramBinary.h +++ b/src/libGLESv2/ProgramBinary.h @@ -114,6 +114,7 @@ class ProgramBinary : public RefCountObject unsigned int getSerial() const; + void initAttributesByLayout(); void sortAttributesByLayout(rx::TranslatedAttribute attributes[gl::MAX_VERTEX_ATTRIBS], int sortedSemanticIndices[MAX_VERTEX_ATTRIBS]) const; static std::string decorateAttribute(const std::string &name); // Prepend an underscore @@ -142,6 +143,7 @@ class ProgramBinary : public RefCountObject Attribute mLinkedAttribute[MAX_VERTEX_ATTRIBS]; int mSemanticIndex[MAX_VERTEX_ATTRIBS]; + int mAttributesByLayout[MAX_VERTEX_ATTRIBS]; struct Sampler { diff --git a/src/libGLESv2/Renderbuffer.cpp b/src/libGLESv2/Renderbuffer.cpp index 12751374..98d33ec6 100644 --- a/src/libGLESv2/Renderbuffer.cpp +++ b/src/libGLESv2/Renderbuffer.cpp @@ -129,6 +129,11 @@ unsigned int RenderbufferTexture2D::getSerial() const return mTexture2D->getRenderTargetSerial(mTarget); } +unsigned int RenderbufferTexture2D::getTextureSerial() const +{ + return mTexture2D->getTextureSerial(); +} + ///// RenderbufferTextureCubeMap Implementation //////// RenderbufferTextureCubeMap::RenderbufferTextureCubeMap(TextureCubeMap *texture, GLenum target) : mTarget(target) @@ -193,6 +198,11 @@ unsigned int RenderbufferTextureCubeMap::getSerial() const return mTextureCubeMap->getRenderTargetSerial(mTarget); } +unsigned int RenderbufferTextureCubeMap::getTextureSerial() const +{ + return mTextureCubeMap->getTextureSerial(); +} + ////// Renderbuffer Implementation ////// Renderbuffer::Renderbuffer(rx::Renderer *renderer, GLuint id, RenderbufferInterface *instance) : RefCountObject(id) @@ -292,6 +302,11 @@ unsigned int Renderbuffer::getSerial() const return mInstance->getSerial(); } +unsigned int Renderbuffer::getTextureSerial() const +{ + return mInstance->getTextureSerial(); +} + void Renderbuffer::setStorage(RenderbufferStorage *newStorage) { ASSERT(newStorage != NULL); diff --git a/src/libGLESv2/Renderbuffer.h b/src/libGLESv2/Renderbuffer.h index eca2f3a7..d46fd445 100644 --- a/src/libGLESv2/Renderbuffer.h +++ b/src/libGLESv2/Renderbuffer.h @@ -60,6 +60,7 @@ class RenderbufferInterface GLuint getStencilSize() const; virtual unsigned int getSerial() const = 0; + virtual unsigned int getTextureSerial() const = 0; private: DISALLOW_COPY_AND_ASSIGN(RenderbufferInterface); @@ -85,6 +86,7 @@ class RenderbufferTexture2D : public RenderbufferInterface virtual GLsizei getSamples() const; virtual unsigned int getSerial() const; + virtual unsigned int getTextureSerial() const; private: DISALLOW_COPY_AND_ASSIGN(RenderbufferTexture2D); @@ -113,6 +115,7 @@ class RenderbufferTextureCubeMap : public RenderbufferInterface virtual GLsizei getSamples() const; virtual unsigned int getSerial() const; + virtual unsigned int getTextureSerial() const; private: DISALLOW_COPY_AND_ASSIGN(RenderbufferTextureCubeMap); @@ -141,6 +144,7 @@ class RenderbufferStorage : public RenderbufferInterface virtual GLsizei getSamples() const; virtual unsigned int getSerial() const; + virtual unsigned int getTextureSerial() const { return 0; } static unsigned int issueSerial(); static unsigned int issueCubeSerials(); @@ -193,6 +197,7 @@ class Renderbuffer : public RefCountObject GLsizei getSamples() const; unsigned int getSerial() const; + unsigned int getTextureSerial() const; void setStorage(RenderbufferStorage *newStorage); diff --git a/src/libGLESv2/Shader.cpp b/src/libGLESv2/Shader.cpp index 7dfdd0ba..f6a2f03d 100644 --- a/src/libGLESv2/Shader.cpp +++ b/src/libGLESv2/Shader.cpp @@ -307,6 +307,7 @@ void Shader::parseVaryings() mUsesPointCoord = strstr(mHlsl, "GL_USES_POINT_COORD") != NULL; mUsesDepthRange = strstr(mHlsl, "GL_USES_DEPTH_RANGE") != NULL; mUsesFragDepth = strstr(mHlsl, "GL_USES_FRAG_DEPTH") != NULL; + mUsesDiscardRewriting = strstr(mHlsl, "ANGLE_USES_DISCARD_REWRITING") != NULL; } } @@ -340,6 +341,7 @@ void Shader::uncompile() mUsesPointCoord = false; mUsesDepthRange = false; mUsesFragDepth = false; + mUsesDiscardRewriting = false; mActiveUniforms.clear(); } diff --git a/src/libGLESv2/Shader.h b/src/libGLESv2/Shader.h index 2afe2976..848d4c99 100644 --- a/src/libGLESv2/Shader.h +++ b/src/libGLESv2/Shader.h @@ -107,6 +107,7 @@ class Shader bool mUsesPointCoord; bool mUsesDepthRange; bool mUsesFragDepth; + bool mUsesDiscardRewriting; static void *mFragmentCompiler; static void *mVertexCompiler; diff --git a/src/libGLESv2/Texture.cpp b/src/libGLESv2/Texture.cpp index ae830378..cee9c57d 100644 --- a/src/libGLESv2/Texture.cpp +++ b/src/libGLESv2/Texture.cpp @@ -1358,10 +1358,10 @@ void TextureCubeMap::storage(GLsizei levels, GLenum internalformat, GLsizei size for (int level = 0; level < levels; level++) { + GLsizei mipSize = std::max(1, size >> level); for (int face = 0; face < 6; face++) { - mImageArray[face][level]->redefine(mRenderer, internalformat, size, size, true); - size = std::max(1, size >> 1); + mImageArray[face][level]->redefine(mRenderer, internalformat, mipSize, mipSize, true); } } diff --git a/src/libGLESv2/Uniform.cpp b/src/libGLESv2/Uniform.cpp index 0fe3b8c9..5424e271 100644 --- a/src/libGLESv2/Uniform.cpp +++ b/src/libGLESv2/Uniform.cpp @@ -1,43 +1,43 @@ #include "precompiled.h" -//
-// Copyright (c) 2010-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 "libGLESv2/Uniform.h"
-
-#include "libGLESv2/utilities.h"
-
-namespace gl
-{
-
-Uniform::Uniform(GLenum type, GLenum precision, const std::string &name, unsigned int arraySize)
- : type(type), precision(precision), name(name), arraySize(arraySize)
-{
- int bytes = gl::UniformInternalSize(type) * elementCount();
- data = new unsigned char[bytes];
- memset(data, 0, bytes);
- dirty = true;
-
- psRegisterIndex = -1;
- vsRegisterIndex = -1;
- registerCount = VariableRowCount(type) * elementCount();
-}
-
-Uniform::~Uniform()
-{
- delete[] data;
-}
-
-bool Uniform::isArray() const
-{
- return arraySize > 0;
-}
-
-unsigned int Uniform::elementCount() const
-{
- return arraySize > 0 ? arraySize : 1;
-}
-
-}
+// +// Copyright (c) 2010-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 "libGLESv2/Uniform.h" + +#include "libGLESv2/utilities.h" + +namespace gl +{ + +Uniform::Uniform(GLenum type, GLenum precision, const std::string &name, unsigned int arraySize) + : type(type), precision(precision), name(name), arraySize(arraySize) +{ + int bytes = gl::UniformInternalSize(type) * elementCount(); + data = new unsigned char[bytes]; + memset(data, 0, bytes); + dirty = true; + + psRegisterIndex = -1; + vsRegisterIndex = -1; + registerCount = VariableRowCount(type) * elementCount(); +} + +Uniform::~Uniform() +{ + delete[] data; +} + +bool Uniform::isArray() const +{ + return arraySize > 0; +} + +unsigned int Uniform::elementCount() const +{ + return arraySize > 0 ? arraySize : 1; +} + +} diff --git a/src/libGLESv2/Uniform.h b/src/libGLESv2/Uniform.h index 64414acb..8ab0fbe2 100644 --- a/src/libGLESv2/Uniform.h +++ b/src/libGLESv2/Uniform.h @@ -1,48 +1,48 @@ -//
-// Copyright (c) 2010-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.
-//
-
-#ifndef LIBGLESV2_UNIFORM_H_
-#define LIBGLESV2_UNIFORM_H_
-
-#include <string>
-#include <vector>
-
-#define GL_APICALL
-#include <GLES2/gl2.h>
-
-#include "common/debug.h"
-
-namespace gl
-{
-
-// Helper struct representing a single shader uniform
-struct Uniform
-{
- Uniform(GLenum type, GLenum precision, const std::string &name, unsigned int arraySize);
-
- ~Uniform();
-
- bool isArray() const;
- unsigned int elementCount() const;
-
- const GLenum type;
- const GLenum precision;
- const std::string name;
- const unsigned int arraySize;
-
- unsigned char *data;
- bool dirty;
-
- int psRegisterIndex;
- int vsRegisterIndex;
- unsigned int registerCount;
-};
-
-typedef std::vector<Uniform*> UniformArray;
-
-}
-
-#endif // LIBGLESV2_UNIFORM_H_
+// +// Copyright (c) 2010-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. +// + +#ifndef LIBGLESV2_UNIFORM_H_ +#define LIBGLESV2_UNIFORM_H_ + +#include <string> +#include <vector> + +#define GL_APICALL +#include <GLES2/gl2.h> + +#include "common/debug.h" + +namespace gl +{ + +// Helper struct representing a single shader uniform +struct Uniform +{ + Uniform(GLenum type, GLenum precision, const std::string &name, unsigned int arraySize); + + ~Uniform(); + + bool isArray() const; + unsigned int elementCount() const; + + const GLenum type; + const GLenum precision; + const std::string name; + const unsigned int arraySize; + + unsigned char *data; + bool dirty; + + int psRegisterIndex; + int vsRegisterIndex; + unsigned int registerCount; +}; + +typedef std::vector<Uniform*> UniformArray; + +} + +#endif // LIBGLESV2_UNIFORM_H_ diff --git a/src/libGLESv2/libGLESv2.def b/src/libGLESv2/libGLESv2.def index 71398b31..b8320c8f 100644 --- a/src/libGLESv2/libGLESv2.def +++ b/src/libGLESv2/libGLESv2.def @@ -182,4 +182,7 @@ EXPORTS glGetProcAddress @148 NONAME glBindTexImage @158 NONAME glCreateRenderer @177 NONAME - glDestroyRenderer @178 NONAME
\ No newline at end of file + glDestroyRenderer @178 NONAME + + ; Setting up TRACE macro callbacks + SetTraceFunctionPointers @180 diff --git a/src/libGLESv2/libGLESv2.vcxproj b/src/libGLESv2/libGLESv2.vcxproj index 906707c9..ecb04cff 100644 --- a/src/libGLESv2/libGLESv2.vcxproj +++ b/src/libGLESv2/libGLESv2.vcxproj @@ -1,425 +1,425 @@ -<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{B5871A7A-968C-42E3-A33B-981E6F448E78}</ProjectGuid>
- <RootNamespace>libGLESv2</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>Unicode</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>Unicode</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- <IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IncludePath)</IncludePath>
- <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(LibraryPath)</LibraryPath>
- <IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IncludePath)</IncludePath>
- <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(LibraryPath)</LibraryPath>
- <IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IncludePath)</IncludePath>
- <IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IncludePath)</IncludePath>
- <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(LibraryPath)</LibraryPath>
- <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(LibraryPath)</LibraryPath>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>$(ProjectDir);$(ProjectDir)/..; $(ProjectDir)/../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBGLESV2_EXPORTS;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
- <PrecompiledHeader>Use</PrecompiledHeader>
- <WarningLevel>Level4</WarningLevel>
- <TreatWarningAsError>true</TreatWarningAsError>
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
- <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- <PrecompiledHeaderFile>precompiled.h</PrecompiledHeaderFile>
- <AdditionalOptions>$(ExternalCompilerOptions) %(AdditionalOptions)</AdditionalOptions>
- </ClCompile>
- <Link>
- <AdditionalDependencies>d3d9.lib;dxguid.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <ModuleDefinitionFile>libGLESv2.def</ModuleDefinitionFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Windows</SubSystem>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- <PostBuildEvent>
- <Command>%40echo on
-mkdir "$(ProjectDir)..\..\lib\$(Configuration)\"
-copy "$(OutDir)libGLESv2.dll" "$(ProjectDir)..\..\lib\$(Configuration)\"
-copy "$(OutDir)libGLESv2.lib" "$(ProjectDir)..\..\lib\$(Configuration)\"
-%40echo off
-</Command>
- </PostBuildEvent>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <Optimization>MaxSpeed</Optimization>
- <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
- <AdditionalIncludeDirectories>$(ProjectDir);$(ProjectDir)/..; $(ProjectDir)/../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>ANGLE_DISABLE_TRACE;WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBGLESV2_EXPORTS;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;_SECURE_SCL=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
- <PrecompiledHeader>Use</PrecompiledHeader>
- <WarningLevel>Level4</WarningLevel>
- <TreatWarningAsError>true</TreatWarningAsError>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;4718;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- <PrecompiledHeaderFile>precompiled.h</PrecompiledHeaderFile>
- <AdditionalOptions>$(ExternalCompilerOptions) %(AdditionalOptions)</AdditionalOptions>
- </ClCompile>
- <Link>
- <AdditionalDependencies>d3d9.lib;dxguid.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
- <ModuleDefinitionFile>libGLESv2.def</ModuleDefinitionFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Windows</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- <PostBuildEvent>
- <Command>%40echo on
-mkdir "$(ProjectDir)..\..\lib\$(Configuration)\"
-copy "$(OutDir)libGLESv2.dll" "$(ProjectDir)..\..\lib\$(Configuration)\"
-copy "$(OutDir)libGLESv2.lib" "$(ProjectDir)..\..\lib\$(Configuration)\"
-%40echo off
-</Command>
- </PostBuildEvent>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>$(ProjectDir)/..; $(ProjectDir)/../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBGLESV2_EXPORTS;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
- <PrecompiledHeader>Use</PrecompiledHeader>
- <WarningLevel>Level4</WarningLevel>
- <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;4718;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <TreatWarningAsError>true</TreatWarningAsError>
- <PrecompiledHeaderFile>precompiled.h</PrecompiledHeaderFile>
- <AdditionalOptions>$(ExternalCompilerOptions) %(AdditionalOptions)</AdditionalOptions>
- </ClCompile>
- <Link>
- <AdditionalDependencies>d3d9.lib;dxguid.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <ModuleDefinitionFile>libGLESv2.def</ModuleDefinitionFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Windows</SubSystem>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- <PostBuildEvent>
- <Command>%40echo on
-mkdir "$(ProjectDir)..\..\lib\$(Configuration)\"
-copy "$(OutDir)libGLESv2.dll" "$(ProjectDir)..\..\lib\$(Configuration)\"
-copy "$(OutDir)libGLESv2.lib" "$(ProjectDir)..\..\lib\$(Configuration)\"
-%40echo off
-</Command>
- </PostBuildEvent>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>MaxSpeed</Optimization>
- <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
- <AdditionalIncludeDirectories>$(ProjectDir)/..; $(ProjectDir)/../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBGLESV2_EXPORTS;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;_SECURE_SCL=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
- <PrecompiledHeader>Use</PrecompiledHeader>
- <WarningLevel>Level4</WarningLevel>
- <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;4718;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <TreatWarningAsError>true</TreatWarningAsError>
- <PrecompiledHeaderFile>precompiled.h</PrecompiledHeaderFile>
- <AdditionalOptions>$(ExternalCompilerOptions) %(AdditionalOptions)</AdditionalOptions>
- </ClCompile>
- <Link>
- <AdditionalDependencies>d3d9.lib;dxguid.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
- <ModuleDefinitionFile>libGLESv2.def</ModuleDefinitionFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Windows</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- <PostBuildEvent>
- <Command>%40echo on
-mkdir "$(ProjectDir)..\..\lib\$(Configuration)\"
-copy "$(OutDir)libGLESv2.dll" "$(ProjectDir)..\..\lib\$(Configuration)\"
-copy "$(OutDir)libGLESv2.lib" "$(ProjectDir)..\..\lib\$(Configuration)\"
-%40echo off
-</Command>
- </PostBuildEvent>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="..\third_party\murmurhash\MurmurHash3.cpp">
- <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
- <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
- <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">NotUsing</PrecompiledHeader>
- <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">NotUsing</PrecompiledHeader>
- </ClCompile>
- <ClCompile Include="Buffer.cpp" />
- <ClCompile Include="Context.cpp" />
- <ClCompile Include="..\common\debug.cpp">
- <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
- <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
- <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">NotUsing</PrecompiledHeader>
- <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">NotUsing</PrecompiledHeader>
- </ClCompile>
- <ClCompile Include="Fence.cpp" />
- <ClCompile Include="Float16ToFloat32.cpp" />
- <ClCompile Include="Framebuffer.cpp" />
- <ClCompile Include="HandleAllocator.cpp" />
- <ClCompile Include="libGLESv2.cpp" />
- <ClCompile Include="main.cpp" />
- <ClCompile Include="precompiled.cpp">
- <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
- <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
- <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
- <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
- </ClCompile>
- <ClCompile Include="Program.cpp" />
- <ClCompile Include="ProgramBinary.cpp" />
- <ClCompile Include="Query.cpp" />
- <ClCompile Include="..\common\RefCountObject.cpp" />
- <ClCompile Include="Renderbuffer.cpp" />
- <ClCompile Include="renderer\Blit.cpp" />
- <ClCompile Include="renderer\Fence11.cpp" />
- <ClCompile Include="renderer\Fence9.cpp" />
- <ClCompile Include="renderer\BufferStorage.cpp" />
- <ClCompile Include="renderer\BufferStorage11.cpp" />
- <ClCompile Include="renderer\BufferStorage9.cpp" />
- <ClCompile Include="renderer\Image.cpp" />
- <ClCompile Include="renderer\Image9.cpp" />
- <ClCompile Include="renderer\IndexBuffer.cpp" />
- <ClCompile Include="renderer\IndexBuffer11.cpp" />
- <ClCompile Include="renderer\IndexBuffer9.cpp" />
- <ClCompile Include="renderer\IndexDataManager.cpp" />
- <ClCompile Include="renderer\ImageSSE2.cpp" />
- <ClCompile Include="renderer\Image11.cpp" />
- <ClCompile Include="renderer\IndexRangeCache.cpp" />
- <ClCompile Include="renderer\InputLayoutCache.cpp" />
- <ClCompile Include="renderer\Query11.cpp" />
- <ClCompile Include="renderer\Query9.cpp" />
- <ClCompile Include="renderer\Renderer.cpp" />
- <ClCompile Include="renderer\Renderer11.cpp" />
- <ClCompile Include="renderer\renderer11_utils.cpp" />
- <ClCompile Include="renderer\Renderer9.cpp" />
- <ClCompile Include="renderer\renderer9_utils.cpp" />
- <ClCompile Include="renderer\RenderTarget11.cpp" />
- <ClCompile Include="renderer\RenderTarget9.cpp" />
- <ClCompile Include="renderer\RenderStateCache.cpp" />
- <ClCompile Include="renderer\ShaderExecutable11.cpp" />
- <ClCompile Include="renderer\ShaderExecutable9.cpp" />
- <ClCompile Include="renderer\SwapChain11.cpp" />
- <ClCompile Include="renderer\SwapChain9.cpp" />
- <ClCompile Include="renderer\TextureStorage.cpp" />
- <ClCompile Include="renderer\TextureStorage11.cpp" />
- <ClCompile Include="renderer\TextureStorage9.cpp" />
- <ClCompile Include="renderer\VertexBuffer.cpp" />
- <ClCompile Include="renderer\VertexBuffer11.cpp" />
- <ClCompile Include="renderer\VertexBuffer9.cpp" />
- <ClCompile Include="renderer\VertexDataManager.cpp" />
- <ClCompile Include="renderer\VertexDeclarationCache.cpp" />
- <ClCompile Include="ResourceManager.cpp" />
- <ClCompile Include="Shader.cpp" />
- <ClCompile Include="Texture.cpp" />
- <ClCompile Include="Uniform.cpp" />
- <ClCompile Include="utilities.cpp" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="..\common\debug.h" />
- <ClInclude Include="..\common\system.h" />
- <ClInclude Include="..\third_party\murmurhash\MurmurHash3.h" />
- <ClInclude Include="angletypes.h" />
- <ClInclude Include="BinaryStream.h" />
- <ClInclude Include="Buffer.h" />
- <ClInclude Include="constants.h" />
- <ClInclude Include="Context.h" />
- <ClInclude Include="Fence.h" />
- <ClInclude Include="Framebuffer.h" />
- <ClInclude Include="..\..\include\GLES2\gl2.h" />
- <ClInclude Include="..\..\include\GLES2\gl2ext.h" />
- <ClInclude Include="..\..\include\GLES2\gl2platform.h" />
- <ClInclude Include="HandleAllocator.h" />
- <ClInclude Include="main.h" />
- <ClInclude Include="mathutil.h" />
- <ClInclude Include="precompiled.h" />
- <ClInclude Include="Program.h" />
- <ClInclude Include="ProgramBinary.h" />
- <ClInclude Include="Query.h" />
- <ClInclude Include="..\common\RefCountObject.h" />
- <ClInclude Include="Renderbuffer.h" />
- <ClInclude Include="renderer\Blit.h" />
- <ClInclude Include="renderer\Fence11.h" />
- <ClInclude Include="renderer\Fence9.h" />
- <ClInclude Include="renderer\FenceImpl.h" />
- <ClInclude Include="renderer\BufferStorage.h" />
- <ClInclude Include="renderer\BufferStorage11.h" />
- <ClInclude Include="renderer\BufferStorage9.h" />
- <ClInclude Include="renderer\generatemip.h" />
- <ClInclude Include="renderer\Image.h" />
- <ClInclude Include="renderer\Image11.h" />
- <ClInclude Include="renderer\Image9.h" />
- <ClInclude Include="renderer\IndexBuffer.h" />
- <ClInclude Include="renderer\IndexBuffer11.h" />
- <ClInclude Include="renderer\IndexBuffer9.h" />
- <ClInclude Include="renderer\IndexDataManager.h" />
- <ClInclude Include="renderer\IndexRangeCache.h" />
- <ClInclude Include="renderer\InputLayoutCache.h" />
- <ClInclude Include="renderer\Query11.h" />
- <ClInclude Include="renderer\QueryImpl.h" />
- <ClInclude Include="renderer\Query9.h" />
- <ClInclude Include="renderer\Renderer.h" />
- <ClInclude Include="renderer\Renderer11.h" />
- <ClInclude Include="renderer\renderer11_utils.h" />
- <ClInclude Include="renderer\Renderer9.h" />
- <ClInclude Include="renderer\renderer9_utils.h" />
- <ClInclude Include="renderer\RenderTarget.h" />
- <ClInclude Include="renderer\RenderTarget11.h" />
- <ClInclude Include="renderer\RenderTarget9.h" />
- <ClInclude Include="renderer\RenderStateCache.h" />
- <ClInclude Include="renderer\ShaderCache.h" />
- <ClInclude Include="renderer\ShaderExecutable.h" />
- <ClInclude Include="renderer\ShaderExecutable11.h" />
- <ClInclude Include="renderer\ShaderExecutable9.h" />
- <ClInclude Include="renderer\shaders\compiled\clear11vs.h" />
- <ClInclude Include="renderer\shaders\compiled\clearmultiple11ps.h" />
- <ClInclude Include="renderer\shaders\compiled\clearsingle11ps.h" />
- <ClInclude Include="renderer\shaders\compiled\componentmaskps.h" />
- <ClInclude Include="renderer\shaders\compiled\flipyvs.h" />
- <ClInclude Include="renderer\shaders\compiled\luminanceps.h" />
- <ClInclude Include="renderer\shaders\compiled\passthrough11vs.h" />
- <ClInclude Include="renderer\shaders\compiled\passthroughlum11ps.h" />
- <ClInclude Include="renderer\shaders\compiled\passthroughlumalpha11ps.h" />
- <ClInclude Include="renderer\shaders\compiled\passthroughps.h" />
- <ClInclude Include="renderer\shaders\compiled\passthroughrgb11ps.h" />
- <ClInclude Include="renderer\shaders\compiled\passthroughrgba11ps.h" />
- <ClInclude Include="renderer\shaders\compiled\standardvs.h" />
- <ClInclude Include="renderer\SwapChain.h" />
- <ClInclude Include="renderer\SwapChain11.h" />
- <ClInclude Include="renderer\SwapChain9.h" />
- <ClInclude Include="renderer\TextureStorage.h" />
- <ClInclude Include="renderer\TextureStorage11.h" />
- <ClInclude Include="renderer\TextureStorage9.h" />
- <ClInclude Include="renderer\VertexBuffer.h" />
- <ClInclude Include="renderer\VertexBuffer11.h" />
- <ClInclude Include="renderer\VertexBuffer9.h" />
- <ClInclude Include="renderer\vertexconversion.h" />
- <ClInclude Include="renderer\VertexDataManager.h" />
- <ClInclude Include="renderer\VertexDeclarationCache.h" />
- <ClInclude Include="resource.h" />
- <ClInclude Include="ResourceManager.h" />
- <ClInclude Include="Shader.h" />
- <ClInclude Include="Texture.h" />
- <ClInclude Include="Uniform.h" />
- <ClInclude Include="utilities.h" />
- <ClInclude Include="..\common\version.h" />
- </ItemGroup>
- <ItemGroup>
- <None Include="libGLESv2.def" />
- <None Include="renderer\shaders\Blit.ps" />
- <None Include="renderer\shaders\Blit.vs" />
- <None Include="renderer\shaders\Clear11.hlsl" />
- <None Include="renderer\shaders\generate_shaders.bat" />
- <None Include="renderer\shaders\Passthrough11.hlsl" />
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="libGLESv2.rc" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\compiler\preprocessor\preprocessor.vcxproj">
- <Project>{fbe32df3-0fb0-4f2f-a424-2c21bd7bc325}</Project>
- </ProjectReference>
- <ProjectReference Include="..\compiler\translator_common.vcxproj">
- <Project>{5b3a6db8-1e7e-40d7-92b9-da8aae619fad}</Project>
- </ProjectReference>
- <ProjectReference Include="..\compiler\translator_hlsl.vcxproj">
- <Project>{5620f0e4-6c43-49bc-a178-b804e1a0c3a7}</Project>
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
- <Private>true</Private>
- <CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
- <LinkLibraryDependencies>true</LinkLibraryDependencies>
- <UseLibraryDependencyInputs>true</UseLibraryDependencyInputs>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
+<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Debug|x64"> + <Configuration>Debug</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|x64"> + <Configuration>Release</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectGuid>{B5871A7A-968C-42E3-A33B-981E6F448E78}</ProjectGuid> + <RootNamespace>libGLESv2</RootNamespace> + <Keyword>Win32Proj</Keyword> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <CharacterSet>Unicode</CharacterSet> + <WholeProgramOptimization>true</WholeProgramOptimization> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <CharacterSet>Unicode</CharacterSet> + <WholeProgramOptimization>true</WholeProgramOptimization> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup> + <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental> + <IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IncludePath)</IncludePath> + <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(LibraryPath)</LibraryPath> + <IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IncludePath)</IncludePath> + <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(LibraryPath)</LibraryPath> + <IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IncludePath)</IncludePath> + <IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IncludePath)</IncludePath> + <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(LibraryPath)</LibraryPath> + <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(LibraryPath)</LibraryPath> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>$(ProjectDir);$(ProjectDir)/..; $(ProjectDir)/../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBGLESV2_EXPORTS;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MinimalRebuild>true</MinimalRebuild> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> + <PrecompiledHeader>Use</PrecompiledHeader> + <WarningLevel>Level4</WarningLevel> + <TreatWarningAsError>true</TreatWarningAsError> + <DebugInformationFormat>EditAndContinue</DebugInformationFormat> + <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;4996;%(DisableSpecificWarnings)</DisableSpecificWarnings> + <PrecompiledHeaderFile>precompiled.h</PrecompiledHeaderFile> + <AdditionalOptions>$(ExternalCompilerOptions) %(AdditionalOptions)</AdditionalOptions> + </ClCompile> + <Link> + <AdditionalDependencies>d3d9.lib;dxguid.lib;%(AdditionalDependencies)</AdditionalDependencies> + <ModuleDefinitionFile>libGLESv2.def</ModuleDefinitionFile> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Windows</SubSystem> + <DataExecutionPrevention> + </DataExecutionPrevention> + <TargetMachine>MachineX86</TargetMachine> + </Link> + <PostBuildEvent> + <Command>%40echo on +mkdir "$(ProjectDir)..\..\lib\$(Configuration)\" +copy "$(OutDir)libGLESv2.dll" "$(ProjectDir)..\..\lib\$(Configuration)\" +copy "$(OutDir)libGLESv2.lib" "$(ProjectDir)..\..\lib\$(Configuration)\" +%40echo off +</Command> + </PostBuildEvent> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ClCompile> + <Optimization>MaxSpeed</Optimization> + <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion> + <AdditionalIncludeDirectories>$(ProjectDir);$(ProjectDir)/..; $(ProjectDir)/../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>ANGLE_DISABLE_TRACE;WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBGLESV2_EXPORTS;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;_SECURE_SCL=0;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreaded</RuntimeLibrary> + <PrecompiledHeader>Use</PrecompiledHeader> + <WarningLevel>Level4</WarningLevel> + <TreatWarningAsError>true</TreatWarningAsError> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;4718;4996;%(DisableSpecificWarnings)</DisableSpecificWarnings> + <PrecompiledHeaderFile>precompiled.h</PrecompiledHeaderFile> + <AdditionalOptions>$(ExternalCompilerOptions) %(AdditionalOptions)</AdditionalOptions> + </ClCompile> + <Link> + <AdditionalDependencies>d3d9.lib;dxguid.lib;%(AdditionalDependencies)</AdditionalDependencies> + <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> + <ModuleDefinitionFile>libGLESv2.def</ModuleDefinitionFile> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Windows</SubSystem> + <OptimizeReferences>true</OptimizeReferences> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <DataExecutionPrevention> + </DataExecutionPrevention> + <TargetMachine>MachineX86</TargetMachine> + </Link> + <PostBuildEvent> + <Command>%40echo on +mkdir "$(ProjectDir)..\..\lib\$(Configuration)\" +copy "$(OutDir)libGLESv2.dll" "$(ProjectDir)..\..\lib\$(Configuration)\" +copy "$(OutDir)libGLESv2.lib" "$(ProjectDir)..\..\lib\$(Configuration)\" +%40echo off +</Command> + </PostBuildEvent> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <Midl> + <TargetEnvironment>X64</TargetEnvironment> + </Midl> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>$(ProjectDir)/..; $(ProjectDir)/../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBGLESV2_EXPORTS;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MinimalRebuild>true</MinimalRebuild> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> + <PrecompiledHeader>Use</PrecompiledHeader> + <WarningLevel>Level4</WarningLevel> + <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;4718;4996;%(DisableSpecificWarnings)</DisableSpecificWarnings> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + <TreatWarningAsError>true</TreatWarningAsError> + <PrecompiledHeaderFile>precompiled.h</PrecompiledHeaderFile> + <AdditionalOptions>$(ExternalCompilerOptions) %(AdditionalOptions)</AdditionalOptions> + </ClCompile> + <Link> + <AdditionalDependencies>d3d9.lib;dxguid.lib;%(AdditionalDependencies)</AdditionalDependencies> + <ModuleDefinitionFile>libGLESv2.def</ModuleDefinitionFile> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Windows</SubSystem> + <DataExecutionPrevention> + </DataExecutionPrevention> + <TargetMachine>MachineX64</TargetMachine> + </Link> + <PostBuildEvent> + <Command>%40echo on +mkdir "$(ProjectDir)..\..\lib\$(Configuration)\" +copy "$(OutDir)libGLESv2.dll" "$(ProjectDir)..\..\lib\$(Configuration)\" +copy "$(OutDir)libGLESv2.lib" "$(ProjectDir)..\..\lib\$(Configuration)\" +%40echo off +</Command> + </PostBuildEvent> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <Midl> + <TargetEnvironment>X64</TargetEnvironment> + </Midl> + <ClCompile> + <Optimization>MaxSpeed</Optimization> + <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion> + <AdditionalIncludeDirectories>$(ProjectDir)/..; $(ProjectDir)/../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBGLESV2_EXPORTS;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;_SECURE_SCL=0;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreaded</RuntimeLibrary> + <PrecompiledHeader>Use</PrecompiledHeader> + <WarningLevel>Level4</WarningLevel> + <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;4718;4996;%(DisableSpecificWarnings)</DisableSpecificWarnings> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + <TreatWarningAsError>true</TreatWarningAsError> + <PrecompiledHeaderFile>precompiled.h</PrecompiledHeaderFile> + <AdditionalOptions>$(ExternalCompilerOptions) %(AdditionalOptions)</AdditionalOptions> + </ClCompile> + <Link> + <AdditionalDependencies>d3d9.lib;dxguid.lib;%(AdditionalDependencies)</AdditionalDependencies> + <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> + <ModuleDefinitionFile>libGLESv2.def</ModuleDefinitionFile> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Windows</SubSystem> + <OptimizeReferences>true</OptimizeReferences> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <DataExecutionPrevention> + </DataExecutionPrevention> + <TargetMachine>MachineX64</TargetMachine> + </Link> + <PostBuildEvent> + <Command>%40echo on +mkdir "$(ProjectDir)..\..\lib\$(Configuration)\" +copy "$(OutDir)libGLESv2.dll" "$(ProjectDir)..\..\lib\$(Configuration)\" +copy "$(OutDir)libGLESv2.lib" "$(ProjectDir)..\..\lib\$(Configuration)\" +%40echo off +</Command> + </PostBuildEvent> + </ItemDefinitionGroup> + <ItemGroup> + <ClCompile Include="..\third_party\murmurhash\MurmurHash3.cpp"> + <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader> + <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader> + <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">NotUsing</PrecompiledHeader> + <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">NotUsing</PrecompiledHeader> + </ClCompile> + <ClCompile Include="Buffer.cpp" /> + <ClCompile Include="Context.cpp" /> + <ClCompile Include="..\common\debug.cpp"> + <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader> + <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader> + <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">NotUsing</PrecompiledHeader> + <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">NotUsing</PrecompiledHeader> + </ClCompile> + <ClCompile Include="..\common\event_tracer.cpp"> + <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader> + <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader> + <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">NotUsing</PrecompiledHeader> + <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">NotUsing</PrecompiledHeader> + </ClCompile> + <ClCompile Include="Fence.cpp" /> + <ClCompile Include="Float16ToFloat32.cpp" /> + <ClCompile Include="Framebuffer.cpp" /> + <ClCompile Include="HandleAllocator.cpp" /> + <ClCompile Include="libGLESv2.cpp" /> + <ClCompile Include="main.cpp" /> + <ClCompile Include="precompiled.cpp"> + <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader> + <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader> + <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader> + <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader> + </ClCompile> + <ClCompile Include="Program.cpp" /> + <ClCompile Include="ProgramBinary.cpp" /> + <ClCompile Include="Query.cpp" /> + <ClCompile Include="..\common\RefCountObject.cpp" /> + <ClCompile Include="Renderbuffer.cpp" /> + <ClCompile Include="renderer\Blit.cpp" /> + <ClCompile Include="renderer\Fence11.cpp" /> + <ClCompile Include="renderer\Fence9.cpp" /> + <ClCompile Include="renderer\BufferStorage.cpp" /> + <ClCompile Include="renderer\BufferStorage11.cpp" /> + <ClCompile Include="renderer\BufferStorage9.cpp" /> + <ClCompile Include="renderer\Image.cpp" /> + <ClCompile Include="renderer\Image9.cpp" /> + <ClCompile Include="renderer\IndexBuffer.cpp" /> + <ClCompile Include="renderer\IndexBuffer11.cpp" /> + <ClCompile Include="renderer\IndexBuffer9.cpp" /> + <ClCompile Include="renderer\IndexDataManager.cpp" /> + <ClCompile Include="renderer\ImageSSE2.cpp" /> + <ClCompile Include="renderer\Image11.cpp" /> + <ClCompile Include="renderer\IndexRangeCache.cpp" /> + <ClCompile Include="renderer\InputLayoutCache.cpp" /> + <ClCompile Include="renderer\Query11.cpp" /> + <ClCompile Include="renderer\Query9.cpp" /> + <ClCompile Include="renderer\Renderer.cpp" /> + <ClCompile Include="renderer\Renderer11.cpp" /> + <ClCompile Include="renderer\renderer11_utils.cpp" /> + <ClCompile Include="renderer\Renderer9.cpp" /> + <ClCompile Include="renderer\renderer9_utils.cpp" /> + <ClCompile Include="renderer\RenderTarget11.cpp" /> + <ClCompile Include="renderer\RenderTarget9.cpp" /> + <ClCompile Include="renderer\RenderStateCache.cpp" /> + <ClCompile Include="renderer\ShaderExecutable11.cpp" /> + <ClCompile Include="renderer\ShaderExecutable9.cpp" /> + <ClCompile Include="renderer\SwapChain11.cpp" /> + <ClCompile Include="renderer\SwapChain9.cpp" /> + <ClCompile Include="renderer\TextureStorage.cpp" /> + <ClCompile Include="renderer\TextureStorage11.cpp" /> + <ClCompile Include="renderer\TextureStorage9.cpp" /> + <ClCompile Include="renderer\VertexBuffer.cpp" /> + <ClCompile Include="renderer\VertexBuffer11.cpp" /> + <ClCompile Include="renderer\VertexBuffer9.cpp" /> + <ClCompile Include="renderer\VertexDataManager.cpp" /> + <ClCompile Include="renderer\VertexDeclarationCache.cpp" /> + <ClCompile Include="ResourceManager.cpp" /> + <ClCompile Include="Shader.cpp" /> + <ClCompile Include="Texture.cpp" /> + <ClCompile Include="Uniform.cpp" /> + <ClCompile Include="utilities.cpp" /> + </ItemGroup> + <ItemGroup> + <ClInclude Include="..\common\debug.h" /> + <ClInclude Include="..\common\event_tracer.h" /> + <ClInclude Include="..\common\system.h" /> + <ClInclude Include="..\third_party\murmurhash\MurmurHash3.h" /> + <ClInclude Include="..\third_party\trace_event\trace_event.h" /> + <ClInclude Include="angletypes.h" /> + <ClInclude Include="BinaryStream.h" /> + <ClInclude Include="Buffer.h" /> + <ClInclude Include="constants.h" /> + <ClInclude Include="Context.h" /> + <ClInclude Include="Fence.h" /> + <ClInclude Include="Framebuffer.h" /> + <ClInclude Include="..\..\include\GLES2\gl2.h" /> + <ClInclude Include="..\..\include\GLES2\gl2ext.h" /> + <ClInclude Include="..\..\include\GLES2\gl2platform.h" /> + <ClInclude Include="HandleAllocator.h" /> + <ClInclude Include="main.h" /> + <ClInclude Include="mathutil.h" /> + <ClInclude Include="precompiled.h" /> + <ClInclude Include="Program.h" /> + <ClInclude Include="ProgramBinary.h" /> + <ClInclude Include="Query.h" /> + <ClInclude Include="..\common\RefCountObject.h" /> + <ClInclude Include="Renderbuffer.h" /> + <ClInclude Include="renderer\Blit.h" /> + <ClInclude Include="renderer\Fence11.h" /> + <ClInclude Include="renderer\Fence9.h" /> + <ClInclude Include="renderer\FenceImpl.h" /> + <ClInclude Include="renderer\BufferStorage.h" /> + <ClInclude Include="renderer\BufferStorage11.h" /> + <ClInclude Include="renderer\BufferStorage9.h" /> + <ClInclude Include="renderer\generatemip.h" /> + <ClInclude Include="renderer\Image.h" /> + <ClInclude Include="renderer\Image11.h" /> + <ClInclude Include="renderer\Image9.h" /> + <ClInclude Include="renderer\IndexBuffer.h" /> + <ClInclude Include="renderer\IndexBuffer11.h" /> + <ClInclude Include="renderer\IndexBuffer9.h" /> + <ClInclude Include="renderer\IndexDataManager.h" /> + <ClInclude Include="renderer\IndexRangeCache.h" /> + <ClInclude Include="renderer\InputLayoutCache.h" /> + <ClInclude Include="renderer\Query11.h" /> + <ClInclude Include="renderer\QueryImpl.h" /> + <ClInclude Include="renderer\Query9.h" /> + <ClInclude Include="renderer\Renderer.h" /> + <ClInclude Include="renderer\Renderer11.h" /> + <ClInclude Include="renderer\renderer11_utils.h" /> + <ClInclude Include="renderer\Renderer9.h" /> + <ClInclude Include="renderer\renderer9_utils.h" /> + <ClInclude Include="renderer\RenderTarget.h" /> + <ClInclude Include="renderer\RenderTarget11.h" /> + <ClInclude Include="renderer\RenderTarget9.h" /> + <ClInclude Include="renderer\RenderStateCache.h" /> + <ClInclude Include="renderer\ShaderCache.h" /> + <ClInclude Include="renderer\ShaderExecutable.h" /> + <ClInclude Include="renderer\ShaderExecutable11.h" /> + <ClInclude Include="renderer\ShaderExecutable9.h" /> + <ClInclude Include="renderer\shaders\compiled\clear11vs.h" /> + <ClInclude Include="renderer\shaders\compiled\clearmultiple11ps.h" /> + <ClInclude Include="renderer\shaders\compiled\clearsingle11ps.h" /> + <ClInclude Include="renderer\shaders\compiled\componentmaskps.h" /> + <ClInclude Include="renderer\shaders\compiled\flipyvs.h" /> + <ClInclude Include="renderer\shaders\compiled\luminanceps.h" /> + <ClInclude Include="renderer\shaders\compiled\passthrough11vs.h" /> + <ClInclude Include="renderer\shaders\compiled\passthroughlum11ps.h" /> + <ClInclude Include="renderer\shaders\compiled\passthroughlumalpha11ps.h" /> + <ClInclude Include="renderer\shaders\compiled\passthroughps.h" /> + <ClInclude Include="renderer\shaders\compiled\passthroughrgb11ps.h" /> + <ClInclude Include="renderer\shaders\compiled\passthroughrgba11ps.h" /> + <ClInclude Include="renderer\shaders\compiled\standardvs.h" /> + <ClInclude Include="renderer\SwapChain.h" /> + <ClInclude Include="renderer\SwapChain11.h" /> + <ClInclude Include="renderer\SwapChain9.h" /> + <ClInclude Include="renderer\TextureStorage.h" /> + <ClInclude Include="renderer\TextureStorage11.h" /> + <ClInclude Include="renderer\TextureStorage9.h" /> + <ClInclude Include="renderer\VertexBuffer.h" /> + <ClInclude Include="renderer\VertexBuffer11.h" /> + <ClInclude Include="renderer\VertexBuffer9.h" /> + <ClInclude Include="renderer\vertexconversion.h" /> + <ClInclude Include="renderer\VertexDataManager.h" /> + <ClInclude Include="renderer\VertexDeclarationCache.h" /> + <ClInclude Include="resource.h" /> + <ClInclude Include="ResourceManager.h" /> + <ClInclude Include="Shader.h" /> + <ClInclude Include="Texture.h" /> + <ClInclude Include="Uniform.h" /> + <ClInclude Include="utilities.h" /> + <ClInclude Include="..\common\version.h" /> + </ItemGroup> + <ItemGroup> + <None Include="libGLESv2.def" /> + <None Include="renderer\shaders\Blit.ps" /> + <None Include="renderer\shaders\Blit.vs" /> + <None Include="renderer\shaders\Clear11.hlsl" /> + <None Include="renderer\shaders\generate_shaders.bat" /> + <None Include="renderer\shaders\Passthrough11.hlsl" /> + </ItemGroup> + <ItemGroup> + <ResourceCompile Include="libGLESv2.rc" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\compiler\preprocessor\preprocessor.vcxproj"> + <Project>{fbe32df3-0fb0-4f2f-a424-2c21bd7bc325}</Project> + </ProjectReference> + <ProjectReference Include="..\compiler\translator.vcxproj"> + <Project>{5b3a6db8-1e7e-40d7-92b9-da8aae619fad}</Project> + </ProjectReference> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> </Project>
\ No newline at end of file diff --git a/src/libGLESv2/libGLESv2.vcxproj.filters b/src/libGLESv2/libGLESv2.vcxproj.filters index 187a46a9..131fd6f2 100644 --- a/src/libGLESv2/libGLESv2.vcxproj.filters +++ b/src/libGLESv2/libGLESv2.vcxproj.filters @@ -1,515 +1,527 @@ -<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
- <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Third Party">
- <UniqueIdentifier>{dc1dac40-3563-41be-9e2d-c2588d8670fb}</UniqueIdentifier>
- </Filter>
- <Filter Include="Third Party\MurmurHash">
- <UniqueIdentifier>{b0005d2f-9b4a-4659-a270-138811174f73}</UniqueIdentifier>
- </Filter>
- <Filter Include="Header Files\Renderer">
- <UniqueIdentifier>{562e469d-1abb-44bc-b7fa-55eefbf75acc}</UniqueIdentifier>
- </Filter>
- <Filter Include="Shaders">
- <UniqueIdentifier>{6dc0306f-6396-4e80-9ef9-09b58aa53c4d}</UniqueIdentifier>
- </Filter>
- <Filter Include="Shaders\Compiled">
- <UniqueIdentifier>{6332705b-1999-4292-a38b-dd47329734aa}</UniqueIdentifier>
- </Filter>
- <Filter Include="Source Files\Renderer">
- <UniqueIdentifier>{93a76964-77a3-4b20-a6f5-e14e762d4e14}</UniqueIdentifier>
- </Filter>
- <Filter Include="Header Files\Renderer9">
- <UniqueIdentifier>{3877f35e-845c-4e95-b9a5-c7d8b9f307c5}</UniqueIdentifier>
- </Filter>
- <Filter Include="Header Files\Renderer11">
- <UniqueIdentifier>{2d70fd60-6dea-489f-ac09-16890d325669}</UniqueIdentifier>
- </Filter>
- <Filter Include="Source Files\Renderer9">
- <UniqueIdentifier>{60e14f04-2cf2-4a07-b3ef-7c68a82ba2d9}</UniqueIdentifier>
- </Filter>
- <Filter Include="Source Files\Renderer11">
- <UniqueIdentifier>{72db61d3-e081-4b58-bc63-a04a8a70585f}</UniqueIdentifier>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="Buffer.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="Context.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\common\debug.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="Fence.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="Float16ToFloat32.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="Framebuffer.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="HandleAllocator.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="libGLESv2.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="main.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="Program.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="ProgramBinary.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="Query.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\common\RefCountObject.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="Renderbuffer.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="ResourceManager.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="Shader.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="Texture.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="utilities.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="renderer\Image.cpp">
- <Filter>Source Files\Renderer</Filter>
- </ClCompile>
- <ClCompile Include="renderer\TextureStorage.cpp">
- <Filter>Source Files\Renderer</Filter>
- </ClCompile>
- <ClCompile Include="renderer\Renderer.cpp">
- <Filter>Source Files\Renderer</Filter>
- </ClCompile>
- <ClCompile Include="..\third_party\murmurhash\MurmurHash3.cpp">
- <Filter>Third Party\MurmurHash</Filter>
- </ClCompile>
- <ClCompile Include="renderer\IndexDataManager.cpp">
- <Filter>Source Files\Renderer</Filter>
- </ClCompile>
- <ClCompile Include="renderer\VertexDataManager.cpp">
- <Filter>Source Files\Renderer</Filter>
- </ClCompile>
- <ClCompile Include="renderer\Image.cpp">
- <Filter>Renderer</Filter>
- </ClCompile>
- <ClCompile Include="renderer\ImageSSE2.cpp">
- <Filter>Source Files\Renderer</Filter>
- </ClCompile>
- <ClCompile Include="renderer\VertexBuffer.cpp">
- <Filter>Source Files\Renderer</Filter>
- </ClCompile>
- <ClCompile Include="renderer\IndexBuffer.cpp">
- <Filter>Source Files\Renderer</Filter>
- </ClCompile>
- <ClCompile Include="Uniform.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="renderer\BufferStorage.cpp">
- <Filter>Source Files\Renderer</Filter>
- </ClCompile>
- <ClCompile Include="renderer\BufferStorage11.cpp">
- <Filter>Source Files\Renderer11</Filter>
- </ClCompile>
- <ClCompile Include="renderer\Fence11.cpp">
- <Filter>Source Files\Renderer11</Filter>
- </ClCompile>
- <ClCompile Include="renderer\Image11.cpp">
- <Filter>Source Files\Renderer11</Filter>
- </ClCompile>
- <ClCompile Include="renderer\IndexBuffer11.cpp">
- <Filter>Source Files\Renderer11</Filter>
- </ClCompile>
- <ClCompile Include="renderer\Query11.cpp">
- <Filter>Source Files\Renderer11</Filter>
- </ClCompile>
- <ClCompile Include="renderer\Renderer11.cpp">
- <Filter>Source Files\Renderer11</Filter>
- </ClCompile>
- <ClCompile Include="renderer\renderer11_utils.cpp">
- <Filter>Source Files\Renderer11</Filter>
- </ClCompile>
- <ClCompile Include="renderer\RenderTarget11.cpp">
- <Filter>Source Files\Renderer11</Filter>
- </ClCompile>
- <ClCompile Include="renderer\ShaderExecutable11.cpp">
- <Filter>Source Files\Renderer11</Filter>
- </ClCompile>
- <ClCompile Include="renderer\SwapChain11.cpp">
- <Filter>Source Files\Renderer11</Filter>
- </ClCompile>
- <ClCompile Include="renderer\TextureStorage11.cpp">
- <Filter>Source Files\Renderer11</Filter>
- </ClCompile>
- <ClCompile Include="renderer\VertexBuffer11.cpp">
- <Filter>Source Files\Renderer11</Filter>
- </ClCompile>
- <ClCompile Include="renderer\BufferStorage9.cpp">
- <Filter>Source Files\Renderer9</Filter>
- </ClCompile>
- <ClCompile Include="renderer\Fence9.cpp">
- <Filter>Source Files\Renderer9</Filter>
- </ClCompile>
- <ClCompile Include="renderer\Image9.cpp">
- <Filter>Source Files\Renderer9</Filter>
- </ClCompile>
- <ClCompile Include="renderer\IndexBuffer9.cpp">
- <Filter>Source Files\Renderer9</Filter>
- </ClCompile>
- <ClCompile Include="renderer\Query9.cpp">
- <Filter>Source Files\Renderer9</Filter>
- </ClCompile>
- <ClCompile Include="renderer\Renderer9.cpp">
- <Filter>Source Files\Renderer9</Filter>
- </ClCompile>
- <ClCompile Include="renderer\renderer9_utils.cpp">
- <Filter>Source Files\Renderer9</Filter>
- </ClCompile>
- <ClCompile Include="renderer\RenderTarget9.cpp">
- <Filter>Source Files\Renderer9</Filter>
- </ClCompile>
- <ClCompile Include="renderer\ShaderExecutable9.cpp">
- <Filter>Source Files\Renderer9</Filter>
- </ClCompile>
- <ClCompile Include="renderer\SwapChain9.cpp">
- <Filter>Source Files\Renderer9</Filter>
- </ClCompile>
- <ClCompile Include="renderer\TextureStorage9.cpp">
- <Filter>Source Files\Renderer9</Filter>
- </ClCompile>
- <ClCompile Include="renderer\VertexBuffer9.cpp">
- <Filter>Source Files\Renderer9</Filter>
- </ClCompile>
- <ClCompile Include="renderer\Blit.cpp">
- <Filter>Source Files\Renderer9</Filter>
- </ClCompile>
- <ClCompile Include="renderer\InputLayoutCache.cpp">
- <Filter>Source Files\Renderer11</Filter>
- </ClCompile>
- <ClCompile Include="renderer\RenderStateCache.cpp">
- <Filter>Source Files\Renderer11</Filter>
- </ClCompile>
- <ClCompile Include="renderer\VertexDeclarationCache.cpp">
- <Filter>Source Files\Renderer9</Filter>
- </ClCompile>
- <ClCompile Include="precompiled.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="renderer\IndexRangeCache.cpp">
- <Filter>Source Files\Renderer</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="BinaryStream.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="Buffer.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="Context.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="Fence.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="Framebuffer.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\..\include\GLES2\gl2.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\..\include\GLES2\gl2ext.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\..\include\GLES2\gl2platform.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="HandleAllocator.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="main.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="mathutil.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="Program.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="ProgramBinary.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="Query.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\common\RefCountObject.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="Renderbuffer.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="resource.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="ResourceManager.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="Shader.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="Texture.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="utilities.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\common\version.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="angletypes.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\third_party\murmurhash\MurmurHash3.h">
- <Filter>Third Party\MurmurHash</Filter>
- </ClInclude>
- <ClInclude Include="Uniform.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="renderer\shaders\compiled\passthrough11vs.h">
- <Filter>Shaders\Compiled</Filter>
- </ClInclude>
- <ClInclude Include="renderer\shaders\compiled\passthroughps.h">
- <Filter>Shaders\Compiled</Filter>
- </ClInclude>
- <ClInclude Include="renderer\shaders\compiled\standardvs.h">
- <Filter>Shaders\Compiled</Filter>
- </ClInclude>
- <ClInclude Include="renderer\shaders\compiled\componentmaskps.h">
- <Filter>Shaders\Compiled</Filter>
- </ClInclude>
- <ClInclude Include="renderer\shaders\compiled\flipyvs.h">
- <Filter>Shaders\Compiled</Filter>
- </ClInclude>
- <ClInclude Include="renderer\shaders\compiled\luminanceps.h">
- <Filter>Shaders\Compiled</Filter>
- </ClInclude>
- <ClInclude Include="renderer\shaders\compiled\passthroughrgba11ps.h">
- <Filter>Shaders\Compiled</Filter>
- </ClInclude>
- <ClInclude Include="renderer\shaders\compiled\passthroughrgb11ps.h">
- <Filter>Shaders\Compiled</Filter>
- </ClInclude>
- <ClInclude Include="renderer\shaders\compiled\passthroughlum11ps.h">
- <Filter>Shaders\Compiled</Filter>
- </ClInclude>
- <ClInclude Include="renderer\shaders\compiled\passthroughlumalpha11ps.h">
- <Filter>Shaders\Compiled</Filter>
- </ClInclude>
- <ClInclude Include="renderer\shaders\compiled\clear11vs.h">
- <Filter>Shaders\Compiled</Filter>
- </ClInclude>
- <ClInclude Include="renderer\shaders\compiled\clearmultiple11ps.h">
- <Filter>Shaders\Compiled</Filter>
- </ClInclude>
- <ClInclude Include="renderer\shaders\compiled\clearsingle11ps.h">
- <Filter>Shaders\Compiled</Filter>
- </ClInclude>
- <ClInclude Include="..\common\system.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\common\debug.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="renderer\BufferStorage.h">
- <Filter>Header Files\Renderer</Filter>
- </ClInclude>
- <ClInclude Include="renderer\FenceImpl.h">
- <Filter>Header Files\Renderer</Filter>
- </ClInclude>
- <ClInclude Include="renderer\generatemip.h">
- <Filter>Header Files\Renderer</Filter>
- </ClInclude>
- <ClInclude Include="renderer\Image.h">
- <Filter>Header Files\Renderer</Filter>
- </ClInclude>
- <ClInclude Include="renderer\IndexBuffer.h">
- <Filter>Header Files\Renderer</Filter>
- </ClInclude>
- <ClInclude Include="renderer\IndexDataManager.h">
- <Filter>Header Files\Renderer</Filter>
- </ClInclude>
- <ClInclude Include="renderer\QueryImpl.h">
- <Filter>Header Files\Renderer</Filter>
- </ClInclude>
- <ClInclude Include="renderer\Renderer.h">
- <Filter>Header Files\Renderer</Filter>
- </ClInclude>
- <ClInclude Include="renderer\RenderTarget.h">
- <Filter>Header Files\Renderer</Filter>
- </ClInclude>
- <ClInclude Include="renderer\ShaderExecutable.h">
- <Filter>Header Files\Renderer</Filter>
- </ClInclude>
- <ClInclude Include="renderer\SwapChain.h">
- <Filter>Header Files\Renderer</Filter>
- </ClInclude>
- <ClInclude Include="renderer\TextureStorage.h">
- <Filter>Header Files\Renderer</Filter>
- </ClInclude>
- <ClInclude Include="renderer\VertexBuffer.h">
- <Filter>Header Files\Renderer</Filter>
- </ClInclude>
- <ClInclude Include="renderer\vertexconversion.h">
- <Filter>Header Files\Renderer</Filter>
- </ClInclude>
- <ClInclude Include="renderer\VertexDataManager.h">
- <Filter>Header Files\Renderer</Filter>
- </ClInclude>
- <ClInclude Include="renderer\BufferStorage11.h">
- <Filter>Header Files\Renderer11</Filter>
- </ClInclude>
- <ClInclude Include="renderer\IndexBuffer11.h">
- <Filter>Header Files\Renderer11</Filter>
- </ClInclude>
- <ClInclude Include="renderer\Query11.h">
- <Filter>Header Files\Renderer11</Filter>
- </ClInclude>
- <ClInclude Include="renderer\Renderer11.h">
- <Filter>Header Files\Renderer11</Filter>
- </ClInclude>
- <ClInclude Include="renderer\RenderTarget11.h">
- <Filter>Header Files\Renderer11</Filter>
- </ClInclude>
- <ClInclude Include="renderer\ShaderExecutable11.h">
- <Filter>Header Files\Renderer11</Filter>
- </ClInclude>
- <ClInclude Include="renderer\SwapChain11.h">
- <Filter>Header Files\Renderer11</Filter>
- </ClInclude>
- <ClInclude Include="renderer\TextureStorage11.h">
- <Filter>Header Files\Renderer11</Filter>
- </ClInclude>
- <ClInclude Include="renderer\VertexBuffer11.h">
- <Filter>Header Files\Renderer11</Filter>
- </ClInclude>
- <ClInclude Include="renderer\BufferStorage9.h">
- <Filter>Header Files\Renderer9</Filter>
- </ClInclude>
- <ClInclude Include="renderer\Fence9.h">
- <Filter>Header Files\Renderer9</Filter>
- </ClInclude>
- <ClInclude Include="renderer\Image9.h">
- <Filter>Header Files\Renderer9</Filter>
- </ClInclude>
- <ClInclude Include="renderer\IndexBuffer9.h">
- <Filter>Header Files\Renderer9</Filter>
- </ClInclude>
- <ClInclude Include="renderer\Query9.h">
- <Filter>Header Files\Renderer9</Filter>
- </ClInclude>
- <ClInclude Include="renderer\Renderer9.h">
- <Filter>Header Files\Renderer9</Filter>
- </ClInclude>
- <ClInclude Include="renderer\renderer9_utils.h">
- <Filter>Header Files\Renderer9</Filter>
- </ClInclude>
- <ClInclude Include="renderer\RenderTarget9.h">
- <Filter>Header Files\Renderer9</Filter>
- </ClInclude>
- <ClInclude Include="renderer\ShaderExecutable9.h">
- <Filter>Header Files\Renderer9</Filter>
- </ClInclude>
- <ClInclude Include="renderer\SwapChain9.h">
- <Filter>Header Files\Renderer9</Filter>
- </ClInclude>
- <ClInclude Include="renderer\TextureStorage9.h">
- <Filter>Header Files\Renderer9</Filter>
- </ClInclude>
- <ClInclude Include="renderer\VertexBuffer9.h">
- <Filter>Header Files\Renderer9</Filter>
- </ClInclude>
- <ClInclude Include="renderer\Fence11.h">
- <Filter>Header Files\Renderer11</Filter>
- </ClInclude>
- <ClInclude Include="renderer\Image11.h">
- <Filter>Header Files\Renderer11</Filter>
- </ClInclude>
- <ClInclude Include="renderer\renderer11_utils.h">
- <Filter>Header Files\Renderer11</Filter>
- </ClInclude>
- <ClInclude Include="renderer\Fence9.h">
- <Filter>Header Files\Renderer\Renderer9</Filter>
- </ClInclude>
- <ClInclude Include="renderer\Query11.h">
- <Filter>Header Files\Renderer\Renderer11</Filter>
- </ClInclude>
- <ClInclude Include="renderer\Blit.h">
- <Filter>Header Files\Renderer9</Filter>
- </ClInclude>
- <ClInclude Include="renderer\ShaderCache.h">
- <Filter>Header Files\Renderer9</Filter>
- </ClInclude>
- <ClInclude Include="renderer\InputLayoutCache.h">
- <Filter>Header Files\Renderer11</Filter>
- </ClInclude>
- <ClInclude Include="renderer\RenderStateCache.h">
- <Filter>Header Files\Renderer11</Filter>
- </ClInclude>
- <ClInclude Include="renderer\VertexDeclarationCache.h">
- <Filter>Header Files\Renderer9</Filter>
- </ClInclude>
- <ClInclude Include="constants.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="precompiled.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="renderer\IndexRangeCache.h">
- <Filter>Header Files\Renderer</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="renderer\shaders\Blit.ps">
- <Filter>Shaders</Filter>
- </None>
- <None Include="renderer\shaders\Blit.vs">
- <Filter>Shaders</Filter>
- </None>
- <None Include="renderer\shaders\generate_shaders.bat">
- <Filter>Shaders</Filter>
- </None>
- <None Include="renderer\shaders\Passthrough11.hlsl">
- <Filter>Shaders</Filter>
- </None>
- <None Include="renderer\shaders\Clear11.hlsl">
- <Filter>Shaders</Filter>
- </None>
- <None Include="libGLESv2.def" />
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="libGLESv2.rc" />
- </ItemGroup>
+<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup> + <Filter Include="Source Files"> + <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier> + <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions> + </Filter> + <Filter Include="Header Files"> + <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier> + <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions> + </Filter> + <Filter Include="Third Party"> + <UniqueIdentifier>{dc1dac40-3563-41be-9e2d-c2588d8670fb}</UniqueIdentifier> + </Filter> + <Filter Include="Third Party\MurmurHash"> + <UniqueIdentifier>{b0005d2f-9b4a-4659-a270-138811174f73}</UniqueIdentifier> + </Filter> + <Filter Include="Header Files\Renderer"> + <UniqueIdentifier>{562e469d-1abb-44bc-b7fa-55eefbf75acc}</UniqueIdentifier> + </Filter> + <Filter Include="Shaders"> + <UniqueIdentifier>{6dc0306f-6396-4e80-9ef9-09b58aa53c4d}</UniqueIdentifier> + </Filter> + <Filter Include="Shaders\Compiled"> + <UniqueIdentifier>{6332705b-1999-4292-a38b-dd47329734aa}</UniqueIdentifier> + </Filter> + <Filter Include="Source Files\Renderer"> + <UniqueIdentifier>{93a76964-77a3-4b20-a6f5-e14e762d4e14}</UniqueIdentifier> + </Filter> + <Filter Include="Header Files\Renderer9"> + <UniqueIdentifier>{3877f35e-845c-4e95-b9a5-c7d8b9f307c5}</UniqueIdentifier> + </Filter> + <Filter Include="Header Files\Renderer11"> + <UniqueIdentifier>{2d70fd60-6dea-489f-ac09-16890d325669}</UniqueIdentifier> + </Filter> + <Filter Include="Source Files\Renderer9"> + <UniqueIdentifier>{60e14f04-2cf2-4a07-b3ef-7c68a82ba2d9}</UniqueIdentifier> + </Filter> + <Filter Include="Source Files\Renderer11"> + <UniqueIdentifier>{72db61d3-e081-4b58-bc63-a04a8a70585f}</UniqueIdentifier> + </Filter> + <Filter Include="Third Party\trace_event"> + <UniqueIdentifier>{ebfc1614-8f0b-48c7-b6bd-295bf91ef85c}</UniqueIdentifier> + </Filter> + </ItemGroup> + <ItemGroup> + <ClCompile Include="Buffer.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="Context.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\common\debug.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="Fence.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="Float16ToFloat32.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="Framebuffer.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="HandleAllocator.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="libGLESv2.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="main.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="Program.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="ProgramBinary.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="Query.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\common\RefCountObject.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="Renderbuffer.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="ResourceManager.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="Shader.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="Texture.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="utilities.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="renderer\Image.cpp"> + <Filter>Source Files\Renderer</Filter> + </ClCompile> + <ClCompile Include="renderer\TextureStorage.cpp"> + <Filter>Source Files\Renderer</Filter> + </ClCompile> + <ClCompile Include="renderer\Renderer.cpp"> + <Filter>Source Files\Renderer</Filter> + </ClCompile> + <ClCompile Include="..\third_party\murmurhash\MurmurHash3.cpp"> + <Filter>Third Party\MurmurHash</Filter> + </ClCompile> + <ClCompile Include="renderer\IndexDataManager.cpp"> + <Filter>Source Files\Renderer</Filter> + </ClCompile> + <ClCompile Include="renderer\VertexDataManager.cpp"> + <Filter>Source Files\Renderer</Filter> + </ClCompile> + <ClCompile Include="renderer\Image.cpp"> + <Filter>Renderer</Filter> + </ClCompile> + <ClCompile Include="renderer\ImageSSE2.cpp"> + <Filter>Source Files\Renderer</Filter> + </ClCompile> + <ClCompile Include="renderer\VertexBuffer.cpp"> + <Filter>Source Files\Renderer</Filter> + </ClCompile> + <ClCompile Include="renderer\IndexBuffer.cpp"> + <Filter>Source Files\Renderer</Filter> + </ClCompile> + <ClCompile Include="Uniform.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="renderer\BufferStorage.cpp"> + <Filter>Source Files\Renderer</Filter> + </ClCompile> + <ClCompile Include="renderer\BufferStorage11.cpp"> + <Filter>Source Files\Renderer11</Filter> + </ClCompile> + <ClCompile Include="renderer\Fence11.cpp"> + <Filter>Source Files\Renderer11</Filter> + </ClCompile> + <ClCompile Include="renderer\Image11.cpp"> + <Filter>Source Files\Renderer11</Filter> + </ClCompile> + <ClCompile Include="renderer\IndexBuffer11.cpp"> + <Filter>Source Files\Renderer11</Filter> + </ClCompile> + <ClCompile Include="renderer\Query11.cpp"> + <Filter>Source Files\Renderer11</Filter> + </ClCompile> + <ClCompile Include="renderer\Renderer11.cpp"> + <Filter>Source Files\Renderer11</Filter> + </ClCompile> + <ClCompile Include="renderer\renderer11_utils.cpp"> + <Filter>Source Files\Renderer11</Filter> + </ClCompile> + <ClCompile Include="renderer\RenderTarget11.cpp"> + <Filter>Source Files\Renderer11</Filter> + </ClCompile> + <ClCompile Include="renderer\ShaderExecutable11.cpp"> + <Filter>Source Files\Renderer11</Filter> + </ClCompile> + <ClCompile Include="renderer\SwapChain11.cpp"> + <Filter>Source Files\Renderer11</Filter> + </ClCompile> + <ClCompile Include="renderer\TextureStorage11.cpp"> + <Filter>Source Files\Renderer11</Filter> + </ClCompile> + <ClCompile Include="renderer\VertexBuffer11.cpp"> + <Filter>Source Files\Renderer11</Filter> + </ClCompile> + <ClCompile Include="renderer\BufferStorage9.cpp"> + <Filter>Source Files\Renderer9</Filter> + </ClCompile> + <ClCompile Include="renderer\Fence9.cpp"> + <Filter>Source Files\Renderer9</Filter> + </ClCompile> + <ClCompile Include="renderer\Image9.cpp"> + <Filter>Source Files\Renderer9</Filter> + </ClCompile> + <ClCompile Include="renderer\IndexBuffer9.cpp"> + <Filter>Source Files\Renderer9</Filter> + </ClCompile> + <ClCompile Include="renderer\Query9.cpp"> + <Filter>Source Files\Renderer9</Filter> + </ClCompile> + <ClCompile Include="renderer\Renderer9.cpp"> + <Filter>Source Files\Renderer9</Filter> + </ClCompile> + <ClCompile Include="renderer\renderer9_utils.cpp"> + <Filter>Source Files\Renderer9</Filter> + </ClCompile> + <ClCompile Include="renderer\RenderTarget9.cpp"> + <Filter>Source Files\Renderer9</Filter> + </ClCompile> + <ClCompile Include="renderer\ShaderExecutable9.cpp"> + <Filter>Source Files\Renderer9</Filter> + </ClCompile> + <ClCompile Include="renderer\SwapChain9.cpp"> + <Filter>Source Files\Renderer9</Filter> + </ClCompile> + <ClCompile Include="renderer\TextureStorage9.cpp"> + <Filter>Source Files\Renderer9</Filter> + </ClCompile> + <ClCompile Include="renderer\VertexBuffer9.cpp"> + <Filter>Source Files\Renderer9</Filter> + </ClCompile> + <ClCompile Include="renderer\Blit.cpp"> + <Filter>Source Files\Renderer9</Filter> + </ClCompile> + <ClCompile Include="renderer\InputLayoutCache.cpp"> + <Filter>Source Files\Renderer11</Filter> + </ClCompile> + <ClCompile Include="renderer\RenderStateCache.cpp"> + <Filter>Source Files\Renderer11</Filter> + </ClCompile> + <ClCompile Include="renderer\VertexDeclarationCache.cpp"> + <Filter>Source Files\Renderer9</Filter> + </ClCompile> + <ClCompile Include="precompiled.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="renderer\IndexRangeCache.cpp"> + <Filter>Source Files\Renderer</Filter> + </ClCompile> + <ClCompile Include="..\common\event_tracer.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + </ItemGroup> + <ItemGroup> + <ClInclude Include="BinaryStream.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="Buffer.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="Context.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="Fence.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="Framebuffer.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\..\include\GLES2\gl2.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\..\include\GLES2\gl2ext.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\..\include\GLES2\gl2platform.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="HandleAllocator.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="main.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="mathutil.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="Program.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="ProgramBinary.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="Query.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\common\RefCountObject.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="Renderbuffer.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="resource.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="ResourceManager.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="Shader.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="Texture.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="utilities.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\common\version.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="angletypes.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\third_party\murmurhash\MurmurHash3.h"> + <Filter>Third Party\MurmurHash</Filter> + </ClInclude> + <ClInclude Include="Uniform.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="renderer\shaders\compiled\passthrough11vs.h"> + <Filter>Shaders\Compiled</Filter> + </ClInclude> + <ClInclude Include="renderer\shaders\compiled\passthroughps.h"> + <Filter>Shaders\Compiled</Filter> + </ClInclude> + <ClInclude Include="renderer\shaders\compiled\standardvs.h"> + <Filter>Shaders\Compiled</Filter> + </ClInclude> + <ClInclude Include="renderer\shaders\compiled\componentmaskps.h"> + <Filter>Shaders\Compiled</Filter> + </ClInclude> + <ClInclude Include="renderer\shaders\compiled\flipyvs.h"> + <Filter>Shaders\Compiled</Filter> + </ClInclude> + <ClInclude Include="renderer\shaders\compiled\luminanceps.h"> + <Filter>Shaders\Compiled</Filter> + </ClInclude> + <ClInclude Include="renderer\shaders\compiled\passthroughrgba11ps.h"> + <Filter>Shaders\Compiled</Filter> + </ClInclude> + <ClInclude Include="renderer\shaders\compiled\passthroughrgb11ps.h"> + <Filter>Shaders\Compiled</Filter> + </ClInclude> + <ClInclude Include="renderer\shaders\compiled\passthroughlum11ps.h"> + <Filter>Shaders\Compiled</Filter> + </ClInclude> + <ClInclude Include="renderer\shaders\compiled\passthroughlumalpha11ps.h"> + <Filter>Shaders\Compiled</Filter> + </ClInclude> + <ClInclude Include="renderer\shaders\compiled\clear11vs.h"> + <Filter>Shaders\Compiled</Filter> + </ClInclude> + <ClInclude Include="renderer\shaders\compiled\clearmultiple11ps.h"> + <Filter>Shaders\Compiled</Filter> + </ClInclude> + <ClInclude Include="renderer\shaders\compiled\clearsingle11ps.h"> + <Filter>Shaders\Compiled</Filter> + </ClInclude> + <ClInclude Include="..\common\system.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\common\debug.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="renderer\BufferStorage.h"> + <Filter>Header Files\Renderer</Filter> + </ClInclude> + <ClInclude Include="renderer\FenceImpl.h"> + <Filter>Header Files\Renderer</Filter> + </ClInclude> + <ClInclude Include="renderer\generatemip.h"> + <Filter>Header Files\Renderer</Filter> + </ClInclude> + <ClInclude Include="renderer\Image.h"> + <Filter>Header Files\Renderer</Filter> + </ClInclude> + <ClInclude Include="renderer\IndexBuffer.h"> + <Filter>Header Files\Renderer</Filter> + </ClInclude> + <ClInclude Include="renderer\IndexDataManager.h"> + <Filter>Header Files\Renderer</Filter> + </ClInclude> + <ClInclude Include="renderer\QueryImpl.h"> + <Filter>Header Files\Renderer</Filter> + </ClInclude> + <ClInclude Include="renderer\Renderer.h"> + <Filter>Header Files\Renderer</Filter> + </ClInclude> + <ClInclude Include="renderer\RenderTarget.h"> + <Filter>Header Files\Renderer</Filter> + </ClInclude> + <ClInclude Include="renderer\ShaderExecutable.h"> + <Filter>Header Files\Renderer</Filter> + </ClInclude> + <ClInclude Include="renderer\SwapChain.h"> + <Filter>Header Files\Renderer</Filter> + </ClInclude> + <ClInclude Include="renderer\TextureStorage.h"> + <Filter>Header Files\Renderer</Filter> + </ClInclude> + <ClInclude Include="renderer\VertexBuffer.h"> + <Filter>Header Files\Renderer</Filter> + </ClInclude> + <ClInclude Include="renderer\vertexconversion.h"> + <Filter>Header Files\Renderer</Filter> + </ClInclude> + <ClInclude Include="renderer\VertexDataManager.h"> + <Filter>Header Files\Renderer</Filter> + </ClInclude> + <ClInclude Include="renderer\BufferStorage11.h"> + <Filter>Header Files\Renderer11</Filter> + </ClInclude> + <ClInclude Include="renderer\IndexBuffer11.h"> + <Filter>Header Files\Renderer11</Filter> + </ClInclude> + <ClInclude Include="renderer\Query11.h"> + <Filter>Header Files\Renderer11</Filter> + </ClInclude> + <ClInclude Include="renderer\Renderer11.h"> + <Filter>Header Files\Renderer11</Filter> + </ClInclude> + <ClInclude Include="renderer\RenderTarget11.h"> + <Filter>Header Files\Renderer11</Filter> + </ClInclude> + <ClInclude Include="renderer\ShaderExecutable11.h"> + <Filter>Header Files\Renderer11</Filter> + </ClInclude> + <ClInclude Include="renderer\SwapChain11.h"> + <Filter>Header Files\Renderer11</Filter> + </ClInclude> + <ClInclude Include="renderer\TextureStorage11.h"> + <Filter>Header Files\Renderer11</Filter> + </ClInclude> + <ClInclude Include="renderer\VertexBuffer11.h"> + <Filter>Header Files\Renderer11</Filter> + </ClInclude> + <ClInclude Include="renderer\BufferStorage9.h"> + <Filter>Header Files\Renderer9</Filter> + </ClInclude> + <ClInclude Include="renderer\Fence9.h"> + <Filter>Header Files\Renderer9</Filter> + </ClInclude> + <ClInclude Include="renderer\Image9.h"> + <Filter>Header Files\Renderer9</Filter> + </ClInclude> + <ClInclude Include="renderer\IndexBuffer9.h"> + <Filter>Header Files\Renderer9</Filter> + </ClInclude> + <ClInclude Include="renderer\Query9.h"> + <Filter>Header Files\Renderer9</Filter> + </ClInclude> + <ClInclude Include="renderer\Renderer9.h"> + <Filter>Header Files\Renderer9</Filter> + </ClInclude> + <ClInclude Include="renderer\renderer9_utils.h"> + <Filter>Header Files\Renderer9</Filter> + </ClInclude> + <ClInclude Include="renderer\RenderTarget9.h"> + <Filter>Header Files\Renderer9</Filter> + </ClInclude> + <ClInclude Include="renderer\ShaderExecutable9.h"> + <Filter>Header Files\Renderer9</Filter> + </ClInclude> + <ClInclude Include="renderer\SwapChain9.h"> + <Filter>Header Files\Renderer9</Filter> + </ClInclude> + <ClInclude Include="renderer\TextureStorage9.h"> + <Filter>Header Files\Renderer9</Filter> + </ClInclude> + <ClInclude Include="renderer\VertexBuffer9.h"> + <Filter>Header Files\Renderer9</Filter> + </ClInclude> + <ClInclude Include="renderer\Fence11.h"> + <Filter>Header Files\Renderer11</Filter> + </ClInclude> + <ClInclude Include="renderer\Image11.h"> + <Filter>Header Files\Renderer11</Filter> + </ClInclude> + <ClInclude Include="renderer\renderer11_utils.h"> + <Filter>Header Files\Renderer11</Filter> + </ClInclude> + <ClInclude Include="renderer\Fence9.h"> + <Filter>Header Files\Renderer\Renderer9</Filter> + </ClInclude> + <ClInclude Include="renderer\Query11.h"> + <Filter>Header Files\Renderer\Renderer11</Filter> + </ClInclude> + <ClInclude Include="renderer\Blit.h"> + <Filter>Header Files\Renderer9</Filter> + </ClInclude> + <ClInclude Include="renderer\ShaderCache.h"> + <Filter>Header Files\Renderer9</Filter> + </ClInclude> + <ClInclude Include="renderer\InputLayoutCache.h"> + <Filter>Header Files\Renderer11</Filter> + </ClInclude> + <ClInclude Include="renderer\RenderStateCache.h"> + <Filter>Header Files\Renderer11</Filter> + </ClInclude> + <ClInclude Include="renderer\VertexDeclarationCache.h"> + <Filter>Header Files\Renderer9</Filter> + </ClInclude> + <ClInclude Include="constants.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="precompiled.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="renderer\IndexRangeCache.h"> + <Filter>Header Files\Renderer</Filter> + </ClInclude> + <ClInclude Include="..\common\event_tracer.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\third_party\trace_event\trace_event.h"> + <Filter>Third Party\trace_event</Filter> + </ClInclude> + </ItemGroup> + <ItemGroup> + <None Include="renderer\shaders\Blit.ps"> + <Filter>Shaders</Filter> + </None> + <None Include="renderer\shaders\Blit.vs"> + <Filter>Shaders</Filter> + </None> + <None Include="renderer\shaders\generate_shaders.bat"> + <Filter>Shaders</Filter> + </None> + <None Include="renderer\shaders\Passthrough11.hlsl"> + <Filter>Shaders</Filter> + </None> + <None Include="renderer\shaders\Clear11.hlsl"> + <Filter>Shaders</Filter> + </None> + <None Include="libGLESv2.def" /> + </ItemGroup> + <ItemGroup> + <ResourceCompile Include="libGLESv2.rc" /> + </ItemGroup> </Project>
\ No newline at end of file diff --git a/src/libGLESv2/precompiled.h b/src/libGLESv2/precompiled.h index a850d57e..58ad1818 100644 --- a/src/libGLESv2/precompiled.h +++ b/src/libGLESv2/precompiled.h @@ -33,9 +33,9 @@ #include <vector> #include <d3d9.h> -#include <D3D11.h> +#include <d3d11.h> #include <dxgi.h> -#include <D3Dcompiler.h> +#include <d3dcompiler.h> #ifdef _MSC_VER #include <hash_map> diff --git a/src/libGLESv2/renderer/Image11.cpp b/src/libGLESv2/renderer/Image11.cpp index a46ad756..09c8922d 100644 --- a/src/libGLESv2/renderer/Image11.cpp +++ b/src/libGLESv2/renderer/Image11.cpp @@ -50,8 +50,8 @@ void Image11::generateMipmap(Image11 *dest, Image11 *src) ASSERT(src->getHeight() == 1 || src->getHeight() / 2 == dest->getHeight()); D3D11_MAPPED_SUBRESOURCE destMapped, srcMapped; - dest->map(&destMapped); - src->map(&srcMapped); + dest->map(D3D11_MAP_WRITE, &destMapped); + src->map(D3D11_MAP_READ, &srcMapped); const unsigned char *sourceData = reinterpret_cast<const unsigned char*>(srcMapped.pData); unsigned char *destData = reinterpret_cast<unsigned char*>(destMapped.pData); @@ -171,7 +171,7 @@ void Image11::loadData(GLint xoffset, GLint yoffset, GLsizei width, GLsizei heig GLint unpackAlignment, const void *input) { D3D11_MAPPED_SUBRESOURCE mappedImage; - HRESULT result = map(&mappedImage); + HRESULT result = map(D3D11_MAP_WRITE, &mappedImage); if (FAILED(result)) { ERR("Could not map image for loading."); @@ -254,7 +254,7 @@ void Image11::loadCompressedData(GLint xoffset, GLint yoffset, GLsizei width, GL ASSERT(yoffset % 4 == 0); D3D11_MAPPED_SUBRESOURCE mappedImage; - HRESULT result = map(&mappedImage); + HRESULT result = map(D3D11_MAP_WRITE, &mappedImage); if (FAILED(result)) { ERR("Could not map image for loading."); @@ -344,8 +344,8 @@ void Image11::copy(GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width { // This format requires conversion, so we must copy the texture to staging and manually convert via readPixels D3D11_MAPPED_SUBRESOURCE mappedImage; - HRESULT result = map(&mappedImage); - + HRESULT result = map(D3D11_MAP_WRITE, &mappedImage); + // determine the offset coordinate into the destination buffer GLsizei rowOffset = gl::ComputePixelSize(mActualFormat) * xoffset; void *dataOffset = static_cast<unsigned char*>(mappedImage.pData) + mappedImage.RowPitch * yoffset + rowOffset; @@ -402,7 +402,7 @@ void Image11::createStagingTexture() desc.SampleDesc.Quality = 0; desc.Usage = D3D11_USAGE_STAGING; desc.BindFlags = 0; - desc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE; + desc.CPUAccessFlags = D3D11_CPU_ACCESS_READ | D3D11_CPU_ACCESS_WRITE; desc.MiscFlags = 0; HRESULT result = device->CreateTexture2D(&desc, NULL, &newTexture); @@ -420,7 +420,7 @@ void Image11::createStagingTexture() mDirty = false; } -HRESULT Image11::map(D3D11_MAPPED_SUBRESOURCE *map) +HRESULT Image11::map(D3D11_MAP mapType, D3D11_MAPPED_SUBRESOURCE *map) { createStagingTexture(); @@ -429,7 +429,7 @@ HRESULT Image11::map(D3D11_MAPPED_SUBRESOURCE *map) if (mStagingTexture) { ID3D11DeviceContext *deviceContext = mRenderer->getDeviceContext(); - result = deviceContext->Map(mStagingTexture, mStagingSubresource, D3D11_MAP_WRITE, 0, map); + result = deviceContext->Map(mStagingTexture, mStagingSubresource, mapType, 0, map); // this can fail if the device is removed (from TDR) if (d3d11::isDeviceLostError(result)) diff --git a/src/libGLESv2/renderer/Image11.h b/src/libGLESv2/renderer/Image11.h index 4d5f1c17..11a6492d 100644 --- a/src/libGLESv2/renderer/Image11.h +++ b/src/libGLESv2/renderer/Image11.h @@ -54,7 +54,7 @@ class Image11 : public Image virtual void copy(GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height, gl::Framebuffer *source); protected: - HRESULT map(D3D11_MAPPED_SUBRESOURCE *map); + HRESULT map(D3D11_MAP mapType, D3D11_MAPPED_SUBRESOURCE *map); void unmap(); private: diff --git a/src/libGLESv2/renderer/IndexBuffer.cpp b/src/libGLESv2/renderer/IndexBuffer.cpp index 2ac94466..37dbd3e1 100644 --- a/src/libGLESv2/renderer/IndexBuffer.cpp +++ b/src/libGLESv2/renderer/IndexBuffer.cpp @@ -67,18 +67,30 @@ unsigned int IndexBufferInterface::getSerial() const return mIndexBuffer->getSerial(); } -int IndexBufferInterface::mapBuffer(unsigned int size, void** outMappedMemory) +bool IndexBufferInterface::mapBuffer(unsigned int size, void** outMappedMemory, unsigned int *streamOffset) { + // Protect against integer overflow + if (mWritePosition + size < mWritePosition) + { + return false; + } + if (!mIndexBuffer->mapBuffer(mWritePosition, size, outMappedMemory)) { - *outMappedMemory = NULL; - return -1; + if (outMappedMemory) + { + *outMappedMemory = NULL; + } + return false; } - int oldWritePos = static_cast<int>(mWritePosition); - mWritePosition += size; + if (streamOffset) + { + *streamOffset = mWritePosition; + } - return oldWritePos; + mWritePosition += size; + return true; } bool IndexBufferInterface::unmapBuffer() diff --git a/src/libGLESv2/renderer/IndexBuffer.h b/src/libGLESv2/renderer/IndexBuffer.h index 98fa5fe3..6fb885a1 100644 --- a/src/libGLESv2/renderer/IndexBuffer.h +++ b/src/libGLESv2/renderer/IndexBuffer.h @@ -59,7 +59,7 @@ class IndexBufferInterface unsigned int getSerial() const; - int mapBuffer(unsigned int size, void** outMappedMemory); + bool mapBuffer(unsigned int size, void** outMappedMemory, unsigned int *streamOffset); bool unmapBuffer(); IndexBuffer *getIndexBuffer() const; diff --git a/src/libGLESv2/renderer/IndexBuffer11.cpp b/src/libGLESv2/renderer/IndexBuffer11.cpp index 2a442ecd..66604c45 100644 --- a/src/libGLESv2/renderer/IndexBuffer11.cpp +++ b/src/libGLESv2/renderer/IndexBuffer11.cpp @@ -75,7 +75,8 @@ bool IndexBuffer11::mapBuffer(unsigned int offset, unsigned int size, void** out { if (mBuffer) { - if (offset + size > mBufferSize) + // Check for integer overflows and out-out-bounds map requests + if (offset + size < offset || offset + size > mBufferSize) { ERR("Index buffer map range is not inside the buffer."); return false; diff --git a/src/libGLESv2/renderer/IndexDataManager.cpp b/src/libGLESv2/renderer/IndexDataManager.cpp index 752d1fb4..49bace81 100644 --- a/src/libGLESv2/renderer/IndexDataManager.cpp +++ b/src/libGLESv2/renderer/IndexDataManager.cpp @@ -115,13 +115,19 @@ GLenum IndexDataManager::prepareIndexData(GLenum type, GLsizei count, gl::Buffer } GLenum destinationIndexType = (type == GL_UNSIGNED_INT) ? GL_UNSIGNED_INT : GL_UNSIGNED_SHORT; - intptr_t offset = reinterpret_cast<intptr_t>(indices); + unsigned int offset = 0; bool alignedOffset = false; BufferStorage *storage = NULL; if (buffer != NULL) { + if (reinterpret_cast<uintptr_t>(indices) > std::numeric_limits<unsigned int>::max()) + { + return GL_OUT_OF_MEMORY; + } + offset = static_cast<unsigned int>(reinterpret_cast<uintptr_t>(indices)); + storage = buffer->getStorage(); switch (type) @@ -132,7 +138,16 @@ GLenum IndexDataManager::prepareIndexData(GLenum type, GLsizei count, gl::Buffer default: UNREACHABLE(); alignedOffset = false; } - if (gl::ComputeTypeSize(type) * count + offset > static_cast<GLsizei>(storage->getSize())) + unsigned int typeSize = gl::ComputeTypeSize(type); + + // check for integer overflows + if (static_cast<unsigned int>(count) > (std::numeric_limits<unsigned int>::max() / typeSize) || + typeSize * static_cast<unsigned int>(count) + offset < offset) + { + return GL_OUT_OF_MEMORY; + } + + if (typeSize * static_cast<unsigned int>(count) + offset > storage->getSize()) { return GL_INVALID_OPERATION; } @@ -146,7 +161,7 @@ GLenum IndexDataManager::prepareIndexData(GLenum type, GLsizei count, gl::Buffer IndexBufferInterface *indexBuffer = streamingBuffer; bool directStorage = alignedOffset && storage && storage->supportsDirectBinding() && destinationIndexType == type; - UINT streamOffset = 0; + unsigned int streamOffset = 0; if (directStorage) { @@ -176,7 +191,7 @@ GLenum IndexDataManager::prepareIndexData(GLenum type, GLsizei count, gl::Buffer } else { - int convertCount = count; + unsigned int convertCount = count; if (staticBuffer) { @@ -198,12 +213,22 @@ GLenum IndexDataManager::prepareIndexData(GLenum type, GLsizei count, gl::Buffer return GL_INVALID_OPERATION; } - unsigned int bufferSizeRequired = convertCount * gl::ComputeTypeSize(destinationIndexType); - indexBuffer->reserveBufferSpace(bufferSizeRequired, type); + unsigned int indexTypeSize = gl::ComputeTypeSize(destinationIndexType); + if (convertCount > std::numeric_limits<unsigned int>::max() / indexTypeSize) + { + ERR("Reserving %u indicies of %u bytes each exceeds the maximum buffer size.", convertCount, indexTypeSize); + return GL_OUT_OF_MEMORY; + } + + unsigned int bufferSizeRequired = convertCount * indexTypeSize; + if (!indexBuffer->reserveBufferSpace(bufferSizeRequired, type)) + { + ERR("Failed to reserve %u bytes in an index buffer.", bufferSizeRequired); + return GL_OUT_OF_MEMORY; + } void* output = NULL; - streamOffset = indexBuffer->mapBuffer(bufferSizeRequired, &output); - if (streamOffset == -1 || output == NULL) + if (!indexBuffer->mapBuffer(bufferSizeRequired, &output, &streamOffset)) { ERR("Failed to map index buffer."); return GL_OUT_OF_MEMORY; @@ -254,7 +279,7 @@ StaticIndexBufferInterface *IndexDataManager::getCountingIndices(GLsizei count) mCountingBuffer->reserveBufferSpace(spaceNeeded, GL_UNSIGNED_SHORT); void* mappedMemory = NULL; - if (mCountingBuffer->mapBuffer(spaceNeeded, &mappedMemory) == -1 || mappedMemory == NULL) + if (!mCountingBuffer->mapBuffer(spaceNeeded, &mappedMemory, NULL)) { ERR("Failed to map counting buffer."); return NULL; @@ -284,7 +309,7 @@ StaticIndexBufferInterface *IndexDataManager::getCountingIndices(GLsizei count) mCountingBuffer->reserveBufferSpace(spaceNeeded, GL_UNSIGNED_INT); void* mappedMemory = NULL; - if (mCountingBuffer->mapBuffer(spaceNeeded, &mappedMemory) == -1 || mappedMemory == NULL) + if (!mCountingBuffer->mapBuffer(spaceNeeded, &mappedMemory, NULL)) { ERR("Failed to map counting buffer."); return NULL; diff --git a/src/libGLESv2/renderer/IndexRangeCache.cpp b/src/libGLESv2/renderer/IndexRangeCache.cpp index 7630934a..610a5efb 100644 --- a/src/libGLESv2/renderer/IndexRangeCache.cpp +++ b/src/libGLESv2/renderer/IndexRangeCache.cpp @@ -16,7 +16,7 @@ namespace rx { -void IndexRangeCache::addRange(GLenum type, intptr_t offset, GLsizei count, unsigned int minIdx, unsigned int maxIdx, +void IndexRangeCache::addRange(GLenum type, unsigned int offset, GLsizei count, unsigned int minIdx, unsigned int maxIdx, unsigned int streamOffset) { mIndexRangeCache[IndexRange(type, offset, count)] = IndexBounds(minIdx, maxIdx, streamOffset); @@ -44,7 +44,7 @@ void IndexRangeCache::invalidateRange(unsigned int offset, unsigned int size) } } -bool IndexRangeCache::findRange(GLenum type, intptr_t offset, GLsizei count, unsigned int *outMinIndex, +bool IndexRangeCache::findRange(GLenum type, unsigned int offset, GLsizei count, unsigned int *outMinIndex, unsigned int *outMaxIndex, unsigned int *outStreamOffset) const { IndexRangeMap::const_iterator i = mIndexRangeCache.find(IndexRange(type, offset, count)); diff --git a/src/libGLESv2/renderer/IndexRangeCache.h b/src/libGLESv2/renderer/IndexRangeCache.h index 5a5ade10..56834306 100644 --- a/src/libGLESv2/renderer/IndexRangeCache.h +++ b/src/libGLESv2/renderer/IndexRangeCache.h @@ -18,9 +18,9 @@ namespace rx class IndexRangeCache { public: - void addRange(GLenum type, intptr_t offset, GLsizei count, unsigned int minIdx, unsigned int maxIdx, + void addRange(GLenum type, unsigned int offset, GLsizei count, unsigned int minIdx, unsigned int maxIdx, unsigned int streamOffset); - bool findRange(GLenum type, intptr_t offset, GLsizei count, unsigned int *outMinIndex, + bool findRange(GLenum type, unsigned int offset, GLsizei count, unsigned int *outMinIndex, unsigned int *outMaxIndex, unsigned int *outStreamOffset) const; void invalidateRange(unsigned int offset, unsigned int size); @@ -30,7 +30,7 @@ class IndexRangeCache struct IndexRange { GLenum type; - intptr_t offset; + unsigned int offset; GLsizei count; IndexRange(); diff --git a/src/libGLESv2/renderer/InputLayoutCache.cpp b/src/libGLESv2/renderer/InputLayoutCache.cpp index fcc6f7ce..1552f3a3 100644 --- a/src/libGLESv2/renderer/InputLayoutCache.cpp +++ b/src/libGLESv2/renderer/InputLayoutCache.cpp @@ -103,15 +103,15 @@ GLenum InputLayoutCache::applyVertexBuffers(TranslatedAttribute attributes[gl::M // Record the type of the associated vertex shader vector in our key // This will prevent mismatched vertex shaders from using the same input layout GLint attributeSize; - programBinary->getActiveAttribute(ilKey.elementCount, 0, NULL, &attributeSize, &ilKey.glslElementType[ilKey.elementCount], NULL); - - ilKey.elements[ilKey.elementCount].SemanticName = semanticName; - ilKey.elements[ilKey.elementCount].SemanticIndex = sortedSemanticIndices[i]; - ilKey.elements[ilKey.elementCount].Format = attributes[i].attribute->mArrayEnabled ? vertexBuffer->getDXGIFormat(*attributes[i].attribute) : DXGI_FORMAT_R32G32B32A32_FLOAT; - ilKey.elements[ilKey.elementCount].InputSlot = i; - ilKey.elements[ilKey.elementCount].AlignedByteOffset = 0; - ilKey.elements[ilKey.elementCount].InputSlotClass = inputClass; - ilKey.elements[ilKey.elementCount].InstanceDataStepRate = attributes[i].divisor; + programBinary->getActiveAttribute(ilKey.elementCount, 0, NULL, &attributeSize, &ilKey.elements[ilKey.elementCount].glslElementType, NULL); + + ilKey.elements[ilKey.elementCount].desc.SemanticName = semanticName; + ilKey.elements[ilKey.elementCount].desc.SemanticIndex = sortedSemanticIndices[i]; + ilKey.elements[ilKey.elementCount].desc.Format = attributes[i].attribute->mArrayEnabled ? vertexBuffer->getDXGIFormat(*attributes[i].attribute) : DXGI_FORMAT_R32G32B32A32_FLOAT; + ilKey.elements[ilKey.elementCount].desc.InputSlot = i; + ilKey.elements[ilKey.elementCount].desc.AlignedByteOffset = 0; + ilKey.elements[ilKey.elementCount].desc.InputSlotClass = inputClass; + ilKey.elements[ilKey.elementCount].desc.InstanceDataStepRate = attributes[i].divisor; ilKey.elementCount++; vertexBuffers[i] = bufferStorage ? bufferStorage->getBuffer() : vertexBuffer->getBuffer(); @@ -133,7 +133,13 @@ GLenum InputLayoutCache::applyVertexBuffers(TranslatedAttribute attributes[gl::M { ShaderExecutable11 *shader = ShaderExecutable11::makeShaderExecutable11(programBinary->getVertexExecutable()); - HRESULT result = mDevice->CreateInputLayout(ilKey.elements, ilKey.elementCount, shader->getFunction(), shader->getLength(), &inputLayout); + D3D11_INPUT_ELEMENT_DESC descs[gl::MAX_VERTEX_ATTRIBS]; + for (unsigned int j = 0; j < ilKey.elementCount; ++j) + { + descs[j] = ilKey.elements[j].desc; + } + + HRESULT result = mDevice->CreateInputLayout(descs, ilKey.elementCount, shader->getFunction(), shader->getLength(), &inputLayout); if (FAILED(result)) { ERR("Failed to crate input layout, result: 0x%08x", result); @@ -190,13 +196,18 @@ std::size_t InputLayoutCache::hashInputLayout(const InputLayoutKey &inputLayout) static const unsigned int seed = 0xDEADBEEF; std::size_t hash = 0; - MurmurHash3_x86_32(&inputLayout, sizeof(InputLayoutKey), seed, &hash); + MurmurHash3_x86_32(inputLayout.begin(), inputLayout.end() - inputLayout.begin(), seed, &hash); return hash; } bool InputLayoutCache::compareInputLayouts(const InputLayoutKey &a, const InputLayoutKey &b) { - return memcmp(&a, &b, sizeof(InputLayoutKey)) == 0; + if (a.elementCount != b.elementCount) + { + return false; + } + + return std::equal(a.begin(), a.end(), b.begin()); } } diff --git a/src/libGLESv2/renderer/InputLayoutCache.h b/src/libGLESv2/renderer/InputLayoutCache.h index 797853de..bb1a8eeb 100644 --- a/src/libGLESv2/renderer/InputLayoutCache.h +++ b/src/libGLESv2/renderer/InputLayoutCache.h @@ -38,11 +38,26 @@ class InputLayoutCache private: DISALLOW_COPY_AND_ASSIGN(InputLayoutCache); + struct InputLayoutElement + { + D3D11_INPUT_ELEMENT_DESC desc; + GLenum glslElementType; + }; + struct InputLayoutKey { unsigned int elementCount; - D3D11_INPUT_ELEMENT_DESC elements[gl::MAX_VERTEX_ATTRIBS]; - GLenum glslElementType[gl::MAX_VERTEX_ATTRIBS]; + InputLayoutElement elements[gl::MAX_VERTEX_ATTRIBS]; + + const char *begin() const + { + return reinterpret_cast<const char*>(&elementCount); + } + + const char *end() const + { + return reinterpret_cast<const char*>(&elements[elementCount]); + } }; struct InputLayoutCounterPair diff --git a/src/libGLESv2/renderer/Renderer.cpp b/src/libGLESv2/renderer/Renderer.cpp index 6138e6d9..e0b3abcf 100644 --- a/src/libGLESv2/renderer/Renderer.cpp +++ b/src/libGLESv2/renderer/Renderer.cpp @@ -14,6 +14,7 @@ #include "libGLESv2/renderer/Renderer9.h" #include "libGLESv2/renderer/Renderer11.h" #include "libGLESv2/utilities.h" +#include "third_party/trace_event/trace_event.h" #if !defined(ANGLE_ENABLE_D3D11) // Enables use of the Direct3D 11 API for a default display, when available @@ -40,6 +41,7 @@ Renderer::~Renderer() bool Renderer::initializeCompiler() { + TRACE_EVENT0("gpu", "initializeCompiler"); #if defined(ANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES) // Find a D3DCompiler module that had already been loaded based on a predefined list of versions. static TCHAR* d3dCompilerNames[] = ANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES; @@ -51,13 +53,16 @@ bool Renderer::initializeCompiler() break; } } -#else - // Load the version of the D3DCompiler DLL associated with the Direct3D version ANGLE was built with. - mD3dCompilerModule = LoadLibrary(D3DCOMPILER_DLL); #endif // ANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES if (!mD3dCompilerModule) { + // Load the version of the D3DCompiler DLL associated with the Direct3D version ANGLE was built with. + mD3dCompilerModule = LoadLibrary(D3DCOMPILER_DLL); + } + + if (!mD3dCompilerModule) + { ERR("No D3D compiler module found - aborting!\n"); return false; } diff --git a/src/libGLESv2/renderer/Renderer.h b/src/libGLESv2/renderer/Renderer.h index 04e877ba..e1861f01 100644 --- a/src/libGLESv2/renderer/Renderer.h +++ b/src/libGLESv2/renderer/Renderer.h @@ -93,6 +93,12 @@ enum ShaderType SHADER_GEOMETRY }; +enum D3DWorkaroundType +{ + ANGLE_D3D_WORKAROUND_NONE, + ANGLE_D3D_WORKAROUND_SM3_OPTIMIZER +}; + class Renderer { public: @@ -207,7 +213,7 @@ class Renderer // Shader operations virtual ShaderExecutable *loadExecutable(const void *function, size_t length, rx::ShaderType type) = 0; - virtual ShaderExecutable *compileToExecutable(gl::InfoLog &infoLog, const char *shaderHLSL, rx::ShaderType type) = 0; + virtual ShaderExecutable *compileToExecutable(gl::InfoLog &infoLog, const char *shaderHLSL, rx::ShaderType type, D3DWorkaroundType workaround) = 0; // Image operations virtual Image *createImage() = 0; diff --git a/src/libGLESv2/renderer/Renderer11.cpp b/src/libGLESv2/renderer/Renderer11.cpp index 9173fc8c..13ba355d 100644 --- a/src/libGLESv2/renderer/Renderer11.cpp +++ b/src/libGLESv2/renderer/Renderer11.cpp @@ -12,7 +12,7 @@ #include "libGLESv2/Buffer.h" #include "libGLESv2/ProgramBinary.h" #include "libGLESv2/Framebuffer.h" -#include "libGLESv2/RenderBuffer.h" +#include "libGLESv2/Renderbuffer.h" #include "libGLESv2/renderer/Renderer11.h" #include "libGLESv2/renderer/RenderTarget11.h" #include "libGLESv2/renderer/renderer11_utils.h" @@ -243,8 +243,6 @@ EGLint Renderer11::initialize() { D3D11_MESSAGE_ID hideMessages[] = { - D3D11_MESSAGE_ID_DEVICE_OMSETRENDERTARGETS_HAZARD, - D3D11_MESSAGE_ID_DEVICE_PSSETSHADERRESOURCES_HAZARD, D3D11_MESSAGE_ID_DEVICE_DRAW_RENDERTARGETVIEW_NOT_SET }; @@ -322,7 +320,6 @@ EGLint Renderer11::initialize() { DXGI_FORMAT_R32_FLOAT, DXGI_FORMAT_R32G32_FLOAT, - DXGI_FORMAT_R32G32B32_FLOAT, DXGI_FORMAT_R32G32B32A32_FLOAT, }; @@ -920,6 +917,25 @@ bool Renderer11::applyRenderTarget(gl::Framebuffer *framebuffer) renderTargetFormat = colorbuffer->getActualFormat(); missingColorRenderTarget = false; } + +#ifdef _DEBUG + // Workaround for Debug SETSHADERRESOURCES_HAZARD D3D11 warnings + for (unsigned int vertexSerialIndex = 0; vertexSerialIndex < gl::IMPLEMENTATION_MAX_VERTEX_TEXTURE_IMAGE_UNITS; vertexSerialIndex++) + { + if (colorbuffer->getTextureSerial() != 0 && mCurVertexTextureSerials[vertexSerialIndex] == colorbuffer->getTextureSerial()) + { + setTexture(gl::SAMPLER_VERTEX, vertexSerialIndex, NULL); + } + } + + for (unsigned int pixelSerialIndex = 0; pixelSerialIndex < gl::MAX_TEXTURE_IMAGE_UNITS; pixelSerialIndex++) + { + if (colorbuffer->getTextureSerial() != 0 && mCurPixelTextureSerials[pixelSerialIndex] == colorbuffer->getTextureSerial()) + { + setTexture(gl::SAMPLER_PIXEL, pixelSerialIndex, NULL); + } + } +#endif } } @@ -1150,15 +1166,15 @@ void Renderer11::drawLineLoop(GLsizei count, GLenum type, const GLvoid *indices, } void* mappedMemory = NULL; - int offset = mLineLoopIB->mapBuffer(spaceNeeded, &mappedMemory); - if (offset == -1 || mappedMemory == NULL) + unsigned int offset; + if (!mLineLoopIB->mapBuffer(spaceNeeded, &mappedMemory, &offset)) { ERR("Could not map index buffer for GL_LINE_LOOP."); return gl::error(GL_OUT_OF_MEMORY); } unsigned int *data = reinterpret_cast<unsigned int*>(mappedMemory); - unsigned int indexBufferOffset = static_cast<unsigned int>(offset); + unsigned int indexBufferOffset = offset; switch (type) { @@ -1255,15 +1271,15 @@ void Renderer11::drawTriangleFan(GLsizei count, GLenum type, const GLvoid *indic } void* mappedMemory = NULL; - int offset = mTriangleFanIB->mapBuffer(spaceNeeded, &mappedMemory); - if (offset == -1 || mappedMemory == NULL) + unsigned int offset; + if (!mTriangleFanIB->mapBuffer(spaceNeeded, &mappedMemory, &offset)) { ERR("Could not map scratch index buffer for GL_TRIANGLE_FAN."); return gl::error(GL_OUT_OF_MEMORY); } unsigned int *data = reinterpret_cast<unsigned int*>(mappedMemory); - unsigned int indexBufferOffset = static_cast<unsigned int>(offset); + unsigned int indexBufferOffset = offset; switch (type) { @@ -2814,7 +2830,7 @@ ShaderExecutable *Renderer11::loadExecutable(const void *function, size_t length return executable; } -ShaderExecutable *Renderer11::compileToExecutable(gl::InfoLog &infoLog, const char *shaderHLSL, rx::ShaderType type) +ShaderExecutable *Renderer11::compileToExecutable(gl::InfoLog &infoLog, const char *shaderHLSL, rx::ShaderType type, D3DWorkaroundType workaround) { const char *profile = NULL; diff --git a/src/libGLESv2/renderer/Renderer11.h b/src/libGLESv2/renderer/Renderer11.h index f024855f..b86f485f 100644 --- a/src/libGLESv2/renderer/Renderer11.h +++ b/src/libGLESv2/renderer/Renderer11.h @@ -155,7 +155,7 @@ class Renderer11 : public Renderer // Shader operations virtual ShaderExecutable *loadExecutable(const void *function, size_t length, rx::ShaderType type); - virtual ShaderExecutable *compileToExecutable(gl::InfoLog &infoLog, const char *shaderHLSL, rx::ShaderType type); + virtual ShaderExecutable *compileToExecutable(gl::InfoLog &infoLog, const char *shaderHLSL, rx::ShaderType type, D3DWorkaroundType workaround); // Image operations virtual Image *createImage(); @@ -235,7 +235,7 @@ class Renderer11 : public Renderer unsigned int qualityLevels[D3D11_MAX_MULTISAMPLE_SAMPLE_COUNT]; }; - typedef std::unordered_map<DXGI_FORMAT, MultisampleSupportInfo> MultisampleSupportMap; + typedef std::unordered_map<DXGI_FORMAT, MultisampleSupportInfo, std::hash<int> > MultisampleSupportMap; MultisampleSupportMap mMultisampleSupportMap; unsigned int mMaxSupportedSamples; diff --git a/src/libGLESv2/renderer/Renderer9.cpp b/src/libGLESv2/renderer/Renderer9.cpp index 240367d5..c46d82b3 100644 --- a/src/libGLESv2/renderer/Renderer9.cpp +++ b/src/libGLESv2/renderer/Renderer9.cpp @@ -30,6 +30,8 @@ #include "libEGL/Display.h" +#include "third_party/trace_event/trace_event.h" + // Can also be enabled by defining FORCE_REF_RAST in the project's predefined macros #define REF_RAST 0 @@ -119,8 +121,6 @@ Renderer9::Renderer9(egl::Display *display, HDC hDc, bool softwareDevice) : Rend Renderer9::~Renderer9() { - releaseDeviceResources(); - if (mDevice) { // If the device is lost, reset it first to prevent leaving the driver in an unstable state @@ -128,22 +128,19 @@ Renderer9::~Renderer9() { resetDevice(); } - - mDevice->Release(); - mDevice = NULL; } - if (mDeviceEx) - { - mDeviceEx->Release(); - mDeviceEx = NULL; - } + deinitialize(); +} - if (mD3d9) - { - mD3d9->Release(); - mD3d9 = NULL; - } +void Renderer9::deinitialize() +{ + releaseDeviceResources(); + + SafeRelease(mDevice); + SafeRelease(mDeviceEx); + SafeRelease(mD3d9); + SafeRelease(mD3d9Ex); if (mDeviceWindow) { @@ -151,12 +148,6 @@ Renderer9::~Renderer9() mDeviceWindow = NULL; } - if (mD3d9Ex) - { - mD3d9Ex->Release(); - mD3d9Ex = NULL; - } - if (mD3d9Module) { mD3d9Module = NULL; @@ -184,10 +175,12 @@ EGLint Renderer9::initialize() if (mSoftwareDevice) { + TRACE_EVENT0("gpu", "GetModuleHandle_swiftshader"); mD3d9Module = GetModuleHandle(TEXT("swiftshader_d3d9.dll")); } else { + TRACE_EVENT0("gpu", "GetModuleHandle_d3d9"); mD3d9Module = GetModuleHandle(TEXT("d3d9.dll")); } @@ -205,12 +198,14 @@ EGLint Renderer9::initialize() // desktop. Direct3D9Ex is available in Windows Vista and later if suitable drivers are available. if (ANGLE_ENABLE_D3D9EX && Direct3DCreate9ExPtr && SUCCEEDED(Direct3DCreate9ExPtr(D3D_SDK_VERSION, &mD3d9Ex))) { + TRACE_EVENT0("gpu", "D3d9Ex_QueryInterface"); ASSERT(mD3d9Ex); mD3d9Ex->QueryInterface(IID_IDirect3D9, reinterpret_cast<void**>(&mD3d9)); ASSERT(mD3d9); } else { + TRACE_EVENT0("gpu", "Direct3DCreate9"); mD3d9 = Direct3DCreate9(D3D_SDK_VERSION); } @@ -228,21 +223,24 @@ EGLint Renderer9::initialize() HRESULT result; // Give up on getting device caps after about one second. - for (int i = 0; i < 10; ++i) { - result = mD3d9->GetDeviceCaps(mAdapter, mDeviceType, &mDeviceCaps); - if (SUCCEEDED(result)) - { - break; - } - else if (result == D3DERR_NOTAVAILABLE) - { - Sleep(100); // Give the driver some time to initialize/recover - } - else if (FAILED(result)) // D3DERR_OUTOFVIDEOMEMORY, E_OUTOFMEMORY, D3DERR_INVALIDDEVICE, or another error we can't recover from + TRACE_EVENT0("gpu", "GetDeviceCaps"); + for (int i = 0; i < 10; ++i) { - ERR("failed to get device caps (0x%x)\n", result); - return EGL_NOT_INITIALIZED; + result = mD3d9->GetDeviceCaps(mAdapter, mDeviceType, &mDeviceCaps); + if (SUCCEEDED(result)) + { + break; + } + else if (result == D3DERR_NOTAVAILABLE) + { + Sleep(100); // Give the driver some time to initialize/recover + } + else if (FAILED(result)) // D3DERR_OUTOFVIDEOMEMORY, E_OUTOFMEMORY, D3DERR_INVALIDDEVICE, or another error we can't recover from + { + ERR("failed to get device caps (0x%x)\n", result); + return EGL_NOT_INITIALIZED; + } } } @@ -260,7 +258,10 @@ EGLint Renderer9::initialize() return EGL_NOT_INITIALIZED; } - mD3d9->GetAdapterIdentifier(mAdapter, 0, &mAdapterIdentifier); + { + TRACE_EVENT0("gpu", "GetAdapterIdentifier"); + mD3d9->GetAdapterIdentifier(mAdapter, 0, &mAdapterIdentifier); + } // ATI cards on XP have problems with non-power-of-two textures. mSupportsNonPower2Textures = !(mDeviceCaps.TextureCaps & D3DPTEXTURECAPS_POW2) && @@ -301,35 +302,41 @@ EGLint Renderer9::initialize() } int max = 0; - for (unsigned int i = 0; i < ArraySize(RenderTargetFormats); ++i) { - bool *multisampleArray = new bool[D3DMULTISAMPLE_16_SAMPLES + 1]; - getMultiSampleSupport(RenderTargetFormats[i], multisampleArray); - mMultiSampleSupport[RenderTargetFormats[i]] = multisampleArray; - - for (int j = D3DMULTISAMPLE_16_SAMPLES; j >= 0; --j) + TRACE_EVENT0("gpu", "getMultiSampleSupport"); + for (unsigned int i = 0; i < ArraySize(RenderTargetFormats); ++i) { - if (multisampleArray[j] && j != D3DMULTISAMPLE_NONMASKABLE && j > max) + bool *multisampleArray = new bool[D3DMULTISAMPLE_16_SAMPLES + 1]; + getMultiSampleSupport(RenderTargetFormats[i], multisampleArray); + mMultiSampleSupport[RenderTargetFormats[i]] = multisampleArray; + + for (int j = D3DMULTISAMPLE_16_SAMPLES; j >= 0; --j) { - max = j; + if (multisampleArray[j] && j != D3DMULTISAMPLE_NONMASKABLE && j > max) + { + max = j; + } } } } - for (unsigned int i = 0; i < ArraySize(DepthStencilFormats); ++i) { - if (DepthStencilFormats[i] == D3DFMT_UNKNOWN) - continue; + TRACE_EVENT0("gpu", "getMultiSampleSupport2"); + for (unsigned int i = 0; i < ArraySize(DepthStencilFormats); ++i) + { + if (DepthStencilFormats[i] == D3DFMT_UNKNOWN) + continue; - bool *multisampleArray = new bool[D3DMULTISAMPLE_16_SAMPLES + 1]; - getMultiSampleSupport(DepthStencilFormats[i], multisampleArray); - mMultiSampleSupport[DepthStencilFormats[i]] = multisampleArray; + bool *multisampleArray = new bool[D3DMULTISAMPLE_16_SAMPLES + 1]; + getMultiSampleSupport(DepthStencilFormats[i], multisampleArray); + mMultiSampleSupport[DepthStencilFormats[i]] = multisampleArray; - for (int j = D3DMULTISAMPLE_16_SAMPLES; j >= 0; --j) - { - if (multisampleArray[j] && j != D3DMULTISAMPLE_NONMASKABLE && j > max) + for (int j = D3DMULTISAMPLE_16_SAMPLES; j >= 0; --j) { - max = j; + if (multisampleArray[j] && j != D3DMULTISAMPLE_NONMASKABLE && j > max) + { + max = j; + } } } } @@ -339,12 +346,18 @@ EGLint Renderer9::initialize() static const TCHAR windowName[] = TEXT("AngleHiddenWindow"); static const TCHAR className[] = TEXT("STATIC"); - mDeviceWindow = CreateWindowEx(WS_EX_NOACTIVATE, className, windowName, WS_DISABLED | WS_POPUP, 0, 0, 1, 1, HWND_MESSAGE, NULL, GetModuleHandle(NULL), NULL); + { + TRACE_EVENT0("gpu", "CreateWindowEx"); + mDeviceWindow = CreateWindowEx(WS_EX_NOACTIVATE, className, windowName, WS_DISABLED | WS_POPUP, 0, 0, 1, 1, HWND_MESSAGE, NULL, GetModuleHandle(NULL), NULL); + } D3DPRESENT_PARAMETERS presentParameters = getDefaultPresentParameters(); DWORD behaviorFlags = D3DCREATE_FPU_PRESERVE | D3DCREATE_NOWINDOWCHANGES; - result = mD3d9->CreateDevice(mAdapter, mDeviceType, mDeviceWindow, behaviorFlags | D3DCREATE_HARDWARE_VERTEXPROCESSING | D3DCREATE_PUREDEVICE, &presentParameters, &mDevice); + { + TRACE_EVENT0("gpu", "D3d9_CreateDevice"); + result = mD3d9->CreateDevice(mAdapter, mDeviceType, mDeviceWindow, behaviorFlags | D3DCREATE_HARDWARE_VERTEXPROCESSING | D3DCREATE_PUREDEVICE, &presentParameters, &mDevice); + } if (result == D3DERR_OUTOFVIDEOMEMORY || result == E_OUTOFMEMORY || result == D3DERR_DEVICELOST) { return EGL_BAD_ALLOC; @@ -352,6 +365,7 @@ EGLint Renderer9::initialize() if (FAILED(result)) { + TRACE_EVENT0("gpu", "D3d9_CreateDevice2"); result = mD3d9->CreateDevice(mAdapter, mDeviceType, mDeviceWindow, behaviorFlags | D3DCREATE_SOFTWARE_VERTEXPROCESSING, &presentParameters, &mDevice); if (FAILED(result)) @@ -363,35 +377,45 @@ EGLint Renderer9::initialize() if (mD3d9Ex) { + TRACE_EVENT0("gpu", "mDevice_QueryInterface"); result = mDevice->QueryInterface(IID_IDirect3DDevice9Ex, (void**) &mDeviceEx); ASSERT(SUCCEEDED(result)); } - mVertexShaderCache.initialize(mDevice); - mPixelShaderCache.initialize(mDevice); + { + TRACE_EVENT0("gpu", "ShaderCache initialize"); + mVertexShaderCache.initialize(mDevice); + mPixelShaderCache.initialize(mDevice); + } // Check occlusion query support IDirect3DQuery9 *occlusionQuery = NULL; - if (SUCCEEDED(mDevice->CreateQuery(D3DQUERYTYPE_OCCLUSION, &occlusionQuery)) && occlusionQuery) - { - occlusionQuery->Release(); - mOcclusionQuerySupport = true; - } - else { - mOcclusionQuerySupport = false; + TRACE_EVENT0("gpu", "device_CreateQuery"); + if (SUCCEEDED(mDevice->CreateQuery(D3DQUERYTYPE_OCCLUSION, &occlusionQuery)) && occlusionQuery) + { + occlusionQuery->Release(); + mOcclusionQuerySupport = true; + } + else + { + mOcclusionQuerySupport = false; + } } // Check event query support IDirect3DQuery9 *eventQuery = NULL; - if (SUCCEEDED(mDevice->CreateQuery(D3DQUERYTYPE_EVENT, &eventQuery)) && eventQuery) { - eventQuery->Release(); - mEventQuerySupport = true; - } - else - { - mEventQuerySupport = false; + TRACE_EVENT0("gpu", "device_CreateQuery2"); + if (SUCCEEDED(mDevice->CreateQuery(D3DQUERYTYPE_EVENT, &eventQuery)) && eventQuery) + { + eventQuery->Release(); + mEventQuerySupport = true; + } + else + { + mEventQuerySupport = false; + } } D3DDISPLAYMODE currentDisplayMode; @@ -1076,8 +1100,10 @@ bool Renderer9::setViewport(const gl::Rectangle &viewport, float zNear, float zF return false; // Nothing to render } + float depthFront = !gl::IsTriangleMode(drawMode) ? 0.0f : (frontFace == GL_CCW ? 1.0f : -1.0f); + bool viewportChanged = mForceSetViewport || memcmp(&actualViewport, &mCurViewport, sizeof(gl::Rectangle)) != 0 || - actualZNear != mCurNear || actualZFar != mCurFar; + actualZNear != mCurNear || actualZFar != mCurFar || mCurDepthFront != depthFront; if (viewportChanged) { mDevice->SetViewport(&dxViewport); @@ -1085,6 +1111,7 @@ bool Renderer9::setViewport(const gl::Rectangle &viewport, float zNear, float zF mCurViewport = actualViewport; mCurNear = actualZNear; mCurFar = actualZFar; + mCurDepthFront = depthFront; dx_VertexConstants vc = {0}; dx_PixelConstants pc = {0}; @@ -1101,7 +1128,7 @@ bool Renderer9::setViewport(const gl::Rectangle &viewport, float zNear, float zF pc.depthFront[0] = (actualZFar - actualZNear) * 0.5f; pc.depthFront[1] = (actualZNear + actualZFar) * 0.5f; - pc.depthFront[2] = !gl::IsTriangleMode(drawMode) ? 0.0f : (frontFace == GL_CCW ? 1.0f : -1.0f);; + pc.depthFront[2] = depthFront; vc.depthRange[0] = actualZNear; vc.depthRange[1] = actualZFar; @@ -1454,7 +1481,7 @@ void Renderer9::drawLineLoop(GLsizei count, GLenum type, const GLvoid *indices, indices = static_cast<const GLubyte*>(storage->getData()) + offset; } - UINT startIndex = 0; + unsigned int startIndex = 0; if (get32BitIndexSupport()) { @@ -1488,14 +1515,14 @@ void Renderer9::drawLineLoop(GLsizei count, GLenum type, const GLvoid *indices, } void* mappedMemory = NULL; - int offset = mLineLoopIB->mapBuffer(spaceNeeded, &mappedMemory); - if (offset == -1 || mappedMemory == NULL) + unsigned int offset = 0; + if (!mLineLoopIB->mapBuffer(spaceNeeded, &mappedMemory, &offset)) { ERR("Could not map index buffer for GL_LINE_LOOP."); return gl::error(GL_OUT_OF_MEMORY); } - startIndex = static_cast<UINT>(offset) / 4; + startIndex = static_cast<unsigned int>(offset) / 4; unsigned int *data = reinterpret_cast<unsigned int*>(mappedMemory); switch (type) @@ -1569,14 +1596,14 @@ void Renderer9::drawLineLoop(GLsizei count, GLenum type, const GLvoid *indices, } void* mappedMemory = NULL; - int offset = mLineLoopIB->mapBuffer(spaceNeeded, &mappedMemory); - if (offset == -1 || mappedMemory == NULL) + unsigned int offset; + if (mLineLoopIB->mapBuffer(spaceNeeded, &mappedMemory, &offset)) { ERR("Could not map index buffer for GL_LINE_LOOP."); return gl::error(GL_OUT_OF_MEMORY); } - startIndex = static_cast<UINT>(offset) / 2; + startIndex = static_cast<unsigned int>(offset) / 2; unsigned short *data = reinterpret_cast<unsigned short*>(mappedMemory); switch (type) @@ -2007,31 +2034,19 @@ void Renderer9::releaseDeviceResources() mEventQueryPool.pop_back(); } - if (mMaskedClearSavedState) - { - mMaskedClearSavedState->Release(); - mMaskedClearSavedState = NULL; - } + SafeRelease(mMaskedClearSavedState); mVertexShaderCache.clear(); mPixelShaderCache.clear(); - delete mBlit; - mBlit = NULL; - - delete mVertexDataManager; - mVertexDataManager = NULL; - - delete mIndexDataManager; - mIndexDataManager = NULL; - - delete mLineLoopIB; - mLineLoopIB = NULL; + SafeDelete(mBlit); + SafeDelete(mVertexDataManager); + SafeDelete(mIndexDataManager); + SafeDelete(mLineLoopIB); for (int i = 0; i < NUM_NULL_COLORBUFFER_CACHE_ENTRIES; i++) { - delete mNullColorbufferCache[i].buffer; - mNullColorbufferCache[i].buffer = NULL; + SafeDelete(mNullColorbufferCache[i].buffer); } } @@ -2051,22 +2066,8 @@ bool Renderer9::isDeviceLost() // set notify to true to broadcast a message to all contexts of the device loss bool Renderer9::testDeviceLost(bool notify) { - HRESULT status = S_OK; - - if (mDeviceEx) - { - status = mDeviceEx->CheckDeviceState(NULL); - } - else if (mDevice) - { - status = mDevice->TestCooperativeLevel(); - } - else - { - // No device yet, so no reset required - } - - bool isLost = FAILED(status) || d3d9::isDeviceLostError(status); + HRESULT status = getDeviceStatusCode(); + bool isLost = (FAILED(status) || d3d9::isDeviceLostError(status)); if (isLost) { @@ -2085,7 +2086,7 @@ bool Renderer9::testDeviceLost(bool notify) return isLost; } -bool Renderer9::testDeviceResettable() +HRESULT Renderer9::getDeviceStatusCode() { HRESULT status = D3D_OK; @@ -2098,9 +2099,14 @@ bool Renderer9::testDeviceResettable() status = mDevice->TestCooperativeLevel(); } + return status; +} + +bool Renderer9::testDeviceResettable() +{ // On D3D9Ex, DEVICELOST represents a hung device that needs to be restarted // DEVICEREMOVED indicates the device has been stopped and must be recreated - switch (status) + switch (getDeviceStatusCode()) { case D3DERR_DEVICENOTRESET: case D3DERR_DEVICEHUNG: @@ -2108,8 +2114,8 @@ bool Renderer9::testDeviceResettable() case D3DERR_DEVICELOST: return (mDeviceEx != NULL); case D3DERR_DEVICEREMOVED: - UNIMPLEMENTED(); - return false; + ASSERT(mDeviceEx != NULL); + return isRemovedDeviceResettable(); default: return false; } @@ -2123,14 +2129,26 @@ bool Renderer9::resetDevice() HRESULT result = D3D_OK; bool lost = testDeviceLost(false); - int attempts = 3; + bool removedDevice = (getDeviceStatusCode() == D3DERR_DEVICEREMOVED); + + // Device Removed is a feature which is only present with D3D9Ex + ASSERT(mDeviceEx != NULL || !removedDevice); - while (lost && attempts > 0) + for (int attempts = 3; lost && attempts > 0; attempts--) { - if (mDeviceEx) + if (removedDevice) + { + // Device removed, which may trigger on driver reinstallation, + // may cause a longer wait other reset attempts before the + // system is ready to handle creating a new device. + Sleep(800); + lost = !resetRemovedDevice(); + } + else if (mDeviceEx) { Sleep(500); // Give the graphics driver some CPU time result = mDeviceEx->ResetEx(&presentParameters, NULL); + lost = testDeviceLost(false); } else { @@ -2145,10 +2163,8 @@ bool Renderer9::resetDevice() { result = mDevice->Reset(&presentParameters); } + lost = testDeviceLost(false); } - - lost = testDeviceLost(false); - attempts --; } if (FAILED(result)) @@ -2157,13 +2173,58 @@ bool Renderer9::resetDevice() return false; } - // reset device defaults - initializeDevice(); + if (removedDevice && lost) + { + ERR("Device lost reset failed multiple times"); + return false; + } + + // If the device was removed, we already finished re-initialization in resetRemovedDevice + if (!removedDevice) + { + // reset device defaults + initializeDevice(); + } + mDeviceLost = false; return true; } +bool Renderer9::isRemovedDeviceResettable() const +{ + bool success = false; + +#ifdef ANGLE_ENABLE_D3D9EX + IDirect3D9Ex *d3d9Ex = NULL; + typedef HRESULT (WINAPI *Direct3DCreate9ExFunc)(UINT, IDirect3D9Ex**); + Direct3DCreate9ExFunc Direct3DCreate9ExPtr = reinterpret_cast<Direct3DCreate9ExFunc>(GetProcAddress(mD3d9Module, "Direct3DCreate9Ex")); + + if (Direct3DCreate9ExPtr && SUCCEEDED(Direct3DCreate9ExPtr(D3D_SDK_VERSION, &d3d9Ex))) + { + D3DCAPS9 deviceCaps; + HRESULT result = d3d9Ex->GetDeviceCaps(mAdapter, mDeviceType, &deviceCaps); + success = SUCCEEDED(result); + } + + SafeRelease(d3d9Ex); +#else + ASSERT(UNREACHABLE()); +#endif + + return success; +} + +bool Renderer9::resetRemovedDevice() +{ + // From http://msdn.microsoft.com/en-us/library/windows/desktop/bb172554(v=vs.85).aspx: + // The hardware adapter has been removed. Application must destroy the device, do enumeration of + // adapters and create another Direct3D device. If application continues rendering without + // calling Reset, the rendering calls will succeed. Applies to Direct3D 9Ex only. + deinitialize(); + return (initialize() == EGL_SUCCESS); +} + DWORD Renderer9::getAdapterVendor() const { return mAdapterIdentifier.VendorId; @@ -3091,7 +3152,7 @@ ShaderExecutable *Renderer9::loadExecutable(const void *function, size_t length, return executable; } -ShaderExecutable *Renderer9::compileToExecutable(gl::InfoLog &infoLog, const char *shaderHLSL, rx::ShaderType type) +ShaderExecutable *Renderer9::compileToExecutable(gl::InfoLog &infoLog, const char *shaderHLSL, rx::ShaderType type, D3DWorkaroundType workaround) { const char *profile = NULL; @@ -3108,7 +3169,11 @@ ShaderExecutable *Renderer9::compileToExecutable(gl::InfoLog &infoLog, const cha return NULL; } - ID3DBlob *binary = (ID3DBlob*)compileToBinary(infoLog, shaderHLSL, profile, ANGLE_COMPILE_OPTIMIZATION_LEVEL, true); + // ANGLE issue 486: + // Work-around a D3D9 compiler bug that presents itself when using conditional discard, by disabling optimization + UINT optimizationFlags = (workaround == ANGLE_D3D_WORKAROUND_SM3_OPTIMIZER ? D3DCOMPILE_SKIP_OPTIMIZATION : ANGLE_COMPILE_OPTIMIZATION_LEVEL); + + ID3DBlob *binary = (ID3DBlob*)compileToBinary(infoLog, shaderHLSL, profile, optimizationFlags, true); if (!binary) return NULL; diff --git a/src/libGLESv2/renderer/Renderer9.h b/src/libGLESv2/renderer/Renderer9.h index 2873e611..1fac9b7f 100644 --- a/src/libGLESv2/renderer/Renderer9.h +++ b/src/libGLESv2/renderer/Renderer9.h @@ -170,7 +170,7 @@ class Renderer9 : public Renderer // Shader operations virtual ShaderExecutable *loadExecutable(const void *function, size_t length, rx::ShaderType type); - virtual ShaderExecutable *compileToExecutable(gl::InfoLog &infoLog, const char *shaderHLSL, rx::ShaderType type); + virtual ShaderExecutable *compileToExecutable(gl::InfoLog &infoLog, const char *shaderHLSL, rx::ShaderType type, D3DWorkaroundType workaround); // Image operations virtual Image *createImage(); @@ -198,6 +198,8 @@ class Renderer9 : public Renderer private: DISALLOW_COPY_AND_ASSIGN(Renderer9); + void deinitialize(); + void applyUniformnfv(gl::Uniform *targetUniform, const GLfloat *v); void applyUniformniv(gl::Uniform *targetUniform, const GLint *v); void applyUniformnbv(gl::Uniform *targetUniform, const GLint *v); @@ -218,6 +220,10 @@ class Renderer9 : public Renderer D3DPRESENT_PARAMETERS getDefaultPresentParameters(); void releaseDeviceResources(); + HRESULT getDeviceStatusCode(); + bool isRemovedDeviceResettable() const; + bool resetRemovedDevice(); + UINT mAdapter; D3DDEVTYPE mDeviceType; bool mSoftwareDevice; // FIXME: Deprecate @@ -298,6 +304,7 @@ class Renderer9 : public Renderer gl::Rectangle mCurViewport; float mCurNear; float mCurFar; + float mCurDepthFront; bool mForceSetBlendState; gl::BlendState mCurBlendState; diff --git a/src/libGLESv2/renderer/SwapChain.h b/src/libGLESv2/renderer/SwapChain.h index 14c0515f..f09f19b2 100644 --- a/src/libGLESv2/renderer/SwapChain.h +++ b/src/libGLESv2/renderer/SwapChain.h @@ -12,6 +12,10 @@ #include "common/angleutils.h" +#if !defined(ANGLE_FORCE_VSYNC_OFF) +#define ANGLE_FORCE_VSYNC_OFF 0 +#endif + namespace rx { diff --git a/src/libGLESv2/renderer/SwapChain11.cpp b/src/libGLESv2/renderer/SwapChain11.cpp index 87422be7..022cfe43 100644 --- a/src/libGLESv2/renderer/SwapChain11.cpp +++ b/src/libGLESv2/renderer/SwapChain11.cpp @@ -275,6 +275,7 @@ EGLint SwapChain11::resetOffscreenTexture(int backbufferWidth, int backbufferHei else { result = offscreenTextureResource->GetSharedHandle(&mShareHandle); + offscreenTextureResource->Release(); if (FAILED(result)) { @@ -464,18 +465,6 @@ EGLint SwapChain11::reset(int backbufferWidth, int backbufferHeight, EGLint swap if (mWindow) { - // We cannot create a swap chain for an HWND that is owned by a different process - DWORD currentProcessId = GetCurrentProcessId(); - DWORD wndProcessId; - GetWindowThreadProcessId(mWindow, &wndProcessId); - - if (currentProcessId != wndProcessId) - { - ERR("Could not create swap chain, window owned by different process"); - release(); - return EGL_BAD_NATIVE_WINDOW; - } - IDXGIFactory *factory = mRenderer->getDxgiFactory(); DXGI_SWAP_CHAIN_DESC swapChainDesc = {0}; @@ -507,7 +496,21 @@ EGLint SwapChain11::reset(int backbufferWidth, int backbufferHeight, EGLint swap } else { - return EGL_BAD_ALLOC; + // We cannot create a swap chain for an HWND that is owned by a different process on some versions of + // windows + DWORD currentProcessId = GetCurrentProcessId(); + DWORD wndProcessId; + GetWindowThreadProcessId(mWindow, &wndProcessId); + + if (currentProcessId != wndProcessId) + { + ERR("Could not create swap chain, window owned by different process"); + return EGL_BAD_NATIVE_WINDOW; + } + else + { + return EGL_BAD_ALLOC; + } } } @@ -667,7 +670,12 @@ EGLint SwapChain11::swapRect(EGLint x, EGLint y, EGLint width, EGLint height) // Draw deviceContext->Draw(4, 0); + +#if ANGLE_FORCE_VSYNC_OFF + result = mSwapChain->Present(0, 0); +#else result = mSwapChain->Present(mSwapInterval, 0); +#endif if (result == DXGI_ERROR_DEVICE_REMOVED) { diff --git a/src/libGLESv2/renderer/SwapChain9.cpp b/src/libGLESv2/renderer/SwapChain9.cpp index 0324d019..7b9b32b4 100644 --- a/src/libGLESv2/renderer/SwapChain9.cpp +++ b/src/libGLESv2/renderer/SwapChain9.cpp @@ -71,6 +71,9 @@ void SwapChain9::release() static DWORD convertInterval(EGLint interval) { +#if ANGLE_FORCE_VSYNC_OFF + return D3DPRESENT_INTERVAL_IMMEDIATE; +#else switch(interval) { case 0: return D3DPRESENT_INTERVAL_IMMEDIATE; @@ -82,6 +85,7 @@ static DWORD convertInterval(EGLint interval) } return D3DPRESENT_INTERVAL_DEFAULT; +#endif } EGLint SwapChain9::resize(int backbufferWidth, int backbufferHeight) @@ -308,6 +312,11 @@ EGLint SwapChain9::swapRect(EGLint x, EGLint y, EGLint width, EGLint height) device->SetSamplerState(0, D3DSAMP_ADDRESSV, D3DTADDRESS_CLAMP); device->SetFVF(D3DFVF_XYZRHW | D3DFVF_TEX1); + for (UINT streamIndex = 0; streamIndex < gl::MAX_VERTEX_ATTRIBS; streamIndex++) + { + device->SetStreamSourceFreq(streamIndex, 1); + } + D3DVIEWPORT9 viewport = {0, 0, mWidth, mHeight, 0.0f, 1.0f}; device->SetViewport(&viewport); diff --git a/src/libGLESv2/renderer/TextureStorage11.cpp b/src/libGLESv2/renderer/TextureStorage11.cpp index 408b48eb..41515ed7 100644 --- a/src/libGLESv2/renderer/TextureStorage11.cpp +++ b/src/libGLESv2/renderer/TextureStorage11.cpp @@ -549,7 +549,7 @@ RenderTarget *TextureStorage11_Cube::getRenderTarget(GLenum faceTarget, int leve D3D11_SHADER_RESOURCE_VIEW_DESC srvDesc; srvDesc.Format = mShaderResourceFormat; - srvDesc.ViewDimension = D3D11_SRV_DIMENSION_TEXTURECUBE; + srvDesc.ViewDimension = D3D11_SRV_DIMENSION_TEXTURE2DARRAY; // Will be used with Texture2D sampler, not TextureCube srvDesc.Texture2DArray.MostDetailedMip = level; srvDesc.Texture2DArray.MipLevels = 1; srvDesc.Texture2DArray.FirstArraySlice = faceIdx; diff --git a/src/libGLESv2/renderer/VertexBuffer.cpp b/src/libGLESv2/renderer/VertexBuffer.cpp index a8589465..a073d950 100644 --- a/src/libGLESv2/renderer/VertexBuffer.cpp +++ b/src/libGLESv2/renderer/VertexBuffer.cpp @@ -87,47 +87,76 @@ bool VertexBufferInterface::discard() return mVertexBuffer->discard(); } -int VertexBufferInterface::storeVertexAttributes(const gl::VertexAttribute &attrib, GLint start, GLsizei count, GLsizei instances) +bool VertexBufferInterface::storeVertexAttributes(const gl::VertexAttribute &attrib, GLint start, GLsizei count, GLsizei instances, + unsigned int *outStreamOffset) { + unsigned int spaceRequired; + if (!mVertexBuffer->getSpaceRequired(attrib, count, instances, &spaceRequired)) + { + return false; + } + + if (mWritePosition + spaceRequired < mWritePosition) + { + return false; + } + if (!reserveSpace(mReservedSpace)) { - return -1; + return false; } mReservedSpace = 0; if (!mVertexBuffer->storeVertexAttributes(attrib, start, count, instances, mWritePosition)) { - return -1; + return false; } - int oldWritePos = static_cast<int>(mWritePosition); - mWritePosition += mVertexBuffer->getSpaceRequired(attrib, count, instances); + if (outStreamOffset) + { + *outStreamOffset = mWritePosition; + } + + mWritePosition += spaceRequired; - return oldWritePos; + return true; } -int VertexBufferInterface::storeRawData(const void* data, unsigned int size) +bool VertexBufferInterface::storeRawData(const void* data, unsigned int size, unsigned int *outStreamOffset) { + if (mWritePosition + size < mWritePosition) + { + return false; + } + if (!reserveSpace(mReservedSpace)) { - return -1; + return false; } mReservedSpace = 0; if (!mVertexBuffer->storeRawData(data, size, mWritePosition)) { - return -1; + return false; + } + + if (outStreamOffset) + { + *outStreamOffset = mWritePosition; } - int oldWritePos = static_cast<int>(mWritePosition); mWritePosition += size; - return oldWritePos; + return true; } bool VertexBufferInterface::reserveVertexSpace(const gl::VertexAttribute &attribute, GLsizei count, GLsizei instances) { - unsigned int requiredSpace = mVertexBuffer->getSpaceRequired(attribute, count, instances); + unsigned int requiredSpace; + if (!mVertexBuffer->getSpaceRequired(attribute, count, instances, &requiredSpace)) + { + return false; + } // Protect against integer overflow if (mReservedSpace + requiredSpace < mReservedSpace) @@ -195,7 +224,7 @@ StaticVertexBufferInterface::~StaticVertexBufferInterface() { } -int StaticVertexBufferInterface::lookupAttribute(const gl::VertexAttribute &attribute) +bool StaticVertexBufferInterface::lookupAttribute(const gl::VertexAttribute &attribute, unsigned int *outStreamOffset) { for (unsigned int element = 0; element < mCache.size(); element++) { @@ -206,12 +235,16 @@ int StaticVertexBufferInterface::lookupAttribute(const gl::VertexAttribute &attr { if (mCache[element].attributeOffset == attribute.mOffset % attribute.stride()) { - return mCache[element].streamOffset; + if (outStreamOffset) + { + *outStreamOffset = mCache[element].streamOffset; + } + return true; } } } - return -1; + return false; } bool StaticVertexBufferInterface::reserveSpace(unsigned int size) @@ -233,13 +266,27 @@ bool StaticVertexBufferInterface::reserveSpace(unsigned int size) } } -int StaticVertexBufferInterface::storeVertexAttributes(const gl::VertexAttribute &attrib, GLint start, GLsizei count, GLsizei instances) +bool StaticVertexBufferInterface::storeVertexAttributes(const gl::VertexAttribute &attrib, GLint start, GLsizei count, GLsizei instances, + unsigned int *outStreamOffset) { - int attributeOffset = attrib.mOffset % attrib.stride(); - VertexElement element = { attrib.mType, attrib.mSize, attrib.stride(), attrib.mNormalized, attributeOffset, getWritePosition() }; - mCache.push_back(element); + unsigned int streamOffset; + if (VertexBufferInterface::storeVertexAttributes(attrib, start, count, instances, &streamOffset)) + { + int attributeOffset = attrib.mOffset % attrib.stride(); + VertexElement element = { attrib.mType, attrib.mSize, attrib.stride(), attrib.mNormalized, attributeOffset, streamOffset }; + mCache.push_back(element); - return VertexBufferInterface::storeVertexAttributes(attrib, start, count, instances); + if (outStreamOffset) + { + *outStreamOffset = streamOffset; + } + + return true; + } + else + { + return false; + } } } diff --git a/src/libGLESv2/renderer/VertexBuffer.h b/src/libGLESv2/renderer/VertexBuffer.h index c474b05c..cbafdd20 100644 --- a/src/libGLESv2/renderer/VertexBuffer.h +++ b/src/libGLESv2/renderer/VertexBuffer.h @@ -33,8 +33,8 @@ class VertexBuffer GLsizei instances, unsigned int offset) = 0; virtual bool storeRawData(const void* data, unsigned int size, unsigned int offset) = 0; - virtual unsigned int getSpaceRequired(const gl::VertexAttribute &attrib, GLsizei count, - GLsizei instances) const = 0; + virtual bool getSpaceRequired(const gl::VertexAttribute &attrib, GLsizei count, GLsizei instances, + unsigned int *outSpaceRequired) const = 0; virtual bool requiresConversion(const gl::VertexAttribute &attrib) const = 0; @@ -67,8 +67,9 @@ class VertexBufferInterface unsigned int getSerial() const; - virtual int storeVertexAttributes(const gl::VertexAttribute &attrib, GLint start, GLsizei count, GLsizei instances); - virtual int storeRawData(const void* data, unsigned int size); + virtual bool storeVertexAttributes(const gl::VertexAttribute &attrib, GLint start, GLsizei count, GLsizei instances, + unsigned int *outStreamOffset); + virtual bool storeRawData(const void* data, unsigned int size, unsigned int *outStreamOffset); VertexBuffer* getVertexBuffer() const; @@ -110,10 +111,10 @@ class StaticVertexBufferInterface : public VertexBufferInterface explicit StaticVertexBufferInterface(rx::Renderer *renderer); ~StaticVertexBufferInterface(); - int storeVertexAttributes(const gl::VertexAttribute &attrib, GLint start, GLsizei count, GLsizei instances); + bool storeVertexAttributes(const gl::VertexAttribute &attrib, GLint start, GLsizei count, GLsizei instances, + unsigned int *outStreamOffset); - // Returns the offset into the vertex buffer, or -1 if not found - int lookupAttribute(const gl::VertexAttribute &attribute); + bool lookupAttribute(const gl::VertexAttribute &attribute, unsigned int* outStreamOffset); protected: bool reserveSpace(unsigned int size); diff --git a/src/libGLESv2/renderer/VertexBuffer11.cpp b/src/libGLESv2/renderer/VertexBuffer11.cpp index 92c8755e..521da80c 100644 --- a/src/libGLESv2/renderer/VertexBuffer11.cpp +++ b/src/libGLESv2/renderer/VertexBuffer11.cpp @@ -152,18 +152,40 @@ bool VertexBuffer11::storeRawData(const void* data, unsigned int size, unsigned } } -unsigned int VertexBuffer11::getSpaceRequired(const gl::VertexAttribute &attrib, GLsizei count, - GLsizei instances) const +bool VertexBuffer11::getSpaceRequired(const gl::VertexAttribute &attrib, GLsizei count, + GLsizei instances, unsigned int *outSpaceRequired) const { unsigned int elementSize = getVertexConversion(attrib).outputElementSize; + unsigned int elementCount = 0; if (instances == 0 || attrib.mDivisor == 0) { - return elementSize * count; + elementCount = count; } else { - return elementSize * ((instances + attrib.mDivisor - 1) / attrib.mDivisor); + if (static_cast<unsigned int>(instances) < std::numeric_limits<unsigned int>::max() - (attrib.mDivisor - 1)) + { + // Round up + elementCount = (static_cast<unsigned int>(instances) + (attrib.mDivisor - 1)) / attrib.mDivisor; + } + else + { + elementCount = instances / attrib.mDivisor; + } + } + + if (elementSize <= std::numeric_limits<unsigned int>::max() / elementCount) + { + if (outSpaceRequired) + { + *outSpaceRequired = elementSize * elementCount; + } + return true; + } + else + { + return false; } } diff --git a/src/libGLESv2/renderer/VertexBuffer11.h b/src/libGLESv2/renderer/VertexBuffer11.h index 75e02507..eceb426e 100644 --- a/src/libGLESv2/renderer/VertexBuffer11.h +++ b/src/libGLESv2/renderer/VertexBuffer11.h @@ -26,10 +26,11 @@ class VertexBuffer11 : public VertexBuffer static VertexBuffer11 *makeVertexBuffer11(VertexBuffer *vetexBuffer); virtual bool storeVertexAttributes(const gl::VertexAttribute &attrib, GLint start, GLsizei count, GLsizei instances, - unsigned int offset); + unsigned int offset); virtual bool storeRawData(const void* data, unsigned int size, unsigned int offset); - virtual unsigned int getSpaceRequired(const gl::VertexAttribute &attrib, GLsizei count, GLsizei instances) const; + virtual bool getSpaceRequired(const gl::VertexAttribute &attrib, GLsizei count, GLsizei instances, + unsigned int *outSpaceRequired) const; virtual bool requiresConversion(const gl::VertexAttribute &attrib) const; @@ -70,4 +71,4 @@ class VertexBuffer11 : public VertexBuffer } -#endif // LIBGLESV2_RENDERER_VERTEXBUFFER11_H_
\ No newline at end of file +#endif // LIBGLESV2_RENDERER_VERTEXBUFFER11_H_ diff --git a/src/libGLESv2/renderer/VertexBuffer9.cpp b/src/libGLESv2/renderer/VertexBuffer9.cpp index 76dc73e3..5a792b97 100644 --- a/src/libGLESv2/renderer/VertexBuffer9.cpp +++ b/src/libGLESv2/renderer/VertexBuffer9.cpp @@ -95,7 +95,14 @@ bool VertexBuffer9::storeVertexAttributes(const gl::VertexAttribute &attrib, GLi DWORD lockFlags = mDynamicUsage ? D3DLOCK_NOOVERWRITE : 0; void *mapPtr = NULL; - HRESULT result = mVertexBuffer->Lock(offset, spaceRequired(attrib, count, instances), &mapPtr, lockFlags); + + unsigned int mapSize; + if (!spaceRequired(attrib, count, instances, &mapSize)) + { + return false; + } + + HRESULT result = mVertexBuffer->Lock(offset, mapSize, &mapPtr, lockFlags); if (FAILED(result)) { @@ -167,19 +174,21 @@ bool VertexBuffer9::storeRawData(const void* data, unsigned int size, unsigned i } } -unsigned int VertexBuffer9::getSpaceRequired(const gl::VertexAttribute &attrib, GLsizei count, GLsizei instances) const +bool VertexBuffer9::getSpaceRequired(const gl::VertexAttribute &attrib, GLsizei count, GLsizei instances, + unsigned int *outSpaceRequired) const { - return spaceRequired(attrib, count, instances); + return spaceRequired(attrib, count, instances, outSpaceRequired); } bool VertexBuffer9::requiresConversion(const gl::VertexAttribute &attrib) const { - return formatConverter(attrib).identity; + return !formatConverter(attrib).identity; } unsigned int VertexBuffer9::getVertexSize(const gl::VertexAttribute &attrib) const { - return spaceRequired(attrib, 1, 0); + unsigned int spaceRequired; + return getSpaceRequired(attrib, 1, 0, &spaceRequired) ? spaceRequired : 0; } D3DDECLTYPE VertexBuffer9::getDeclType(const gl::VertexAttribute &attrib) const @@ -469,17 +478,52 @@ const VertexBuffer9::FormatConverter &VertexBuffer9::formatConverter(const gl::V return mFormatConverters[typeIndex(attribute.mType)][attribute.mNormalized][attribute.mSize - 1]; } -unsigned int VertexBuffer9::spaceRequired(const gl::VertexAttribute &attrib, std::size_t count, GLsizei instances) +bool VertexBuffer9::spaceRequired(const gl::VertexAttribute &attrib, std::size_t count, GLsizei instances, + unsigned int *outSpaceRequired) { unsigned int elementSize = formatConverter(attrib).outputElementSize; - if (instances == 0 || attrib.mDivisor == 0) + if (attrib.mArrayEnabled) { - return elementSize * count; + unsigned int elementCount = 0; + if (instances == 0 || attrib.mDivisor == 0) + { + elementCount = count; + } + else + { + if (static_cast<unsigned int>(instances) < std::numeric_limits<unsigned int>::max() - (attrib.mDivisor - 1)) + { + // Round up + elementCount = (static_cast<unsigned int>(instances) + (attrib.mDivisor - 1)) / attrib.mDivisor; + } + else + { + elementCount = static_cast<unsigned int>(instances) / attrib.mDivisor; + } + } + + if (elementSize <= std::numeric_limits<unsigned int>::max() / elementCount) + { + if (outSpaceRequired) + { + *outSpaceRequired = elementSize * elementCount; + } + return true; + } + else + { + return false; + } } else { - return elementSize * ((instances + attrib.mDivisor - 1) / attrib.mDivisor); + const unsigned int elementSize = 4; + if (outSpaceRequired) + { + *outSpaceRequired = elementSize * 4; + } + return true; } } diff --git a/src/libGLESv2/renderer/VertexBuffer9.h b/src/libGLESv2/renderer/VertexBuffer9.h index f771635b..2f88117b 100644 --- a/src/libGLESv2/renderer/VertexBuffer9.h +++ b/src/libGLESv2/renderer/VertexBuffer9.h @@ -29,7 +29,7 @@ class VertexBuffer9 : public VertexBuffer unsigned int offset); virtual bool storeRawData(const void* data, unsigned int size, unsigned int offset); - virtual unsigned int getSpaceRequired(const gl::VertexAttribute &attrib, GLsizei count, GLsizei instances) const; + virtual bool getSpaceRequired(const gl::VertexAttribute &attrib, GLsizei count, GLsizei instances, unsigned int *outSpaceRequired) const; virtual bool requiresConversion(const gl::VertexAttribute &attrib) const; @@ -82,7 +82,8 @@ class VertexBuffer9 : public VertexBuffer static unsigned int typeIndex(GLenum type); static const FormatConverter &formatConverter(const gl::VertexAttribute &attribute); - static unsigned int spaceRequired(const gl::VertexAttribute &attrib, std::size_t count, GLsizei instances); + static bool spaceRequired(const gl::VertexAttribute &attrib, std::size_t count, GLsizei instances, + unsigned int *outSpaceRequired); }; } diff --git a/src/libGLESv2/renderer/VertexDataManager.cpp b/src/libGLESv2/renderer/VertexDataManager.cpp index fd869b10..8034aed8 100644 --- a/src/libGLESv2/renderer/VertexDataManager.cpp +++ b/src/libGLESv2/renderer/VertexDataManager.cpp @@ -26,12 +26,32 @@ namespace namespace rx { -static int elementsInBuffer(const gl::VertexAttribute &attribute, int size) +static int elementsInBuffer(const gl::VertexAttribute &attribute, unsigned int size) { - int stride = attribute.stride(); + // Size cannot be larger than a GLsizei + if (size > static_cast<unsigned int>(std::numeric_limits<int>::max())) + { + size = static_cast<unsigned int>(std::numeric_limits<int>::max()); + } + + GLsizei stride = attribute.stride(); return (size - attribute.mOffset % stride + (stride - attribute.typeSize())) / stride; } +static int StreamingBufferElementCount(const gl::VertexAttribute &attribute, int vertexDrawCount, int instanceDrawCount) +{ + // For instanced rendering, we draw "instanceDrawCount" sets of "vertexDrawCount" vertices. + // + // A vertex attribute with a positive divisor loads one instanced vertex for every set of + // non-instanced vertices, and the instanced vertex index advances once every "mDivisor" instances. + if (instanceDrawCount > 0 && attribute.mDivisor > 0) + { + return instanceDrawCount / attribute.mDivisor; + } + + return vertexDrawCount; +} + VertexDataManager::VertexDataManager(Renderer *renderer) : mRenderer(renderer) { for (int i = 0; i < gl::MAX_VERTEX_ATTRIBS; i++) @@ -92,7 +112,7 @@ GLenum VertexDataManager::prepareVertexData(const gl::VertexAttribute attribs[], gl::Buffer *buffer = attribs[i].mBoundBuffer.get(); StaticVertexBufferInterface *staticBuffer = buffer ? buffer->getStaticVertexBuffer() : NULL; - if (staticBuffer && staticBuffer->getBufferSize() > 0 && staticBuffer->lookupAttribute(attribs[i]) == -1 && + if (staticBuffer && staticBuffer->getBufferSize() > 0 && !staticBuffer->lookupAttribute(attribs[i], NULL) && !directStoragePossible(staticBuffer, attribs[i])) { buffer->invalidateStaticData(); @@ -124,7 +144,16 @@ GLenum VertexDataManager::prepareVertexData(const gl::VertexAttribute attribs[], } else { - if (!mStreamingBuffer->reserveVertexSpace(attribs[i], count, instances)) + int totalCount = StreamingBufferElementCount(attribs[i], count, instances); + + // Undefined behaviour: + // We can return INVALID_OPERATION if our vertex attribute does not have enough backing data. + if (buffer && elementsInBuffer(attribs[i], buffer->size()) < totalCount) + { + return GL_INVALID_OPERATION; + } + + if (!mStreamingBuffer->reserveVertexSpace(attribs[i], totalCount, instances)) { return GL_OUT_OF_MEMORY; } @@ -155,7 +184,7 @@ GLenum VertexDataManager::prepareVertexData(const gl::VertexAttribute attribs[], BufferStorage *storage = buffer ? buffer->getStorage() : NULL; bool directStorage = directStoragePossible(vertexBuffer, attribs[i]); - std::size_t streamOffset = -1; + unsigned int streamOffset = 0; unsigned int outputElementSize = 0; if (directStorage) @@ -166,37 +195,40 @@ GLenum VertexDataManager::prepareVertexData(const gl::VertexAttribute attribs[], } else if (staticBuffer) { - streamOffset = staticBuffer->lookupAttribute(attribs[i]); - outputElementSize = staticBuffer->getVertexBuffer()->getSpaceRequired(attribs[i], 1, 0); + if (!staticBuffer->getVertexBuffer()->getSpaceRequired(attribs[i], 1, 0, &outputElementSize)) + { + return GL_OUT_OF_MEMORY; + } - if (streamOffset == -1) + if (!staticBuffer->lookupAttribute(attribs[i], &streamOffset)) { // Convert the entire buffer int totalCount = elementsInBuffer(attribs[i], storage->getSize()); int startIndex = attribs[i].mOffset / attribs[i].stride(); - streamOffset = staticBuffer->storeVertexAttributes(attribs[i], -startIndex, totalCount, 0); + if (!staticBuffer->storeVertexAttributes(attribs[i], -startIndex, totalCount, 0, &streamOffset)) + { + return GL_OUT_OF_MEMORY; + } } - if (streamOffset != -1) + unsigned int firstElementOffset = (attribs[i].mOffset / attribs[i].stride()) * outputElementSize; + unsigned int startOffset = (instances == 0 || attribs[i].mDivisor == 0) ? start * outputElementSize : 0; + if (streamOffset + firstElementOffset + startOffset < streamOffset) { - streamOffset += (attribs[i].mOffset / attribs[i].stride()) * outputElementSize; - - if (instances == 0 || attribs[i].mDivisor == 0) - { - streamOffset += start * outputElementSize; - } + return GL_OUT_OF_MEMORY; } + + streamOffset += firstElementOffset + startOffset; } else { - outputElementSize = mStreamingBuffer->getVertexBuffer()->getSpaceRequired(attribs[i], 1, 0); - streamOffset = mStreamingBuffer->storeVertexAttributes(attribs[i], start, count, instances); - } - - if (streamOffset == -1) - { - return GL_OUT_OF_MEMORY; + int totalCount = StreamingBufferElementCount(attribs[i], count, instances); + if (!mStreamingBuffer->getVertexBuffer()->getSpaceRequired(attribs[i], 1, 0, &outputElementSize) || + !mStreamingBuffer->storeVertexAttributes(attribs[i], start, totalCount, instances, &streamOffset)) + { + return GL_OUT_OF_MEMORY; + } } translated[i].storage = directStorage ? storage : NULL; @@ -227,12 +259,17 @@ GLenum VertexDataManager::prepareVertexData(const gl::VertexAttribute attribs[], { return GL_OUT_OF_MEMORY; } - int streamOffset = buffer->storeRawData(attribs[i].mCurrentValue, requiredSpace); - if (streamOffset == -1) + + unsigned int streamOffset; + if (!buffer->storeRawData(attribs[i].mCurrentValue, requiredSpace, &streamOffset)) { return GL_OUT_OF_MEMORY; } + mCurrentValue[i][0] = attribs[i].mCurrentValue[0]; + mCurrentValue[i][1] = attribs[i].mCurrentValue[1]; + mCurrentValue[i][2] = attribs[i].mCurrentValue[2]; + mCurrentValue[i][3] = attribs[i].mCurrentValue[3]; mCurrentValueOffsets[i] = streamOffset; } diff --git a/src/libGLESv2/renderer/VertexDataManager.h b/src/libGLESv2/renderer/VertexDataManager.h index 28387e6b..1a878655 100644 --- a/src/libGLESv2/renderer/VertexDataManager.h +++ b/src/libGLESv2/renderer/VertexDataManager.h @@ -31,8 +31,8 @@ struct TranslatedAttribute bool active; const gl::VertexAttribute *attribute; - UINT offset; - UINT stride; // 0 means not to advance the read pointer at all + unsigned int offset; + unsigned int stride; // 0 means not to advance the read pointer at all VertexBuffer *vertexBuffer; BufferStorage *storage; diff --git a/src/libGLESv2/renderer/shaders/compiled/clear11vs.h b/src/libGLESv2/renderer/shaders/compiled/clear11vs.h index 9f9c7017..c3a3f38a 100644 --- a/src/libGLESv2/renderer/shaders/compiled/clear11vs.h +++ b/src/libGLESv2/renderer/shaders/compiled/clear11vs.h @@ -1,133 +1,131 @@ -#if 0
-//
-// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
-//
-//
-// fxc /E VS_Clear /T vs_4_0 /Fh compiled/clear11vs.h Clear11.hlsl
-//
-//
-//
-// Input signature:
-//
-// Name Index Mask Register SysValue Format Used
-// -------------------- ----- ------ -------- -------- ------ ------
-// POSITION 0 xyz 0 NONE float xyz
-// COLOR 0 xyzw 1 NONE float xyzw
-//
-//
-// Output signature:
-//
-// Name Index Mask Register SysValue Format Used
-// -------------------- ----- ------ -------- -------- ------ ------
-// SV_POSITION 0 xyzw 0 POS float xyzw
-// COLOR 0 xyzw 1 NONE float xyzw
-//
-vs_4_0
-dcl_input v0.xyz
-dcl_input v1.xyzw
-dcl_output_siv o0.xyzw, position
-dcl_output o1.xyzw
-mov o0.xyz, v0.xyzx
-mov o0.w, l(1.000000)
-mov o1.xyzw, v1.xyzw
-ret
-// Approximately 4 instruction slots used
-#endif
-
-const BYTE g_VS_Clear[] =
-{
- 68, 88, 66, 67, 109, 138,
- 105, 83, 86, 190, 83, 125,
- 72, 102, 194, 136, 46, 69,
- 17, 121, 1, 0, 0, 0,
- 48, 2, 0, 0, 5, 0,
- 0, 0, 52, 0, 0, 0,
- 140, 0, 0, 0, 220, 0,
- 0, 0, 48, 1, 0, 0,
- 180, 1, 0, 0, 82, 68,
- 69, 70, 80, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 28, 0, 0, 0, 0, 4,
- 254, 255, 0, 1, 0, 0,
- 28, 0, 0, 0, 77, 105,
- 99, 114, 111, 115, 111, 102,
- 116, 32, 40, 82, 41, 32,
- 72, 76, 83, 76, 32, 83,
- 104, 97, 100, 101, 114, 32,
- 67, 111, 109, 112, 105, 108,
- 101, 114, 32, 57, 46, 50,
- 57, 46, 57, 53, 50, 46,
- 51, 49, 49, 49, 0, 171,
- 171, 171, 73, 83, 71, 78,
- 72, 0, 0, 0, 2, 0,
- 0, 0, 8, 0, 0, 0,
- 56, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 3, 0, 0, 0, 0, 0,
- 0, 0, 7, 7, 0, 0,
- 65, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 3, 0, 0, 0, 1, 0,
- 0, 0, 15, 15, 0, 0,
- 80, 79, 83, 73, 84, 73,
- 79, 78, 0, 67, 79, 76,
- 79, 82, 0, 171, 79, 83,
- 71, 78, 76, 0, 0, 0,
- 2, 0, 0, 0, 8, 0,
- 0, 0, 56, 0, 0, 0,
- 0, 0, 0, 0, 1, 0,
- 0, 0, 3, 0, 0, 0,
- 0, 0, 0, 0, 15, 0,
- 0, 0, 68, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 3, 0, 0, 0,
- 1, 0, 0, 0, 15, 0,
- 0, 0, 83, 86, 95, 80,
- 79, 83, 73, 84, 73, 79,
- 78, 0, 67, 79, 76, 79,
- 82, 0, 171, 171, 83, 72,
- 68, 82, 124, 0, 0, 0,
- 64, 0, 1, 0, 31, 0,
- 0, 0, 95, 0, 0, 3,
- 114, 16, 16, 0, 0, 0,
- 0, 0, 95, 0, 0, 3,
- 242, 16, 16, 0, 1, 0,
- 0, 0, 103, 0, 0, 4,
- 242, 32, 16, 0, 0, 0,
- 0, 0, 1, 0, 0, 0,
- 101, 0, 0, 3, 242, 32,
- 16, 0, 1, 0, 0, 0,
- 54, 0, 0, 5, 114, 32,
- 16, 0, 0, 0, 0, 0,
- 70, 18, 16, 0, 0, 0,
- 0, 0, 54, 0, 0, 5,
- 130, 32, 16, 0, 0, 0,
- 0, 0, 1, 64, 0, 0,
- 0, 0, 128, 63, 54, 0,
- 0, 5, 242, 32, 16, 0,
- 1, 0, 0, 0, 70, 30,
- 16, 0, 1, 0, 0, 0,
- 62, 0, 0, 1, 83, 84,
- 65, 84, 116, 0, 0, 0,
- 4, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 4, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 1, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 3, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0
-};
+#if 0 +// +// Generated by Microsoft (R) HLSL Shader Compiler 9.30.9200.16384 +// +// +/// +// +// Input signature: +// +// Name Index Mask Register SysValue Format Used +// -------------------- ----- ------ -------- -------- ------- ------ +// POSITION 0 xyz 0 NONE float xyz +// COLOR 0 xyzw 1 NONE float xyzw +// +// +// Output signature: +// +// Name Index Mask Register SysValue Format Used +// -------------------- ----- ------ -------- -------- ------- ------ +// SV_POSITION 0 xyzw 0 POS float xyzw +// COLOR 0 xyzw 1 NONE float xyzw +// +vs_4_0 +dcl_input v0.xyz +dcl_input v1.xyzw +dcl_output_siv o0.xyzw, position +dcl_output o1.xyzw +mov o0.xyz, v0.xyzx +mov o0.w, l(1.000000) +mov o1.xyzw, v1.xyzw +ret +// Approximately 4 instruction slots used +#endif + +const BYTE g_VS_Clear[] = +{ + 68, 88, 66, 67, 97, 5, + 13, 163, 160, 254, 95, 127, + 30, 194, 121, 144, 236, 185, + 59, 29, 1, 0, 0, 0, + 48, 2, 0, 0, 5, 0, + 0, 0, 52, 0, 0, 0, + 140, 0, 0, 0, 220, 0, + 0, 0, 48, 1, 0, 0, + 180, 1, 0, 0, 82, 68, + 69, 70, 80, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 28, 0, 0, 0, 0, 4, + 254, 255, 0, 1, 0, 0, + 28, 0, 0, 0, 77, 105, + 99, 114, 111, 115, 111, 102, + 116, 32, 40, 82, 41, 32, + 72, 76, 83, 76, 32, 83, + 104, 97, 100, 101, 114, 32, + 67, 111, 109, 112, 105, 108, + 101, 114, 32, 57, 46, 51, + 48, 46, 57, 50, 48, 48, + 46, 49, 54, 51, 56, 52, + 0, 171, 73, 83, 71, 78, + 72, 0, 0, 0, 2, 0, + 0, 0, 8, 0, 0, 0, + 56, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 0, 0, + 0, 0, 7, 7, 0, 0, + 65, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 1, 0, + 0, 0, 15, 15, 0, 0, + 80, 79, 83, 73, 84, 73, + 79, 78, 0, 67, 79, 76, + 79, 82, 0, 171, 79, 83, + 71, 78, 76, 0, 0, 0, + 2, 0, 0, 0, 8, 0, + 0, 0, 56, 0, 0, 0, + 0, 0, 0, 0, 1, 0, + 0, 0, 3, 0, 0, 0, + 0, 0, 0, 0, 15, 0, + 0, 0, 68, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 3, 0, 0, 0, + 1, 0, 0, 0, 15, 0, + 0, 0, 83, 86, 95, 80, + 79, 83, 73, 84, 73, 79, + 78, 0, 67, 79, 76, 79, + 82, 0, 171, 171, 83, 72, + 68, 82, 124, 0, 0, 0, + 64, 0, 1, 0, 31, 0, + 0, 0, 95, 0, 0, 3, + 114, 16, 16, 0, 0, 0, + 0, 0, 95, 0, 0, 3, + 242, 16, 16, 0, 1, 0, + 0, 0, 103, 0, 0, 4, + 242, 32, 16, 0, 0, 0, + 0, 0, 1, 0, 0, 0, + 101, 0, 0, 3, 242, 32, + 16, 0, 1, 0, 0, 0, + 54, 0, 0, 5, 114, 32, + 16, 0, 0, 0, 0, 0, + 70, 18, 16, 0, 0, 0, + 0, 0, 54, 0, 0, 5, + 130, 32, 16, 0, 0, 0, + 0, 0, 1, 64, 0, 0, + 0, 0, 128, 63, 54, 0, + 0, 5, 242, 32, 16, 0, + 1, 0, 0, 0, 70, 30, + 16, 0, 1, 0, 0, 0, + 62, 0, 0, 1, 83, 84, + 65, 84, 116, 0, 0, 0, + 4, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 4, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 4, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0 +}; diff --git a/src/libGLESv2/renderer/shaders/compiled/clearmultiple11ps.h b/src/libGLESv2/renderer/shaders/compiled/clearmultiple11ps.h index c70eebb8..82a1493f 100644 --- a/src/libGLESv2/renderer/shaders/compiled/clearmultiple11ps.h +++ b/src/libGLESv2/renderer/shaders/compiled/clearmultiple11ps.h @@ -1,199 +1,196 @@ -#if 0
-//
-// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
-//
-//
-// fxc /E PS_ClearMultiple /T ps_4_0 /Fh compiled/clearmultiple11ps.h
-// Clear11.hlsl
-//
-//
-//
-// Input signature:
-//
-// Name Index Mask Register SysValue Format Used
-// -------------------- ----- ------ -------- -------- ------ ------
-// SV_POSITION 0 xyzw 0 POS float
-// COLOR 0 xyzw 1 NONE float xyzw
-//
-//
-// Output signature:
-//
-// Name Index Mask Register SysValue Format Used
-// -------------------- ----- ------ -------- -------- ------ ------
-// SV_TARGET 0 xyzw 0 TARGET float xyzw
-// SV_TARGET 1 xyzw 1 TARGET float xyzw
-// SV_TARGET 2 xyzw 2 TARGET float xyzw
-// SV_TARGET 3 xyzw 3 TARGET float xyzw
-// SV_TARGET 4 xyzw 4 TARGET float xyzw
-// SV_TARGET 5 xyzw 5 TARGET float xyzw
-// SV_TARGET 6 xyzw 6 TARGET float xyzw
-// SV_TARGET 7 xyzw 7 TARGET float xyzw
-//
-ps_4_0
-dcl_input_ps linear v1.xyzw
-dcl_output o0.xyzw
-dcl_output o1.xyzw
-dcl_output o2.xyzw
-dcl_output o3.xyzw
-dcl_output o4.xyzw
-dcl_output o5.xyzw
-dcl_output o6.xyzw
-dcl_output o7.xyzw
-mov o0.xyzw, v1.xyzw
-mov o1.xyzw, v1.xyzw
-mov o2.xyzw, v1.xyzw
-mov o3.xyzw, v1.xyzw
-mov o4.xyzw, v1.xyzw
-mov o5.xyzw, v1.xyzw
-mov o6.xyzw, v1.xyzw
-mov o7.xyzw, v1.xyzw
-ret
-// Approximately 9 instruction slots used
-#endif
-
-const BYTE g_PS_ClearMultiple[] =
-{
- 68, 88, 66, 67, 146, 246,
- 236, 240, 50, 40, 87, 55,
- 73, 140, 251, 200, 8, 22,
- 173, 117, 1, 0, 0, 0,
- 88, 3, 0, 0, 5, 0,
- 0, 0, 52, 0, 0, 0,
- 140, 0, 0, 0, 224, 0,
- 0, 0, 188, 1, 0, 0,
- 220, 2, 0, 0, 82, 68,
- 69, 70, 80, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 28, 0, 0, 0, 0, 4,
- 255, 255, 0, 1, 0, 0,
- 28, 0, 0, 0, 77, 105,
- 99, 114, 111, 115, 111, 102,
- 116, 32, 40, 82, 41, 32,
- 72, 76, 83, 76, 32, 83,
- 104, 97, 100, 101, 114, 32,
- 67, 111, 109, 112, 105, 108,
- 101, 114, 32, 57, 46, 50,
- 57, 46, 57, 53, 50, 46,
- 51, 49, 49, 49, 0, 171,
- 171, 171, 73, 83, 71, 78,
- 76, 0, 0, 0, 2, 0,
- 0, 0, 8, 0, 0, 0,
- 56, 0, 0, 0, 0, 0,
- 0, 0, 1, 0, 0, 0,
- 3, 0, 0, 0, 0, 0,
- 0, 0, 15, 0, 0, 0,
- 68, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 3, 0, 0, 0, 1, 0,
- 0, 0, 15, 15, 0, 0,
- 83, 86, 95, 80, 79, 83,
- 73, 84, 73, 79, 78, 0,
- 67, 79, 76, 79, 82, 0,
- 171, 171, 79, 83, 71, 78,
- 212, 0, 0, 0, 8, 0,
- 0, 0, 8, 0, 0, 0,
- 200, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 3, 0, 0, 0, 0, 0,
- 0, 0, 15, 0, 0, 0,
- 200, 0, 0, 0, 1, 0,
- 0, 0, 0, 0, 0, 0,
- 3, 0, 0, 0, 1, 0,
- 0, 0, 15, 0, 0, 0,
- 200, 0, 0, 0, 2, 0,
- 0, 0, 0, 0, 0, 0,
- 3, 0, 0, 0, 2, 0,
- 0, 0, 15, 0, 0, 0,
- 200, 0, 0, 0, 3, 0,
- 0, 0, 0, 0, 0, 0,
- 3, 0, 0, 0, 3, 0,
- 0, 0, 15, 0, 0, 0,
- 200, 0, 0, 0, 4, 0,
- 0, 0, 0, 0, 0, 0,
- 3, 0, 0, 0, 4, 0,
- 0, 0, 15, 0, 0, 0,
- 200, 0, 0, 0, 5, 0,
- 0, 0, 0, 0, 0, 0,
- 3, 0, 0, 0, 5, 0,
- 0, 0, 15, 0, 0, 0,
- 200, 0, 0, 0, 6, 0,
- 0, 0, 0, 0, 0, 0,
- 3, 0, 0, 0, 6, 0,
- 0, 0, 15, 0, 0, 0,
- 200, 0, 0, 0, 7, 0,
- 0, 0, 0, 0, 0, 0,
- 3, 0, 0, 0, 7, 0,
- 0, 0, 15, 0, 0, 0,
- 83, 86, 95, 84, 65, 82,
- 71, 69, 84, 0, 171, 171,
- 83, 72, 68, 82, 24, 1,
- 0, 0, 64, 0, 0, 0,
- 70, 0, 0, 0, 98, 16,
- 0, 3, 242, 16, 16, 0,
- 1, 0, 0, 0, 101, 0,
- 0, 3, 242, 32, 16, 0,
- 0, 0, 0, 0, 101, 0,
- 0, 3, 242, 32, 16, 0,
- 1, 0, 0, 0, 101, 0,
- 0, 3, 242, 32, 16, 0,
- 2, 0, 0, 0, 101, 0,
- 0, 3, 242, 32, 16, 0,
- 3, 0, 0, 0, 101, 0,
- 0, 3, 242, 32, 16, 0,
- 4, 0, 0, 0, 101, 0,
- 0, 3, 242, 32, 16, 0,
- 5, 0, 0, 0, 101, 0,
- 0, 3, 242, 32, 16, 0,
- 6, 0, 0, 0, 101, 0,
- 0, 3, 242, 32, 16, 0,
- 7, 0, 0, 0, 54, 0,
- 0, 5, 242, 32, 16, 0,
- 0, 0, 0, 0, 70, 30,
- 16, 0, 1, 0, 0, 0,
- 54, 0, 0, 5, 242, 32,
- 16, 0, 1, 0, 0, 0,
- 70, 30, 16, 0, 1, 0,
- 0, 0, 54, 0, 0, 5,
- 242, 32, 16, 0, 2, 0,
- 0, 0, 70, 30, 16, 0,
- 1, 0, 0, 0, 54, 0,
- 0, 5, 242, 32, 16, 0,
- 3, 0, 0, 0, 70, 30,
- 16, 0, 1, 0, 0, 0,
- 54, 0, 0, 5, 242, 32,
- 16, 0, 4, 0, 0, 0,
- 70, 30, 16, 0, 1, 0,
- 0, 0, 54, 0, 0, 5,
- 242, 32, 16, 0, 5, 0,
- 0, 0, 70, 30, 16, 0,
- 1, 0, 0, 0, 54, 0,
- 0, 5, 242, 32, 16, 0,
- 6, 0, 0, 0, 70, 30,
- 16, 0, 1, 0, 0, 0,
- 54, 0, 0, 5, 242, 32,
- 16, 0, 7, 0, 0, 0,
- 70, 30, 16, 0, 1, 0,
- 0, 0, 62, 0, 0, 1,
- 83, 84, 65, 84, 116, 0,
- 0, 0, 9, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 9, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 1, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 8, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0
-};
+#if 0 +// +// Generated by Microsoft (R) HLSL Shader Compiler 9.30.9200.16384 +// +// +/// +// +// Input signature: +// +// Name Index Mask Register SysValue Format Used +// -------------------- ----- ------ -------- -------- ------- ------ +// SV_POSITION 0 xyzw 0 POS float +// COLOR 0 xyzw 1 NONE float xyzw +// +// +// Output signature: +// +// Name Index Mask Register SysValue Format Used +// -------------------- ----- ------ -------- -------- ------- ------ +// SV_TARGET 0 xyzw 0 TARGET float xyzw +// SV_TARGET 1 xyzw 1 TARGET float xyzw +// SV_TARGET 2 xyzw 2 TARGET float xyzw +// SV_TARGET 3 xyzw 3 TARGET float xyzw +// SV_TARGET 4 xyzw 4 TARGET float xyzw +// SV_TARGET 5 xyzw 5 TARGET float xyzw +// SV_TARGET 6 xyzw 6 TARGET float xyzw +// SV_TARGET 7 xyzw 7 TARGET float xyzw +// +ps_4_0 +dcl_input_ps linear v1.xyzw +dcl_output o0.xyzw +dcl_output o1.xyzw +dcl_output o2.xyzw +dcl_output o3.xyzw +dcl_output o4.xyzw +dcl_output o5.xyzw +dcl_output o6.xyzw +dcl_output o7.xyzw +mov o0.xyzw, v1.xyzw +mov o1.xyzw, v1.xyzw +mov o2.xyzw, v1.xyzw +mov o3.xyzw, v1.xyzw +mov o4.xyzw, v1.xyzw +mov o5.xyzw, v1.xyzw +mov o6.xyzw, v1.xyzw +mov o7.xyzw, v1.xyzw +ret +// Approximately 9 instruction slots used +#endif + +const BYTE g_PS_ClearMultiple[] = +{ + 68, 88, 66, 67, 92, 54, + 120, 105, 166, 196, 132, 158, + 209, 33, 185, 122, 8, 189, + 145, 114, 1, 0, 0, 0, + 88, 3, 0, 0, 5, 0, + 0, 0, 52, 0, 0, 0, + 140, 0, 0, 0, 224, 0, + 0, 0, 188, 1, 0, 0, + 220, 2, 0, 0, 82, 68, + 69, 70, 80, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 28, 0, 0, 0, 0, 4, + 255, 255, 0, 1, 0, 0, + 28, 0, 0, 0, 77, 105, + 99, 114, 111, 115, 111, 102, + 116, 32, 40, 82, 41, 32, + 72, 76, 83, 76, 32, 83, + 104, 97, 100, 101, 114, 32, + 67, 111, 109, 112, 105, 108, + 101, 114, 32, 57, 46, 51, + 48, 46, 57, 50, 48, 48, + 46, 49, 54, 51, 56, 52, + 0, 171, 73, 83, 71, 78, + 76, 0, 0, 0, 2, 0, + 0, 0, 8, 0, 0, 0, + 56, 0, 0, 0, 0, 0, + 0, 0, 1, 0, 0, 0, + 3, 0, 0, 0, 0, 0, + 0, 0, 15, 0, 0, 0, + 68, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 1, 0, + 0, 0, 15, 15, 0, 0, + 83, 86, 95, 80, 79, 83, + 73, 84, 73, 79, 78, 0, + 67, 79, 76, 79, 82, 0, + 171, 171, 79, 83, 71, 78, + 212, 0, 0, 0, 8, 0, + 0, 0, 8, 0, 0, 0, + 200, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 0, 0, + 0, 0, 15, 0, 0, 0, + 200, 0, 0, 0, 1, 0, + 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 1, 0, + 0, 0, 15, 0, 0, 0, + 200, 0, 0, 0, 2, 0, + 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 2, 0, + 0, 0, 15, 0, 0, 0, + 200, 0, 0, 0, 3, 0, + 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 3, 0, + 0, 0, 15, 0, 0, 0, + 200, 0, 0, 0, 4, 0, + 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 4, 0, + 0, 0, 15, 0, 0, 0, + 200, 0, 0, 0, 5, 0, + 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 5, 0, + 0, 0, 15, 0, 0, 0, + 200, 0, 0, 0, 6, 0, + 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 6, 0, + 0, 0, 15, 0, 0, 0, + 200, 0, 0, 0, 7, 0, + 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 7, 0, + 0, 0, 15, 0, 0, 0, + 83, 86, 95, 84, 65, 82, + 71, 69, 84, 0, 171, 171, + 83, 72, 68, 82, 24, 1, + 0, 0, 64, 0, 0, 0, + 70, 0, 0, 0, 98, 16, + 0, 3, 242, 16, 16, 0, + 1, 0, 0, 0, 101, 0, + 0, 3, 242, 32, 16, 0, + 0, 0, 0, 0, 101, 0, + 0, 3, 242, 32, 16, 0, + 1, 0, 0, 0, 101, 0, + 0, 3, 242, 32, 16, 0, + 2, 0, 0, 0, 101, 0, + 0, 3, 242, 32, 16, 0, + 3, 0, 0, 0, 101, 0, + 0, 3, 242, 32, 16, 0, + 4, 0, 0, 0, 101, 0, + 0, 3, 242, 32, 16, 0, + 5, 0, 0, 0, 101, 0, + 0, 3, 242, 32, 16, 0, + 6, 0, 0, 0, 101, 0, + 0, 3, 242, 32, 16, 0, + 7, 0, 0, 0, 54, 0, + 0, 5, 242, 32, 16, 0, + 0, 0, 0, 0, 70, 30, + 16, 0, 1, 0, 0, 0, + 54, 0, 0, 5, 242, 32, + 16, 0, 1, 0, 0, 0, + 70, 30, 16, 0, 1, 0, + 0, 0, 54, 0, 0, 5, + 242, 32, 16, 0, 2, 0, + 0, 0, 70, 30, 16, 0, + 1, 0, 0, 0, 54, 0, + 0, 5, 242, 32, 16, 0, + 3, 0, 0, 0, 70, 30, + 16, 0, 1, 0, 0, 0, + 54, 0, 0, 5, 242, 32, + 16, 0, 4, 0, 0, 0, + 70, 30, 16, 0, 1, 0, + 0, 0, 54, 0, 0, 5, + 242, 32, 16, 0, 5, 0, + 0, 0, 70, 30, 16, 0, + 1, 0, 0, 0, 54, 0, + 0, 5, 242, 32, 16, 0, + 6, 0, 0, 0, 70, 30, + 16, 0, 1, 0, 0, 0, + 54, 0, 0, 5, 242, 32, + 16, 0, 7, 0, 0, 0, + 70, 30, 16, 0, 1, 0, + 0, 0, 62, 0, 0, 1, + 83, 84, 65, 84, 116, 0, + 0, 0, 9, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 9, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 9, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0 +}; diff --git a/src/libGLESv2/renderer/shaders/compiled/clearsingle11ps.h b/src/libGLESv2/renderer/shaders/compiled/clearsingle11ps.h index 20395e2a..dde816a0 100644 --- a/src/libGLESv2/renderer/shaders/compiled/clearsingle11ps.h +++ b/src/libGLESv2/renderer/shaders/compiled/clearsingle11ps.h @@ -1,113 +1,110 @@ -#if 0
-//
-// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
-//
-//
-// fxc /E PS_ClearSingle /T ps_4_0 /Fh compiled/clearsingle11ps.h
-// Clear11.hlsl
-//
-//
-//
-// Input signature:
-//
-// Name Index Mask Register SysValue Format Used
-// -------------------- ----- ------ -------- -------- ------ ------
-// SV_Position 0 xyzw 0 POS float
-// COLOR 0 xyzw 1 NONE float xyzw
-//
-//
-// Output signature:
-//
-// Name Index Mask Register SysValue Format Used
-// -------------------- ----- ------ -------- -------- ------ ------
-// SV_Target 0 xyzw 0 TARGET float xyzw
-//
-ps_4_0
-dcl_input_ps linear v1.xyzw
-dcl_output o0.xyzw
-mov o0.xyzw, v1.xyzw
-ret
-// Approximately 2 instruction slots used
-#endif
-
-const BYTE g_PS_ClearSingle[] =
-{
- 68, 88, 66, 67, 11, 49,
- 220, 157, 35, 106, 175, 161,
- 180, 178, 147, 150, 134, 162,
- 222, 79, 1, 0, 0, 0,
- 208, 1, 0, 0, 5, 0,
- 0, 0, 52, 0, 0, 0,
- 140, 0, 0, 0, 224, 0,
- 0, 0, 20, 1, 0, 0,
- 84, 1, 0, 0, 82, 68,
- 69, 70, 80, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 28, 0, 0, 0, 0, 4,
- 255, 255, 0, 1, 0, 0,
- 28, 0, 0, 0, 77, 105,
- 99, 114, 111, 115, 111, 102,
- 116, 32, 40, 82, 41, 32,
- 72, 76, 83, 76, 32, 83,
- 104, 97, 100, 101, 114, 32,
- 67, 111, 109, 112, 105, 108,
- 101, 114, 32, 57, 46, 50,
- 57, 46, 57, 53, 50, 46,
- 51, 49, 49, 49, 0, 171,
- 171, 171, 73, 83, 71, 78,
- 76, 0, 0, 0, 2, 0,
- 0, 0, 8, 0, 0, 0,
- 56, 0, 0, 0, 0, 0,
- 0, 0, 1, 0, 0, 0,
- 3, 0, 0, 0, 0, 0,
- 0, 0, 15, 0, 0, 0,
- 68, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 3, 0, 0, 0, 1, 0,
- 0, 0, 15, 15, 0, 0,
- 83, 86, 95, 80, 111, 115,
- 105, 116, 105, 111, 110, 0,
- 67, 79, 76, 79, 82, 0,
- 171, 171, 79, 83, 71, 78,
- 44, 0, 0, 0, 1, 0,
- 0, 0, 8, 0, 0, 0,
- 32, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 3, 0, 0, 0, 0, 0,
- 0, 0, 15, 0, 0, 0,
- 83, 86, 95, 84, 97, 114,
- 103, 101, 116, 0, 171, 171,
- 83, 72, 68, 82, 56, 0,
- 0, 0, 64, 0, 0, 0,
- 14, 0, 0, 0, 98, 16,
- 0, 3, 242, 16, 16, 0,
- 1, 0, 0, 0, 101, 0,
- 0, 3, 242, 32, 16, 0,
- 0, 0, 0, 0, 54, 0,
- 0, 5, 242, 32, 16, 0,
- 0, 0, 0, 0, 70, 30,
- 16, 0, 1, 0, 0, 0,
- 62, 0, 0, 1, 83, 84,
- 65, 84, 116, 0, 0, 0,
- 2, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 2, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 1, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 1, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0
-};
+#if 0 +// +// Generated by Microsoft (R) HLSL Shader Compiler 9.30.9200.16384 +// +// +/// +// +// Input signature: +// +// Name Index Mask Register SysValue Format Used +// -------------------- ----- ------ -------- -------- ------- ------ +// SV_Position 0 xyzw 0 POS float +// COLOR 0 xyzw 1 NONE float xyzw +// +// +// Output signature: +// +// Name Index Mask Register SysValue Format Used +// -------------------- ----- ------ -------- -------- ------- ------ +// SV_Target 0 xyzw 0 TARGET float xyzw +// +ps_4_0 +dcl_input_ps linear v1.xyzw +dcl_output o0.xyzw +mov o0.xyzw, v1.xyzw +ret +// Approximately 2 instruction slots used +#endif + +const BYTE g_PS_ClearSingle[] = +{ + 68, 88, 66, 67, 13, 152, + 32, 49, 222, 236, 92, 20, + 188, 71, 88, 46, 163, 241, + 188, 238, 1, 0, 0, 0, + 208, 1, 0, 0, 5, 0, + 0, 0, 52, 0, 0, 0, + 140, 0, 0, 0, 224, 0, + 0, 0, 20, 1, 0, 0, + 84, 1, 0, 0, 82, 68, + 69, 70, 80, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 28, 0, 0, 0, 0, 4, + 255, 255, 0, 1, 0, 0, + 28, 0, 0, 0, 77, 105, + 99, 114, 111, 115, 111, 102, + 116, 32, 40, 82, 41, 32, + 72, 76, 83, 76, 32, 83, + 104, 97, 100, 101, 114, 32, + 67, 111, 109, 112, 105, 108, + 101, 114, 32, 57, 46, 51, + 48, 46, 57, 50, 48, 48, + 46, 49, 54, 51, 56, 52, + 0, 171, 73, 83, 71, 78, + 76, 0, 0, 0, 2, 0, + 0, 0, 8, 0, 0, 0, + 56, 0, 0, 0, 0, 0, + 0, 0, 1, 0, 0, 0, + 3, 0, 0, 0, 0, 0, + 0, 0, 15, 0, 0, 0, + 68, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 1, 0, + 0, 0, 15, 15, 0, 0, + 83, 86, 95, 80, 111, 115, + 105, 116, 105, 111, 110, 0, + 67, 79, 76, 79, 82, 0, + 171, 171, 79, 83, 71, 78, + 44, 0, 0, 0, 1, 0, + 0, 0, 8, 0, 0, 0, + 32, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 0, 0, + 0, 0, 15, 0, 0, 0, + 83, 86, 95, 84, 97, 114, + 103, 101, 116, 0, 171, 171, + 83, 72, 68, 82, 56, 0, + 0, 0, 64, 0, 0, 0, + 14, 0, 0, 0, 98, 16, + 0, 3, 242, 16, 16, 0, + 1, 0, 0, 0, 101, 0, + 0, 3, 242, 32, 16, 0, + 0, 0, 0, 0, 54, 0, + 0, 5, 242, 32, 16, 0, + 0, 0, 0, 0, 70, 30, + 16, 0, 1, 0, 0, 0, + 62, 0, 0, 1, 83, 84, + 65, 84, 116, 0, 0, 0, + 2, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 2, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 2, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0 +}; diff --git a/src/libGLESv2/renderer/shaders/compiled/componentmaskps.h b/src/libGLESv2/renderer/shaders/compiled/componentmaskps.h index 2b8f04b4..a6ec1d99 100644 --- a/src/libGLESv2/renderer/shaders/compiled/componentmaskps.h +++ b/src/libGLESv2/renderer/shaders/compiled/componentmaskps.h @@ -1,81 +1,79 @@ -#if 0
-//
-// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
-//
-// fxc /E componentmaskps /T ps_2_0 /Fh compiled/componentmaskps.h Blit.ps
-//
-//
-// Parameters:
-//
-// float4 mode;
-// sampler2D tex;
-//
-//
-// Registers:
-//
-// Name Reg Size
-// ------------ ----- ----
-// mode c0 1
-// tex s0 1
-//
-
- ps_2_0
- dcl t0.xy
- dcl_2d s0
- texld r0, t0, s0
- mul r1.xyz, r0, c0.x
- mad r1.w, r0.w, c0.z, c0.w
- mov oC0, r1
-
-// approximately 4 instruction slots used (1 texture, 3 arithmetic)
-#endif
-
-const BYTE g_ps20_componentmaskps[] =
-{
- 0, 2, 255, 255, 254, 255,
- 43, 0, 67, 84, 65, 66,
- 28, 0, 0, 0, 119, 0,
- 0, 0, 0, 2, 255, 255,
- 2, 0, 0, 0, 28, 0,
- 0, 0, 0, 1, 0, 0,
- 112, 0, 0, 0, 68, 0,
- 0, 0, 2, 0, 0, 0,
- 1, 0, 0, 0, 76, 0,
- 0, 0, 0, 0, 0, 0,
- 92, 0, 0, 0, 3, 0,
- 0, 0, 1, 0, 0, 0,
- 96, 0, 0, 0, 0, 0,
- 0, 0, 109, 111, 100, 101,
- 0, 171, 171, 171, 1, 0,
- 3, 0, 1, 0, 4, 0,
- 1, 0, 0, 0, 0, 0,
- 0, 0, 116, 101, 120, 0,
- 4, 0, 12, 0, 1, 0,
- 1, 0, 1, 0, 0, 0,
- 0, 0, 0, 0, 112, 115,
- 95, 50, 95, 48, 0, 77,
- 105, 99, 114, 111, 115, 111,
- 102, 116, 32, 40, 82, 41,
- 32, 72, 76, 83, 76, 32,
- 83, 104, 97, 100, 101, 114,
- 32, 67, 111, 109, 112, 105,
- 108, 101, 114, 32, 57, 46,
- 50, 57, 46, 57, 53, 50,
- 46, 51, 49, 49, 49, 0,
- 31, 0, 0, 2, 0, 0,
- 0, 128, 0, 0, 3, 176,
- 31, 0, 0, 2, 0, 0,
- 0, 144, 0, 8, 15, 160,
- 66, 0, 0, 3, 0, 0,
- 15, 128, 0, 0, 228, 176,
- 0, 8, 228, 160, 5, 0,
- 0, 3, 1, 0, 7, 128,
- 0, 0, 228, 128, 0, 0,
- 0, 160, 4, 0, 0, 4,
- 1, 0, 8, 128, 0, 0,
- 255, 128, 0, 0, 170, 160,
- 0, 0, 255, 160, 1, 0,
- 0, 2, 0, 8, 15, 128,
- 1, 0, 228, 128, 255, 255,
- 0, 0
-};
+#if 0 +// +// Generated by Microsoft (R) HLSL Shader Compiler 9.30.9200.16384 +// +/// +// Parameters: +// +// float4 mode; +// sampler2D tex; +// +// +// Registers: +// +// Name Reg Size +// ------------ ----- ---- +// mode c0 1 +// tex s0 1 +// + + ps_2_0 + dcl t0.xy + dcl_2d s0 + texld r0, t0, s0 + mul r1.xyz, r0, c0.x + mad r1.w, r0.w, c0.z, c0.w + mov oC0, r1 + +// approximately 4 instruction slots used (1 texture, 3 arithmetic) +#endif + +const BYTE g_ps20_componentmaskps[] = +{ + 0, 2, 255, 255, 254, 255, + 44, 0, 67, 84, 65, 66, + 28, 0, 0, 0, 119, 0, + 0, 0, 0, 2, 255, 255, + 2, 0, 0, 0, 28, 0, + 0, 0, 0, 1, 0, 0, + 112, 0, 0, 0, 68, 0, + 0, 0, 2, 0, 0, 0, + 1, 0, 0, 0, 76, 0, + 0, 0, 0, 0, 0, 0, + 92, 0, 0, 0, 3, 0, + 0, 0, 1, 0, 0, 0, + 96, 0, 0, 0, 0, 0, + 0, 0, 109, 111, 100, 101, + 0, 171, 171, 171, 1, 0, + 3, 0, 1, 0, 4, 0, + 1, 0, 0, 0, 0, 0, + 0, 0, 116, 101, 120, 0, + 4, 0, 12, 0, 1, 0, + 1, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 112, 115, + 95, 50, 95, 48, 0, 77, + 105, 99, 114, 111, 115, 111, + 102, 116, 32, 40, 82, 41, + 32, 72, 76, 83, 76, 32, + 83, 104, 97, 100, 101, 114, + 32, 67, 111, 109, 112, 105, + 108, 101, 114, 32, 57, 46, + 51, 48, 46, 57, 50, 48, + 48, 46, 49, 54, 51, 56, + 52, 0, 171, 171, 31, 0, + 0, 2, 0, 0, 0, 128, + 0, 0, 3, 176, 31, 0, + 0, 2, 0, 0, 0, 144, + 0, 8, 15, 160, 66, 0, + 0, 3, 0, 0, 15, 128, + 0, 0, 228, 176, 0, 8, + 228, 160, 5, 0, 0, 3, + 1, 0, 7, 128, 0, 0, + 228, 128, 0, 0, 0, 160, + 4, 0, 0, 4, 1, 0, + 8, 128, 0, 0, 255, 128, + 0, 0, 170, 160, 0, 0, + 255, 160, 1, 0, 0, 2, + 0, 8, 15, 128, 1, 0, + 228, 128, 255, 255, 0, 0 +}; diff --git a/src/libGLESv2/renderer/shaders/compiled/flipyvs.h b/src/libGLESv2/renderer/shaders/compiled/flipyvs.h index ef121016..27d84c9f 100644 --- a/src/libGLESv2/renderer/shaders/compiled/flipyvs.h +++ b/src/libGLESv2/renderer/shaders/compiled/flipyvs.h @@ -1,69 +1,67 @@ -#if 0
-//
-// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
-//
-// fxc /E flipyvs /T vs_2_0 /Fh compiled/flipyvs.h Blit.vs
-//
-//
-// Parameters:
-//
-// float4 halfPixelSize;
-//
-//
-// Registers:
-//
-// Name Reg Size
-// ------------- ----- ----
-// halfPixelSize c0 1
-//
-
- vs_2_0
- def c1, 0.5, 1, 0, 0
- dcl_position v0
- add oPos, v0, c0
- mad oT0, v0, c1.xxyy, c1.xxzz
-
-// approximately 2 instruction slots used
-#endif
-
-const BYTE g_vs20_flipyvs[] =
-{
- 0, 2, 254, 255, 254, 255,
- 35, 0, 67, 84, 65, 66,
- 28, 0, 0, 0, 87, 0,
- 0, 0, 0, 2, 254, 255,
- 1, 0, 0, 0, 28, 0,
- 0, 0, 0, 1, 0, 0,
- 80, 0, 0, 0, 48, 0,
- 0, 0, 2, 0, 0, 0,
- 1, 0, 0, 0, 64, 0,
- 0, 0, 0, 0, 0, 0,
- 104, 97, 108, 102, 80, 105,
- 120, 101, 108, 83, 105, 122,
- 101, 0, 171, 171, 1, 0,
- 3, 0, 1, 0, 4, 0,
- 1, 0, 0, 0, 0, 0,
- 0, 0, 118, 115, 95, 50,
- 95, 48, 0, 77, 105, 99,
- 114, 111, 115, 111, 102, 116,
- 32, 40, 82, 41, 32, 72,
- 76, 83, 76, 32, 83, 104,
- 97, 100, 101, 114, 32, 67,
- 111, 109, 112, 105, 108, 101,
- 114, 32, 57, 46, 50, 57,
- 46, 57, 53, 50, 46, 51,
- 49, 49, 49, 0, 81, 0,
- 0, 5, 1, 0, 15, 160,
- 0, 0, 0, 63, 0, 0,
- 128, 63, 0, 0, 0, 0,
- 0, 0, 0, 0, 31, 0,
- 0, 2, 0, 0, 0, 128,
- 0, 0, 15, 144, 2, 0,
- 0, 3, 0, 0, 15, 192,
- 0, 0, 228, 144, 0, 0,
- 228, 160, 4, 0, 0, 4,
- 0, 0, 15, 224, 0, 0,
- 228, 144, 1, 0, 80, 160,
- 1, 0, 160, 160, 255, 255,
- 0, 0
-};
+#if 0 +// +// Generated by Microsoft (R) HLSL Shader Compiler 9.30.9200.16384 +// +/// +// Parameters: +// +// float4 halfPixelSize; +// +// +// Registers: +// +// Name Reg Size +// ------------- ----- ---- +// halfPixelSize c0 1 +// + + vs_2_0 + def c1, 0.5, 1, 0, 0 + dcl_position v0 + add oPos, v0, c0 + mad oT0, v0, c1.xxyy, c1.xxzz + +// approximately 2 instruction slots used +#endif + +const BYTE g_vs20_flipyvs[] = +{ + 0, 2, 254, 255, 254, 255, + 36, 0, 67, 84, 65, 66, + 28, 0, 0, 0, 87, 0, + 0, 0, 0, 2, 254, 255, + 1, 0, 0, 0, 28, 0, + 0, 0, 0, 1, 0, 0, + 80, 0, 0, 0, 48, 0, + 0, 0, 2, 0, 0, 0, + 1, 0, 0, 0, 64, 0, + 0, 0, 0, 0, 0, 0, + 104, 97, 108, 102, 80, 105, + 120, 101, 108, 83, 105, 122, + 101, 0, 171, 171, 1, 0, + 3, 0, 1, 0, 4, 0, + 1, 0, 0, 0, 0, 0, + 0, 0, 118, 115, 95, 50, + 95, 48, 0, 77, 105, 99, + 114, 111, 115, 111, 102, 116, + 32, 40, 82, 41, 32, 72, + 76, 83, 76, 32, 83, 104, + 97, 100, 101, 114, 32, 67, + 111, 109, 112, 105, 108, 101, + 114, 32, 57, 46, 51, 48, + 46, 57, 50, 48, 48, 46, + 49, 54, 51, 56, 52, 0, + 171, 171, 81, 0, 0, 5, + 1, 0, 15, 160, 0, 0, + 0, 63, 0, 0, 128, 63, + 0, 0, 0, 0, 0, 0, + 0, 0, 31, 0, 0, 2, + 0, 0, 0, 128, 0, 0, + 15, 144, 2, 0, 0, 3, + 0, 0, 15, 192, 0, 0, + 228, 144, 0, 0, 228, 160, + 4, 0, 0, 4, 0, 0, + 15, 224, 0, 0, 228, 144, + 1, 0, 80, 160, 1, 0, + 160, 160, 255, 255, 0, 0 +}; diff --git a/src/libGLESv2/renderer/shaders/compiled/luminanceps.h b/src/libGLESv2/renderer/shaders/compiled/luminanceps.h index 44dc7498..f32d3f2f 100644 --- a/src/libGLESv2/renderer/shaders/compiled/luminanceps.h +++ b/src/libGLESv2/renderer/shaders/compiled/luminanceps.h @@ -1,80 +1,79 @@ -#if 0
-//
-// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
-//
-// fxc /E luminanceps /T ps_2_0 /Fh compiled/luminanceps.h Blit.ps
-//
-//
-// Parameters:
-//
-// float4 mode;
-// sampler2D tex;
-//
-//
-// Registers:
-//
-// Name Reg Size
-// ------------ ----- ----
-// mode c0 1
-// tex s0 1
-//
-
- ps_2_0
- dcl t0.xy
- dcl_2d s0
- texld r0, t0, s0
- mad r1.w, r0.w, c0.x, c0.y
- mov r1.xyz, r0.x
- mov oC0, r1
-
-// approximately 4 instruction slots used (1 texture, 3 arithmetic)
-#endif
-
-const BYTE g_ps20_luminanceps[] =
-{
- 0, 2, 255, 255, 254, 255,
- 43, 0, 67, 84, 65, 66,
- 28, 0, 0, 0, 119, 0,
- 0, 0, 0, 2, 255, 255,
- 2, 0, 0, 0, 28, 0,
- 0, 0, 0, 1, 0, 0,
- 112, 0, 0, 0, 68, 0,
- 0, 0, 2, 0, 0, 0,
- 1, 0, 0, 0, 76, 0,
- 0, 0, 0, 0, 0, 0,
- 92, 0, 0, 0, 3, 0,
- 0, 0, 1, 0, 0, 0,
- 96, 0, 0, 0, 0, 0,
- 0, 0, 109, 111, 100, 101,
- 0, 171, 171, 171, 1, 0,
- 3, 0, 1, 0, 4, 0,
- 1, 0, 0, 0, 0, 0,
- 0, 0, 116, 101, 120, 0,
- 4, 0, 12, 0, 1, 0,
- 1, 0, 1, 0, 0, 0,
- 0, 0, 0, 0, 112, 115,
- 95, 50, 95, 48, 0, 77,
- 105, 99, 114, 111, 115, 111,
- 102, 116, 32, 40, 82, 41,
- 32, 72, 76, 83, 76, 32,
- 83, 104, 97, 100, 101, 114,
- 32, 67, 111, 109, 112, 105,
- 108, 101, 114, 32, 57, 46,
- 50, 57, 46, 57, 53, 50,
- 46, 51, 49, 49, 49, 0,
- 31, 0, 0, 2, 0, 0,
- 0, 128, 0, 0, 3, 176,
- 31, 0, 0, 2, 0, 0,
- 0, 144, 0, 8, 15, 160,
- 66, 0, 0, 3, 0, 0,
- 15, 128, 0, 0, 228, 176,
- 0, 8, 228, 160, 4, 0,
- 0, 4, 1, 0, 8, 128,
- 0, 0, 255, 128, 0, 0,
- 0, 160, 0, 0, 85, 160,
- 1, 0, 0, 2, 1, 0,
- 7, 128, 0, 0, 0, 128,
- 1, 0, 0, 2, 0, 8,
- 15, 128, 1, 0, 228, 128,
- 255, 255, 0, 0
-};
+#if 0 +// +// Generated by Microsoft (R) HLSL Shader Compiler 9.30.9200.16384 +// +/// +// Parameters: +// +// float4 mode; +// sampler2D tex; +// +// +// Registers: +// +// Name Reg Size +// ------------ ----- ---- +// mode c0 1 +// tex s0 1 +// + + ps_2_0 + dcl t0.xy + dcl_2d s0 + texld r0, t0, s0 + mad r1.w, r0.w, c0.x, c0.y + mov r1.xyz, r0.x + mov oC0, r1 + +// approximately 4 instruction slots used (1 texture, 3 arithmetic) +#endif + +const BYTE g_ps20_luminanceps[] = +{ + 0, 2, 255, 255, 254, 255, + 44, 0, 67, 84, 65, 66, + 28, 0, 0, 0, 119, 0, + 0, 0, 0, 2, 255, 255, + 2, 0, 0, 0, 28, 0, + 0, 0, 0, 1, 0, 0, + 112, 0, 0, 0, 68, 0, + 0, 0, 2, 0, 0, 0, + 1, 0, 0, 0, 76, 0, + 0, 0, 0, 0, 0, 0, + 92, 0, 0, 0, 3, 0, + 0, 0, 1, 0, 0, 0, + 96, 0, 0, 0, 0, 0, + 0, 0, 109, 111, 100, 101, + 0, 171, 171, 171, 1, 0, + 3, 0, 1, 0, 4, 0, + 1, 0, 0, 0, 0, 0, + 0, 0, 116, 101, 120, 0, + 4, 0, 12, 0, 1, 0, + 1, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 112, 115, + 95, 50, 95, 48, 0, 77, + 105, 99, 114, 111, 115, 111, + 102, 116, 32, 40, 82, 41, + 32, 72, 76, 83, 76, 32, + 83, 104, 97, 100, 101, 114, + 32, 67, 111, 109, 112, 105, + 108, 101, 114, 32, 57, 46, + 51, 48, 46, 57, 50, 48, + 48, 46, 49, 54, 51, 56, + 52, 0, 171, 171, 31, 0, + 0, 2, 0, 0, 0, 128, + 0, 0, 3, 176, 31, 0, + 0, 2, 0, 0, 0, 144, + 0, 8, 15, 160, 66, 0, + 0, 3, 0, 0, 15, 128, + 0, 0, 228, 176, 0, 8, + 228, 160, 4, 0, 0, 4, + 1, 0, 8, 128, 0, 0, + 255, 128, 0, 0, 0, 160, + 0, 0, 85, 160, 1, 0, + 0, 2, 1, 0, 7, 128, + 0, 0, 0, 128, 1, 0, + 0, 2, 0, 8, 15, 128, + 1, 0, 228, 128, 255, 255, + 0, 0 +}; diff --git a/src/libGLESv2/renderer/shaders/compiled/passthrough11vs.h b/src/libGLESv2/renderer/shaders/compiled/passthrough11vs.h index b12fff9b..bbe1be94 100644 --- a/src/libGLESv2/renderer/shaders/compiled/passthrough11vs.h +++ b/src/libGLESv2/renderer/shaders/compiled/passthrough11vs.h @@ -1,137 +1,134 @@ -#if 0
-//
-// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
-//
-//
-// fxc /E VS_Passthrough /T vs_4_0 /Fh compiled/passthrough11vs.h
-// Passthrough11.hlsl
-//
-//
-//
-// Input signature:
-//
-// Name Index Mask Register SysValue Format Used
-// -------------------- ----- ------ -------- -------- ------ ------
-// POSITION 0 xy 0 NONE float xy
-// TEXCOORD 0 xy 1 NONE float xy
-//
-//
-// Output signature:
-//
-// Name Index Mask Register SysValue Format Used
-// -------------------- ----- ------ -------- -------- ------ ------
-// SV_POSITION 0 xyzw 0 POS float xyzw
-// TEXCOORD 0 xy 1 NONE float xy
-//
-vs_4_0
-dcl_input v0.xy
-dcl_input v1.xy
-dcl_output_siv o0.xyzw, position
-dcl_output o1.xy
-mov o0.xy, v0.xyxx
-mov o0.zw, l(0,0,0,1.000000)
-mov o1.xy, v1.xyxx
-ret
-// Approximately 4 instruction slots used
-#endif
-
-const BYTE g_VS_Passthrough[] =
-{
- 68, 88, 66, 67, 117, 74,
- 34, 79, 174, 226, 170, 74,
- 110, 16, 237, 14, 67, 185,
- 119, 167, 1, 0, 0, 0,
- 68, 2, 0, 0, 5, 0,
- 0, 0, 52, 0, 0, 0,
- 140, 0, 0, 0, 224, 0,
- 0, 0, 56, 1, 0, 0,
- 200, 1, 0, 0, 82, 68,
- 69, 70, 80, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 28, 0, 0, 0, 0, 4,
- 254, 255, 0, 1, 0, 0,
- 28, 0, 0, 0, 77, 105,
- 99, 114, 111, 115, 111, 102,
- 116, 32, 40, 82, 41, 32,
- 72, 76, 83, 76, 32, 83,
- 104, 97, 100, 101, 114, 32,
- 67, 111, 109, 112, 105, 108,
- 101, 114, 32, 57, 46, 50,
- 57, 46, 57, 53, 50, 46,
- 51, 49, 49, 49, 0, 171,
- 171, 171, 73, 83, 71, 78,
- 76, 0, 0, 0, 2, 0,
- 0, 0, 8, 0, 0, 0,
- 56, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 3, 0, 0, 0, 0, 0,
- 0, 0, 3, 3, 0, 0,
- 65, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 3, 0, 0, 0, 1, 0,
- 0, 0, 3, 3, 0, 0,
- 80, 79, 83, 73, 84, 73,
- 79, 78, 0, 84, 69, 88,
- 67, 79, 79, 82, 68, 0,
- 171, 171, 79, 83, 71, 78,
- 80, 0, 0, 0, 2, 0,
- 0, 0, 8, 0, 0, 0,
- 56, 0, 0, 0, 0, 0,
- 0, 0, 1, 0, 0, 0,
- 3, 0, 0, 0, 0, 0,
- 0, 0, 15, 0, 0, 0,
- 68, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 3, 0, 0, 0, 1, 0,
- 0, 0, 3, 12, 0, 0,
- 83, 86, 95, 80, 79, 83,
- 73, 84, 73, 79, 78, 0,
- 84, 69, 88, 67, 79, 79,
- 82, 68, 0, 171, 171, 171,
- 83, 72, 68, 82, 136, 0,
- 0, 0, 64, 0, 1, 0,
- 34, 0, 0, 0, 95, 0,
- 0, 3, 50, 16, 16, 0,
- 0, 0, 0, 0, 95, 0,
- 0, 3, 50, 16, 16, 0,
- 1, 0, 0, 0, 103, 0,
- 0, 4, 242, 32, 16, 0,
- 0, 0, 0, 0, 1, 0,
- 0, 0, 101, 0, 0, 3,
- 50, 32, 16, 0, 1, 0,
- 0, 0, 54, 0, 0, 5,
- 50, 32, 16, 0, 0, 0,
- 0, 0, 70, 16, 16, 0,
- 0, 0, 0, 0, 54, 0,
- 0, 8, 194, 32, 16, 0,
- 0, 0, 0, 0, 2, 64,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 128, 63,
- 54, 0, 0, 5, 50, 32,
- 16, 0, 1, 0, 0, 0,
- 70, 16, 16, 0, 1, 0,
- 0, 0, 62, 0, 0, 1,
- 83, 84, 65, 84, 116, 0,
- 0, 0, 4, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 4, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 1, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 3, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0
-};
+#if 0 +// +// Generated by Microsoft (R) HLSL Shader Compiler 9.30.9200.16384 +// +// +/// +// +// Input signature: +// +// Name Index Mask Register SysValue Format Used +// -------------------- ----- ------ -------- -------- ------- ------ +// POSITION 0 xy 0 NONE float xy +// TEXCOORD 0 xy 1 NONE float xy +// +// +// Output signature: +// +// Name Index Mask Register SysValue Format Used +// -------------------- ----- ------ -------- -------- ------- ------ +// SV_POSITION 0 xyzw 0 POS float xyzw +// TEXCOORD 0 xy 1 NONE float xy +// +vs_4_0 +dcl_input v0.xy +dcl_input v1.xy +dcl_output_siv o0.xyzw, position +dcl_output o1.xy +mov o0.xy, v0.xyxx +mov o0.zw, l(0,0,0,1.000000) +mov o1.xy, v1.xyxx +ret +// Approximately 4 instruction slots used +#endif + +const BYTE g_VS_Passthrough[] = +{ + 68, 88, 66, 67, 197, 214, + 184, 85, 240, 94, 71, 48, + 165, 34, 142, 233, 0, 135, + 193, 178, 1, 0, 0, 0, + 68, 2, 0, 0, 5, 0, + 0, 0, 52, 0, 0, 0, + 140, 0, 0, 0, 224, 0, + 0, 0, 56, 1, 0, 0, + 200, 1, 0, 0, 82, 68, + 69, 70, 80, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 28, 0, 0, 0, 0, 4, + 254, 255, 0, 1, 0, 0, + 28, 0, 0, 0, 77, 105, + 99, 114, 111, 115, 111, 102, + 116, 32, 40, 82, 41, 32, + 72, 76, 83, 76, 32, 83, + 104, 97, 100, 101, 114, 32, + 67, 111, 109, 112, 105, 108, + 101, 114, 32, 57, 46, 51, + 48, 46, 57, 50, 48, 48, + 46, 49, 54, 51, 56, 52, + 0, 171, 73, 83, 71, 78, + 76, 0, 0, 0, 2, 0, + 0, 0, 8, 0, 0, 0, + 56, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 0, 0, + 0, 0, 3, 3, 0, 0, + 65, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 1, 0, + 0, 0, 3, 3, 0, 0, + 80, 79, 83, 73, 84, 73, + 79, 78, 0, 84, 69, 88, + 67, 79, 79, 82, 68, 0, + 171, 171, 79, 83, 71, 78, + 80, 0, 0, 0, 2, 0, + 0, 0, 8, 0, 0, 0, + 56, 0, 0, 0, 0, 0, + 0, 0, 1, 0, 0, 0, + 3, 0, 0, 0, 0, 0, + 0, 0, 15, 0, 0, 0, + 68, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 1, 0, + 0, 0, 3, 12, 0, 0, + 83, 86, 95, 80, 79, 83, + 73, 84, 73, 79, 78, 0, + 84, 69, 88, 67, 79, 79, + 82, 68, 0, 171, 171, 171, + 83, 72, 68, 82, 136, 0, + 0, 0, 64, 0, 1, 0, + 34, 0, 0, 0, 95, 0, + 0, 3, 50, 16, 16, 0, + 0, 0, 0, 0, 95, 0, + 0, 3, 50, 16, 16, 0, + 1, 0, 0, 0, 103, 0, + 0, 4, 242, 32, 16, 0, + 0, 0, 0, 0, 1, 0, + 0, 0, 101, 0, 0, 3, + 50, 32, 16, 0, 1, 0, + 0, 0, 54, 0, 0, 5, + 50, 32, 16, 0, 0, 0, + 0, 0, 70, 16, 16, 0, + 0, 0, 0, 0, 54, 0, + 0, 8, 194, 32, 16, 0, + 0, 0, 0, 0, 2, 64, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 128, 63, + 54, 0, 0, 5, 50, 32, + 16, 0, 1, 0, 0, 0, + 70, 16, 16, 0, 1, 0, + 0, 0, 62, 0, 0, 1, + 83, 84, 65, 84, 116, 0, + 0, 0, 4, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 4, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 4, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0 +}; diff --git a/src/libGLESv2/renderer/shaders/compiled/passthroughlum11ps.h b/src/libGLESv2/renderer/shaders/compiled/passthroughlum11ps.h index 0d5c8ebd..73c4892c 100644 --- a/src/libGLESv2/renderer/shaders/compiled/passthroughlum11ps.h +++ b/src/libGLESv2/renderer/shaders/compiled/passthroughlum11ps.h @@ -1,155 +1,152 @@ -#if 0
-//
-// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
-//
-//
-// fxc /E PS_PassthroughLum /T ps_4_0 /Fh compiled/passthroughlum11ps.h
-// Passthrough11.hlsl
-//
-//
-// Resource Bindings:
-//
-// Name Type Format Dim Slot Elements
-// ------------------------------ ---------- ------- ----------- ---- --------
-// Sampler sampler NA NA 0 1
-// Texture texture float4 2d 0 1
-//
-//
-//
-// Input signature:
-//
-// Name Index Mask Register SysValue Format Used
-// -------------------- ----- ------ -------- -------- ------ ------
-// SV_POSITION 0 xyzw 0 POS float
-// TEXCOORD 0 xy 1 NONE float xy
-//
-//
-// Output signature:
-//
-// Name Index Mask Register SysValue Format Used
-// -------------------- ----- ------ -------- -------- ------ ------
-// SV_TARGET 0 xyzw 0 TARGET float xyzw
-//
-ps_4_0
-dcl_sampler s0, mode_default
-dcl_resource_texture2d (float,float,float,float) t0
-dcl_input_ps linear v1.xy
-dcl_output o0.xyzw
-dcl_temps 1
-sample r0.xyzw, v1.xyxx, t0.xyzw, s0
-mov o0.xyz, r0.xxxx
-mov o0.w, l(1.000000)
-ret
-// Approximately 4 instruction slots used
-#endif
-
-const BYTE g_PS_PassthroughLum[] =
-{
- 68, 88, 66, 67, 97, 41,
- 37, 154, 0, 174, 137, 157,
- 76, 219, 230, 26, 227, 174,
- 187, 66, 1, 0, 0, 0,
- 128, 2, 0, 0, 5, 0,
- 0, 0, 52, 0, 0, 0,
- 220, 0, 0, 0, 52, 1,
- 0, 0, 104, 1, 0, 0,
- 4, 2, 0, 0, 82, 68,
- 69, 70, 160, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 2, 0, 0, 0,
- 28, 0, 0, 0, 0, 4,
- 255, 255, 0, 1, 0, 0,
- 108, 0, 0, 0, 92, 0,
- 0, 0, 3, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 1, 0,
- 0, 0, 1, 0, 0, 0,
- 100, 0, 0, 0, 2, 0,
- 0, 0, 5, 0, 0, 0,
- 4, 0, 0, 0, 255, 255,
- 255, 255, 0, 0, 0, 0,
- 1, 0, 0, 0, 13, 0,
- 0, 0, 83, 97, 109, 112,
- 108, 101, 114, 0, 84, 101,
- 120, 116, 117, 114, 101, 0,
- 77, 105, 99, 114, 111, 115,
- 111, 102, 116, 32, 40, 82,
- 41, 32, 72, 76, 83, 76,
- 32, 83, 104, 97, 100, 101,
- 114, 32, 67, 111, 109, 112,
- 105, 108, 101, 114, 32, 57,
- 46, 50, 57, 46, 57, 53,
- 50, 46, 51, 49, 49, 49,
- 0, 171, 171, 171, 73, 83,
- 71, 78, 80, 0, 0, 0,
- 2, 0, 0, 0, 8, 0,
- 0, 0, 56, 0, 0, 0,
- 0, 0, 0, 0, 1, 0,
- 0, 0, 3, 0, 0, 0,
- 0, 0, 0, 0, 15, 0,
- 0, 0, 68, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 3, 0, 0, 0,
- 1, 0, 0, 0, 3, 3,
- 0, 0, 83, 86, 95, 80,
- 79, 83, 73, 84, 73, 79,
- 78, 0, 84, 69, 88, 67,
- 79, 79, 82, 68, 0, 171,
- 171, 171, 79, 83, 71, 78,
- 44, 0, 0, 0, 1, 0,
- 0, 0, 8, 0, 0, 0,
- 32, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 3, 0, 0, 0, 0, 0,
- 0, 0, 15, 0, 0, 0,
- 83, 86, 95, 84, 65, 82,
- 71, 69, 84, 0, 171, 171,
- 83, 72, 68, 82, 148, 0,
- 0, 0, 64, 0, 0, 0,
- 37, 0, 0, 0, 90, 0,
- 0, 3, 0, 96, 16, 0,
- 0, 0, 0, 0, 88, 24,
- 0, 4, 0, 112, 16, 0,
- 0, 0, 0, 0, 85, 85,
- 0, 0, 98, 16, 0, 3,
- 50, 16, 16, 0, 1, 0,
- 0, 0, 101, 0, 0, 3,
- 242, 32, 16, 0, 0, 0,
- 0, 0, 104, 0, 0, 2,
- 1, 0, 0, 0, 69, 0,
- 0, 9, 242, 0, 16, 0,
- 0, 0, 0, 0, 70, 16,
- 16, 0, 1, 0, 0, 0,
- 70, 126, 16, 0, 0, 0,
- 0, 0, 0, 96, 16, 0,
- 0, 0, 0, 0, 54, 0,
- 0, 5, 114, 32, 16, 0,
- 0, 0, 0, 0, 6, 0,
- 16, 0, 0, 0, 0, 0,
- 54, 0, 0, 5, 130, 32,
- 16, 0, 0, 0, 0, 0,
- 1, 64, 0, 0, 0, 0,
- 128, 63, 62, 0, 0, 1,
- 83, 84, 65, 84, 116, 0,
- 0, 0, 4, 0, 0, 0,
- 1, 0, 0, 0, 0, 0,
- 0, 0, 2, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 1, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 1, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 2, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0
-};
+#if 0 +// +// Generated by Microsoft (R) HLSL Shader Compiler 9.30.9200.16384 +// +// +/// +// Resource Bindings: +// +// Name Type Format Dim Slot Elements +// ------------------------------ ---------- ------- ----------- ---- -------- +// Sampler sampler NA NA 0 1 +// Texture texture float4 2d 0 1 +// +// +// +// Input signature: +// +// Name Index Mask Register SysValue Format Used +// -------------------- ----- ------ -------- -------- ------- ------ +// SV_POSITION 0 xyzw 0 POS float +// TEXCOORD 0 xy 1 NONE float xy +// +// +// Output signature: +// +// Name Index Mask Register SysValue Format Used +// -------------------- ----- ------ -------- -------- ------- ------ +// SV_TARGET 0 xyzw 0 TARGET float xyzw +// +ps_4_0 +dcl_sampler s0, mode_default +dcl_resource_texture2d (float,float,float,float) t0 +dcl_input_ps linear v1.xy +dcl_output o0.xyzw +dcl_temps 1 +sample r0.xyzw, v1.xyxx, t0.xyzw, s0 +mov o0.xyz, r0.xxxx +mov o0.w, l(1.000000) +ret +// Approximately 4 instruction slots used +#endif + +const BYTE g_PS_PassthroughLum[] = +{ + 68, 88, 66, 67, 244, 9, + 213, 147, 19, 249, 70, 111, + 157, 92, 243, 160, 40, 144, + 238, 221, 1, 0, 0, 0, + 128, 2, 0, 0, 5, 0, + 0, 0, 52, 0, 0, 0, + 220, 0, 0, 0, 52, 1, + 0, 0, 104, 1, 0, 0, + 4, 2, 0, 0, 82, 68, + 69, 70, 160, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 2, 0, 0, 0, + 28, 0, 0, 0, 0, 4, + 255, 255, 0, 1, 0, 0, + 108, 0, 0, 0, 92, 0, + 0, 0, 3, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 0, + 0, 0, 1, 0, 0, 0, + 100, 0, 0, 0, 2, 0, + 0, 0, 5, 0, 0, 0, + 4, 0, 0, 0, 255, 255, + 255, 255, 0, 0, 0, 0, + 1, 0, 0, 0, 13, 0, + 0, 0, 83, 97, 109, 112, + 108, 101, 114, 0, 84, 101, + 120, 116, 117, 114, 101, 0, + 77, 105, 99, 114, 111, 115, + 111, 102, 116, 32, 40, 82, + 41, 32, 72, 76, 83, 76, + 32, 83, 104, 97, 100, 101, + 114, 32, 67, 111, 109, 112, + 105, 108, 101, 114, 32, 57, + 46, 51, 48, 46, 57, 50, + 48, 48, 46, 49, 54, 51, + 56, 52, 0, 171, 73, 83, + 71, 78, 80, 0, 0, 0, + 2, 0, 0, 0, 8, 0, + 0, 0, 56, 0, 0, 0, + 0, 0, 0, 0, 1, 0, + 0, 0, 3, 0, 0, 0, + 0, 0, 0, 0, 15, 0, + 0, 0, 68, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 3, 0, 0, 0, + 1, 0, 0, 0, 3, 3, + 0, 0, 83, 86, 95, 80, + 79, 83, 73, 84, 73, 79, + 78, 0, 84, 69, 88, 67, + 79, 79, 82, 68, 0, 171, + 171, 171, 79, 83, 71, 78, + 44, 0, 0, 0, 1, 0, + 0, 0, 8, 0, 0, 0, + 32, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 0, 0, + 0, 0, 15, 0, 0, 0, + 83, 86, 95, 84, 65, 82, + 71, 69, 84, 0, 171, 171, + 83, 72, 68, 82, 148, 0, + 0, 0, 64, 0, 0, 0, + 37, 0, 0, 0, 90, 0, + 0, 3, 0, 96, 16, 0, + 0, 0, 0, 0, 88, 24, + 0, 4, 0, 112, 16, 0, + 0, 0, 0, 0, 85, 85, + 0, 0, 98, 16, 0, 3, + 50, 16, 16, 0, 1, 0, + 0, 0, 101, 0, 0, 3, + 242, 32, 16, 0, 0, 0, + 0, 0, 104, 0, 0, 2, + 1, 0, 0, 0, 69, 0, + 0, 9, 242, 0, 16, 0, + 0, 0, 0, 0, 70, 16, + 16, 0, 1, 0, 0, 0, + 70, 126, 16, 0, 0, 0, + 0, 0, 0, 96, 16, 0, + 0, 0, 0, 0, 54, 0, + 0, 5, 114, 32, 16, 0, + 0, 0, 0, 0, 6, 0, + 16, 0, 0, 0, 0, 0, + 54, 0, 0, 5, 130, 32, + 16, 0, 0, 0, 0, 0, + 1, 64, 0, 0, 0, 0, + 128, 63, 62, 0, 0, 1, + 83, 84, 65, 84, 116, 0, + 0, 0, 4, 0, 0, 0, + 1, 0, 0, 0, 0, 0, + 0, 0, 2, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0 +}; diff --git a/src/libGLESv2/renderer/shaders/compiled/passthroughlumalpha11ps.h b/src/libGLESv2/renderer/shaders/compiled/passthroughlumalpha11ps.h index 6f9c14d3..90007ef7 100644 --- a/src/libGLESv2/renderer/shaders/compiled/passthroughlumalpha11ps.h +++ b/src/libGLESv2/renderer/shaders/compiled/passthroughlumalpha11ps.h @@ -1,151 +1,148 @@ -#if 0
-//
-// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
-//
-//
-// fxc /E PS_PassthroughLumAlpha /T ps_4_0 /Fh
-// compiled/passthroughlumalpha11ps.h Passthrough11.hlsl
-//
-//
-// Resource Bindings:
-//
-// Name Type Format Dim Slot Elements
-// ------------------------------ ---------- ------- ----------- ---- --------
-// Sampler sampler NA NA 0 1
-// Texture texture float4 2d 0 1
-//
-//
-//
-// Input signature:
-//
-// Name Index Mask Register SysValue Format Used
-// -------------------- ----- ------ -------- -------- ------ ------
-// SV_POSITION 0 xyzw 0 POS float
-// TEXCOORD 0 xy 1 NONE float xy
-//
-//
-// Output signature:
-//
-// Name Index Mask Register SysValue Format Used
-// -------------------- ----- ------ -------- -------- ------ ------
-// SV_TARGET 0 xyzw 0 TARGET float xyzw
-//
-ps_4_0
-dcl_sampler s0, mode_default
-dcl_resource_texture2d (float,float,float,float) t0
-dcl_input_ps linear v1.xy
-dcl_output o0.xyzw
-dcl_temps 1
-sample r0.xyzw, v1.xyxx, t0.xyzw, s0
-mov o0.xyzw, r0.xxxw
-ret
-// Approximately 3 instruction slots used
-#endif
-
-const BYTE g_PS_PassthroughLumAlpha[] =
-{
- 68, 88, 66, 67, 197, 72,
- 251, 236, 53, 107, 182, 146,
- 196, 219, 130, 187, 140, 159,
- 211, 123, 1, 0, 0, 0,
- 108, 2, 0, 0, 5, 0,
- 0, 0, 52, 0, 0, 0,
- 220, 0, 0, 0, 52, 1,
- 0, 0, 104, 1, 0, 0,
- 240, 1, 0, 0, 82, 68,
- 69, 70, 160, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 2, 0, 0, 0,
- 28, 0, 0, 0, 0, 4,
- 255, 255, 0, 1, 0, 0,
- 108, 0, 0, 0, 92, 0,
- 0, 0, 3, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 1, 0,
- 0, 0, 1, 0, 0, 0,
- 100, 0, 0, 0, 2, 0,
- 0, 0, 5, 0, 0, 0,
- 4, 0, 0, 0, 255, 255,
- 255, 255, 0, 0, 0, 0,
- 1, 0, 0, 0, 13, 0,
- 0, 0, 83, 97, 109, 112,
- 108, 101, 114, 0, 84, 101,
- 120, 116, 117, 114, 101, 0,
- 77, 105, 99, 114, 111, 115,
- 111, 102, 116, 32, 40, 82,
- 41, 32, 72, 76, 83, 76,
- 32, 83, 104, 97, 100, 101,
- 114, 32, 67, 111, 109, 112,
- 105, 108, 101, 114, 32, 57,
- 46, 50, 57, 46, 57, 53,
- 50, 46, 51, 49, 49, 49,
- 0, 171, 171, 171, 73, 83,
- 71, 78, 80, 0, 0, 0,
- 2, 0, 0, 0, 8, 0,
- 0, 0, 56, 0, 0, 0,
- 0, 0, 0, 0, 1, 0,
- 0, 0, 3, 0, 0, 0,
- 0, 0, 0, 0, 15, 0,
- 0, 0, 68, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 3, 0, 0, 0,
- 1, 0, 0, 0, 3, 3,
- 0, 0, 83, 86, 95, 80,
- 79, 83, 73, 84, 73, 79,
- 78, 0, 84, 69, 88, 67,
- 79, 79, 82, 68, 0, 171,
- 171, 171, 79, 83, 71, 78,
- 44, 0, 0, 0, 1, 0,
- 0, 0, 8, 0, 0, 0,
- 32, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 3, 0, 0, 0, 0, 0,
- 0, 0, 15, 0, 0, 0,
- 83, 86, 95, 84, 65, 82,
- 71, 69, 84, 0, 171, 171,
- 83, 72, 68, 82, 128, 0,
- 0, 0, 64, 0, 0, 0,
- 32, 0, 0, 0, 90, 0,
- 0, 3, 0, 96, 16, 0,
- 0, 0, 0, 0, 88, 24,
- 0, 4, 0, 112, 16, 0,
- 0, 0, 0, 0, 85, 85,
- 0, 0, 98, 16, 0, 3,
- 50, 16, 16, 0, 1, 0,
- 0, 0, 101, 0, 0, 3,
- 242, 32, 16, 0, 0, 0,
- 0, 0, 104, 0, 0, 2,
- 1, 0, 0, 0, 69, 0,
- 0, 9, 242, 0, 16, 0,
- 0, 0, 0, 0, 70, 16,
- 16, 0, 1, 0, 0, 0,
- 70, 126, 16, 0, 0, 0,
- 0, 0, 0, 96, 16, 0,
- 0, 0, 0, 0, 54, 0,
- 0, 5, 242, 32, 16, 0,
- 0, 0, 0, 0, 6, 12,
- 16, 0, 0, 0, 0, 0,
- 62, 0, 0, 1, 83, 84,
- 65, 84, 116, 0, 0, 0,
- 3, 0, 0, 0, 1, 0,
- 0, 0, 0, 0, 0, 0,
- 2, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 1, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 1, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 1, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0
-};
+#if 0 +// +// Generated by Microsoft (R) HLSL Shader Compiler 9.30.9200.16384 +// +// +/// +// Resource Bindings: +// +// Name Type Format Dim Slot Elements +// ------------------------------ ---------- ------- ----------- ---- -------- +// Sampler sampler NA NA 0 1 +// Texture texture float4 2d 0 1 +// +// +// +// Input signature: +// +// Name Index Mask Register SysValue Format Used +// -------------------- ----- ------ -------- -------- ------- ------ +// SV_POSITION 0 xyzw 0 POS float +// TEXCOORD 0 xy 1 NONE float xy +// +// +// Output signature: +// +// Name Index Mask Register SysValue Format Used +// -------------------- ----- ------ -------- -------- ------- ------ +// SV_TARGET 0 xyzw 0 TARGET float xyzw +// +ps_4_0 +dcl_sampler s0, mode_default +dcl_resource_texture2d (float,float,float,float) t0 +dcl_input_ps linear v1.xy +dcl_output o0.xyzw +dcl_temps 1 +sample r0.xyzw, v1.xyxx, t0.xyzw, s0 +mov o0.xyzw, r0.xxxw +ret +// Approximately 3 instruction slots used +#endif + +const BYTE g_PS_PassthroughLumAlpha[] = +{ + 68, 88, 66, 67, 185, 14, + 84, 223, 192, 42, 16, 133, + 46, 100, 95, 221, 183, 97, + 192, 23, 1, 0, 0, 0, + 108, 2, 0, 0, 5, 0, + 0, 0, 52, 0, 0, 0, + 220, 0, 0, 0, 52, 1, + 0, 0, 104, 1, 0, 0, + 240, 1, 0, 0, 82, 68, + 69, 70, 160, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 2, 0, 0, 0, + 28, 0, 0, 0, 0, 4, + 255, 255, 0, 1, 0, 0, + 108, 0, 0, 0, 92, 0, + 0, 0, 3, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 0, + 0, 0, 1, 0, 0, 0, + 100, 0, 0, 0, 2, 0, + 0, 0, 5, 0, 0, 0, + 4, 0, 0, 0, 255, 255, + 255, 255, 0, 0, 0, 0, + 1, 0, 0, 0, 13, 0, + 0, 0, 83, 97, 109, 112, + 108, 101, 114, 0, 84, 101, + 120, 116, 117, 114, 101, 0, + 77, 105, 99, 114, 111, 115, + 111, 102, 116, 32, 40, 82, + 41, 32, 72, 76, 83, 76, + 32, 83, 104, 97, 100, 101, + 114, 32, 67, 111, 109, 112, + 105, 108, 101, 114, 32, 57, + 46, 51, 48, 46, 57, 50, + 48, 48, 46, 49, 54, 51, + 56, 52, 0, 171, 73, 83, + 71, 78, 80, 0, 0, 0, + 2, 0, 0, 0, 8, 0, + 0, 0, 56, 0, 0, 0, + 0, 0, 0, 0, 1, 0, + 0, 0, 3, 0, 0, 0, + 0, 0, 0, 0, 15, 0, + 0, 0, 68, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 3, 0, 0, 0, + 1, 0, 0, 0, 3, 3, + 0, 0, 83, 86, 95, 80, + 79, 83, 73, 84, 73, 79, + 78, 0, 84, 69, 88, 67, + 79, 79, 82, 68, 0, 171, + 171, 171, 79, 83, 71, 78, + 44, 0, 0, 0, 1, 0, + 0, 0, 8, 0, 0, 0, + 32, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 0, 0, + 0, 0, 15, 0, 0, 0, + 83, 86, 95, 84, 65, 82, + 71, 69, 84, 0, 171, 171, + 83, 72, 68, 82, 128, 0, + 0, 0, 64, 0, 0, 0, + 32, 0, 0, 0, 90, 0, + 0, 3, 0, 96, 16, 0, + 0, 0, 0, 0, 88, 24, + 0, 4, 0, 112, 16, 0, + 0, 0, 0, 0, 85, 85, + 0, 0, 98, 16, 0, 3, + 50, 16, 16, 0, 1, 0, + 0, 0, 101, 0, 0, 3, + 242, 32, 16, 0, 0, 0, + 0, 0, 104, 0, 0, 2, + 1, 0, 0, 0, 69, 0, + 0, 9, 242, 0, 16, 0, + 0, 0, 0, 0, 70, 16, + 16, 0, 1, 0, 0, 0, + 70, 126, 16, 0, 0, 0, + 0, 0, 0, 96, 16, 0, + 0, 0, 0, 0, 54, 0, + 0, 5, 242, 32, 16, 0, + 0, 0, 0, 0, 6, 12, + 16, 0, 0, 0, 0, 0, + 62, 0, 0, 1, 83, 84, + 65, 84, 116, 0, 0, 0, + 3, 0, 0, 0, 1, 0, + 0, 0, 0, 0, 0, 0, + 2, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 2, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0 +}; diff --git a/src/libGLESv2/renderer/shaders/compiled/passthroughps.h b/src/libGLESv2/renderer/shaders/compiled/passthroughps.h index f231d440..66059b84 100644 --- a/src/libGLESv2/renderer/shaders/compiled/passthroughps.h +++ b/src/libGLESv2/renderer/shaders/compiled/passthroughps.h @@ -1,63 +1,62 @@ -#if 0
-//
-// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
-//
-// fxc /E passthroughps /T ps_2_0 /Fh compiled/passthroughps.h Blit.ps
-//
-//
-// Parameters:
-//
-// sampler2D tex;
-//
-//
-// Registers:
-//
-// Name Reg Size
-// ------------ ----- ----
-// tex s0 1
-//
-
- ps_2_0
- dcl t0.xy
- dcl_2d s0
- texld r0, t0, s0
- mov oC0, r0
-
-// approximately 2 instruction slots used (1 texture, 1 arithmetic)
-#endif
-
-const BYTE g_ps20_passthroughps[] =
-{
- 0, 2, 255, 255, 254, 255,
- 32, 0, 67, 84, 65, 66,
- 28, 0, 0, 0, 75, 0,
- 0, 0, 0, 2, 255, 255,
- 1, 0, 0, 0, 28, 0,
- 0, 0, 0, 1, 0, 0,
- 68, 0, 0, 0, 48, 0,
- 0, 0, 3, 0, 0, 0,
- 1, 0, 0, 0, 52, 0,
- 0, 0, 0, 0, 0, 0,
- 116, 101, 120, 0, 4, 0,
- 12, 0, 1, 0, 1, 0,
- 1, 0, 0, 0, 0, 0,
- 0, 0, 112, 115, 95, 50,
- 95, 48, 0, 77, 105, 99,
- 114, 111, 115, 111, 102, 116,
- 32, 40, 82, 41, 32, 72,
- 76, 83, 76, 32, 83, 104,
- 97, 100, 101, 114, 32, 67,
- 111, 109, 112, 105, 108, 101,
- 114, 32, 57, 46, 50, 57,
- 46, 57, 53, 50, 46, 51,
- 49, 49, 49, 0, 31, 0,
- 0, 2, 0, 0, 0, 128,
- 0, 0, 3, 176, 31, 0,
- 0, 2, 0, 0, 0, 144,
- 0, 8, 15, 160, 66, 0,
- 0, 3, 0, 0, 15, 128,
- 0, 0, 228, 176, 0, 8,
- 228, 160, 1, 0, 0, 2,
- 0, 8, 15, 128, 0, 0,
- 228, 128, 255, 255, 0, 0
-};
+#if 0 +// +// Generated by Microsoft (R) HLSL Shader Compiler 9.30.9200.16384 +// +/// +// Parameters: +// +// sampler2D tex; +// +// +// Registers: +// +// Name Reg Size +// ------------ ----- ---- +// tex s0 1 +// + + ps_2_0 + dcl t0.xy + dcl_2d s0 + texld r0, t0, s0 + mov oC0, r0 + +// approximately 2 instruction slots used (1 texture, 1 arithmetic) +#endif + +const BYTE g_ps20_passthroughps[] = +{ + 0, 2, 255, 255, 254, 255, + 33, 0, 67, 84, 65, 66, + 28, 0, 0, 0, 75, 0, + 0, 0, 0, 2, 255, 255, + 1, 0, 0, 0, 28, 0, + 0, 0, 0, 1, 0, 0, + 68, 0, 0, 0, 48, 0, + 0, 0, 3, 0, 0, 0, + 1, 0, 0, 0, 52, 0, + 0, 0, 0, 0, 0, 0, + 116, 101, 120, 0, 4, 0, + 12, 0, 1, 0, 1, 0, + 1, 0, 0, 0, 0, 0, + 0, 0, 112, 115, 95, 50, + 95, 48, 0, 77, 105, 99, + 114, 111, 115, 111, 102, 116, + 32, 40, 82, 41, 32, 72, + 76, 83, 76, 32, 83, 104, + 97, 100, 101, 114, 32, 67, + 111, 109, 112, 105, 108, 101, + 114, 32, 57, 46, 51, 48, + 46, 57, 50, 48, 48, 46, + 49, 54, 51, 56, 52, 0, + 171, 171, 31, 0, 0, 2, + 0, 0, 0, 128, 0, 0, + 3, 176, 31, 0, 0, 2, + 0, 0, 0, 144, 0, 8, + 15, 160, 66, 0, 0, 3, + 0, 0, 15, 128, 0, 0, + 228, 176, 0, 8, 228, 160, + 1, 0, 0, 2, 0, 8, + 15, 128, 0, 0, 228, 128, + 255, 255, 0, 0 +}; diff --git a/src/libGLESv2/renderer/shaders/compiled/passthroughrgb11ps.h b/src/libGLESv2/renderer/shaders/compiled/passthroughrgb11ps.h index da9ff630..a99c5411 100644 --- a/src/libGLESv2/renderer/shaders/compiled/passthroughrgb11ps.h +++ b/src/libGLESv2/renderer/shaders/compiled/passthroughrgb11ps.h @@ -1,155 +1,152 @@ -#if 0
-//
-// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
-//
-//
-// fxc /E PS_PassthroughRGB /T ps_4_0 /Fh compiled/passthroughrgb11ps.h
-// Passthrough11.hlsl
-//
-//
-// Resource Bindings:
-//
-// Name Type Format Dim Slot Elements
-// ------------------------------ ---------- ------- ----------- ---- --------
-// Sampler sampler NA NA 0 1
-// Texture texture float4 2d 0 1
-//
-//
-//
-// Input signature:
-//
-// Name Index Mask Register SysValue Format Used
-// -------------------- ----- ------ -------- -------- ------ ------
-// SV_POSITION 0 xyzw 0 POS float
-// TEXCOORD 0 xy 1 NONE float xy
-//
-//
-// Output signature:
-//
-// Name Index Mask Register SysValue Format Used
-// -------------------- ----- ------ -------- -------- ------ ------
-// SV_TARGET 0 xyzw 0 TARGET float xyzw
-//
-ps_4_0
-dcl_sampler s0, mode_default
-dcl_resource_texture2d (float,float,float,float) t0
-dcl_input_ps linear v1.xy
-dcl_output o0.xyzw
-dcl_temps 1
-sample r0.xyzw, v1.xyxx, t0.xyzw, s0
-mov o0.xyz, r0.xyzx
-mov o0.w, l(1.000000)
-ret
-// Approximately 4 instruction slots used
-#endif
-
-const BYTE g_PS_PassthroughRGB[] =
-{
- 68, 88, 66, 67, 253, 45,
- 13, 34, 125, 194, 95, 149,
- 1, 95, 194, 252, 118, 228,
- 178, 200, 1, 0, 0, 0,
- 128, 2, 0, 0, 5, 0,
- 0, 0, 52, 0, 0, 0,
- 220, 0, 0, 0, 52, 1,
- 0, 0, 104, 1, 0, 0,
- 4, 2, 0, 0, 82, 68,
- 69, 70, 160, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 2, 0, 0, 0,
- 28, 0, 0, 0, 0, 4,
- 255, 255, 0, 1, 0, 0,
- 108, 0, 0, 0, 92, 0,
- 0, 0, 3, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 1, 0,
- 0, 0, 1, 0, 0, 0,
- 100, 0, 0, 0, 2, 0,
- 0, 0, 5, 0, 0, 0,
- 4, 0, 0, 0, 255, 255,
- 255, 255, 0, 0, 0, 0,
- 1, 0, 0, 0, 13, 0,
- 0, 0, 83, 97, 109, 112,
- 108, 101, 114, 0, 84, 101,
- 120, 116, 117, 114, 101, 0,
- 77, 105, 99, 114, 111, 115,
- 111, 102, 116, 32, 40, 82,
- 41, 32, 72, 76, 83, 76,
- 32, 83, 104, 97, 100, 101,
- 114, 32, 67, 111, 109, 112,
- 105, 108, 101, 114, 32, 57,
- 46, 50, 57, 46, 57, 53,
- 50, 46, 51, 49, 49, 49,
- 0, 171, 171, 171, 73, 83,
- 71, 78, 80, 0, 0, 0,
- 2, 0, 0, 0, 8, 0,
- 0, 0, 56, 0, 0, 0,
- 0, 0, 0, 0, 1, 0,
- 0, 0, 3, 0, 0, 0,
- 0, 0, 0, 0, 15, 0,
- 0, 0, 68, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 3, 0, 0, 0,
- 1, 0, 0, 0, 3, 3,
- 0, 0, 83, 86, 95, 80,
- 79, 83, 73, 84, 73, 79,
- 78, 0, 84, 69, 88, 67,
- 79, 79, 82, 68, 0, 171,
- 171, 171, 79, 83, 71, 78,
- 44, 0, 0, 0, 1, 0,
- 0, 0, 8, 0, 0, 0,
- 32, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 3, 0, 0, 0, 0, 0,
- 0, 0, 15, 0, 0, 0,
- 83, 86, 95, 84, 65, 82,
- 71, 69, 84, 0, 171, 171,
- 83, 72, 68, 82, 148, 0,
- 0, 0, 64, 0, 0, 0,
- 37, 0, 0, 0, 90, 0,
- 0, 3, 0, 96, 16, 0,
- 0, 0, 0, 0, 88, 24,
- 0, 4, 0, 112, 16, 0,
- 0, 0, 0, 0, 85, 85,
- 0, 0, 98, 16, 0, 3,
- 50, 16, 16, 0, 1, 0,
- 0, 0, 101, 0, 0, 3,
- 242, 32, 16, 0, 0, 0,
- 0, 0, 104, 0, 0, 2,
- 1, 0, 0, 0, 69, 0,
- 0, 9, 242, 0, 16, 0,
- 0, 0, 0, 0, 70, 16,
- 16, 0, 1, 0, 0, 0,
- 70, 126, 16, 0, 0, 0,
- 0, 0, 0, 96, 16, 0,
- 0, 0, 0, 0, 54, 0,
- 0, 5, 114, 32, 16, 0,
- 0, 0, 0, 0, 70, 2,
- 16, 0, 0, 0, 0, 0,
- 54, 0, 0, 5, 130, 32,
- 16, 0, 0, 0, 0, 0,
- 1, 64, 0, 0, 0, 0,
- 128, 63, 62, 0, 0, 1,
- 83, 84, 65, 84, 116, 0,
- 0, 0, 4, 0, 0, 0,
- 1, 0, 0, 0, 0, 0,
- 0, 0, 2, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 1, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 1, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 2, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0
-};
+#if 0 +// +// Generated by Microsoft (R) HLSL Shader Compiler 9.30.9200.16384 +// +// +/// +// Resource Bindings: +// +// Name Type Format Dim Slot Elements +// ------------------------------ ---------- ------- ----------- ---- -------- +// Sampler sampler NA NA 0 1 +// Texture texture float4 2d 0 1 +// +// +// +// Input signature: +// +// Name Index Mask Register SysValue Format Used +// -------------------- ----- ------ -------- -------- ------- ------ +// SV_POSITION 0 xyzw 0 POS float +// TEXCOORD 0 xy 1 NONE float xy +// +// +// Output signature: +// +// Name Index Mask Register SysValue Format Used +// -------------------- ----- ------ -------- -------- ------- ------ +// SV_TARGET 0 xyzw 0 TARGET float xyzw +// +ps_4_0 +dcl_sampler s0, mode_default +dcl_resource_texture2d (float,float,float,float) t0 +dcl_input_ps linear v1.xy +dcl_output o0.xyzw +dcl_temps 1 +sample r0.xyzw, v1.xyxx, t0.xyzw, s0 +mov o0.xyz, r0.xyzx +mov o0.w, l(1.000000) +ret +// Approximately 4 instruction slots used +#endif + +const BYTE g_PS_PassthroughRGB[] = +{ + 68, 88, 66, 67, 125, 186, + 250, 242, 113, 255, 59, 239, + 119, 158, 237, 78, 220, 43, + 160, 46, 1, 0, 0, 0, + 128, 2, 0, 0, 5, 0, + 0, 0, 52, 0, 0, 0, + 220, 0, 0, 0, 52, 1, + 0, 0, 104, 1, 0, 0, + 4, 2, 0, 0, 82, 68, + 69, 70, 160, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 2, 0, 0, 0, + 28, 0, 0, 0, 0, 4, + 255, 255, 0, 1, 0, 0, + 108, 0, 0, 0, 92, 0, + 0, 0, 3, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 0, + 0, 0, 1, 0, 0, 0, + 100, 0, 0, 0, 2, 0, + 0, 0, 5, 0, 0, 0, + 4, 0, 0, 0, 255, 255, + 255, 255, 0, 0, 0, 0, + 1, 0, 0, 0, 13, 0, + 0, 0, 83, 97, 109, 112, + 108, 101, 114, 0, 84, 101, + 120, 116, 117, 114, 101, 0, + 77, 105, 99, 114, 111, 115, + 111, 102, 116, 32, 40, 82, + 41, 32, 72, 76, 83, 76, + 32, 83, 104, 97, 100, 101, + 114, 32, 67, 111, 109, 112, + 105, 108, 101, 114, 32, 57, + 46, 51, 48, 46, 57, 50, + 48, 48, 46, 49, 54, 51, + 56, 52, 0, 171, 73, 83, + 71, 78, 80, 0, 0, 0, + 2, 0, 0, 0, 8, 0, + 0, 0, 56, 0, 0, 0, + 0, 0, 0, 0, 1, 0, + 0, 0, 3, 0, 0, 0, + 0, 0, 0, 0, 15, 0, + 0, 0, 68, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 3, 0, 0, 0, + 1, 0, 0, 0, 3, 3, + 0, 0, 83, 86, 95, 80, + 79, 83, 73, 84, 73, 79, + 78, 0, 84, 69, 88, 67, + 79, 79, 82, 68, 0, 171, + 171, 171, 79, 83, 71, 78, + 44, 0, 0, 0, 1, 0, + 0, 0, 8, 0, 0, 0, + 32, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 0, 0, + 0, 0, 15, 0, 0, 0, + 83, 86, 95, 84, 65, 82, + 71, 69, 84, 0, 171, 171, + 83, 72, 68, 82, 148, 0, + 0, 0, 64, 0, 0, 0, + 37, 0, 0, 0, 90, 0, + 0, 3, 0, 96, 16, 0, + 0, 0, 0, 0, 88, 24, + 0, 4, 0, 112, 16, 0, + 0, 0, 0, 0, 85, 85, + 0, 0, 98, 16, 0, 3, + 50, 16, 16, 0, 1, 0, + 0, 0, 101, 0, 0, 3, + 242, 32, 16, 0, 0, 0, + 0, 0, 104, 0, 0, 2, + 1, 0, 0, 0, 69, 0, + 0, 9, 242, 0, 16, 0, + 0, 0, 0, 0, 70, 16, + 16, 0, 1, 0, 0, 0, + 70, 126, 16, 0, 0, 0, + 0, 0, 0, 96, 16, 0, + 0, 0, 0, 0, 54, 0, + 0, 5, 114, 32, 16, 0, + 0, 0, 0, 0, 70, 2, + 16, 0, 0, 0, 0, 0, + 54, 0, 0, 5, 130, 32, + 16, 0, 0, 0, 0, 0, + 1, 64, 0, 0, 0, 0, + 128, 63, 62, 0, 0, 1, + 83, 84, 65, 84, 116, 0, + 0, 0, 4, 0, 0, 0, + 1, 0, 0, 0, 0, 0, + 0, 0, 2, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0 +}; diff --git a/src/libGLESv2/renderer/shaders/compiled/passthroughrgba11ps.h b/src/libGLESv2/renderer/shaders/compiled/passthroughrgba11ps.h index 55f2fef5..bf9ee709 100644 --- a/src/libGLESv2/renderer/shaders/compiled/passthroughrgba11ps.h +++ b/src/libGLESv2/renderer/shaders/compiled/passthroughrgba11ps.h @@ -1,144 +1,141 @@ -#if 0
-//
-// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
-//
-//
-// fxc /E PS_PassthroughRGBA /T ps_4_0 /Fh compiled/passthroughrgba11ps.h
-// Passthrough11.hlsl
-//
-//
-// Resource Bindings:
-//
-// Name Type Format Dim Slot Elements
-// ------------------------------ ---------- ------- ----------- ---- --------
-// Sampler sampler NA NA 0 1
-// Texture texture float4 2d 0 1
-//
-//
-//
-// Input signature:
-//
-// Name Index Mask Register SysValue Format Used
-// -------------------- ----- ------ -------- -------- ------ ------
-// SV_POSITION 0 xyzw 0 POS float
-// TEXCOORD 0 xy 1 NONE float xy
-//
-//
-// Output signature:
-//
-// Name Index Mask Register SysValue Format Used
-// -------------------- ----- ------ -------- -------- ------ ------
-// SV_TARGET 0 xyzw 0 TARGET float xyzw
-//
-ps_4_0
-dcl_sampler s0, mode_default
-dcl_resource_texture2d (float,float,float,float) t0
-dcl_input_ps linear v1.xy
-dcl_output o0.xyzw
-sample o0.xyzw, v1.xyxx, t0.xyzw, s0
-ret
-// Approximately 2 instruction slots used
-#endif
-
-const BYTE g_PS_PassthroughRGBA[] =
-{
- 68, 88, 66, 67, 152, 86,
- 225, 107, 155, 83, 216, 13,
- 154, 212, 144, 5, 82, 74,
- 90, 98, 1, 0, 0, 0,
- 80, 2, 0, 0, 5, 0,
- 0, 0, 52, 0, 0, 0,
- 220, 0, 0, 0, 52, 1,
- 0, 0, 104, 1, 0, 0,
- 212, 1, 0, 0, 82, 68,
- 69, 70, 160, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 2, 0, 0, 0,
- 28, 0, 0, 0, 0, 4,
- 255, 255, 0, 1, 0, 0,
- 108, 0, 0, 0, 92, 0,
- 0, 0, 3, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 1, 0,
- 0, 0, 1, 0, 0, 0,
- 100, 0, 0, 0, 2, 0,
- 0, 0, 5, 0, 0, 0,
- 4, 0, 0, 0, 255, 255,
- 255, 255, 0, 0, 0, 0,
- 1, 0, 0, 0, 13, 0,
- 0, 0, 83, 97, 109, 112,
- 108, 101, 114, 0, 84, 101,
- 120, 116, 117, 114, 101, 0,
- 77, 105, 99, 114, 111, 115,
- 111, 102, 116, 32, 40, 82,
- 41, 32, 72, 76, 83, 76,
- 32, 83, 104, 97, 100, 101,
- 114, 32, 67, 111, 109, 112,
- 105, 108, 101, 114, 32, 57,
- 46, 50, 57, 46, 57, 53,
- 50, 46, 51, 49, 49, 49,
- 0, 171, 171, 171, 73, 83,
- 71, 78, 80, 0, 0, 0,
- 2, 0, 0, 0, 8, 0,
- 0, 0, 56, 0, 0, 0,
- 0, 0, 0, 0, 1, 0,
- 0, 0, 3, 0, 0, 0,
- 0, 0, 0, 0, 15, 0,
- 0, 0, 68, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 3, 0, 0, 0,
- 1, 0, 0, 0, 3, 3,
- 0, 0, 83, 86, 95, 80,
- 79, 83, 73, 84, 73, 79,
- 78, 0, 84, 69, 88, 67,
- 79, 79, 82, 68, 0, 171,
- 171, 171, 79, 83, 71, 78,
- 44, 0, 0, 0, 1, 0,
- 0, 0, 8, 0, 0, 0,
- 32, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 3, 0, 0, 0, 0, 0,
- 0, 0, 15, 0, 0, 0,
- 83, 86, 95, 84, 65, 82,
- 71, 69, 84, 0, 171, 171,
- 83, 72, 68, 82, 100, 0,
- 0, 0, 64, 0, 0, 0,
- 25, 0, 0, 0, 90, 0,
- 0, 3, 0, 96, 16, 0,
- 0, 0, 0, 0, 88, 24,
- 0, 4, 0, 112, 16, 0,
- 0, 0, 0, 0, 85, 85,
- 0, 0, 98, 16, 0, 3,
- 50, 16, 16, 0, 1, 0,
- 0, 0, 101, 0, 0, 3,
- 242, 32, 16, 0, 0, 0,
- 0, 0, 69, 0, 0, 9,
- 242, 32, 16, 0, 0, 0,
- 0, 0, 70, 16, 16, 0,
- 1, 0, 0, 0, 70, 126,
- 16, 0, 0, 0, 0, 0,
- 0, 96, 16, 0, 0, 0,
- 0, 0, 62, 0, 0, 1,
- 83, 84, 65, 84, 116, 0,
- 0, 0, 2, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 2, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 1, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 1, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0
-};
+#if 0 +// +// Generated by Microsoft (R) HLSL Shader Compiler 9.30.9200.16384 +// +// +/// +// Resource Bindings: +// +// Name Type Format Dim Slot Elements +// ------------------------------ ---------- ------- ----------- ---- -------- +// Sampler sampler NA NA 0 1 +// Texture texture float4 2d 0 1 +// +// +// +// Input signature: +// +// Name Index Mask Register SysValue Format Used +// -------------------- ----- ------ -------- -------- ------- ------ +// SV_POSITION 0 xyzw 0 POS float +// TEXCOORD 0 xy 1 NONE float xy +// +// +// Output signature: +// +// Name Index Mask Register SysValue Format Used +// -------------------- ----- ------ -------- -------- ------- ------ +// SV_TARGET 0 xyzw 0 TARGET float xyzw +// +ps_4_0 +dcl_sampler s0, mode_default +dcl_resource_texture2d (float,float,float,float) t0 +dcl_input_ps linear v1.xy +dcl_output o0.xyzw +sample o0.xyzw, v1.xyxx, t0.xyzw, s0 +ret +// Approximately 2 instruction slots used +#endif + +const BYTE g_PS_PassthroughRGBA[] = +{ + 68, 88, 66, 67, 151, 152, + 8, 102, 174, 135, 76, 57, + 100, 146, 59, 74, 205, 35, + 206, 21, 1, 0, 0, 0, + 80, 2, 0, 0, 5, 0, + 0, 0, 52, 0, 0, 0, + 220, 0, 0, 0, 52, 1, + 0, 0, 104, 1, 0, 0, + 212, 1, 0, 0, 82, 68, + 69, 70, 160, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 2, 0, 0, 0, + 28, 0, 0, 0, 0, 4, + 255, 255, 0, 1, 0, 0, + 108, 0, 0, 0, 92, 0, + 0, 0, 3, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 0, + 0, 0, 1, 0, 0, 0, + 100, 0, 0, 0, 2, 0, + 0, 0, 5, 0, 0, 0, + 4, 0, 0, 0, 255, 255, + 255, 255, 0, 0, 0, 0, + 1, 0, 0, 0, 13, 0, + 0, 0, 83, 97, 109, 112, + 108, 101, 114, 0, 84, 101, + 120, 116, 117, 114, 101, 0, + 77, 105, 99, 114, 111, 115, + 111, 102, 116, 32, 40, 82, + 41, 32, 72, 76, 83, 76, + 32, 83, 104, 97, 100, 101, + 114, 32, 67, 111, 109, 112, + 105, 108, 101, 114, 32, 57, + 46, 51, 48, 46, 57, 50, + 48, 48, 46, 49, 54, 51, + 56, 52, 0, 171, 73, 83, + 71, 78, 80, 0, 0, 0, + 2, 0, 0, 0, 8, 0, + 0, 0, 56, 0, 0, 0, + 0, 0, 0, 0, 1, 0, + 0, 0, 3, 0, 0, 0, + 0, 0, 0, 0, 15, 0, + 0, 0, 68, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 3, 0, 0, 0, + 1, 0, 0, 0, 3, 3, + 0, 0, 83, 86, 95, 80, + 79, 83, 73, 84, 73, 79, + 78, 0, 84, 69, 88, 67, + 79, 79, 82, 68, 0, 171, + 171, 171, 79, 83, 71, 78, + 44, 0, 0, 0, 1, 0, + 0, 0, 8, 0, 0, 0, + 32, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 0, 0, + 0, 0, 15, 0, 0, 0, + 83, 86, 95, 84, 65, 82, + 71, 69, 84, 0, 171, 171, + 83, 72, 68, 82, 100, 0, + 0, 0, 64, 0, 0, 0, + 25, 0, 0, 0, 90, 0, + 0, 3, 0, 96, 16, 0, + 0, 0, 0, 0, 88, 24, + 0, 4, 0, 112, 16, 0, + 0, 0, 0, 0, 85, 85, + 0, 0, 98, 16, 0, 3, + 50, 16, 16, 0, 1, 0, + 0, 0, 101, 0, 0, 3, + 242, 32, 16, 0, 0, 0, + 0, 0, 69, 0, 0, 9, + 242, 32, 16, 0, 0, 0, + 0, 0, 70, 16, 16, 0, + 1, 0, 0, 0, 70, 126, + 16, 0, 0, 0, 0, 0, + 0, 96, 16, 0, 0, 0, + 0, 0, 62, 0, 0, 1, + 83, 84, 65, 84, 116, 0, + 0, 0, 2, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 2, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0 +}; diff --git a/src/libGLESv2/renderer/shaders/compiled/standardvs.h b/src/libGLESv2/renderer/shaders/compiled/standardvs.h index 8ea892eb..0841cfb3 100644 --- a/src/libGLESv2/renderer/shaders/compiled/standardvs.h +++ b/src/libGLESv2/renderer/shaders/compiled/standardvs.h @@ -1,69 +1,67 @@ -#if 0
-//
-// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
-//
-// fxc /E standardvs /T vs_2_0 /Fh compiled/standardvs.h Blit.vs
-//
-//
-// Parameters:
-//
-// float4 halfPixelSize;
-//
-//
-// Registers:
-//
-// Name Reg Size
-// ------------- ----- ----
-// halfPixelSize c0 1
-//
-
- vs_2_0
- def c1, 0.5, -0.5, 1, 0
- dcl_position v0
- add oPos, v0, c0
- mad oT0, v0, c1.xyzz, c1.xxww
-
-// approximately 2 instruction slots used
-#endif
-
-const BYTE g_vs20_standardvs[] =
-{
- 0, 2, 254, 255, 254, 255,
- 35, 0, 67, 84, 65, 66,
- 28, 0, 0, 0, 87, 0,
- 0, 0, 0, 2, 254, 255,
- 1, 0, 0, 0, 28, 0,
- 0, 0, 0, 1, 0, 0,
- 80, 0, 0, 0, 48, 0,
- 0, 0, 2, 0, 0, 0,
- 1, 0, 0, 0, 64, 0,
- 0, 0, 0, 0, 0, 0,
- 104, 97, 108, 102, 80, 105,
- 120, 101, 108, 83, 105, 122,
- 101, 0, 171, 171, 1, 0,
- 3, 0, 1, 0, 4, 0,
- 1, 0, 0, 0, 0, 0,
- 0, 0, 118, 115, 95, 50,
- 95, 48, 0, 77, 105, 99,
- 114, 111, 115, 111, 102, 116,
- 32, 40, 82, 41, 32, 72,
- 76, 83, 76, 32, 83, 104,
- 97, 100, 101, 114, 32, 67,
- 111, 109, 112, 105, 108, 101,
- 114, 32, 57, 46, 50, 57,
- 46, 57, 53, 50, 46, 51,
- 49, 49, 49, 0, 81, 0,
- 0, 5, 1, 0, 15, 160,
- 0, 0, 0, 63, 0, 0,
- 0, 191, 0, 0, 128, 63,
- 0, 0, 0, 0, 31, 0,
- 0, 2, 0, 0, 0, 128,
- 0, 0, 15, 144, 2, 0,
- 0, 3, 0, 0, 15, 192,
- 0, 0, 228, 144, 0, 0,
- 228, 160, 4, 0, 0, 4,
- 0, 0, 15, 224, 0, 0,
- 228, 144, 1, 0, 164, 160,
- 1, 0, 240, 160, 255, 255,
- 0, 0
-};
+#if 0 +// +// Generated by Microsoft (R) HLSL Shader Compiler 9.30.9200.16384 +// +/// +// Parameters: +// +// float4 halfPixelSize; +// +// +// Registers: +// +// Name Reg Size +// ------------- ----- ---- +// halfPixelSize c0 1 +// + + vs_2_0 + def c1, 0.5, -0.5, 1, 0 + dcl_position v0 + add oPos, v0, c0 + mad oT0, v0, c1.xyzz, c1.xxww + +// approximately 2 instruction slots used +#endif + +const BYTE g_vs20_standardvs[] = +{ + 0, 2, 254, 255, 254, 255, + 36, 0, 67, 84, 65, 66, + 28, 0, 0, 0, 87, 0, + 0, 0, 0, 2, 254, 255, + 1, 0, 0, 0, 28, 0, + 0, 0, 0, 1, 0, 0, + 80, 0, 0, 0, 48, 0, + 0, 0, 2, 0, 0, 0, + 1, 0, 0, 0, 64, 0, + 0, 0, 0, 0, 0, 0, + 104, 97, 108, 102, 80, 105, + 120, 101, 108, 83, 105, 122, + 101, 0, 171, 171, 1, 0, + 3, 0, 1, 0, 4, 0, + 1, 0, 0, 0, 0, 0, + 0, 0, 118, 115, 95, 50, + 95, 48, 0, 77, 105, 99, + 114, 111, 115, 111, 102, 116, + 32, 40, 82, 41, 32, 72, + 76, 83, 76, 32, 83, 104, + 97, 100, 101, 114, 32, 67, + 111, 109, 112, 105, 108, 101, + 114, 32, 57, 46, 51, 48, + 46, 57, 50, 48, 48, 46, + 49, 54, 51, 56, 52, 0, + 171, 171, 81, 0, 0, 5, + 1, 0, 15, 160, 0, 0, + 0, 63, 0, 0, 0, 191, + 0, 0, 128, 63, 0, 0, + 0, 0, 31, 0, 0, 2, + 0, 0, 0, 128, 0, 0, + 15, 144, 2, 0, 0, 3, + 0, 0, 15, 192, 0, 0, + 228, 144, 0, 0, 228, 160, + 4, 0, 0, 4, 0, 0, + 15, 224, 0, 0, 228, 144, + 1, 0, 164, 160, 1, 0, + 240, 160, 255, 255, 0, 0 +}; diff --git a/src/libGLESv2/renderer/shaders/generate_shaders.bat b/src/libGLESv2/renderer/shaders/generate_shaders.bat index 04ef1368..48fd7ee1 100644 --- a/src/libGLESv2/renderer/shaders/generate_shaders.bat +++ b/src/libGLESv2/renderer/shaders/generate_shaders.bat @@ -1,24 +1,24 @@ -@ECHO OFF
-REM
-REM Copyright (c) 2012 The ANGLE Project Authors. All rights reserved.
-REM Use of this source code is governed by a BSD-style license that can be
-REM found in the LICENSE file.
-REM
-
-PATH %PATH%;%DXSDK_DIR%\Utilities\bin\x86
-
-fxc /E standardvs /T vs_2_0 /Fh compiled/standardvs.h Blit.vs
-fxc /E flipyvs /T vs_2_0 /Fh compiled/flipyvs.h Blit.vs
-fxc /E passthroughps /T ps_2_0 /Fh compiled/passthroughps.h Blit.ps
-fxc /E luminanceps /T ps_2_0 /Fh compiled/luminanceps.h Blit.ps
-fxc /E componentmaskps /T ps_2_0 /Fh compiled/componentmaskps.h Blit.ps
-
-fxc /E VS_Passthrough /T vs_4_0 /Fh compiled/passthrough11vs.h Passthrough11.hlsl
-fxc /E PS_PassthroughRGBA /T ps_4_0 /Fh compiled/passthroughrgba11ps.h Passthrough11.hlsl
-fxc /E PS_PassthroughRGB /T ps_4_0 /Fh compiled/passthroughrgb11ps.h Passthrough11.hlsl
-fxc /E PS_PassthroughLum /T ps_4_0 /Fh compiled/passthroughlum11ps.h Passthrough11.hlsl
-fxc /E PS_PassthroughLumAlpha /T ps_4_0 /Fh compiled/passthroughlumalpha11ps.h Passthrough11.hlsl
-
-fxc /E VS_Clear /T vs_4_0 /Fh compiled/clear11vs.h Clear11.hlsl
-fxc /E PS_ClearSingle /T ps_4_0 /Fh compiled/clearsingle11ps.h Clear11.hlsl
-fxc /E PS_ClearMultiple /T ps_4_0 /Fh compiled/clearmultiple11ps.h Clear11.hlsl
+@ECHO OFF +REM +REM Copyright (c) 2012 The ANGLE Project Authors. All rights reserved. +REM Use of this source code is governed by a BSD-style license that can be +REM found in the LICENSE file. +REM + +PATH %PATH%;%ProgramFiles(x86)%\Windows Kits\8.0\bin\x86;%DXSDK_DIR%\Utilities\bin\x86 + +fxc /E standardvs /T vs_2_0 /Fh compiled/standardvs.h Blit.vs +fxc /E flipyvs /T vs_2_0 /Fh compiled/flipyvs.h Blit.vs +fxc /E passthroughps /T ps_2_0 /Fh compiled/passthroughps.h Blit.ps +fxc /E luminanceps /T ps_2_0 /Fh compiled/luminanceps.h Blit.ps +fxc /E componentmaskps /T ps_2_0 /Fh compiled/componentmaskps.h Blit.ps + +fxc /E VS_Passthrough /T vs_4_0 /Fh compiled/passthrough11vs.h Passthrough11.hlsl +fxc /E PS_PassthroughRGBA /T ps_4_0 /Fh compiled/passthroughrgba11ps.h Passthrough11.hlsl +fxc /E PS_PassthroughRGB /T ps_4_0 /Fh compiled/passthroughrgb11ps.h Passthrough11.hlsl +fxc /E PS_PassthroughLum /T ps_4_0 /Fh compiled/passthroughlum11ps.h Passthrough11.hlsl +fxc /E PS_PassthroughLumAlpha /T ps_4_0 /Fh compiled/passthroughlumalpha11ps.h Passthrough11.hlsl + +fxc /E VS_Clear /T vs_4_0 /Fh compiled/clear11vs.h Clear11.hlsl +fxc /E PS_ClearSingle /T ps_4_0 /Fh compiled/clearsingle11ps.h Clear11.hlsl +fxc /E PS_ClearMultiple /T ps_4_0 /Fh compiled/clearmultiple11ps.h Clear11.hlsl diff --git a/src/preprocessor.target.darwin-arm.mk b/src/preprocessor.target.darwin-arm.mk index 31c9ec76..4bd714e6 100644 --- a/src/preprocessor.target.darwin-arm.mk +++ b/src/preprocessor.target.darwin-arm.mk @@ -78,19 +78,17 @@ MY_DEFS_Debug := \ '-DANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ TEXT("d3dcompiler_46.dll"), TEXT("d3dcompiler_43.dll") }' \ '-D_FILE_OFFSET_BITS=64' \ '-DNO_TCMALLOC' \ - '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ - '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DDISABLE_NACL' \ '-DCHROMIUM_BUILD' \ '-DUSE_LIBJPEG_TURBO=1' \ '-DUSE_PROPRIETARY_CODECS' \ '-DENABLE_CONFIGURATION_POLICY' \ - '-DLOGGING_IS_OFFICIAL_BUILD=1' \ - '-DTRACING_IS_OFFICIAL_BUILD=1' \ - '-DENABLE_GPU=1' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DUSE_OPENSSL=1' \ '-DENABLE_EGLIMAGE=1' \ - '-DENABLE_PRINTING=1' \ + '-DCLD_VERSION=1' \ + '-DENABLE_MANAGED_USERS=1' \ '-DANDROID' \ '-D__GNU_SOURCE=1' \ '-DUSE_STLPORT=1' \ @@ -164,19 +162,17 @@ MY_DEFS_Release := \ '-DANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ TEXT("d3dcompiler_46.dll"), TEXT("d3dcompiler_43.dll") }' \ '-D_FILE_OFFSET_BITS=64' \ '-DNO_TCMALLOC' \ - '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ - '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DDISABLE_NACL' \ '-DCHROMIUM_BUILD' \ '-DUSE_LIBJPEG_TURBO=1' \ '-DUSE_PROPRIETARY_CODECS' \ '-DENABLE_CONFIGURATION_POLICY' \ - '-DLOGGING_IS_OFFICIAL_BUILD=1' \ - '-DTRACING_IS_OFFICIAL_BUILD=1' \ - '-DENABLE_GPU=1' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DUSE_OPENSSL=1' \ '-DENABLE_EGLIMAGE=1' \ - '-DENABLE_PRINTING=1' \ + '-DCLD_VERSION=1' \ + '-DENABLE_MANAGED_USERS=1' \ '-DANDROID' \ '-D__GNU_SOURCE=1' \ '-DUSE_STLPORT=1' \ diff --git a/src/preprocessor.target.darwin-mips.mk b/src/preprocessor.target.darwin-mips.mk index 3fc00116..cf665a41 100644 --- a/src/preprocessor.target.darwin-mips.mk +++ b/src/preprocessor.target.darwin-mips.mk @@ -78,19 +78,17 @@ MY_DEFS_Debug := \ '-DANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ TEXT("d3dcompiler_46.dll"), TEXT("d3dcompiler_43.dll") }' \ '-D_FILE_OFFSET_BITS=64' \ '-DNO_TCMALLOC' \ - '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ - '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DDISABLE_NACL' \ '-DCHROMIUM_BUILD' \ '-DUSE_LIBJPEG_TURBO=1' \ '-DUSE_PROPRIETARY_CODECS' \ '-DENABLE_CONFIGURATION_POLICY' \ - '-DLOGGING_IS_OFFICIAL_BUILD=1' \ - '-DTRACING_IS_OFFICIAL_BUILD=1' \ - '-DENABLE_GPU=1' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DUSE_OPENSSL=1' \ '-DENABLE_EGLIMAGE=1' \ - '-DENABLE_PRINTING=1' \ + '-DCLD_VERSION=1' \ + '-DENABLE_MANAGED_USERS=1' \ '-DANDROID' \ '-D__GNU_SOURCE=1' \ '-DUSE_STLPORT=1' \ @@ -164,19 +162,17 @@ MY_DEFS_Release := \ '-DANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ TEXT("d3dcompiler_46.dll"), TEXT("d3dcompiler_43.dll") }' \ '-D_FILE_OFFSET_BITS=64' \ '-DNO_TCMALLOC' \ - '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ - '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DDISABLE_NACL' \ '-DCHROMIUM_BUILD' \ '-DUSE_LIBJPEG_TURBO=1' \ '-DUSE_PROPRIETARY_CODECS' \ '-DENABLE_CONFIGURATION_POLICY' \ - '-DLOGGING_IS_OFFICIAL_BUILD=1' \ - '-DTRACING_IS_OFFICIAL_BUILD=1' \ - '-DENABLE_GPU=1' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DUSE_OPENSSL=1' \ '-DENABLE_EGLIMAGE=1' \ - '-DENABLE_PRINTING=1' \ + '-DCLD_VERSION=1' \ + '-DENABLE_MANAGED_USERS=1' \ '-DANDROID' \ '-D__GNU_SOURCE=1' \ '-DUSE_STLPORT=1' \ diff --git a/src/preprocessor.target.darwin-x86.mk b/src/preprocessor.target.darwin-x86.mk index 50f920b9..3ba28657 100644 --- a/src/preprocessor.target.darwin-x86.mk +++ b/src/preprocessor.target.darwin-x86.mk @@ -62,11 +62,11 @@ MY_CFLAGS_Debug := \ -Wno-extra \ -Wno-ignored-qualifiers \ -Wno-type-limits \ + -fno-stack-protector \ -Wno-address \ -Wno-format-security \ -Wno-return-type \ -Wno-sequence-point \ - -fno-stack-protector \ -Os \ -g \ -fomit-frame-pointer \ @@ -80,19 +80,17 @@ MY_DEFS_Debug := \ '-DANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ TEXT("d3dcompiler_46.dll"), TEXT("d3dcompiler_43.dll") }' \ '-D_FILE_OFFSET_BITS=64' \ '-DNO_TCMALLOC' \ - '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ - '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DDISABLE_NACL' \ '-DCHROMIUM_BUILD' \ '-DUSE_LIBJPEG_TURBO=1' \ '-DUSE_PROPRIETARY_CODECS' \ '-DENABLE_CONFIGURATION_POLICY' \ - '-DLOGGING_IS_OFFICIAL_BUILD=1' \ - '-DTRACING_IS_OFFICIAL_BUILD=1' \ - '-DENABLE_GPU=1' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DUSE_OPENSSL=1' \ '-DENABLE_EGLIMAGE=1' \ - '-DENABLE_PRINTING=1' \ + '-DCLD_VERSION=1' \ + '-DENABLE_MANAGED_USERS=1' \ '-DANDROID' \ '-D__GNU_SOURCE=1' \ '-DUSE_STLPORT=1' \ @@ -149,11 +147,11 @@ MY_CFLAGS_Release := \ -Wno-extra \ -Wno-ignored-qualifiers \ -Wno-type-limits \ + -fno-stack-protector \ -Wno-address \ -Wno-format-security \ -Wno-return-type \ -Wno-sequence-point \ - -fno-stack-protector \ -Os \ -fno-ident \ -fdata-sections \ @@ -169,19 +167,17 @@ MY_DEFS_Release := \ '-DANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ TEXT("d3dcompiler_46.dll"), TEXT("d3dcompiler_43.dll") }' \ '-D_FILE_OFFSET_BITS=64' \ '-DNO_TCMALLOC' \ - '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ - '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DDISABLE_NACL' \ '-DCHROMIUM_BUILD' \ '-DUSE_LIBJPEG_TURBO=1' \ '-DUSE_PROPRIETARY_CODECS' \ '-DENABLE_CONFIGURATION_POLICY' \ - '-DLOGGING_IS_OFFICIAL_BUILD=1' \ - '-DTRACING_IS_OFFICIAL_BUILD=1' \ - '-DENABLE_GPU=1' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DUSE_OPENSSL=1' \ '-DENABLE_EGLIMAGE=1' \ - '-DENABLE_PRINTING=1' \ + '-DCLD_VERSION=1' \ + '-DENABLE_MANAGED_USERS=1' \ '-DANDROID' \ '-D__GNU_SOURCE=1' \ '-DUSE_STLPORT=1' \ diff --git a/src/preprocessor.target.linux-arm.mk b/src/preprocessor.target.linux-arm.mk index 31c9ec76..4bd714e6 100644 --- a/src/preprocessor.target.linux-arm.mk +++ b/src/preprocessor.target.linux-arm.mk @@ -78,19 +78,17 @@ MY_DEFS_Debug := \ '-DANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ TEXT("d3dcompiler_46.dll"), TEXT("d3dcompiler_43.dll") }' \ '-D_FILE_OFFSET_BITS=64' \ '-DNO_TCMALLOC' \ - '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ - '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DDISABLE_NACL' \ '-DCHROMIUM_BUILD' \ '-DUSE_LIBJPEG_TURBO=1' \ '-DUSE_PROPRIETARY_CODECS' \ '-DENABLE_CONFIGURATION_POLICY' \ - '-DLOGGING_IS_OFFICIAL_BUILD=1' \ - '-DTRACING_IS_OFFICIAL_BUILD=1' \ - '-DENABLE_GPU=1' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DUSE_OPENSSL=1' \ '-DENABLE_EGLIMAGE=1' \ - '-DENABLE_PRINTING=1' \ + '-DCLD_VERSION=1' \ + '-DENABLE_MANAGED_USERS=1' \ '-DANDROID' \ '-D__GNU_SOURCE=1' \ '-DUSE_STLPORT=1' \ @@ -164,19 +162,17 @@ MY_DEFS_Release := \ '-DANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ TEXT("d3dcompiler_46.dll"), TEXT("d3dcompiler_43.dll") }' \ '-D_FILE_OFFSET_BITS=64' \ '-DNO_TCMALLOC' \ - '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ - '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DDISABLE_NACL' \ '-DCHROMIUM_BUILD' \ '-DUSE_LIBJPEG_TURBO=1' \ '-DUSE_PROPRIETARY_CODECS' \ '-DENABLE_CONFIGURATION_POLICY' \ - '-DLOGGING_IS_OFFICIAL_BUILD=1' \ - '-DTRACING_IS_OFFICIAL_BUILD=1' \ - '-DENABLE_GPU=1' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DUSE_OPENSSL=1' \ '-DENABLE_EGLIMAGE=1' \ - '-DENABLE_PRINTING=1' \ + '-DCLD_VERSION=1' \ + '-DENABLE_MANAGED_USERS=1' \ '-DANDROID' \ '-D__GNU_SOURCE=1' \ '-DUSE_STLPORT=1' \ diff --git a/src/preprocessor.target.linux-mips.mk b/src/preprocessor.target.linux-mips.mk index 3fc00116..cf665a41 100644 --- a/src/preprocessor.target.linux-mips.mk +++ b/src/preprocessor.target.linux-mips.mk @@ -78,19 +78,17 @@ MY_DEFS_Debug := \ '-DANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ TEXT("d3dcompiler_46.dll"), TEXT("d3dcompiler_43.dll") }' \ '-D_FILE_OFFSET_BITS=64' \ '-DNO_TCMALLOC' \ - '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ - '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DDISABLE_NACL' \ '-DCHROMIUM_BUILD' \ '-DUSE_LIBJPEG_TURBO=1' \ '-DUSE_PROPRIETARY_CODECS' \ '-DENABLE_CONFIGURATION_POLICY' \ - '-DLOGGING_IS_OFFICIAL_BUILD=1' \ - '-DTRACING_IS_OFFICIAL_BUILD=1' \ - '-DENABLE_GPU=1' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DUSE_OPENSSL=1' \ '-DENABLE_EGLIMAGE=1' \ - '-DENABLE_PRINTING=1' \ + '-DCLD_VERSION=1' \ + '-DENABLE_MANAGED_USERS=1' \ '-DANDROID' \ '-D__GNU_SOURCE=1' \ '-DUSE_STLPORT=1' \ @@ -164,19 +162,17 @@ MY_DEFS_Release := \ '-DANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ TEXT("d3dcompiler_46.dll"), TEXT("d3dcompiler_43.dll") }' \ '-D_FILE_OFFSET_BITS=64' \ '-DNO_TCMALLOC' \ - '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ - '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DDISABLE_NACL' \ '-DCHROMIUM_BUILD' \ '-DUSE_LIBJPEG_TURBO=1' \ '-DUSE_PROPRIETARY_CODECS' \ '-DENABLE_CONFIGURATION_POLICY' \ - '-DLOGGING_IS_OFFICIAL_BUILD=1' \ - '-DTRACING_IS_OFFICIAL_BUILD=1' \ - '-DENABLE_GPU=1' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DUSE_OPENSSL=1' \ '-DENABLE_EGLIMAGE=1' \ - '-DENABLE_PRINTING=1' \ + '-DCLD_VERSION=1' \ + '-DENABLE_MANAGED_USERS=1' \ '-DANDROID' \ '-D__GNU_SOURCE=1' \ '-DUSE_STLPORT=1' \ diff --git a/src/preprocessor.target.linux-x86.mk b/src/preprocessor.target.linux-x86.mk index 50f920b9..3ba28657 100644 --- a/src/preprocessor.target.linux-x86.mk +++ b/src/preprocessor.target.linux-x86.mk @@ -62,11 +62,11 @@ MY_CFLAGS_Debug := \ -Wno-extra \ -Wno-ignored-qualifiers \ -Wno-type-limits \ + -fno-stack-protector \ -Wno-address \ -Wno-format-security \ -Wno-return-type \ -Wno-sequence-point \ - -fno-stack-protector \ -Os \ -g \ -fomit-frame-pointer \ @@ -80,19 +80,17 @@ MY_DEFS_Debug := \ '-DANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ TEXT("d3dcompiler_46.dll"), TEXT("d3dcompiler_43.dll") }' \ '-D_FILE_OFFSET_BITS=64' \ '-DNO_TCMALLOC' \ - '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ - '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DDISABLE_NACL' \ '-DCHROMIUM_BUILD' \ '-DUSE_LIBJPEG_TURBO=1' \ '-DUSE_PROPRIETARY_CODECS' \ '-DENABLE_CONFIGURATION_POLICY' \ - '-DLOGGING_IS_OFFICIAL_BUILD=1' \ - '-DTRACING_IS_OFFICIAL_BUILD=1' \ - '-DENABLE_GPU=1' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DUSE_OPENSSL=1' \ '-DENABLE_EGLIMAGE=1' \ - '-DENABLE_PRINTING=1' \ + '-DCLD_VERSION=1' \ + '-DENABLE_MANAGED_USERS=1' \ '-DANDROID' \ '-D__GNU_SOURCE=1' \ '-DUSE_STLPORT=1' \ @@ -149,11 +147,11 @@ MY_CFLAGS_Release := \ -Wno-extra \ -Wno-ignored-qualifiers \ -Wno-type-limits \ + -fno-stack-protector \ -Wno-address \ -Wno-format-security \ -Wno-return-type \ -Wno-sequence-point \ - -fno-stack-protector \ -Os \ -fno-ident \ -fdata-sections \ @@ -169,19 +167,17 @@ MY_DEFS_Release := \ '-DANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ TEXT("d3dcompiler_46.dll"), TEXT("d3dcompiler_43.dll") }' \ '-D_FILE_OFFSET_BITS=64' \ '-DNO_TCMALLOC' \ - '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ - '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DDISABLE_NACL' \ '-DCHROMIUM_BUILD' \ '-DUSE_LIBJPEG_TURBO=1' \ '-DUSE_PROPRIETARY_CODECS' \ '-DENABLE_CONFIGURATION_POLICY' \ - '-DLOGGING_IS_OFFICIAL_BUILD=1' \ - '-DTRACING_IS_OFFICIAL_BUILD=1' \ - '-DENABLE_GPU=1' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DUSE_OPENSSL=1' \ '-DENABLE_EGLIMAGE=1' \ - '-DENABLE_PRINTING=1' \ + '-DCLD_VERSION=1' \ + '-DENABLE_MANAGED_USERS=1' \ '-DANDROID' \ '-D__GNU_SOURCE=1' \ '-DUSE_STLPORT=1' \ diff --git a/src/third_party/murmurhash/MurmurHash3.cpp b/src/third_party/murmurhash/MurmurHash3.cpp index 94a18a59..dd862926 100644 --- a/src/third_party/murmurhash/MurmurHash3.cpp +++ b/src/third_party/murmurhash/MurmurHash3.cpp @@ -1,334 +1,334 @@ -//-----------------------------------------------------------------------------
-// MurmurHash3 was written by Austin Appleby, and is placed in the public
-// domain. The author hereby disclaims copyright to this source code.
-
-// Note - The x86 and x64 versions do _not_ produce the same results, as the
-// algorithms are optimized for their respective platforms. You can still
-// compile and run any of them on any platform, but your performance with the
-// non-native version will be less than optimal.
-
-#include "MurmurHash3.h"
-
-//-----------------------------------------------------------------------------
-// Platform-specific functions and macros
-
-// Microsoft Visual Studio
-
-#if defined(_MSC_VER)
-
-#define FORCE_INLINE __forceinline
-
-#include <stdlib.h>
-
-#define ROTL32(x,y) _rotl(x,y)
-#define ROTL64(x,y) _rotl64(x,y)
-
-#define BIG_CONSTANT(x) (x)
-
-// Other compilers
-
-#else // defined(_MSC_VER)
-
-#define FORCE_INLINE __attribute__((always_inline))
-
-inline uint32_t rotl32 ( uint32_t x, int8_t r )
-{
- return (x << r) | (x >> (32 - r));
-}
-
-inline uint64_t rotl64 ( uint64_t x, int8_t r )
-{
- return (x << r) | (x >> (64 - r));
-}
-
-#define ROTL32(x,y) rotl32(x,y)
-#define ROTL64(x,y) rotl64(x,y)
-
-#define BIG_CONSTANT(x) (x##LLU)
-
-#endif // !defined(_MSC_VER)
-
-//-----------------------------------------------------------------------------
-// Block read - if your platform needs to do endian-swapping or can only
-// handle aligned reads, do the conversion here
-
-FORCE_INLINE uint32_t getblock ( const uint32_t * p, int i )
-{
- return p[i];
-}
-
-FORCE_INLINE uint64_t getblock ( const uint64_t * p, int i )
-{
- return p[i];
-}
-
-//-----------------------------------------------------------------------------
-// Finalization mix - force all bits of a hash block to avalanche
-
-FORCE_INLINE uint32_t fmix ( uint32_t h )
-{
- h ^= h >> 16;
- h *= 0x85ebca6b;
- h ^= h >> 13;
- h *= 0xc2b2ae35;
- h ^= h >> 16;
-
- return h;
-}
-
-//----------
-
-FORCE_INLINE uint64_t fmix ( uint64_t k )
-{
- k ^= k >> 33;
- k *= BIG_CONSTANT(0xff51afd7ed558ccd);
- k ^= k >> 33;
- k *= BIG_CONSTANT(0xc4ceb9fe1a85ec53);
- k ^= k >> 33;
-
- return k;
-}
-
-//-----------------------------------------------------------------------------
-
-void MurmurHash3_x86_32 ( const void * key, int len,
- uint32_t seed, void * out )
-{
- const uint8_t * data = (const uint8_t*)key;
- const int nblocks = len / 4;
-
- uint32_t h1 = seed;
-
- const uint32_t c1 = 0xcc9e2d51;
- const uint32_t c2 = 0x1b873593;
-
- //----------
- // body
-
- const uint32_t * blocks = (const uint32_t *)(data + nblocks*4);
-
- for(int i = -nblocks; i; i++)
- {
- uint32_t k1 = getblock(blocks,i);
-
- k1 *= c1;
- k1 = ROTL32(k1,15);
- k1 *= c2;
-
- h1 ^= k1;
- h1 = ROTL32(h1,13);
- h1 = h1*5+0xe6546b64;
- }
-
- //----------
- // tail
-
- const uint8_t * tail = (const uint8_t*)(data + nblocks*4);
-
- uint32_t k1 = 0;
-
- switch(len & 3)
- {
- case 3: k1 ^= tail[2] << 16;
- case 2: k1 ^= tail[1] << 8;
- case 1: k1 ^= tail[0];
- k1 *= c1; k1 = ROTL32(k1,15); k1 *= c2; h1 ^= k1;
- };
-
- //----------
- // finalization
-
- h1 ^= len;
-
- h1 = fmix(h1);
-
- *(uint32_t*)out = h1;
-}
-
-//-----------------------------------------------------------------------------
-
-void MurmurHash3_x86_128 ( const void * key, const int len,
- uint32_t seed, void * out )
-{
- const uint8_t * data = (const uint8_t*)key;
- const int nblocks = len / 16;
-
- uint32_t h1 = seed;
- uint32_t h2 = seed;
- uint32_t h3 = seed;
- uint32_t h4 = seed;
-
- const uint32_t c1 = 0x239b961b;
- const uint32_t c2 = 0xab0e9789;
- const uint32_t c3 = 0x38b34ae5;
- const uint32_t c4 = 0xa1e38b93;
-
- //----------
- // body
-
- const uint32_t * blocks = (const uint32_t *)(data + nblocks*16);
-
- for(int i = -nblocks; i; i++)
- {
- uint32_t k1 = getblock(blocks,i*4+0);
- uint32_t k2 = getblock(blocks,i*4+1);
- uint32_t k3 = getblock(blocks,i*4+2);
- uint32_t k4 = getblock(blocks,i*4+3);
-
- k1 *= c1; k1 = ROTL32(k1,15); k1 *= c2; h1 ^= k1;
-
- h1 = ROTL32(h1,19); h1 += h2; h1 = h1*5+0x561ccd1b;
-
- k2 *= c2; k2 = ROTL32(k2,16); k2 *= c3; h2 ^= k2;
-
- h2 = ROTL32(h2,17); h2 += h3; h2 = h2*5+0x0bcaa747;
-
- k3 *= c3; k3 = ROTL32(k3,17); k3 *= c4; h3 ^= k3;
-
- h3 = ROTL32(h3,15); h3 += h4; h3 = h3*5+0x96cd1c35;
-
- k4 *= c4; k4 = ROTL32(k4,18); k4 *= c1; h4 ^= k4;
-
- h4 = ROTL32(h4,13); h4 += h1; h4 = h4*5+0x32ac3b17;
- }
-
- //----------
- // tail
-
- const uint8_t * tail = (const uint8_t*)(data + nblocks*16);
-
- uint32_t k1 = 0;
- uint32_t k2 = 0;
- uint32_t k3 = 0;
- uint32_t k4 = 0;
-
- switch(len & 15)
- {
- case 15: k4 ^= tail[14] << 16;
- case 14: k4 ^= tail[13] << 8;
- case 13: k4 ^= tail[12] << 0;
- k4 *= c4; k4 = ROTL32(k4,18); k4 *= c1; h4 ^= k4;
-
- case 12: k3 ^= tail[11] << 24;
- case 11: k3 ^= tail[10] << 16;
- case 10: k3 ^= tail[ 9] << 8;
- case 9: k3 ^= tail[ 8] << 0;
- k3 *= c3; k3 = ROTL32(k3,17); k3 *= c4; h3 ^= k3;
-
- case 8: k2 ^= tail[ 7] << 24;
- case 7: k2 ^= tail[ 6] << 16;
- case 6: k2 ^= tail[ 5] << 8;
- case 5: k2 ^= tail[ 4] << 0;
- k2 *= c2; k2 = ROTL32(k2,16); k2 *= c3; h2 ^= k2;
-
- case 4: k1 ^= tail[ 3] << 24;
- case 3: k1 ^= tail[ 2] << 16;
- case 2: k1 ^= tail[ 1] << 8;
- case 1: k1 ^= tail[ 0] << 0;
- k1 *= c1; k1 = ROTL32(k1,15); k1 *= c2; h1 ^= k1;
- };
-
- //----------
- // finalization
-
- h1 ^= len; h2 ^= len; h3 ^= len; h4 ^= len;
-
- h1 += h2; h1 += h3; h1 += h4;
- h2 += h1; h3 += h1; h4 += h1;
-
- h1 = fmix(h1);
- h2 = fmix(h2);
- h3 = fmix(h3);
- h4 = fmix(h4);
-
- h1 += h2; h1 += h3; h1 += h4;
- h2 += h1; h3 += h1; h4 += h1;
-
- ((uint32_t*)out)[0] = h1;
- ((uint32_t*)out)[1] = h2;
- ((uint32_t*)out)[2] = h3;
- ((uint32_t*)out)[3] = h4;
-}
-
-//-----------------------------------------------------------------------------
-
-void MurmurHash3_x64_128 ( const void * key, const int len,
- const uint32_t seed, void * out )
-{
- const uint8_t * data = (const uint8_t*)key;
- const int nblocks = len / 16;
-
- uint64_t h1 = seed;
- uint64_t h2 = seed;
-
- const uint64_t c1 = BIG_CONSTANT(0x87c37b91114253d5);
- const uint64_t c2 = BIG_CONSTANT(0x4cf5ad432745937f);
-
- //----------
- // body
-
- const uint64_t * blocks = (const uint64_t *)(data);
-
- for(int i = 0; i < nblocks; i++)
- {
- uint64_t k1 = getblock(blocks,i*2+0);
- uint64_t k2 = getblock(blocks,i*2+1);
-
- k1 *= c1; k1 = ROTL64(k1,31); k1 *= c2; h1 ^= k1;
-
- h1 = ROTL64(h1,27); h1 += h2; h1 = h1*5+0x52dce729;
-
- k2 *= c2; k2 = ROTL64(k2,33); k2 *= c1; h2 ^= k2;
-
- h2 = ROTL64(h2,31); h2 += h1; h2 = h2*5+0x38495ab5;
- }
-
- //----------
- // tail
-
- const uint8_t * tail = (const uint8_t*)(data + nblocks*16);
-
- uint64_t k1 = 0;
- uint64_t k2 = 0;
-
- switch(len & 15)
- {
- case 15: k2 ^= uint64_t(tail[14]) << 48;
- case 14: k2 ^= uint64_t(tail[13]) << 40;
- case 13: k2 ^= uint64_t(tail[12]) << 32;
- case 12: k2 ^= uint64_t(tail[11]) << 24;
- case 11: k2 ^= uint64_t(tail[10]) << 16;
- case 10: k2 ^= uint64_t(tail[ 9]) << 8;
- case 9: k2 ^= uint64_t(tail[ 8]) << 0;
- k2 *= c2; k2 = ROTL64(k2,33); k2 *= c1; h2 ^= k2;
-
- case 8: k1 ^= uint64_t(tail[ 7]) << 56;
- case 7: k1 ^= uint64_t(tail[ 6]) << 48;
- case 6: k1 ^= uint64_t(tail[ 5]) << 40;
- case 5: k1 ^= uint64_t(tail[ 4]) << 32;
- case 4: k1 ^= uint64_t(tail[ 3]) << 24;
- case 3: k1 ^= uint64_t(tail[ 2]) << 16;
- case 2: k1 ^= uint64_t(tail[ 1]) << 8;
- case 1: k1 ^= uint64_t(tail[ 0]) << 0;
- k1 *= c1; k1 = ROTL64(k1,31); k1 *= c2; h1 ^= k1;
- };
-
- //----------
- // finalization
-
- h1 ^= len; h2 ^= len;
-
- h1 += h2;
- h2 += h1;
-
- h1 = fmix(h1);
- h2 = fmix(h2);
-
- h1 += h2;
- h2 += h1;
-
- ((uint64_t*)out)[0] = h1;
- ((uint64_t*)out)[1] = h2;
-}
-
-//-----------------------------------------------------------------------------
+//----------------------------------------------------------------------------- +// MurmurHash3 was written by Austin Appleby, and is placed in the public +// domain. The author hereby disclaims copyright to this source code. + +// Note - The x86 and x64 versions do _not_ produce the same results, as the +// algorithms are optimized for their respective platforms. You can still +// compile and run any of them on any platform, but your performance with the +// non-native version will be less than optimal. + +#include "MurmurHash3.h" + +//----------------------------------------------------------------------------- +// Platform-specific functions and macros + +// Microsoft Visual Studio + +#if defined(_MSC_VER) + +#define FORCE_INLINE __forceinline + +#include <stdlib.h> + +#define ROTL32(x,y) _rotl(x,y) +#define ROTL64(x,y) _rotl64(x,y) + +#define BIG_CONSTANT(x) (x) + +// Other compilers + +#else // defined(_MSC_VER) + +#define FORCE_INLINE __attribute__((always_inline)) + +inline uint32_t rotl32 ( uint32_t x, int8_t r ) +{ + return (x << r) | (x >> (32 - r)); +} + +inline uint64_t rotl64 ( uint64_t x, int8_t r ) +{ + return (x << r) | (x >> (64 - r)); +} + +#define ROTL32(x,y) rotl32(x,y) +#define ROTL64(x,y) rotl64(x,y) + +#define BIG_CONSTANT(x) (x##LLU) + +#endif // !defined(_MSC_VER) + +//----------------------------------------------------------------------------- +// Block read - if your platform needs to do endian-swapping or can only +// handle aligned reads, do the conversion here + +FORCE_INLINE uint32_t getblock ( const uint32_t * p, int i ) +{ + return p[i]; +} + +FORCE_INLINE uint64_t getblock ( const uint64_t * p, int i ) +{ + return p[i]; +} + +//----------------------------------------------------------------------------- +// Finalization mix - force all bits of a hash block to avalanche + +FORCE_INLINE uint32_t fmix ( uint32_t h ) +{ + h ^= h >> 16; + h *= 0x85ebca6b; + h ^= h >> 13; + h *= 0xc2b2ae35; + h ^= h >> 16; + + return h; +} + +//---------- + +FORCE_INLINE uint64_t fmix ( uint64_t k ) +{ + k ^= k >> 33; + k *= BIG_CONSTANT(0xff51afd7ed558ccd); + k ^= k >> 33; + k *= BIG_CONSTANT(0xc4ceb9fe1a85ec53); + k ^= k >> 33; + + return k; +} + +//----------------------------------------------------------------------------- + +void MurmurHash3_x86_32 ( const void * key, int len, + uint32_t seed, void * out ) +{ + const uint8_t * data = (const uint8_t*)key; + const int nblocks = len / 4; + + uint32_t h1 = seed; + + const uint32_t c1 = 0xcc9e2d51; + const uint32_t c2 = 0x1b873593; + + //---------- + // body + + const uint32_t * blocks = (const uint32_t *)(data + nblocks*4); + + for(int i = -nblocks; i; i++) + { + uint32_t k1 = getblock(blocks,i); + + k1 *= c1; + k1 = ROTL32(k1,15); + k1 *= c2; + + h1 ^= k1; + h1 = ROTL32(h1,13); + h1 = h1*5+0xe6546b64; + } + + //---------- + // tail + + const uint8_t * tail = (const uint8_t*)(data + nblocks*4); + + uint32_t k1 = 0; + + switch(len & 3) + { + case 3: k1 ^= tail[2] << 16; + case 2: k1 ^= tail[1] << 8; + case 1: k1 ^= tail[0]; + k1 *= c1; k1 = ROTL32(k1,15); k1 *= c2; h1 ^= k1; + }; + + //---------- + // finalization + + h1 ^= len; + + h1 = fmix(h1); + + *(uint32_t*)out = h1; +} + +//----------------------------------------------------------------------------- + +void MurmurHash3_x86_128 ( const void * key, const int len, + uint32_t seed, void * out ) +{ + const uint8_t * data = (const uint8_t*)key; + const int nblocks = len / 16; + + uint32_t h1 = seed; + uint32_t h2 = seed; + uint32_t h3 = seed; + uint32_t h4 = seed; + + const uint32_t c1 = 0x239b961b; + const uint32_t c2 = 0xab0e9789; + const uint32_t c3 = 0x38b34ae5; + const uint32_t c4 = 0xa1e38b93; + + //---------- + // body + + const uint32_t * blocks = (const uint32_t *)(data + nblocks*16); + + for(int i = -nblocks; i; i++) + { + uint32_t k1 = getblock(blocks,i*4+0); + uint32_t k2 = getblock(blocks,i*4+1); + uint32_t k3 = getblock(blocks,i*4+2); + uint32_t k4 = getblock(blocks,i*4+3); + + k1 *= c1; k1 = ROTL32(k1,15); k1 *= c2; h1 ^= k1; + + h1 = ROTL32(h1,19); h1 += h2; h1 = h1*5+0x561ccd1b; + + k2 *= c2; k2 = ROTL32(k2,16); k2 *= c3; h2 ^= k2; + + h2 = ROTL32(h2,17); h2 += h3; h2 = h2*5+0x0bcaa747; + + k3 *= c3; k3 = ROTL32(k3,17); k3 *= c4; h3 ^= k3; + + h3 = ROTL32(h3,15); h3 += h4; h3 = h3*5+0x96cd1c35; + + k4 *= c4; k4 = ROTL32(k4,18); k4 *= c1; h4 ^= k4; + + h4 = ROTL32(h4,13); h4 += h1; h4 = h4*5+0x32ac3b17; + } + + //---------- + // tail + + const uint8_t * tail = (const uint8_t*)(data + nblocks*16); + + uint32_t k1 = 0; + uint32_t k2 = 0; + uint32_t k3 = 0; + uint32_t k4 = 0; + + switch(len & 15) + { + case 15: k4 ^= tail[14] << 16; + case 14: k4 ^= tail[13] << 8; + case 13: k4 ^= tail[12] << 0; + k4 *= c4; k4 = ROTL32(k4,18); k4 *= c1; h4 ^= k4; + + case 12: k3 ^= tail[11] << 24; + case 11: k3 ^= tail[10] << 16; + case 10: k3 ^= tail[ 9] << 8; + case 9: k3 ^= tail[ 8] << 0; + k3 *= c3; k3 = ROTL32(k3,17); k3 *= c4; h3 ^= k3; + + case 8: k2 ^= tail[ 7] << 24; + case 7: k2 ^= tail[ 6] << 16; + case 6: k2 ^= tail[ 5] << 8; + case 5: k2 ^= tail[ 4] << 0; + k2 *= c2; k2 = ROTL32(k2,16); k2 *= c3; h2 ^= k2; + + case 4: k1 ^= tail[ 3] << 24; + case 3: k1 ^= tail[ 2] << 16; + case 2: k1 ^= tail[ 1] << 8; + case 1: k1 ^= tail[ 0] << 0; + k1 *= c1; k1 = ROTL32(k1,15); k1 *= c2; h1 ^= k1; + }; + + //---------- + // finalization + + h1 ^= len; h2 ^= len; h3 ^= len; h4 ^= len; + + h1 += h2; h1 += h3; h1 += h4; + h2 += h1; h3 += h1; h4 += h1; + + h1 = fmix(h1); + h2 = fmix(h2); + h3 = fmix(h3); + h4 = fmix(h4); + + h1 += h2; h1 += h3; h1 += h4; + h2 += h1; h3 += h1; h4 += h1; + + ((uint32_t*)out)[0] = h1; + ((uint32_t*)out)[1] = h2; + ((uint32_t*)out)[2] = h3; + ((uint32_t*)out)[3] = h4; +} + +//----------------------------------------------------------------------------- + +void MurmurHash3_x64_128 ( const void * key, const int len, + const uint32_t seed, void * out ) +{ + const uint8_t * data = (const uint8_t*)key; + const int nblocks = len / 16; + + uint64_t h1 = seed; + uint64_t h2 = seed; + + const uint64_t c1 = BIG_CONSTANT(0x87c37b91114253d5); + const uint64_t c2 = BIG_CONSTANT(0x4cf5ad432745937f); + + //---------- + // body + + const uint64_t * blocks = (const uint64_t *)(data); + + for(int i = 0; i < nblocks; i++) + { + uint64_t k1 = getblock(blocks,i*2+0); + uint64_t k2 = getblock(blocks,i*2+1); + + k1 *= c1; k1 = ROTL64(k1,31); k1 *= c2; h1 ^= k1; + + h1 = ROTL64(h1,27); h1 += h2; h1 = h1*5+0x52dce729; + + k2 *= c2; k2 = ROTL64(k2,33); k2 *= c1; h2 ^= k2; + + h2 = ROTL64(h2,31); h2 += h1; h2 = h2*5+0x38495ab5; + } + + //---------- + // tail + + const uint8_t * tail = (const uint8_t*)(data + nblocks*16); + + uint64_t k1 = 0; + uint64_t k2 = 0; + + switch(len & 15) + { + case 15: k2 ^= uint64_t(tail[14]) << 48; + case 14: k2 ^= uint64_t(tail[13]) << 40; + case 13: k2 ^= uint64_t(tail[12]) << 32; + case 12: k2 ^= uint64_t(tail[11]) << 24; + case 11: k2 ^= uint64_t(tail[10]) << 16; + case 10: k2 ^= uint64_t(tail[ 9]) << 8; + case 9: k2 ^= uint64_t(tail[ 8]) << 0; + k2 *= c2; k2 = ROTL64(k2,33); k2 *= c1; h2 ^= k2; + + case 8: k1 ^= uint64_t(tail[ 7]) << 56; + case 7: k1 ^= uint64_t(tail[ 6]) << 48; + case 6: k1 ^= uint64_t(tail[ 5]) << 40; + case 5: k1 ^= uint64_t(tail[ 4]) << 32; + case 4: k1 ^= uint64_t(tail[ 3]) << 24; + case 3: k1 ^= uint64_t(tail[ 2]) << 16; + case 2: k1 ^= uint64_t(tail[ 1]) << 8; + case 1: k1 ^= uint64_t(tail[ 0]) << 0; + k1 *= c1; k1 = ROTL64(k1,31); k1 *= c2; h1 ^= k1; + }; + + //---------- + // finalization + + h1 ^= len; h2 ^= len; + + h1 += h2; + h2 += h1; + + h1 = fmix(h1); + h2 = fmix(h2); + + h1 += h2; + h2 += h1; + + ((uint64_t*)out)[0] = h1; + ((uint64_t*)out)[1] = h2; +} + +//----------------------------------------------------------------------------- diff --git a/src/third_party/murmurhash/MurmurHash3.h b/src/third_party/murmurhash/MurmurHash3.h index 3c6c78cd..c08f4f25 100644 --- a/src/third_party/murmurhash/MurmurHash3.h +++ b/src/third_party/murmurhash/MurmurHash3.h @@ -1,37 +1,37 @@ -//-----------------------------------------------------------------------------
-// MurmurHash3 was written by Austin Appleby, and is placed in the public
-// domain. The author hereby disclaims copyright to this source code.
-
-#ifndef _MURMURHASH3_H_
-#define _MURMURHASH3_H_
-
-//-----------------------------------------------------------------------------
-// Platform-specific functions and macros
-
-// Microsoft Visual Studio
-
-#if defined(_MSC_VER)
-
-typedef unsigned char uint8_t;
-typedef unsigned long uint32_t;
-typedef unsigned __int64 uint64_t;
-
-// Other compilers
-
-#else // defined(_MSC_VER)
-
-#include <stdint.h>
-
-#endif // !defined(_MSC_VER)
-
-//-----------------------------------------------------------------------------
-
-void MurmurHash3_x86_32 ( const void * key, int len, uint32_t seed, void * out );
-
-void MurmurHash3_x86_128 ( const void * key, int len, uint32_t seed, void * out );
-
-void MurmurHash3_x64_128 ( const void * key, int len, uint32_t seed, void * out );
-
-//-----------------------------------------------------------------------------
-
+//----------------------------------------------------------------------------- +// MurmurHash3 was written by Austin Appleby, and is placed in the public +// domain. The author hereby disclaims copyright to this source code. + +#ifndef _MURMURHASH3_H_ +#define _MURMURHASH3_H_ + +//----------------------------------------------------------------------------- +// Platform-specific functions and macros + +// Microsoft Visual Studio + +#if defined(_MSC_VER) + +typedef unsigned char uint8_t; +typedef unsigned long uint32_t; +typedef unsigned __int64 uint64_t; + +// Other compilers + +#else // defined(_MSC_VER) + +#include <stdint.h> + +#endif // !defined(_MSC_VER) + +//----------------------------------------------------------------------------- + +void MurmurHash3_x86_32 ( const void * key, int len, uint32_t seed, void * out ); + +void MurmurHash3_x86_128 ( const void * key, int len, uint32_t seed, void * out ); + +void MurmurHash3_x64_128 ( const void * key, int len, uint32_t seed, void * out ); + +//----------------------------------------------------------------------------- + #endif // _MURMURHASH3_H_
\ No newline at end of file diff --git a/src/third_party/trace_event/trace_event.h b/src/third_party/trace_event/trace_event.h new file mode 100644 index 00000000..18800563 --- /dev/null +++ b/src/third_party/trace_event/trace_event.h @@ -0,0 +1,826 @@ +// Copyright (c) 2013 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Trace events are for tracking application performance and resource usage. +// Macros are provided to track: +// Begin and end of function calls +// Counters +// +// Events are issued against categories. Whereas LOG's +// categories are statically defined, TRACE categories are created +// implicitly with a string. For example: +// TRACE_EVENT_INSTANT0("MY_SUBSYSTEM", "SomeImportantEvent") +// +// Events can be INSTANT, or can be pairs of BEGIN and END in the same scope: +// TRACE_EVENT_BEGIN0("MY_SUBSYSTEM", "SomethingCostly") +// doSomethingCostly() +// TRACE_EVENT_END0("MY_SUBSYSTEM", "SomethingCostly") +// Note: our tools can't always determine the correct BEGIN/END pairs unless +// these are used in the same scope. Use ASYNC_BEGIN/ASYNC_END macros if you need them +// to be in separate scopes. +// +// A common use case is to trace entire function scopes. This +// issues a trace BEGIN and END automatically: +// void doSomethingCostly() { +// TRACE_EVENT0("MY_SUBSYSTEM", "doSomethingCostly"); +// ... +// } +// +// Additional parameters can be associated with an event: +// void doSomethingCostly2(int howMuch) { +// TRACE_EVENT1("MY_SUBSYSTEM", "doSomethingCostly", +// "howMuch", howMuch); +// ... +// } +// +// The trace system will automatically add to this information the +// current process id, thread id, and a timestamp in microseconds. +// +// To trace an asynchronous procedure such as an IPC send/receive, use ASYNC_BEGIN and +// ASYNC_END: +// [single threaded sender code] +// static int send_count = 0; +// ++send_count; +// TRACE_EVENT_ASYNC_BEGIN0("ipc", "message", send_count); +// Send(new MyMessage(send_count)); +// [receive code] +// void OnMyMessage(send_count) { +// TRACE_EVENT_ASYNC_END0("ipc", "message", send_count); +// } +// The third parameter is a unique ID to match ASYNC_BEGIN/ASYNC_END pairs. +// ASYNC_BEGIN and ASYNC_END can occur on any thread of any traced process. Pointers can +// be used for the ID parameter, and they will be mangled internally so that +// the same pointer on two different processes will not match. For example: +// class MyTracedClass { +// public: +// MyTracedClass() { +// TRACE_EVENT_ASYNC_BEGIN0("category", "MyTracedClass", this); +// } +// ~MyTracedClass() { +// TRACE_EVENT_ASYNC_END0("category", "MyTracedClass", this); +// } +// } +// +// Trace event also supports counters, which is a way to track a quantity +// as it varies over time. Counters are created with the following macro: +// TRACE_COUNTER1("MY_SUBSYSTEM", "myCounter", g_myCounterValue); +// +// Counters are process-specific. The macro itself can be issued from any +// thread, however. +// +// Sometimes, you want to track two counters at once. You can do this with two +// counter macros: +// TRACE_COUNTER1("MY_SUBSYSTEM", "myCounter0", g_myCounterValue[0]); +// TRACE_COUNTER1("MY_SUBSYSTEM", "myCounter1", g_myCounterValue[1]); +// Or you can do it with a combined macro: +// TRACE_COUNTER2("MY_SUBSYSTEM", "myCounter", +// "bytesPinned", g_myCounterValue[0], +// "bytesAllocated", g_myCounterValue[1]); +// This indicates to the tracing UI that these counters should be displayed +// in a single graph, as a summed area chart. +// +// Since counters are in a global namespace, you may want to disembiguate with a +// unique ID, by using the TRACE_COUNTER_ID* variations. +// +// By default, trace collection is compiled in, but turned off at runtime. +// Collecting trace data is the responsibility of the embedding +// application. In Chrome's case, navigating to about:tracing will turn on +// tracing and display data collected across all active processes. +// +// +// Memory scoping note: +// Tracing copies the pointers, not the string content, of the strings passed +// in for category, name, and arg_names. Thus, the following code will +// cause problems: +// char* str = strdup("impprtantName"); +// TRACE_EVENT_INSTANT0("SUBSYSTEM", str); // BAD! +// free(str); // Trace system now has dangling pointer +// +// To avoid this issue with the |name| and |arg_name| parameters, use the +// TRACE_EVENT_COPY_XXX overloads of the macros at additional runtime overhead. +// Notes: The category must always be in a long-lived char* (i.e. static const). +// The |arg_values|, when used, are always deep copied with the _COPY +// macros. +// +// When are string argument values copied: +// const char* arg_values are only referenced by default: +// TRACE_EVENT1("category", "name", +// "arg1", "literal string is only referenced"); +// Use TRACE_STR_COPY to force copying of a const char*: +// TRACE_EVENT1("category", "name", +// "arg1", TRACE_STR_COPY("string will be copied")); +// std::string arg_values are always copied: +// TRACE_EVENT1("category", "name", +// "arg1", std::string("string will be copied")); +// +// +// Thread Safety: +// A thread safe singleton and mutex are used for thread safety. Category +// enabled flags are used to limit the performance impact when the system +// is not enabled. +// +// TRACE_EVENT macros first cache a pointer to a category. The categories are +// statically allocated and safe at all times, even after exit. Fetching a +// category is protected by the TraceLog::lock_. Multiple threads initializing +// the static variable is safe, as they will be serialized by the lock and +// multiple calls will return the same pointer to the category. +// +// Then the category_enabled flag is checked. This is a unsigned char, and +// not intended to be multithread safe. It optimizes access to addTraceEvent +// which is threadsafe internally via TraceLog::lock_. The enabled flag may +// cause some threads to incorrectly call or skip calling addTraceEvent near +// the time of the system being enabled or disabled. This is acceptable as +// we tolerate some data loss while the system is being enabled/disabled and +// because addTraceEvent is threadsafe internally and checks the enabled state +// again under lock. +// +// Without the use of these static category pointers and enabled flags all +// trace points would carry a significant performance cost of aquiring a lock +// and resolving the category. + +#ifndef COMMON_TRACE_EVENT_H_ +#define COMMON_TRACE_EVENT_H_ + +#include <string> + +#include "common/event_tracer.h" + +// By default, const char* argument values are assumed to have long-lived scope +// and will not be copied. Use this macro to force a const char* to be copied. +#define TRACE_STR_COPY(str) \ + WebCore::TraceEvent::TraceStringWithCopy(str) + +// Records a pair of begin and end events called "name" for the current +// scope, with 0, 1 or 2 associated arguments. If the category is not +// enabled, then this does nothing. +// - category and name strings must have application lifetime (statics or +// literals). They may not include " chars. +#define TRACE_EVENT0(category, name) \ + INTERNAL_TRACE_EVENT_ADD_SCOPED(category, name) +#define TRACE_EVENT1(category, name, arg1_name, arg1_val) \ + INTERNAL_TRACE_EVENT_ADD_SCOPED(category, name, arg1_name, arg1_val) +#define TRACE_EVENT2(category, name, arg1_name, arg1_val, arg2_name, arg2_val) \ + INTERNAL_TRACE_EVENT_ADD_SCOPED(category, name, arg1_name, arg1_val, \ + arg2_name, arg2_val) + +// Records a single event called "name" immediately, with 0, 1 or 2 +// associated arguments. If the category is not enabled, then this +// does nothing. +// - category and name strings must have application lifetime (statics or +// literals). They may not include " chars. +#define TRACE_EVENT_INSTANT0(category, name) \ + INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_INSTANT, \ + category, name, TRACE_EVENT_FLAG_NONE) +#define TRACE_EVENT_INSTANT1(category, name, arg1_name, arg1_val) \ + INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_INSTANT, \ + category, name, TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val) +#define TRACE_EVENT_INSTANT2(category, name, arg1_name, arg1_val, \ + arg2_name, arg2_val) \ + INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_INSTANT, \ + category, name, TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val, \ + arg2_name, arg2_val) +#define TRACE_EVENT_COPY_INSTANT0(category, name) \ + INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_INSTANT, \ + category, name, TRACE_EVENT_FLAG_COPY) +#define TRACE_EVENT_COPY_INSTANT1(category, name, arg1_name, arg1_val) \ + INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_INSTANT, \ + category, name, TRACE_EVENT_FLAG_COPY, arg1_name, arg1_val) +#define TRACE_EVENT_COPY_INSTANT2(category, name, arg1_name, arg1_val, \ + arg2_name, arg2_val) \ + INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_INSTANT, \ + category, name, TRACE_EVENT_FLAG_COPY, arg1_name, arg1_val, \ + arg2_name, arg2_val) + +// Records a single BEGIN event called "name" immediately, with 0, 1 or 2 +// associated arguments. If the category is not enabled, then this +// does nothing. +// - category and name strings must have application lifetime (statics or +// literals). They may not include " chars. +#define TRACE_EVENT_BEGIN0(category, name) \ + INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_BEGIN, \ + category, name, TRACE_EVENT_FLAG_NONE) +#define TRACE_EVENT_BEGIN1(category, name, arg1_name, arg1_val) \ + INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_BEGIN, \ + category, name, TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val) +#define TRACE_EVENT_BEGIN2(category, name, arg1_name, arg1_val, \ + arg2_name, arg2_val) \ + INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_BEGIN, \ + category, name, TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val, \ + arg2_name, arg2_val) +#define TRACE_EVENT_COPY_BEGIN0(category, name) \ + INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_BEGIN, \ + category, name, TRACE_EVENT_FLAG_COPY) +#define TRACE_EVENT_COPY_BEGIN1(category, name, arg1_name, arg1_val) \ + INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_BEGIN, \ + category, name, TRACE_EVENT_FLAG_COPY, arg1_name, arg1_val) +#define TRACE_EVENT_COPY_BEGIN2(category, name, arg1_name, arg1_val, \ + arg2_name, arg2_val) \ + INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_BEGIN, \ + category, name, TRACE_EVENT_FLAG_COPY, arg1_name, arg1_val, \ + arg2_name, arg2_val) + +// Records a single END event for "name" immediately. If the category +// is not enabled, then this does nothing. +// - category and name strings must have application lifetime (statics or +// literals). They may not include " chars. +#define TRACE_EVENT_END0(category, name) \ + INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_END, \ + category, name, TRACE_EVENT_FLAG_NONE) +#define TRACE_EVENT_END1(category, name, arg1_name, arg1_val) \ + INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_END, \ + category, name, TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val) +#define TRACE_EVENT_END2(category, name, arg1_name, arg1_val, \ + arg2_name, arg2_val) \ + INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_END, \ + category, name, TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val, \ + arg2_name, arg2_val) +#define TRACE_EVENT_COPY_END0(category, name) \ + INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_END, \ + category, name, TRACE_EVENT_FLAG_COPY) +#define TRACE_EVENT_COPY_END1(category, name, arg1_name, arg1_val) \ + INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_END, \ + category, name, TRACE_EVENT_FLAG_COPY, arg1_name, arg1_val) +#define TRACE_EVENT_COPY_END2(category, name, arg1_name, arg1_val, \ + arg2_name, arg2_val) \ + INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_END, \ + category, name, TRACE_EVENT_FLAG_COPY, arg1_name, arg1_val, \ + arg2_name, arg2_val) + +// Records the value of a counter called "name" immediately. Value +// must be representable as a 32 bit integer. +// - category and name strings must have application lifetime (statics or +// literals). They may not include " chars. +#define TRACE_COUNTER1(category, name, value) \ + INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_COUNTER, \ + category, name, TRACE_EVENT_FLAG_NONE, \ + "value", static_cast<int>(value)) +#define TRACE_COPY_COUNTER1(category, name, value) \ + INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_COUNTER, \ + category, name, TRACE_EVENT_FLAG_COPY, \ + "value", static_cast<int>(value)) + +// Records the values of a multi-parted counter called "name" immediately. +// The UI will treat value1 and value2 as parts of a whole, displaying their +// values as a stacked-bar chart. +// - category and name strings must have application lifetime (statics or +// literals). They may not include " chars. +#define TRACE_COUNTER2(category, name, value1_name, value1_val, \ + value2_name, value2_val) \ + INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_COUNTER, \ + category, name, TRACE_EVENT_FLAG_NONE, \ + value1_name, static_cast<int>(value1_val), \ + value2_name, static_cast<int>(value2_val)) +#define TRACE_COPY_COUNTER2(category, name, value1_name, value1_val, \ + value2_name, value2_val) \ + INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_COUNTER, \ + category, name, TRACE_EVENT_FLAG_COPY, \ + value1_name, static_cast<int>(value1_val), \ + value2_name, static_cast<int>(value2_val)) + +// Records the value of a counter called "name" immediately. Value +// must be representable as a 32 bit integer. +// - category and name strings must have application lifetime (statics or +// literals). They may not include " chars. +// - |id| is used to disambiguate counters with the same name. It must either +// be a pointer or an integer value up to 64 bits. If it's a pointer, the bits +// will be xored with a hash of the process ID so that the same pointer on +// two different processes will not collide. +#define TRACE_COUNTER_ID1(category, name, id, value) \ + INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_COUNTER, \ + category, name, id, TRACE_EVENT_FLAG_NONE, \ + "value", static_cast<int>(value)) +#define TRACE_COPY_COUNTER_ID1(category, name, id, value) \ + INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_COUNTER, \ + category, name, id, TRACE_EVENT_FLAG_COPY, \ + "value", static_cast<int>(value)) + +// Records the values of a multi-parted counter called "name" immediately. +// The UI will treat value1 and value2 as parts of a whole, displaying their +// values as a stacked-bar chart. +// - category and name strings must have application lifetime (statics or +// literals). They may not include " chars. +// - |id| is used to disambiguate counters with the same name. It must either +// be a pointer or an integer value up to 64 bits. If it's a pointer, the bits +// will be xored with a hash of the process ID so that the same pointer on +// two different processes will not collide. +#define TRACE_COUNTER_ID2(category, name, id, value1_name, value1_val, \ + value2_name, value2_val) \ + INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_COUNTER, \ + category, name, id, TRACE_EVENT_FLAG_NONE, \ + value1_name, static_cast<int>(value1_val), \ + value2_name, static_cast<int>(value2_val)) +#define TRACE_COPY_COUNTER_ID2(category, name, id, value1_name, value1_val, \ + value2_name, value2_val) \ + INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_COUNTER, \ + category, name, id, TRACE_EVENT_FLAG_COPY, \ + value1_name, static_cast<int>(value1_val), \ + value2_name, static_cast<int>(value2_val)) + +// Records a single ASYNC_BEGIN event called "name" immediately, with 0, 1 or 2 +// associated arguments. If the category is not enabled, then this +// does nothing. +// - category and name strings must have application lifetime (statics or +// literals). They may not include " chars. +// - |id| is used to match the ASYNC_BEGIN event with the ASYNC_END event. ASYNC +// events are considered to match if their category, name and id values all +// match. |id| must either be a pointer or an integer value up to 64 bits. If +// it's a pointer, the bits will be xored with a hash of the process ID so +// that the same pointer on two different processes will not collide. +// An asynchronous operation can consist of multiple phases. The first phase is +// defined by the ASYNC_BEGIN calls. Additional phases can be defined using the +// ASYNC_STEP_BEGIN macros. When the operation completes, call ASYNC_END. +// An async operation can span threads and processes, but all events in that +// operation must use the same |name| and |id|. Each event can have its own +// args. +#define TRACE_EVENT_ASYNC_BEGIN0(category, name, id) \ + INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_ASYNC_BEGIN, \ + category, name, id, TRACE_EVENT_FLAG_NONE) +#define TRACE_EVENT_ASYNC_BEGIN1(category, name, id, arg1_name, arg1_val) \ + INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_ASYNC_BEGIN, \ + category, name, id, TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val) +#define TRACE_EVENT_ASYNC_BEGIN2(category, name, id, arg1_name, arg1_val, \ + arg2_name, arg2_val) \ + INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_ASYNC_BEGIN, \ + category, name, id, TRACE_EVENT_FLAG_NONE, \ + arg1_name, arg1_val, arg2_name, arg2_val) +#define TRACE_EVENT_COPY_ASYNC_BEGIN0(category, name, id) \ + INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_ASYNC_BEGIN, \ + category, name, id, TRACE_EVENT_FLAG_COPY) +#define TRACE_EVENT_COPY_ASYNC_BEGIN1(category, name, id, arg1_name, arg1_val) \ + INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_ASYNC_BEGIN, \ + category, name, id, TRACE_EVENT_FLAG_COPY, \ + arg1_name, arg1_val) +#define TRACE_EVENT_COPY_ASYNC_BEGIN2(category, name, id, arg1_name, arg1_val, \ + arg2_name, arg2_val) \ + INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_ASYNC_BEGIN, \ + category, name, id, TRACE_EVENT_FLAG_COPY, \ + arg1_name, arg1_val, arg2_name, arg2_val) + +// Records a single ASYNC_STEP event for |step| immediately. If the category +// is not enabled, then this does nothing. The |name| and |id| must match the +// ASYNC_BEGIN event above. The |step| param identifies this step within the +// async event. This should be called at the beginning of the next phase of an +// asynchronous operation. +#define TRACE_EVENT_ASYNC_STEP0(category, name, id, step) \ + INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_ASYNC_STEP, \ + category, name, id, TRACE_EVENT_FLAG_NONE, "step", step) +#define TRACE_EVENT_ASYNC_STEP1(category, name, id, step, \ + arg1_name, arg1_val) \ + INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_ASYNC_STEP, \ + category, name, id, TRACE_EVENT_FLAG_NONE, "step", step, \ + arg1_name, arg1_val) +#define TRACE_EVENT_COPY_ASYNC_STEP0(category, name, id, step) \ + INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_ASYNC_STEP, \ + category, name, id, TRACE_EVENT_FLAG_COPY, "step", step) +#define TRACE_EVENT_COPY_ASYNC_STEP1(category, name, id, step, \ + arg1_name, arg1_val) \ + INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_ASYNC_STEP, \ + category, name, id, TRACE_EVENT_FLAG_COPY, "step", step, \ + arg1_name, arg1_val) + +// Records a single ASYNC_END event for "name" immediately. If the category +// is not enabled, then this does nothing. +#define TRACE_EVENT_ASYNC_END0(category, name, id) \ + INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_ASYNC_END, \ + category, name, id, TRACE_EVENT_FLAG_NONE) +#define TRACE_EVENT_ASYNC_END1(category, name, id, arg1_name, arg1_val) \ + INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_ASYNC_END, \ + category, name, id, TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val) +#define TRACE_EVENT_ASYNC_END2(category, name, id, arg1_name, arg1_val, \ + arg2_name, arg2_val) \ + INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_ASYNC_END, \ + category, name, id, TRACE_EVENT_FLAG_NONE, \ + arg1_name, arg1_val, arg2_name, arg2_val) +#define TRACE_EVENT_COPY_ASYNC_END0(category, name, id) \ + INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_ASYNC_END, \ + category, name, id, TRACE_EVENT_FLAG_COPY) +#define TRACE_EVENT_COPY_ASYNC_END1(category, name, id, arg1_name, arg1_val) \ + INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_ASYNC_END, \ + category, name, id, TRACE_EVENT_FLAG_COPY, \ + arg1_name, arg1_val) +#define TRACE_EVENT_COPY_ASYNC_END2(category, name, id, arg1_name, arg1_val, \ + arg2_name, arg2_val) \ + INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_ASYNC_END, \ + category, name, id, TRACE_EVENT_FLAG_COPY, \ + arg1_name, arg1_val, arg2_name, arg2_val) + +// Creates a scope of a sampling state with the given category and name (both must +// be constant strings). These states are intended for a sampling profiler. +// Implementation note: we store category and name together because we don't +// want the inconsistency/expense of storing two pointers. +// |thread_bucket| is [0..2] and is used to statically isolate samples in one +// thread from others. +// +// { // The sampling state is set within this scope. +// TRACE_EVENT_SAMPLING_STATE_SCOPE_FOR_BUCKET(0, "category", "name"); +// ...; +// } +#define TRACE_EVENT_SCOPED_SAMPLING_STATE_FOR_BUCKET(bucket_number, category, name) \ + TraceEvent::SamplingStateScope<bucket_number> traceEventSamplingScope(category "\0" name); + +// Returns a current sampling state of the given bucket. +// The format of the returned string is "category\0name". +#define TRACE_EVENT_GET_SAMPLING_STATE_FOR_BUCKET(bucket_number) \ + TraceEvent::SamplingStateScope<bucket_number>::current() + +// Sets a current sampling state of the given bucket. +// |category| and |name| have to be constant strings. +#define TRACE_EVENT_SET_SAMPLING_STATE_FOR_BUCKET(bucket_number, category, name) \ + TraceEvent::SamplingStateScope<bucket_number>::set(category "\0" name) + +// Sets a current sampling state of the given bucket. +// |categoryAndName| doesn't need to be a constant string. +// The format of the string is "category\0name". +#define TRACE_EVENT_SET_NONCONST_SAMPLING_STATE_FOR_BUCKET(bucket_number, categoryAndName) \ + TraceEvent::SamplingStateScope<bucket_number>::set(categoryAndName) + +// Syntactic sugars for the sampling tracing in the main thread. +#define TRACE_EVENT_SCOPED_SAMPLING_STATE(category, name) \ + TRACE_EVENT_SCOPED_SAMPLING_STATE_FOR_BUCKET(0, category, name) +#define TRACE_EVENT_GET_SAMPLING_STATE() \ + TRACE_EVENT_GET_SAMPLING_STATE_FOR_BUCKET(0) +#define TRACE_EVENT_SET_SAMPLING_STATE(category, name) \ + TRACE_EVENT_SET_SAMPLING_STATE_FOR_BUCKET(0, category, name) +#define TRACE_EVENT_SET_NONCONST_SAMPLING_STATE(categoryAndName) \ + TRACE_EVENT_SET_NONCONST_SAMPLING_STATE_FOR_BUCKET(0, categoryAndName) + +//////////////////////////////////////////////////////////////////////////////// +// Implementation specific tracing API definitions. + +// Get a pointer to the enabled state of the given trace category. Only +// long-lived literal strings should be given as the category name. The returned +// pointer can be held permanently in a local static for example. If the +// unsigned char is non-zero, tracing is enabled. If tracing is enabled, +// TRACE_EVENT_API_ADD_TRACE_EVENT can be called. It's OK if tracing is disabled +// between the load of the tracing state and the call to +// TRACE_EVENT_API_ADD_TRACE_EVENT, because this flag only provides an early out +// for best performance when tracing is disabled. +// const unsigned char* +// TRACE_EVENT_API_GET_CATEGORY_ENABLED(const char* category_name) +#define TRACE_EVENT_API_GET_CATEGORY_ENABLED \ + gl::TraceGetTraceCategoryEnabledFlag + +// Add a trace event to the platform tracing system. +// void TRACE_EVENT_API_ADD_TRACE_EVENT( +// char phase, +// const unsigned char* category_enabled, +// const char* name, +// unsigned long long id, +// int num_args, +// const char** arg_names, +// const unsigned char* arg_types, +// const unsigned long long* arg_values, +// unsigned char flags) +#define TRACE_EVENT_API_ADD_TRACE_EVENT \ + gl::TraceAddTraceEvent + +//////////////////////////////////////////////////////////////////////////////// + +// Implementation detail: trace event macros create temporary variables +// to keep instrumentation overhead low. These macros give each temporary +// variable a unique name based on the line number to prevent name collissions. +#define INTERNAL_TRACE_EVENT_UID3(a, b) \ + trace_event_unique_##a##b +#define INTERNAL_TRACE_EVENT_UID2(a, b) \ + INTERNAL_TRACE_EVENT_UID3(a, b) +#define INTERNALTRACEEVENTUID(name_prefix) \ + INTERNAL_TRACE_EVENT_UID2(name_prefix, __LINE__) + +// Implementation detail: internal macro to create static category. +#define INTERNAL_TRACE_EVENT_GET_CATEGORY_INFO(category) \ + static const unsigned char* INTERNALTRACEEVENTUID(catstatic) = 0; \ + if (!INTERNALTRACEEVENTUID(catstatic)) \ + INTERNALTRACEEVENTUID(catstatic) = \ + TRACE_EVENT_API_GET_CATEGORY_ENABLED(category); + +// Implementation detail: internal macro to create static category and add +// event if the category is enabled. +#define INTERNAL_TRACE_EVENT_ADD(phase, category, name, flags, ...) \ + do { \ + INTERNAL_TRACE_EVENT_GET_CATEGORY_INFO(category); \ + if (*INTERNALTRACEEVENTUID(catstatic)) { \ + gl::TraceEvent::addTraceEvent( \ + phase, INTERNALTRACEEVENTUID(catstatic), name, \ + gl::TraceEvent::noEventId, flags, ##__VA_ARGS__); \ + } \ + } while (0) + +// Implementation detail: internal macro to create static category and add begin +// event if the category is enabled. Also adds the end event when the scope +// ends. +#define INTERNAL_TRACE_EVENT_ADD_SCOPED(category, name, ...) \ + INTERNAL_TRACE_EVENT_GET_CATEGORY_INFO(category); \ + gl::TraceEvent::TraceEndOnScopeClose \ + INTERNALTRACEEVENTUID(profileScope); \ + if (*INTERNALTRACEEVENTUID(catstatic)) { \ + gl::TraceEvent::addTraceEvent( \ + TRACE_EVENT_PHASE_BEGIN, \ + INTERNALTRACEEVENTUID(catstatic), \ + name, gl::TraceEvent::noEventId, \ + TRACE_EVENT_FLAG_NONE, ##__VA_ARGS__); \ + INTERNALTRACEEVENTUID(profileScope).initialize( \ + INTERNALTRACEEVENTUID(catstatic), name); \ + } + +// Implementation detail: internal macro to create static category and add +// event if the category is enabled. +#define INTERNAL_TRACE_EVENT_ADD_WITH_ID(phase, category, name, id, flags, \ + ...) \ + do { \ + INTERNAL_TRACE_EVENT_GET_CATEGORY_INFO(category); \ + if (*INTERNALTRACEEVENTUID(catstatic)) { \ + unsigned char traceEventFlags = flags | TRACE_EVENT_FLAG_HAS_ID; \ + gl::TraceEvent::TraceID traceEventTraceID( \ + id, &traceEventFlags); \ + gl::TraceEvent::addTraceEvent( \ + phase, INTERNALTRACEEVENTUID(catstatic), \ + name, traceEventTraceID.data(), traceEventFlags, \ + ##__VA_ARGS__); \ + } \ + } while (0) + +// Notes regarding the following definitions: +// New values can be added and propagated to third party libraries, but existing +// definitions must never be changed, because third party libraries may use old +// definitions. + +// Phase indicates the nature of an event entry. E.g. part of a begin/end pair. +#define TRACE_EVENT_PHASE_BEGIN ('B') +#define TRACE_EVENT_PHASE_END ('E') +#define TRACE_EVENT_PHASE_INSTANT ('I') +#define TRACE_EVENT_PHASE_ASYNC_BEGIN ('S') +#define TRACE_EVENT_PHASE_ASYNC_STEP ('T') +#define TRACE_EVENT_PHASE_ASYNC_END ('F') +#define TRACE_EVENT_PHASE_METADATA ('M') +#define TRACE_EVENT_PHASE_COUNTER ('C') +#define TRACE_EVENT_PHASE_SAMPLE ('P') + +// Flags for changing the behavior of TRACE_EVENT_API_ADD_TRACE_EVENT. +#define TRACE_EVENT_FLAG_NONE (static_cast<unsigned char>(0)) +#define TRACE_EVENT_FLAG_COPY (static_cast<unsigned char>(1 << 0)) +#define TRACE_EVENT_FLAG_HAS_ID (static_cast<unsigned char>(1 << 1)) +#define TRACE_EVENT_FLAG_MANGLE_ID (static_cast<unsigned char>(1 << 2)) + +// Type values for identifying types in the TraceValue union. +#define TRACE_VALUE_TYPE_BOOL (static_cast<unsigned char>(1)) +#define TRACE_VALUE_TYPE_UINT (static_cast<unsigned char>(2)) +#define TRACE_VALUE_TYPE_INT (static_cast<unsigned char>(3)) +#define TRACE_VALUE_TYPE_DOUBLE (static_cast<unsigned char>(4)) +#define TRACE_VALUE_TYPE_POINTER (static_cast<unsigned char>(5)) +#define TRACE_VALUE_TYPE_STRING (static_cast<unsigned char>(6)) +#define TRACE_VALUE_TYPE_COPY_STRING (static_cast<unsigned char>(7)) + + +namespace gl { + +namespace TraceEvent { + +// Specify these values when the corresponding argument of addTraceEvent is not +// used. +const int zeroNumArgs = 0; +const unsigned long long noEventId = 0; + +// TraceID encapsulates an ID that can either be an integer or pointer. Pointers +// are mangled with the Process ID so that they are unlikely to collide when the +// same pointer is used on different processes. +class TraceID { +public: + explicit TraceID(const void* id, unsigned char* flags) : + m_data(static_cast<unsigned long long>(reinterpret_cast<unsigned long>(id))) + { + *flags |= TRACE_EVENT_FLAG_MANGLE_ID; + } + explicit TraceID(unsigned long long id, unsigned char* flags) : m_data(id) { (void)flags; } + explicit TraceID(unsigned long id, unsigned char* flags) : m_data(id) { (void)flags; } + explicit TraceID(unsigned int id, unsigned char* flags) : m_data(id) { (void)flags; } + explicit TraceID(unsigned short id, unsigned char* flags) : m_data(id) { (void)flags; } + explicit TraceID(unsigned char id, unsigned char* flags) : m_data(id) { (void)flags; } + explicit TraceID(long long id, unsigned char* flags) : + m_data(static_cast<unsigned long long>(id)) { (void)flags; } + explicit TraceID(long id, unsigned char* flags) : + m_data(static_cast<unsigned long long>(id)) { (void)flags; } + explicit TraceID(int id, unsigned char* flags) : + m_data(static_cast<unsigned long long>(id)) { (void)flags; } + explicit TraceID(short id, unsigned char* flags) : + m_data(static_cast<unsigned long long>(id)) { (void)flags; } + explicit TraceID(signed char id, unsigned char* flags) : + m_data(static_cast<unsigned long long>(id)) { (void)flags; } + + unsigned long long data() const { return m_data; } + +private: + unsigned long long m_data; +}; + +// Simple union to store various types as unsigned long long. +union TraceValueUnion { + bool m_bool; + unsigned long long m_uint; + long long m_int; + double m_double; + const void* m_pointer; + const char* m_string; +}; + +// Simple container for const char* that should be copied instead of retained. +class TraceStringWithCopy { +public: + explicit TraceStringWithCopy(const char* str) : m_str(str) { } + operator const char* () const { return m_str; } +private: + const char* m_str; +}; + +// Define setTraceValue for each allowed type. It stores the type and +// value in the return arguments. This allows this API to avoid declaring any +// structures so that it is portable to third_party libraries. +#define INTERNAL_DECLARE_SET_TRACE_VALUE(actual_type, \ + union_member, \ + value_type_id) \ + static inline void setTraceValue(actual_type arg, \ + unsigned char* type, \ + unsigned long long* value) { \ + TraceValueUnion typeValue; \ + typeValue.union_member = arg; \ + *type = value_type_id; \ + *value = typeValue.m_uint; \ + } +// Simpler form for int types that can be safely casted. +#define INTERNAL_DECLARE_SET_TRACE_VALUE_INT(actual_type, \ + value_type_id) \ + static inline void setTraceValue(actual_type arg, \ + unsigned char* type, \ + unsigned long long* value) { \ + *type = value_type_id; \ + *value = static_cast<unsigned long long>(arg); \ + } + +INTERNAL_DECLARE_SET_TRACE_VALUE_INT(unsigned long long, TRACE_VALUE_TYPE_UINT) +INTERNAL_DECLARE_SET_TRACE_VALUE_INT(unsigned int, TRACE_VALUE_TYPE_UINT) +INTERNAL_DECLARE_SET_TRACE_VALUE_INT(unsigned short, TRACE_VALUE_TYPE_UINT) +INTERNAL_DECLARE_SET_TRACE_VALUE_INT(unsigned char, TRACE_VALUE_TYPE_UINT) +INTERNAL_DECLARE_SET_TRACE_VALUE_INT(long long, TRACE_VALUE_TYPE_INT) +INTERNAL_DECLARE_SET_TRACE_VALUE_INT(int, TRACE_VALUE_TYPE_INT) +INTERNAL_DECLARE_SET_TRACE_VALUE_INT(short, TRACE_VALUE_TYPE_INT) +INTERNAL_DECLARE_SET_TRACE_VALUE_INT(signed char, TRACE_VALUE_TYPE_INT) +INTERNAL_DECLARE_SET_TRACE_VALUE(bool, m_bool, TRACE_VALUE_TYPE_BOOL) +INTERNAL_DECLARE_SET_TRACE_VALUE(double, m_double, TRACE_VALUE_TYPE_DOUBLE) +INTERNAL_DECLARE_SET_TRACE_VALUE(const void*, m_pointer, + TRACE_VALUE_TYPE_POINTER) +INTERNAL_DECLARE_SET_TRACE_VALUE(const char*, m_string, + TRACE_VALUE_TYPE_STRING) +INTERNAL_DECLARE_SET_TRACE_VALUE(const TraceStringWithCopy&, m_string, + TRACE_VALUE_TYPE_COPY_STRING) + +#undef INTERNAL_DECLARE_SET_TRACE_VALUE +#undef INTERNAL_DECLARE_SET_TRACE_VALUE_INT + +static inline void setTraceValue(const std::string& arg, + unsigned char* type, + unsigned long long* value) { + TraceValueUnion typeValue; + typeValue.m_string = arg.data(); + *type = TRACE_VALUE_TYPE_COPY_STRING; + *value = typeValue.m_uint; +} + +// These addTraceEvent template functions are defined here instead of in the +// macro, because the arg values could be temporary string objects. In order to +// store pointers to the internal c_str and pass through to the tracing API, the +// arg values must live throughout these procedures. + +static inline void addTraceEvent(char phase, + const unsigned char* categoryEnabled, + const char* name, + unsigned long long id, + unsigned char flags) { + TRACE_EVENT_API_ADD_TRACE_EVENT( + phase, categoryEnabled, name, id, + zeroNumArgs, 0, 0, 0, + flags); +} + +template<class ARG1_TYPE> +static inline void addTraceEvent(char phase, + const unsigned char* categoryEnabled, + const char* name, + unsigned long long id, + unsigned char flags, + const char* arg1Name, + const ARG1_TYPE& arg1Val) { + const int numArgs = 1; + unsigned char argTypes[1]; + unsigned long long argValues[1]; + setTraceValue(arg1Val, &argTypes[0], &argValues[0]); + TRACE_EVENT_API_ADD_TRACE_EVENT( + phase, categoryEnabled, name, id, + numArgs, &arg1Name, argTypes, argValues, + flags); +} + +template<class ARG1_TYPE, class ARG2_TYPE> +static inline void addTraceEvent(char phase, + const unsigned char* categoryEnabled, + const char* name, + unsigned long long id, + unsigned char flags, + const char* arg1Name, + const ARG1_TYPE& arg1Val, + const char* arg2Name, + const ARG2_TYPE& arg2Val) { + const int numArgs = 2; + const char* argNames[2] = { arg1Name, arg2Name }; + unsigned char argTypes[2]; + unsigned long long argValues[2]; + setTraceValue(arg1Val, &argTypes[0], &argValues[0]); + setTraceValue(arg2Val, &argTypes[1], &argValues[1]); + return TRACE_EVENT_API_ADD_TRACE_EVENT( + phase, categoryEnabled, name, id, + numArgs, argNames, argTypes, argValues, + flags); +} + +// Used by TRACE_EVENTx macro. Do not use directly. +class TraceEndOnScopeClose { +public: + // Note: members of m_data intentionally left uninitialized. See initialize. + TraceEndOnScopeClose() : m_pdata(0) { } + ~TraceEndOnScopeClose() + { + if (m_pdata) + addEventIfEnabled(); + } + + void initialize(const unsigned char* categoryEnabled, + const char* name) + { + m_data.categoryEnabled = categoryEnabled; + m_data.name = name; + m_pdata = &m_data; + } + +private: + // Add the end event if the category is still enabled. + void addEventIfEnabled() + { + // Only called when m_pdata is non-null. + if (*m_pdata->categoryEnabled) { + TRACE_EVENT_API_ADD_TRACE_EVENT( + TRACE_EVENT_PHASE_END, + m_pdata->categoryEnabled, + m_pdata->name, noEventId, + zeroNumArgs, 0, 0, 0, + TRACE_EVENT_FLAG_NONE); + } + } + + // This Data struct workaround is to avoid initializing all the members + // in Data during construction of this object, since this object is always + // constructed, even when tracing is disabled. If the members of Data were + // members of this class instead, compiler warnings occur about potential + // uninitialized accesses. + struct Data { + const unsigned char* categoryEnabled; + const char* name; + }; + Data* m_pdata; + Data m_data; +}; + +// TraceEventSamplingStateScope records the current sampling state +// and sets a new sampling state. When the scope exists, it restores +// the sampling state having recorded. +template<size_t BucketNumber> +class SamplingStateScope { +public: + SamplingStateScope(const char* categoryAndName) + { + m_previousState = SamplingStateScope<BucketNumber>::current(); + SamplingStateScope<BucketNumber>::set(categoryAndName); + } + + ~SamplingStateScope() + { + SamplingStateScope<BucketNumber>::set(m_previousState); + } + + // FIXME: Make load/store to traceSamplingState[] thread-safe and atomic. + static inline const char* current() + { + return reinterpret_cast<const char*>(*gl::traceSamplingState[BucketNumber]); + } + static inline void set(const char* categoryAndName) + { + *gl::traceSamplingState[BucketNumber] = reinterpret_cast<long>(const_cast<char*>(categoryAndName)); + } + +private: + const char* m_previousState; +}; + +} // namespace TraceEvent + +} // namespace gl + +#endif diff --git a/src/translator_common.target.darwin-arm.mk b/src/translator.target.darwin-arm.mk index a0401336..9ffde69e 100644 --- a/src/translator_common.target.darwin-arm.mk +++ b/src/translator.target.darwin-arm.mk @@ -3,7 +3,7 @@ include $(CLEAR_VARS) LOCAL_MODULE_CLASS := STATIC_LIBRARIES -LOCAL_MODULE := third_party_angle_dx11_src_translator_common_gyp +LOCAL_MODULE := third_party_angle_dx11_src_translator_gyp LOCAL_MODULE_SUFFIX := .a LOCAL_MODULE_TAGS := optional gyp_intermediate_dir := $(call local-intermediates-dir) @@ -23,9 +23,11 @@ GYP_COPIED_SOURCE_ORIGIN_DIRS := LOCAL_SRC_FILES := \ third_party/angle_dx11/src/compiler/BuiltInFunctionEmulator.cpp \ + third_party/angle_dx11/src/compiler/CodeGen.cpp \ third_party/angle_dx11/src/compiler/Compiler.cpp \ third_party/angle_dx11/src/compiler/debug.cpp \ third_party/angle_dx11/src/compiler/DetectCallDepth.cpp \ + third_party/angle_dx11/src/compiler/DetectDiscontinuity.cpp \ third_party/angle_dx11/src/compiler/Diagnostics.cpp \ third_party/angle_dx11/src/compiler/DirectiveHandler.cpp \ third_party/angle_dx11/src/compiler/ForLoopUnroll.cpp \ @@ -34,22 +36,35 @@ LOCAL_SRC_FILES := \ third_party/angle_dx11/src/compiler/InfoSink.cpp \ third_party/angle_dx11/src/compiler/Initialize.cpp \ third_party/angle_dx11/src/compiler/InitializeDll.cpp \ + third_party/angle_dx11/src/compiler/InitializeGLPosition.cpp \ third_party/angle_dx11/src/compiler/InitializeParseContext.cpp \ third_party/angle_dx11/src/compiler/Intermediate.cpp \ third_party/angle_dx11/src/compiler/intermOut.cpp \ third_party/angle_dx11/src/compiler/IntermTraverse.cpp \ third_party/angle_dx11/src/compiler/MapLongVariableNames.cpp \ + third_party/angle_dx11/src/compiler/OutputESSL.cpp \ + third_party/angle_dx11/src/compiler/OutputGLSLBase.cpp \ + third_party/angle_dx11/src/compiler/OutputGLSL.cpp \ + third_party/angle_dx11/src/compiler/OutputHLSL.cpp \ third_party/angle_dx11/src/compiler/parseConst.cpp \ - third_party/angle_dx11/src/compiler/ParseHelper.cpp \ + third_party/angle_dx11/src/compiler/ParseContext.cpp \ third_party/angle_dx11/src/compiler/PoolAlloc.cpp \ third_party/angle_dx11/src/compiler/QualifierAlive.cpp \ third_party/angle_dx11/src/compiler/RemoveTree.cpp \ + third_party/angle_dx11/src/compiler/SearchSymbol.cpp \ + third_party/angle_dx11/src/compiler/ShaderLang.cpp \ third_party/angle_dx11/src/compiler/SymbolTable.cpp \ + third_party/angle_dx11/src/compiler/TranslatorESSL.cpp \ + third_party/angle_dx11/src/compiler/TranslatorGLSL.cpp \ + third_party/angle_dx11/src/compiler/TranslatorHLSL.cpp \ + third_party/angle_dx11/src/compiler/UnfoldShortCircuitAST.cpp \ + third_party/angle_dx11/src/compiler/UnfoldShortCircuit.cpp \ third_party/angle_dx11/src/compiler/Uniform.cpp \ third_party/angle_dx11/src/compiler/util.cpp \ third_party/angle_dx11/src/compiler/ValidateLimitations.cpp \ third_party/angle_dx11/src/compiler/VariableInfo.cpp \ third_party/angle_dx11/src/compiler/VariablePacker.cpp \ + third_party/angle_dx11/src/compiler/VersionGLSL.cpp \ third_party/angle_dx11/src/compiler/depgraph/DependencyGraph.cpp \ third_party/angle_dx11/src/compiler/depgraph/DependencyGraphBuilder.cpp \ third_party/angle_dx11/src/compiler/depgraph/DependencyGraphOutput.cpp \ @@ -103,20 +118,18 @@ MY_DEFS_Debug := \ '-DANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ TEXT("d3dcompiler_46.dll"), TEXT("d3dcompiler_43.dll") }' \ '-D_FILE_OFFSET_BITS=64' \ '-DNO_TCMALLOC' \ - '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ - '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DDISABLE_NACL' \ '-DCHROMIUM_BUILD' \ '-DUSE_LIBJPEG_TURBO=1' \ '-DUSE_PROPRIETARY_CODECS' \ '-DENABLE_CONFIGURATION_POLICY' \ - '-DLOGGING_IS_OFFICIAL_BUILD=1' \ - '-DTRACING_IS_OFFICIAL_BUILD=1' \ - '-DENABLE_GPU=1' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DUSE_OPENSSL=1' \ '-DENABLE_EGLIMAGE=1' \ - '-DENABLE_PRINTING=1' \ - '-DCOMPILER_IMPLEMENTATION' \ + '-DCLD_VERSION=1' \ + '-DENABLE_MANAGED_USERS=1' \ + '-DANGLE_TRANSLATOR_IMPLEMENTATION' \ '-DANDROID' \ '-D__GNU_SOURCE=1' \ '-DUSE_STLPORT=1' \ @@ -192,20 +205,18 @@ MY_DEFS_Release := \ '-DANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ TEXT("d3dcompiler_46.dll"), TEXT("d3dcompiler_43.dll") }' \ '-D_FILE_OFFSET_BITS=64' \ '-DNO_TCMALLOC' \ - '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ - '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DDISABLE_NACL' \ '-DCHROMIUM_BUILD' \ '-DUSE_LIBJPEG_TURBO=1' \ '-DUSE_PROPRIETARY_CODECS' \ '-DENABLE_CONFIGURATION_POLICY' \ - '-DLOGGING_IS_OFFICIAL_BUILD=1' \ - '-DTRACING_IS_OFFICIAL_BUILD=1' \ - '-DENABLE_GPU=1' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DUSE_OPENSSL=1' \ '-DENABLE_EGLIMAGE=1' \ - '-DENABLE_PRINTING=1' \ - '-DCOMPILER_IMPLEMENTATION' \ + '-DCLD_VERSION=1' \ + '-DENABLE_MANAGED_USERS=1' \ + '-DANGLE_TRANSLATOR_IMPLEMENTATION' \ '-DANDROID' \ '-D__GNU_SOURCE=1' \ '-DUSE_STLPORT=1' \ @@ -294,10 +305,10 @@ LOCAL_SHARED_LIBRARIES := \ # Add target alias to "gyp_all_modules" target. .PHONY: gyp_all_modules -gyp_all_modules: third_party_angle_dx11_src_translator_common_gyp +gyp_all_modules: third_party_angle_dx11_src_translator_gyp # Alias gyp target name. -.PHONY: translator_common -translator_common: third_party_angle_dx11_src_translator_common_gyp +.PHONY: translator +translator: third_party_angle_dx11_src_translator_gyp include $(BUILD_STATIC_LIBRARY) diff --git a/src/translator_common.target.linux-mips.mk b/src/translator.target.darwin-mips.mk index ad1ed22a..af2a2d5d 100644 --- a/src/translator_common.target.linux-mips.mk +++ b/src/translator.target.darwin-mips.mk @@ -3,7 +3,7 @@ include $(CLEAR_VARS) LOCAL_MODULE_CLASS := STATIC_LIBRARIES -LOCAL_MODULE := third_party_angle_dx11_src_translator_common_gyp +LOCAL_MODULE := third_party_angle_dx11_src_translator_gyp LOCAL_MODULE_SUFFIX := .a LOCAL_MODULE_TAGS := optional gyp_intermediate_dir := $(call local-intermediates-dir) @@ -23,9 +23,11 @@ GYP_COPIED_SOURCE_ORIGIN_DIRS := LOCAL_SRC_FILES := \ third_party/angle_dx11/src/compiler/BuiltInFunctionEmulator.cpp \ + third_party/angle_dx11/src/compiler/CodeGen.cpp \ third_party/angle_dx11/src/compiler/Compiler.cpp \ third_party/angle_dx11/src/compiler/debug.cpp \ third_party/angle_dx11/src/compiler/DetectCallDepth.cpp \ + third_party/angle_dx11/src/compiler/DetectDiscontinuity.cpp \ third_party/angle_dx11/src/compiler/Diagnostics.cpp \ third_party/angle_dx11/src/compiler/DirectiveHandler.cpp \ third_party/angle_dx11/src/compiler/ForLoopUnroll.cpp \ @@ -34,22 +36,35 @@ LOCAL_SRC_FILES := \ third_party/angle_dx11/src/compiler/InfoSink.cpp \ third_party/angle_dx11/src/compiler/Initialize.cpp \ third_party/angle_dx11/src/compiler/InitializeDll.cpp \ + third_party/angle_dx11/src/compiler/InitializeGLPosition.cpp \ third_party/angle_dx11/src/compiler/InitializeParseContext.cpp \ third_party/angle_dx11/src/compiler/Intermediate.cpp \ third_party/angle_dx11/src/compiler/intermOut.cpp \ third_party/angle_dx11/src/compiler/IntermTraverse.cpp \ third_party/angle_dx11/src/compiler/MapLongVariableNames.cpp \ + third_party/angle_dx11/src/compiler/OutputESSL.cpp \ + third_party/angle_dx11/src/compiler/OutputGLSLBase.cpp \ + third_party/angle_dx11/src/compiler/OutputGLSL.cpp \ + third_party/angle_dx11/src/compiler/OutputHLSL.cpp \ third_party/angle_dx11/src/compiler/parseConst.cpp \ - third_party/angle_dx11/src/compiler/ParseHelper.cpp \ + third_party/angle_dx11/src/compiler/ParseContext.cpp \ third_party/angle_dx11/src/compiler/PoolAlloc.cpp \ third_party/angle_dx11/src/compiler/QualifierAlive.cpp \ third_party/angle_dx11/src/compiler/RemoveTree.cpp \ + third_party/angle_dx11/src/compiler/SearchSymbol.cpp \ + third_party/angle_dx11/src/compiler/ShaderLang.cpp \ third_party/angle_dx11/src/compiler/SymbolTable.cpp \ + third_party/angle_dx11/src/compiler/TranslatorESSL.cpp \ + third_party/angle_dx11/src/compiler/TranslatorGLSL.cpp \ + third_party/angle_dx11/src/compiler/TranslatorHLSL.cpp \ + third_party/angle_dx11/src/compiler/UnfoldShortCircuitAST.cpp \ + third_party/angle_dx11/src/compiler/UnfoldShortCircuit.cpp \ third_party/angle_dx11/src/compiler/Uniform.cpp \ third_party/angle_dx11/src/compiler/util.cpp \ third_party/angle_dx11/src/compiler/ValidateLimitations.cpp \ third_party/angle_dx11/src/compiler/VariableInfo.cpp \ third_party/angle_dx11/src/compiler/VariablePacker.cpp \ + third_party/angle_dx11/src/compiler/VersionGLSL.cpp \ third_party/angle_dx11/src/compiler/depgraph/DependencyGraph.cpp \ third_party/angle_dx11/src/compiler/depgraph/DependencyGraphBuilder.cpp \ third_party/angle_dx11/src/compiler/depgraph/DependencyGraphOutput.cpp \ @@ -103,20 +118,18 @@ MY_DEFS_Debug := \ '-DANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ TEXT("d3dcompiler_46.dll"), TEXT("d3dcompiler_43.dll") }' \ '-D_FILE_OFFSET_BITS=64' \ '-DNO_TCMALLOC' \ - '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ - '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DDISABLE_NACL' \ '-DCHROMIUM_BUILD' \ '-DUSE_LIBJPEG_TURBO=1' \ '-DUSE_PROPRIETARY_CODECS' \ '-DENABLE_CONFIGURATION_POLICY' \ - '-DLOGGING_IS_OFFICIAL_BUILD=1' \ - '-DTRACING_IS_OFFICIAL_BUILD=1' \ - '-DENABLE_GPU=1' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DUSE_OPENSSL=1' \ '-DENABLE_EGLIMAGE=1' \ - '-DENABLE_PRINTING=1' \ - '-DCOMPILER_IMPLEMENTATION' \ + '-DCLD_VERSION=1' \ + '-DENABLE_MANAGED_USERS=1' \ + '-DANGLE_TRANSLATOR_IMPLEMENTATION' \ '-DANDROID' \ '-D__GNU_SOURCE=1' \ '-DUSE_STLPORT=1' \ @@ -192,20 +205,18 @@ MY_DEFS_Release := \ '-DANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ TEXT("d3dcompiler_46.dll"), TEXT("d3dcompiler_43.dll") }' \ '-D_FILE_OFFSET_BITS=64' \ '-DNO_TCMALLOC' \ - '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ - '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DDISABLE_NACL' \ '-DCHROMIUM_BUILD' \ '-DUSE_LIBJPEG_TURBO=1' \ '-DUSE_PROPRIETARY_CODECS' \ '-DENABLE_CONFIGURATION_POLICY' \ - '-DLOGGING_IS_OFFICIAL_BUILD=1' \ - '-DTRACING_IS_OFFICIAL_BUILD=1' \ - '-DENABLE_GPU=1' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DUSE_OPENSSL=1' \ '-DENABLE_EGLIMAGE=1' \ - '-DENABLE_PRINTING=1' \ - '-DCOMPILER_IMPLEMENTATION' \ + '-DCLD_VERSION=1' \ + '-DENABLE_MANAGED_USERS=1' \ + '-DANGLE_TRANSLATOR_IMPLEMENTATION' \ '-DANDROID' \ '-D__GNU_SOURCE=1' \ '-DUSE_STLPORT=1' \ @@ -290,10 +301,10 @@ LOCAL_SHARED_LIBRARIES := \ # Add target alias to "gyp_all_modules" target. .PHONY: gyp_all_modules -gyp_all_modules: third_party_angle_dx11_src_translator_common_gyp +gyp_all_modules: third_party_angle_dx11_src_translator_gyp # Alias gyp target name. -.PHONY: translator_common -translator_common: third_party_angle_dx11_src_translator_common_gyp +.PHONY: translator +translator: third_party_angle_dx11_src_translator_gyp include $(BUILD_STATIC_LIBRARY) diff --git a/src/translator_common.target.darwin-x86.mk b/src/translator.target.darwin-x86.mk index 23fddb04..39587236 100644 --- a/src/translator_common.target.darwin-x86.mk +++ b/src/translator.target.darwin-x86.mk @@ -3,7 +3,7 @@ include $(CLEAR_VARS) LOCAL_MODULE_CLASS := STATIC_LIBRARIES -LOCAL_MODULE := third_party_angle_dx11_src_translator_common_gyp +LOCAL_MODULE := third_party_angle_dx11_src_translator_gyp LOCAL_MODULE_SUFFIX := .a LOCAL_MODULE_TAGS := optional gyp_intermediate_dir := $(call local-intermediates-dir) @@ -23,9 +23,11 @@ GYP_COPIED_SOURCE_ORIGIN_DIRS := LOCAL_SRC_FILES := \ third_party/angle_dx11/src/compiler/BuiltInFunctionEmulator.cpp \ + third_party/angle_dx11/src/compiler/CodeGen.cpp \ third_party/angle_dx11/src/compiler/Compiler.cpp \ third_party/angle_dx11/src/compiler/debug.cpp \ third_party/angle_dx11/src/compiler/DetectCallDepth.cpp \ + third_party/angle_dx11/src/compiler/DetectDiscontinuity.cpp \ third_party/angle_dx11/src/compiler/Diagnostics.cpp \ third_party/angle_dx11/src/compiler/DirectiveHandler.cpp \ third_party/angle_dx11/src/compiler/ForLoopUnroll.cpp \ @@ -34,22 +36,35 @@ LOCAL_SRC_FILES := \ third_party/angle_dx11/src/compiler/InfoSink.cpp \ third_party/angle_dx11/src/compiler/Initialize.cpp \ third_party/angle_dx11/src/compiler/InitializeDll.cpp \ + third_party/angle_dx11/src/compiler/InitializeGLPosition.cpp \ third_party/angle_dx11/src/compiler/InitializeParseContext.cpp \ third_party/angle_dx11/src/compiler/Intermediate.cpp \ third_party/angle_dx11/src/compiler/intermOut.cpp \ third_party/angle_dx11/src/compiler/IntermTraverse.cpp \ third_party/angle_dx11/src/compiler/MapLongVariableNames.cpp \ + third_party/angle_dx11/src/compiler/OutputESSL.cpp \ + third_party/angle_dx11/src/compiler/OutputGLSLBase.cpp \ + third_party/angle_dx11/src/compiler/OutputGLSL.cpp \ + third_party/angle_dx11/src/compiler/OutputHLSL.cpp \ third_party/angle_dx11/src/compiler/parseConst.cpp \ - third_party/angle_dx11/src/compiler/ParseHelper.cpp \ + third_party/angle_dx11/src/compiler/ParseContext.cpp \ third_party/angle_dx11/src/compiler/PoolAlloc.cpp \ third_party/angle_dx11/src/compiler/QualifierAlive.cpp \ third_party/angle_dx11/src/compiler/RemoveTree.cpp \ + third_party/angle_dx11/src/compiler/SearchSymbol.cpp \ + third_party/angle_dx11/src/compiler/ShaderLang.cpp \ third_party/angle_dx11/src/compiler/SymbolTable.cpp \ + third_party/angle_dx11/src/compiler/TranslatorESSL.cpp \ + third_party/angle_dx11/src/compiler/TranslatorGLSL.cpp \ + third_party/angle_dx11/src/compiler/TranslatorHLSL.cpp \ + third_party/angle_dx11/src/compiler/UnfoldShortCircuitAST.cpp \ + third_party/angle_dx11/src/compiler/UnfoldShortCircuit.cpp \ third_party/angle_dx11/src/compiler/Uniform.cpp \ third_party/angle_dx11/src/compiler/util.cpp \ third_party/angle_dx11/src/compiler/ValidateLimitations.cpp \ third_party/angle_dx11/src/compiler/VariableInfo.cpp \ third_party/angle_dx11/src/compiler/VariablePacker.cpp \ + third_party/angle_dx11/src/compiler/VersionGLSL.cpp \ third_party/angle_dx11/src/compiler/depgraph/DependencyGraph.cpp \ third_party/angle_dx11/src/compiler/depgraph/DependencyGraphBuilder.cpp \ third_party/angle_dx11/src/compiler/depgraph/DependencyGraphOutput.cpp \ @@ -87,11 +102,11 @@ MY_CFLAGS_Debug := \ -Wno-extra \ -Wno-ignored-qualifiers \ -Wno-type-limits \ + -fno-stack-protector \ -Wno-address \ -Wno-format-security \ -Wno-return-type \ -Wno-sequence-point \ - -fno-stack-protector \ -Os \ -g \ -fomit-frame-pointer \ @@ -105,20 +120,18 @@ MY_DEFS_Debug := \ '-DANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ TEXT("d3dcompiler_46.dll"), TEXT("d3dcompiler_43.dll") }' \ '-D_FILE_OFFSET_BITS=64' \ '-DNO_TCMALLOC' \ - '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ - '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DDISABLE_NACL' \ '-DCHROMIUM_BUILD' \ '-DUSE_LIBJPEG_TURBO=1' \ '-DUSE_PROPRIETARY_CODECS' \ '-DENABLE_CONFIGURATION_POLICY' \ - '-DLOGGING_IS_OFFICIAL_BUILD=1' \ - '-DTRACING_IS_OFFICIAL_BUILD=1' \ - '-DENABLE_GPU=1' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DUSE_OPENSSL=1' \ '-DENABLE_EGLIMAGE=1' \ - '-DENABLE_PRINTING=1' \ - '-DCOMPILER_IMPLEMENTATION' \ + '-DCLD_VERSION=1' \ + '-DENABLE_MANAGED_USERS=1' \ + '-DANGLE_TRANSLATOR_IMPLEMENTATION' \ '-DANDROID' \ '-D__GNU_SOURCE=1' \ '-DUSE_STLPORT=1' \ @@ -177,11 +190,11 @@ MY_CFLAGS_Release := \ -Wno-extra \ -Wno-ignored-qualifiers \ -Wno-type-limits \ + -fno-stack-protector \ -Wno-address \ -Wno-format-security \ -Wno-return-type \ -Wno-sequence-point \ - -fno-stack-protector \ -Os \ -fno-ident \ -fdata-sections \ @@ -197,20 +210,18 @@ MY_DEFS_Release := \ '-DANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ TEXT("d3dcompiler_46.dll"), TEXT("d3dcompiler_43.dll") }' \ '-D_FILE_OFFSET_BITS=64' \ '-DNO_TCMALLOC' \ - '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ - '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DDISABLE_NACL' \ '-DCHROMIUM_BUILD' \ '-DUSE_LIBJPEG_TURBO=1' \ '-DUSE_PROPRIETARY_CODECS' \ '-DENABLE_CONFIGURATION_POLICY' \ - '-DLOGGING_IS_OFFICIAL_BUILD=1' \ - '-DTRACING_IS_OFFICIAL_BUILD=1' \ - '-DENABLE_GPU=1' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DUSE_OPENSSL=1' \ '-DENABLE_EGLIMAGE=1' \ - '-DENABLE_PRINTING=1' \ - '-DCOMPILER_IMPLEMENTATION' \ + '-DCLD_VERSION=1' \ + '-DENABLE_MANAGED_USERS=1' \ + '-DANGLE_TRANSLATOR_IMPLEMENTATION' \ '-DANDROID' \ '-D__GNU_SOURCE=1' \ '-DUSE_STLPORT=1' \ @@ -294,10 +305,10 @@ LOCAL_SHARED_LIBRARIES := \ # Add target alias to "gyp_all_modules" target. .PHONY: gyp_all_modules -gyp_all_modules: third_party_angle_dx11_src_translator_common_gyp +gyp_all_modules: third_party_angle_dx11_src_translator_gyp # Alias gyp target name. -.PHONY: translator_common -translator_common: third_party_angle_dx11_src_translator_common_gyp +.PHONY: translator +translator: third_party_angle_dx11_src_translator_gyp include $(BUILD_STATIC_LIBRARY) diff --git a/src/translator_common.target.linux-arm.mk b/src/translator.target.linux-arm.mk index a0401336..9ffde69e 100644 --- a/src/translator_common.target.linux-arm.mk +++ b/src/translator.target.linux-arm.mk @@ -3,7 +3,7 @@ include $(CLEAR_VARS) LOCAL_MODULE_CLASS := STATIC_LIBRARIES -LOCAL_MODULE := third_party_angle_dx11_src_translator_common_gyp +LOCAL_MODULE := third_party_angle_dx11_src_translator_gyp LOCAL_MODULE_SUFFIX := .a LOCAL_MODULE_TAGS := optional gyp_intermediate_dir := $(call local-intermediates-dir) @@ -23,9 +23,11 @@ GYP_COPIED_SOURCE_ORIGIN_DIRS := LOCAL_SRC_FILES := \ third_party/angle_dx11/src/compiler/BuiltInFunctionEmulator.cpp \ + third_party/angle_dx11/src/compiler/CodeGen.cpp \ third_party/angle_dx11/src/compiler/Compiler.cpp \ third_party/angle_dx11/src/compiler/debug.cpp \ third_party/angle_dx11/src/compiler/DetectCallDepth.cpp \ + third_party/angle_dx11/src/compiler/DetectDiscontinuity.cpp \ third_party/angle_dx11/src/compiler/Diagnostics.cpp \ third_party/angle_dx11/src/compiler/DirectiveHandler.cpp \ third_party/angle_dx11/src/compiler/ForLoopUnroll.cpp \ @@ -34,22 +36,35 @@ LOCAL_SRC_FILES := \ third_party/angle_dx11/src/compiler/InfoSink.cpp \ third_party/angle_dx11/src/compiler/Initialize.cpp \ third_party/angle_dx11/src/compiler/InitializeDll.cpp \ + third_party/angle_dx11/src/compiler/InitializeGLPosition.cpp \ third_party/angle_dx11/src/compiler/InitializeParseContext.cpp \ third_party/angle_dx11/src/compiler/Intermediate.cpp \ third_party/angle_dx11/src/compiler/intermOut.cpp \ third_party/angle_dx11/src/compiler/IntermTraverse.cpp \ third_party/angle_dx11/src/compiler/MapLongVariableNames.cpp \ + third_party/angle_dx11/src/compiler/OutputESSL.cpp \ + third_party/angle_dx11/src/compiler/OutputGLSLBase.cpp \ + third_party/angle_dx11/src/compiler/OutputGLSL.cpp \ + third_party/angle_dx11/src/compiler/OutputHLSL.cpp \ third_party/angle_dx11/src/compiler/parseConst.cpp \ - third_party/angle_dx11/src/compiler/ParseHelper.cpp \ + third_party/angle_dx11/src/compiler/ParseContext.cpp \ third_party/angle_dx11/src/compiler/PoolAlloc.cpp \ third_party/angle_dx11/src/compiler/QualifierAlive.cpp \ third_party/angle_dx11/src/compiler/RemoveTree.cpp \ + third_party/angle_dx11/src/compiler/SearchSymbol.cpp \ + third_party/angle_dx11/src/compiler/ShaderLang.cpp \ third_party/angle_dx11/src/compiler/SymbolTable.cpp \ + third_party/angle_dx11/src/compiler/TranslatorESSL.cpp \ + third_party/angle_dx11/src/compiler/TranslatorGLSL.cpp \ + third_party/angle_dx11/src/compiler/TranslatorHLSL.cpp \ + third_party/angle_dx11/src/compiler/UnfoldShortCircuitAST.cpp \ + third_party/angle_dx11/src/compiler/UnfoldShortCircuit.cpp \ third_party/angle_dx11/src/compiler/Uniform.cpp \ third_party/angle_dx11/src/compiler/util.cpp \ third_party/angle_dx11/src/compiler/ValidateLimitations.cpp \ third_party/angle_dx11/src/compiler/VariableInfo.cpp \ third_party/angle_dx11/src/compiler/VariablePacker.cpp \ + third_party/angle_dx11/src/compiler/VersionGLSL.cpp \ third_party/angle_dx11/src/compiler/depgraph/DependencyGraph.cpp \ third_party/angle_dx11/src/compiler/depgraph/DependencyGraphBuilder.cpp \ third_party/angle_dx11/src/compiler/depgraph/DependencyGraphOutput.cpp \ @@ -103,20 +118,18 @@ MY_DEFS_Debug := \ '-DANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ TEXT("d3dcompiler_46.dll"), TEXT("d3dcompiler_43.dll") }' \ '-D_FILE_OFFSET_BITS=64' \ '-DNO_TCMALLOC' \ - '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ - '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DDISABLE_NACL' \ '-DCHROMIUM_BUILD' \ '-DUSE_LIBJPEG_TURBO=1' \ '-DUSE_PROPRIETARY_CODECS' \ '-DENABLE_CONFIGURATION_POLICY' \ - '-DLOGGING_IS_OFFICIAL_BUILD=1' \ - '-DTRACING_IS_OFFICIAL_BUILD=1' \ - '-DENABLE_GPU=1' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DUSE_OPENSSL=1' \ '-DENABLE_EGLIMAGE=1' \ - '-DENABLE_PRINTING=1' \ - '-DCOMPILER_IMPLEMENTATION' \ + '-DCLD_VERSION=1' \ + '-DENABLE_MANAGED_USERS=1' \ + '-DANGLE_TRANSLATOR_IMPLEMENTATION' \ '-DANDROID' \ '-D__GNU_SOURCE=1' \ '-DUSE_STLPORT=1' \ @@ -192,20 +205,18 @@ MY_DEFS_Release := \ '-DANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ TEXT("d3dcompiler_46.dll"), TEXT("d3dcompiler_43.dll") }' \ '-D_FILE_OFFSET_BITS=64' \ '-DNO_TCMALLOC' \ - '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ - '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DDISABLE_NACL' \ '-DCHROMIUM_BUILD' \ '-DUSE_LIBJPEG_TURBO=1' \ '-DUSE_PROPRIETARY_CODECS' \ '-DENABLE_CONFIGURATION_POLICY' \ - '-DLOGGING_IS_OFFICIAL_BUILD=1' \ - '-DTRACING_IS_OFFICIAL_BUILD=1' \ - '-DENABLE_GPU=1' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DUSE_OPENSSL=1' \ '-DENABLE_EGLIMAGE=1' \ - '-DENABLE_PRINTING=1' \ - '-DCOMPILER_IMPLEMENTATION' \ + '-DCLD_VERSION=1' \ + '-DENABLE_MANAGED_USERS=1' \ + '-DANGLE_TRANSLATOR_IMPLEMENTATION' \ '-DANDROID' \ '-D__GNU_SOURCE=1' \ '-DUSE_STLPORT=1' \ @@ -294,10 +305,10 @@ LOCAL_SHARED_LIBRARIES := \ # Add target alias to "gyp_all_modules" target. .PHONY: gyp_all_modules -gyp_all_modules: third_party_angle_dx11_src_translator_common_gyp +gyp_all_modules: third_party_angle_dx11_src_translator_gyp # Alias gyp target name. -.PHONY: translator_common -translator_common: third_party_angle_dx11_src_translator_common_gyp +.PHONY: translator +translator: third_party_angle_dx11_src_translator_gyp include $(BUILD_STATIC_LIBRARY) diff --git a/src/translator_common.target.darwin-mips.mk b/src/translator.target.linux-mips.mk index ad1ed22a..af2a2d5d 100644 --- a/src/translator_common.target.darwin-mips.mk +++ b/src/translator.target.linux-mips.mk @@ -3,7 +3,7 @@ include $(CLEAR_VARS) LOCAL_MODULE_CLASS := STATIC_LIBRARIES -LOCAL_MODULE := third_party_angle_dx11_src_translator_common_gyp +LOCAL_MODULE := third_party_angle_dx11_src_translator_gyp LOCAL_MODULE_SUFFIX := .a LOCAL_MODULE_TAGS := optional gyp_intermediate_dir := $(call local-intermediates-dir) @@ -23,9 +23,11 @@ GYP_COPIED_SOURCE_ORIGIN_DIRS := LOCAL_SRC_FILES := \ third_party/angle_dx11/src/compiler/BuiltInFunctionEmulator.cpp \ + third_party/angle_dx11/src/compiler/CodeGen.cpp \ third_party/angle_dx11/src/compiler/Compiler.cpp \ third_party/angle_dx11/src/compiler/debug.cpp \ third_party/angle_dx11/src/compiler/DetectCallDepth.cpp \ + third_party/angle_dx11/src/compiler/DetectDiscontinuity.cpp \ third_party/angle_dx11/src/compiler/Diagnostics.cpp \ third_party/angle_dx11/src/compiler/DirectiveHandler.cpp \ third_party/angle_dx11/src/compiler/ForLoopUnroll.cpp \ @@ -34,22 +36,35 @@ LOCAL_SRC_FILES := \ third_party/angle_dx11/src/compiler/InfoSink.cpp \ third_party/angle_dx11/src/compiler/Initialize.cpp \ third_party/angle_dx11/src/compiler/InitializeDll.cpp \ + third_party/angle_dx11/src/compiler/InitializeGLPosition.cpp \ third_party/angle_dx11/src/compiler/InitializeParseContext.cpp \ third_party/angle_dx11/src/compiler/Intermediate.cpp \ third_party/angle_dx11/src/compiler/intermOut.cpp \ third_party/angle_dx11/src/compiler/IntermTraverse.cpp \ third_party/angle_dx11/src/compiler/MapLongVariableNames.cpp \ + third_party/angle_dx11/src/compiler/OutputESSL.cpp \ + third_party/angle_dx11/src/compiler/OutputGLSLBase.cpp \ + third_party/angle_dx11/src/compiler/OutputGLSL.cpp \ + third_party/angle_dx11/src/compiler/OutputHLSL.cpp \ third_party/angle_dx11/src/compiler/parseConst.cpp \ - third_party/angle_dx11/src/compiler/ParseHelper.cpp \ + third_party/angle_dx11/src/compiler/ParseContext.cpp \ third_party/angle_dx11/src/compiler/PoolAlloc.cpp \ third_party/angle_dx11/src/compiler/QualifierAlive.cpp \ third_party/angle_dx11/src/compiler/RemoveTree.cpp \ + third_party/angle_dx11/src/compiler/SearchSymbol.cpp \ + third_party/angle_dx11/src/compiler/ShaderLang.cpp \ third_party/angle_dx11/src/compiler/SymbolTable.cpp \ + third_party/angle_dx11/src/compiler/TranslatorESSL.cpp \ + third_party/angle_dx11/src/compiler/TranslatorGLSL.cpp \ + third_party/angle_dx11/src/compiler/TranslatorHLSL.cpp \ + third_party/angle_dx11/src/compiler/UnfoldShortCircuitAST.cpp \ + third_party/angle_dx11/src/compiler/UnfoldShortCircuit.cpp \ third_party/angle_dx11/src/compiler/Uniform.cpp \ third_party/angle_dx11/src/compiler/util.cpp \ third_party/angle_dx11/src/compiler/ValidateLimitations.cpp \ third_party/angle_dx11/src/compiler/VariableInfo.cpp \ third_party/angle_dx11/src/compiler/VariablePacker.cpp \ + third_party/angle_dx11/src/compiler/VersionGLSL.cpp \ third_party/angle_dx11/src/compiler/depgraph/DependencyGraph.cpp \ third_party/angle_dx11/src/compiler/depgraph/DependencyGraphBuilder.cpp \ third_party/angle_dx11/src/compiler/depgraph/DependencyGraphOutput.cpp \ @@ -103,20 +118,18 @@ MY_DEFS_Debug := \ '-DANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ TEXT("d3dcompiler_46.dll"), TEXT("d3dcompiler_43.dll") }' \ '-D_FILE_OFFSET_BITS=64' \ '-DNO_TCMALLOC' \ - '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ - '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DDISABLE_NACL' \ '-DCHROMIUM_BUILD' \ '-DUSE_LIBJPEG_TURBO=1' \ '-DUSE_PROPRIETARY_CODECS' \ '-DENABLE_CONFIGURATION_POLICY' \ - '-DLOGGING_IS_OFFICIAL_BUILD=1' \ - '-DTRACING_IS_OFFICIAL_BUILD=1' \ - '-DENABLE_GPU=1' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DUSE_OPENSSL=1' \ '-DENABLE_EGLIMAGE=1' \ - '-DENABLE_PRINTING=1' \ - '-DCOMPILER_IMPLEMENTATION' \ + '-DCLD_VERSION=1' \ + '-DENABLE_MANAGED_USERS=1' \ + '-DANGLE_TRANSLATOR_IMPLEMENTATION' \ '-DANDROID' \ '-D__GNU_SOURCE=1' \ '-DUSE_STLPORT=1' \ @@ -192,20 +205,18 @@ MY_DEFS_Release := \ '-DANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ TEXT("d3dcompiler_46.dll"), TEXT("d3dcompiler_43.dll") }' \ '-D_FILE_OFFSET_BITS=64' \ '-DNO_TCMALLOC' \ - '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ - '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DDISABLE_NACL' \ '-DCHROMIUM_BUILD' \ '-DUSE_LIBJPEG_TURBO=1' \ '-DUSE_PROPRIETARY_CODECS' \ '-DENABLE_CONFIGURATION_POLICY' \ - '-DLOGGING_IS_OFFICIAL_BUILD=1' \ - '-DTRACING_IS_OFFICIAL_BUILD=1' \ - '-DENABLE_GPU=1' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DUSE_OPENSSL=1' \ '-DENABLE_EGLIMAGE=1' \ - '-DENABLE_PRINTING=1' \ - '-DCOMPILER_IMPLEMENTATION' \ + '-DCLD_VERSION=1' \ + '-DENABLE_MANAGED_USERS=1' \ + '-DANGLE_TRANSLATOR_IMPLEMENTATION' \ '-DANDROID' \ '-D__GNU_SOURCE=1' \ '-DUSE_STLPORT=1' \ @@ -290,10 +301,10 @@ LOCAL_SHARED_LIBRARIES := \ # Add target alias to "gyp_all_modules" target. .PHONY: gyp_all_modules -gyp_all_modules: third_party_angle_dx11_src_translator_common_gyp +gyp_all_modules: third_party_angle_dx11_src_translator_gyp # Alias gyp target name. -.PHONY: translator_common -translator_common: third_party_angle_dx11_src_translator_common_gyp +.PHONY: translator +translator: third_party_angle_dx11_src_translator_gyp include $(BUILD_STATIC_LIBRARY) diff --git a/src/translator_common.target.linux-x86.mk b/src/translator.target.linux-x86.mk index 23fddb04..39587236 100644 --- a/src/translator_common.target.linux-x86.mk +++ b/src/translator.target.linux-x86.mk @@ -3,7 +3,7 @@ include $(CLEAR_VARS) LOCAL_MODULE_CLASS := STATIC_LIBRARIES -LOCAL_MODULE := third_party_angle_dx11_src_translator_common_gyp +LOCAL_MODULE := third_party_angle_dx11_src_translator_gyp LOCAL_MODULE_SUFFIX := .a LOCAL_MODULE_TAGS := optional gyp_intermediate_dir := $(call local-intermediates-dir) @@ -23,9 +23,11 @@ GYP_COPIED_SOURCE_ORIGIN_DIRS := LOCAL_SRC_FILES := \ third_party/angle_dx11/src/compiler/BuiltInFunctionEmulator.cpp \ + third_party/angle_dx11/src/compiler/CodeGen.cpp \ third_party/angle_dx11/src/compiler/Compiler.cpp \ third_party/angle_dx11/src/compiler/debug.cpp \ third_party/angle_dx11/src/compiler/DetectCallDepth.cpp \ + third_party/angle_dx11/src/compiler/DetectDiscontinuity.cpp \ third_party/angle_dx11/src/compiler/Diagnostics.cpp \ third_party/angle_dx11/src/compiler/DirectiveHandler.cpp \ third_party/angle_dx11/src/compiler/ForLoopUnroll.cpp \ @@ -34,22 +36,35 @@ LOCAL_SRC_FILES := \ third_party/angle_dx11/src/compiler/InfoSink.cpp \ third_party/angle_dx11/src/compiler/Initialize.cpp \ third_party/angle_dx11/src/compiler/InitializeDll.cpp \ + third_party/angle_dx11/src/compiler/InitializeGLPosition.cpp \ third_party/angle_dx11/src/compiler/InitializeParseContext.cpp \ third_party/angle_dx11/src/compiler/Intermediate.cpp \ third_party/angle_dx11/src/compiler/intermOut.cpp \ third_party/angle_dx11/src/compiler/IntermTraverse.cpp \ third_party/angle_dx11/src/compiler/MapLongVariableNames.cpp \ + third_party/angle_dx11/src/compiler/OutputESSL.cpp \ + third_party/angle_dx11/src/compiler/OutputGLSLBase.cpp \ + third_party/angle_dx11/src/compiler/OutputGLSL.cpp \ + third_party/angle_dx11/src/compiler/OutputHLSL.cpp \ third_party/angle_dx11/src/compiler/parseConst.cpp \ - third_party/angle_dx11/src/compiler/ParseHelper.cpp \ + third_party/angle_dx11/src/compiler/ParseContext.cpp \ third_party/angle_dx11/src/compiler/PoolAlloc.cpp \ third_party/angle_dx11/src/compiler/QualifierAlive.cpp \ third_party/angle_dx11/src/compiler/RemoveTree.cpp \ + third_party/angle_dx11/src/compiler/SearchSymbol.cpp \ + third_party/angle_dx11/src/compiler/ShaderLang.cpp \ third_party/angle_dx11/src/compiler/SymbolTable.cpp \ + third_party/angle_dx11/src/compiler/TranslatorESSL.cpp \ + third_party/angle_dx11/src/compiler/TranslatorGLSL.cpp \ + third_party/angle_dx11/src/compiler/TranslatorHLSL.cpp \ + third_party/angle_dx11/src/compiler/UnfoldShortCircuitAST.cpp \ + third_party/angle_dx11/src/compiler/UnfoldShortCircuit.cpp \ third_party/angle_dx11/src/compiler/Uniform.cpp \ third_party/angle_dx11/src/compiler/util.cpp \ third_party/angle_dx11/src/compiler/ValidateLimitations.cpp \ third_party/angle_dx11/src/compiler/VariableInfo.cpp \ third_party/angle_dx11/src/compiler/VariablePacker.cpp \ + third_party/angle_dx11/src/compiler/VersionGLSL.cpp \ third_party/angle_dx11/src/compiler/depgraph/DependencyGraph.cpp \ third_party/angle_dx11/src/compiler/depgraph/DependencyGraphBuilder.cpp \ third_party/angle_dx11/src/compiler/depgraph/DependencyGraphOutput.cpp \ @@ -87,11 +102,11 @@ MY_CFLAGS_Debug := \ -Wno-extra \ -Wno-ignored-qualifiers \ -Wno-type-limits \ + -fno-stack-protector \ -Wno-address \ -Wno-format-security \ -Wno-return-type \ -Wno-sequence-point \ - -fno-stack-protector \ -Os \ -g \ -fomit-frame-pointer \ @@ -105,20 +120,18 @@ MY_DEFS_Debug := \ '-DANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ TEXT("d3dcompiler_46.dll"), TEXT("d3dcompiler_43.dll") }' \ '-D_FILE_OFFSET_BITS=64' \ '-DNO_TCMALLOC' \ - '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ - '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DDISABLE_NACL' \ '-DCHROMIUM_BUILD' \ '-DUSE_LIBJPEG_TURBO=1' \ '-DUSE_PROPRIETARY_CODECS' \ '-DENABLE_CONFIGURATION_POLICY' \ - '-DLOGGING_IS_OFFICIAL_BUILD=1' \ - '-DTRACING_IS_OFFICIAL_BUILD=1' \ - '-DENABLE_GPU=1' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DUSE_OPENSSL=1' \ '-DENABLE_EGLIMAGE=1' \ - '-DENABLE_PRINTING=1' \ - '-DCOMPILER_IMPLEMENTATION' \ + '-DCLD_VERSION=1' \ + '-DENABLE_MANAGED_USERS=1' \ + '-DANGLE_TRANSLATOR_IMPLEMENTATION' \ '-DANDROID' \ '-D__GNU_SOURCE=1' \ '-DUSE_STLPORT=1' \ @@ -177,11 +190,11 @@ MY_CFLAGS_Release := \ -Wno-extra \ -Wno-ignored-qualifiers \ -Wno-type-limits \ + -fno-stack-protector \ -Wno-address \ -Wno-format-security \ -Wno-return-type \ -Wno-sequence-point \ - -fno-stack-protector \ -Os \ -fno-ident \ -fdata-sections \ @@ -197,20 +210,18 @@ MY_DEFS_Release := \ '-DANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ TEXT("d3dcompiler_46.dll"), TEXT("d3dcompiler_43.dll") }' \ '-D_FILE_OFFSET_BITS=64' \ '-DNO_TCMALLOC' \ - '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ - '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DDISABLE_NACL' \ '-DCHROMIUM_BUILD' \ '-DUSE_LIBJPEG_TURBO=1' \ '-DUSE_PROPRIETARY_CODECS' \ '-DENABLE_CONFIGURATION_POLICY' \ - '-DLOGGING_IS_OFFICIAL_BUILD=1' \ - '-DTRACING_IS_OFFICIAL_BUILD=1' \ - '-DENABLE_GPU=1' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DUSE_OPENSSL=1' \ '-DENABLE_EGLIMAGE=1' \ - '-DENABLE_PRINTING=1' \ - '-DCOMPILER_IMPLEMENTATION' \ + '-DCLD_VERSION=1' \ + '-DENABLE_MANAGED_USERS=1' \ + '-DANGLE_TRANSLATOR_IMPLEMENTATION' \ '-DANDROID' \ '-D__GNU_SOURCE=1' \ '-DUSE_STLPORT=1' \ @@ -294,10 +305,10 @@ LOCAL_SHARED_LIBRARIES := \ # Add target alias to "gyp_all_modules" target. .PHONY: gyp_all_modules -gyp_all_modules: third_party_angle_dx11_src_translator_common_gyp +gyp_all_modules: third_party_angle_dx11_src_translator_gyp # Alias gyp target name. -.PHONY: translator_common -translator_common: third_party_angle_dx11_src_translator_common_gyp +.PHONY: translator +translator: third_party_angle_dx11_src_translator_gyp include $(BUILD_STATIC_LIBRARY) diff --git a/src/translator_glsl.target.darwin-arm.mk b/src/translator_glsl.target.darwin-arm.mk deleted file mode 100644 index 7c1cf91c..00000000 --- a/src/translator_glsl.target.darwin-arm.mk +++ /dev/null @@ -1,275 +0,0 @@ -# This file is generated by gyp; do not edit. - -include $(CLEAR_VARS) - -LOCAL_MODULE_CLASS := STATIC_LIBRARIES -LOCAL_MODULE := third_party_angle_dx11_src_translator_glsl_gyp -LOCAL_MODULE_SUFFIX := .a -LOCAL_MODULE_TAGS := optional -gyp_intermediate_dir := $(call local-intermediates-dir) -gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared) - -# Make sure our deps are built first. -GYP_TARGET_DEPENDENCIES := - -GYP_GENERATED_OUTPUTS := - -# Make sure our deps and generated files are built first. -LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS) - -LOCAL_GENERATED_SOURCES := - -GYP_COPIED_SOURCE_ORIGIN_DIRS := - -LOCAL_SRC_FILES := \ - third_party/angle_dx11/src/compiler/CodeGenGLSL.cpp \ - third_party/angle_dx11/src/compiler/OutputESSL.cpp \ - third_party/angle_dx11/src/compiler/OutputGLSLBase.cpp \ - third_party/angle_dx11/src/compiler/OutputGLSL.cpp \ - third_party/angle_dx11/src/compiler/ShaderLang.cpp \ - third_party/angle_dx11/src/compiler/TranslatorESSL.cpp \ - third_party/angle_dx11/src/compiler/TranslatorGLSL.cpp \ - third_party/angle_dx11/src/compiler/VersionGLSL.cpp - - -# Flags passed to both C and C++ files. -MY_CFLAGS_Debug := \ - -fstack-protector \ - --param=ssp-buffer-size=4 \ - -fno-exceptions \ - -fno-strict-aliasing \ - -Wno-unused-parameter \ - -Wno-missing-field-initializers \ - -fvisibility=hidden \ - -pipe \ - -fPIC \ - -Wno-format \ - -fno-tree-sra \ - -fuse-ld=gold \ - -Wno-psabi \ - -ffunction-sections \ - -funwind-tables \ - -g \ - -fstack-protector \ - -fno-short-enums \ - -finline-limit=64 \ - -Wa,--noexecstack \ - -U_FORTIFY_SOURCE \ - -Wno-extra \ - -Wno-ignored-qualifiers \ - -Wno-type-limits \ - -Wno-address \ - -Wno-format-security \ - -Wno-return-type \ - -Wno-sequence-point \ - -Os \ - -g \ - -fomit-frame-pointer \ - -fdata-sections \ - -ffunction-sections - -MY_DEFS_Debug := \ - '-DANGLE_DX11' \ - '-DANGLE_DISABLE_TRACE' \ - '-DANGLE_COMPILE_OPTIMIZATION_LEVEL=D3DCOMPILE_OPTIMIZATION_LEVEL1' \ - '-DANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ TEXT("d3dcompiler_46.dll"), TEXT("d3dcompiler_43.dll") }' \ - '-D_FILE_OFFSET_BITS=64' \ - '-DNO_TCMALLOC' \ - '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ - '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ - '-DDISABLE_NACL' \ - '-DCHROMIUM_BUILD' \ - '-DUSE_LIBJPEG_TURBO=1' \ - '-DUSE_PROPRIETARY_CODECS' \ - '-DENABLE_CONFIGURATION_POLICY' \ - '-DLOGGING_IS_OFFICIAL_BUILD=1' \ - '-DTRACING_IS_OFFICIAL_BUILD=1' \ - '-DENABLE_GPU=1' \ - '-DUSE_OPENSSL=1' \ - '-DENABLE_EGLIMAGE=1' \ - '-DENABLE_PRINTING=1' \ - '-DCOMPILER_IMPLEMENTATION' \ - '-DANDROID' \ - '-D__GNU_SOURCE=1' \ - '-DUSE_STLPORT=1' \ - '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \ - '-DCHROME_BUILD_ID=""' \ - '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \ - '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \ - '-D_DEBUG' - - -# Include paths placed before CFLAGS/CPPFLAGS -LOCAL_C_INCLUDES_Debug := \ - $(LOCAL_PATH)/third_party/angle_dx11/src \ - $(LOCAL_PATH)/third_party/angle_dx11/include \ - $(PWD)/frameworks/wilhelm/include \ - $(PWD)/bionic \ - $(PWD)/external/stlport/stlport - - -# Flags passed to only C++ (and not C) files. -LOCAL_CPPFLAGS_Debug := \ - -fno-rtti \ - -fno-threadsafe-statics \ - -fvisibility-inlines-hidden \ - -Wno-deprecated \ - -Wno-abi \ - -Wno-error=c++0x-compat \ - -Wno-non-virtual-dtor \ - -Wno-sign-promo \ - -Wno-non-virtual-dtor - - -# Flags passed to both C and C++ files. -MY_CFLAGS_Release := \ - -fstack-protector \ - --param=ssp-buffer-size=4 \ - -fno-exceptions \ - -fno-strict-aliasing \ - -Wno-unused-parameter \ - -Wno-missing-field-initializers \ - -fvisibility=hidden \ - -pipe \ - -fPIC \ - -Wno-format \ - -fno-tree-sra \ - -fuse-ld=gold \ - -Wno-psabi \ - -ffunction-sections \ - -funwind-tables \ - -g \ - -fstack-protector \ - -fno-short-enums \ - -finline-limit=64 \ - -Wa,--noexecstack \ - -U_FORTIFY_SOURCE \ - -Wno-extra \ - -Wno-ignored-qualifiers \ - -Wno-type-limits \ - -Wno-address \ - -Wno-format-security \ - -Wno-return-type \ - -Wno-sequence-point \ - -Os \ - -fno-ident \ - -fdata-sections \ - -ffunction-sections \ - -fomit-frame-pointer - -MY_DEFS_Release := \ - '-DANGLE_DX11' \ - '-DANGLE_DISABLE_TRACE' \ - '-DANGLE_COMPILE_OPTIMIZATION_LEVEL=D3DCOMPILE_OPTIMIZATION_LEVEL1' \ - '-DANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ TEXT("d3dcompiler_46.dll"), TEXT("d3dcompiler_43.dll") }' \ - '-D_FILE_OFFSET_BITS=64' \ - '-DNO_TCMALLOC' \ - '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ - '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ - '-DDISABLE_NACL' \ - '-DCHROMIUM_BUILD' \ - '-DUSE_LIBJPEG_TURBO=1' \ - '-DUSE_PROPRIETARY_CODECS' \ - '-DENABLE_CONFIGURATION_POLICY' \ - '-DLOGGING_IS_OFFICIAL_BUILD=1' \ - '-DTRACING_IS_OFFICIAL_BUILD=1' \ - '-DENABLE_GPU=1' \ - '-DUSE_OPENSSL=1' \ - '-DENABLE_EGLIMAGE=1' \ - '-DENABLE_PRINTING=1' \ - '-DCOMPILER_IMPLEMENTATION' \ - '-DANDROID' \ - '-D__GNU_SOURCE=1' \ - '-DUSE_STLPORT=1' \ - '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \ - '-DCHROME_BUILD_ID=""' \ - '-DNDEBUG' \ - '-DNVALGRIND' \ - '-DDYNAMIC_ANNOTATIONS_ENABLED=0' - - -# Include paths placed before CFLAGS/CPPFLAGS -LOCAL_C_INCLUDES_Release := \ - $(LOCAL_PATH)/third_party/angle_dx11/src \ - $(LOCAL_PATH)/third_party/angle_dx11/include \ - $(PWD)/frameworks/wilhelm/include \ - $(PWD)/bionic \ - $(PWD)/external/stlport/stlport - - -# Flags passed to only C++ (and not C) files. -LOCAL_CPPFLAGS_Release := \ - -fno-rtti \ - -fno-threadsafe-statics \ - -fvisibility-inlines-hidden \ - -Wno-deprecated \ - -Wno-abi \ - -Wno-error=c++0x-compat \ - -Wno-non-virtual-dtor \ - -Wno-sign-promo \ - -Wno-non-virtual-dtor - - -LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION)) -LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION)) -LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION)) -### Rules for final target. - -LOCAL_LDFLAGS_Debug := \ - -Wl,-z,now \ - -Wl,-z,relro \ - -Wl,-z,noexecstack \ - -fPIC \ - -Wl,-z,relro \ - -Wl,-z,now \ - -fuse-ld=gold \ - -nostdlib \ - -Wl,--no-undefined \ - -Wl,--exclude-libs=ALL \ - -Wl,--icf=safe \ - -Wl,--fatal-warnings \ - -Wl,--gc-sections \ - -Wl,--warn-shared-textrel \ - -Wl,-O1 \ - -Wl,--as-needed - - -LOCAL_LDFLAGS_Release := \ - -Wl,-z,now \ - -Wl,-z,relro \ - -Wl,-z,noexecstack \ - -fPIC \ - -Wl,-z,relro \ - -Wl,-z,now \ - -fuse-ld=gold \ - -nostdlib \ - -Wl,--no-undefined \ - -Wl,--exclude-libs=ALL \ - -Wl,--icf=safe \ - -Wl,-O1 \ - -Wl,--as-needed \ - -Wl,--gc-sections \ - -Wl,--fatal-warnings \ - -Wl,--warn-shared-textrel - - -LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION)) - -LOCAL_STATIC_LIBRARIES := - -# Enable grouping to fix circular references -LOCAL_GROUP_STATIC_LIBRARIES := true - -LOCAL_SHARED_LIBRARIES := \ - libstlport \ - libdl - -# Add target alias to "gyp_all_modules" target. -.PHONY: gyp_all_modules -gyp_all_modules: third_party_angle_dx11_src_translator_glsl_gyp - -# Alias gyp target name. -.PHONY: translator_glsl -translator_glsl: third_party_angle_dx11_src_translator_glsl_gyp - -include $(BUILD_STATIC_LIBRARY) diff --git a/src/translator_glsl.target.darwin-mips.mk b/src/translator_glsl.target.darwin-mips.mk deleted file mode 100644 index b0e8e615..00000000 --- a/src/translator_glsl.target.darwin-mips.mk +++ /dev/null @@ -1,271 +0,0 @@ -# This file is generated by gyp; do not edit. - -include $(CLEAR_VARS) - -LOCAL_MODULE_CLASS := STATIC_LIBRARIES -LOCAL_MODULE := third_party_angle_dx11_src_translator_glsl_gyp -LOCAL_MODULE_SUFFIX := .a -LOCAL_MODULE_TAGS := optional -gyp_intermediate_dir := $(call local-intermediates-dir) -gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared) - -# Make sure our deps are built first. -GYP_TARGET_DEPENDENCIES := - -GYP_GENERATED_OUTPUTS := - -# Make sure our deps and generated files are built first. -LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS) - -LOCAL_GENERATED_SOURCES := - -GYP_COPIED_SOURCE_ORIGIN_DIRS := - -LOCAL_SRC_FILES := \ - third_party/angle_dx11/src/compiler/CodeGenGLSL.cpp \ - third_party/angle_dx11/src/compiler/OutputESSL.cpp \ - third_party/angle_dx11/src/compiler/OutputGLSLBase.cpp \ - third_party/angle_dx11/src/compiler/OutputGLSL.cpp \ - third_party/angle_dx11/src/compiler/ShaderLang.cpp \ - third_party/angle_dx11/src/compiler/TranslatorESSL.cpp \ - third_party/angle_dx11/src/compiler/TranslatorGLSL.cpp \ - third_party/angle_dx11/src/compiler/VersionGLSL.cpp - - -# Flags passed to both C and C++ files. -MY_CFLAGS_Debug := \ - -fstack-protector \ - --param=ssp-buffer-size=4 \ - \ - -fno-exceptions \ - -fno-strict-aliasing \ - -Wno-unused-parameter \ - -Wno-missing-field-initializers \ - -fvisibility=hidden \ - -pipe \ - -fPIC \ - -Wno-format \ - -EL \ - -mhard-float \ - -ffunction-sections \ - -funwind-tables \ - -g \ - -fstack-protector \ - -fno-short-enums \ - -finline-limit=64 \ - -Wa,--noexecstack \ - -U_FORTIFY_SOURCE \ - -Wno-extra \ - -Wno-ignored-qualifiers \ - -Wno-type-limits \ - -Wno-address \ - -Wno-format-security \ - -Wno-return-type \ - -Wno-sequence-point \ - -Os \ - -g \ - -fomit-frame-pointer \ - -fdata-sections \ - -ffunction-sections - -MY_DEFS_Debug := \ - '-DANGLE_DX11' \ - '-DANGLE_DISABLE_TRACE' \ - '-DANGLE_COMPILE_OPTIMIZATION_LEVEL=D3DCOMPILE_OPTIMIZATION_LEVEL1' \ - '-DANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ TEXT("d3dcompiler_46.dll"), TEXT("d3dcompiler_43.dll") }' \ - '-D_FILE_OFFSET_BITS=64' \ - '-DNO_TCMALLOC' \ - '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ - '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ - '-DDISABLE_NACL' \ - '-DCHROMIUM_BUILD' \ - '-DUSE_LIBJPEG_TURBO=1' \ - '-DUSE_PROPRIETARY_CODECS' \ - '-DENABLE_CONFIGURATION_POLICY' \ - '-DLOGGING_IS_OFFICIAL_BUILD=1' \ - '-DTRACING_IS_OFFICIAL_BUILD=1' \ - '-DENABLE_GPU=1' \ - '-DUSE_OPENSSL=1' \ - '-DENABLE_EGLIMAGE=1' \ - '-DENABLE_PRINTING=1' \ - '-DCOMPILER_IMPLEMENTATION' \ - '-DANDROID' \ - '-D__GNU_SOURCE=1' \ - '-DUSE_STLPORT=1' \ - '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \ - '-DCHROME_BUILD_ID=""' \ - '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \ - '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \ - '-D_DEBUG' - - -# Include paths placed before CFLAGS/CPPFLAGS -LOCAL_C_INCLUDES_Debug := \ - $(LOCAL_PATH)/third_party/angle_dx11/src \ - $(LOCAL_PATH)/third_party/angle_dx11/include \ - $(PWD)/frameworks/wilhelm/include \ - $(PWD)/bionic \ - $(PWD)/external/stlport/stlport - - -# Flags passed to only C++ (and not C) files. -LOCAL_CPPFLAGS_Debug := \ - -fno-rtti \ - -fno-threadsafe-statics \ - -fvisibility-inlines-hidden \ - -Wno-deprecated \ - -Wno-uninitialized \ - -Wno-error=c++0x-compat \ - -Wno-non-virtual-dtor \ - -Wno-sign-promo \ - -Wno-non-virtual-dtor - - -# Flags passed to both C and C++ files. -MY_CFLAGS_Release := \ - -fstack-protector \ - --param=ssp-buffer-size=4 \ - \ - -fno-exceptions \ - -fno-strict-aliasing \ - -Wno-unused-parameter \ - -Wno-missing-field-initializers \ - -fvisibility=hidden \ - -pipe \ - -fPIC \ - -Wno-format \ - -EL \ - -mhard-float \ - -ffunction-sections \ - -funwind-tables \ - -g \ - -fstack-protector \ - -fno-short-enums \ - -finline-limit=64 \ - -Wa,--noexecstack \ - -U_FORTIFY_SOURCE \ - -Wno-extra \ - -Wno-ignored-qualifiers \ - -Wno-type-limits \ - -Wno-address \ - -Wno-format-security \ - -Wno-return-type \ - -Wno-sequence-point \ - -Os \ - -fno-ident \ - -fdata-sections \ - -ffunction-sections \ - -fomit-frame-pointer - -MY_DEFS_Release := \ - '-DANGLE_DX11' \ - '-DANGLE_DISABLE_TRACE' \ - '-DANGLE_COMPILE_OPTIMIZATION_LEVEL=D3DCOMPILE_OPTIMIZATION_LEVEL1' \ - '-DANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ TEXT("d3dcompiler_46.dll"), TEXT("d3dcompiler_43.dll") }' \ - '-D_FILE_OFFSET_BITS=64' \ - '-DNO_TCMALLOC' \ - '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ - '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ - '-DDISABLE_NACL' \ - '-DCHROMIUM_BUILD' \ - '-DUSE_LIBJPEG_TURBO=1' \ - '-DUSE_PROPRIETARY_CODECS' \ - '-DENABLE_CONFIGURATION_POLICY' \ - '-DLOGGING_IS_OFFICIAL_BUILD=1' \ - '-DTRACING_IS_OFFICIAL_BUILD=1' \ - '-DENABLE_GPU=1' \ - '-DUSE_OPENSSL=1' \ - '-DENABLE_EGLIMAGE=1' \ - '-DENABLE_PRINTING=1' \ - '-DCOMPILER_IMPLEMENTATION' \ - '-DANDROID' \ - '-D__GNU_SOURCE=1' \ - '-DUSE_STLPORT=1' \ - '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \ - '-DCHROME_BUILD_ID=""' \ - '-DNDEBUG' \ - '-DNVALGRIND' \ - '-DDYNAMIC_ANNOTATIONS_ENABLED=0' - - -# Include paths placed before CFLAGS/CPPFLAGS -LOCAL_C_INCLUDES_Release := \ - $(LOCAL_PATH)/third_party/angle_dx11/src \ - $(LOCAL_PATH)/third_party/angle_dx11/include \ - $(PWD)/frameworks/wilhelm/include \ - $(PWD)/bionic \ - $(PWD)/external/stlport/stlport - - -# Flags passed to only C++ (and not C) files. -LOCAL_CPPFLAGS_Release := \ - -fno-rtti \ - -fno-threadsafe-statics \ - -fvisibility-inlines-hidden \ - -Wno-deprecated \ - -Wno-uninitialized \ - -Wno-error=c++0x-compat \ - -Wno-non-virtual-dtor \ - -Wno-sign-promo \ - -Wno-non-virtual-dtor - - -LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION)) -LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION)) -LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION)) -### Rules for final target. - -LOCAL_LDFLAGS_Debug := \ - -Wl,-z,now \ - -Wl,-z,relro \ - -Wl,-z,noexecstack \ - -fPIC \ - -EL \ - -Wl,--no-keep-memory \ - -nostdlib \ - -Wl,--no-undefined \ - -Wl,--exclude-libs=ALL \ - -Wl,--fatal-warnings \ - -Wl,--gc-sections \ - -Wl,--warn-shared-textrel \ - -Wl,-O1 \ - -Wl,--as-needed - - -LOCAL_LDFLAGS_Release := \ - -Wl,-z,now \ - -Wl,-z,relro \ - -Wl,-z,noexecstack \ - -fPIC \ - -EL \ - -Wl,--no-keep-memory \ - -nostdlib \ - -Wl,--no-undefined \ - -Wl,--exclude-libs=ALL \ - -Wl,-O1 \ - -Wl,--as-needed \ - -Wl,--gc-sections \ - -Wl,--fatal-warnings \ - -Wl,--warn-shared-textrel - - -LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION)) - -LOCAL_STATIC_LIBRARIES := - -# Enable grouping to fix circular references -LOCAL_GROUP_STATIC_LIBRARIES := true - -LOCAL_SHARED_LIBRARIES := \ - libstlport \ - libdl - -# Add target alias to "gyp_all_modules" target. -.PHONY: gyp_all_modules -gyp_all_modules: third_party_angle_dx11_src_translator_glsl_gyp - -# Alias gyp target name. -.PHONY: translator_glsl -translator_glsl: third_party_angle_dx11_src_translator_glsl_gyp - -include $(BUILD_STATIC_LIBRARY) diff --git a/src/translator_glsl.target.darwin-x86.mk b/src/translator_glsl.target.darwin-x86.mk deleted file mode 100644 index 84defe27..00000000 --- a/src/translator_glsl.target.darwin-x86.mk +++ /dev/null @@ -1,275 +0,0 @@ -# This file is generated by gyp; do not edit. - -include $(CLEAR_VARS) - -LOCAL_MODULE_CLASS := STATIC_LIBRARIES -LOCAL_MODULE := third_party_angle_dx11_src_translator_glsl_gyp -LOCAL_MODULE_SUFFIX := .a -LOCAL_MODULE_TAGS := optional -gyp_intermediate_dir := $(call local-intermediates-dir) -gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared) - -# Make sure our deps are built first. -GYP_TARGET_DEPENDENCIES := - -GYP_GENERATED_OUTPUTS := - -# Make sure our deps and generated files are built first. -LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS) - -LOCAL_GENERATED_SOURCES := - -GYP_COPIED_SOURCE_ORIGIN_DIRS := - -LOCAL_SRC_FILES := \ - third_party/angle_dx11/src/compiler/CodeGenGLSL.cpp \ - third_party/angle_dx11/src/compiler/OutputESSL.cpp \ - third_party/angle_dx11/src/compiler/OutputGLSLBase.cpp \ - third_party/angle_dx11/src/compiler/OutputGLSL.cpp \ - third_party/angle_dx11/src/compiler/ShaderLang.cpp \ - third_party/angle_dx11/src/compiler/TranslatorESSL.cpp \ - third_party/angle_dx11/src/compiler/TranslatorGLSL.cpp \ - third_party/angle_dx11/src/compiler/VersionGLSL.cpp - - -# Flags passed to both C and C++ files. -MY_CFLAGS_Debug := \ - --param=ssp-buffer-size=4 \ - -fno-exceptions \ - -fno-strict-aliasing \ - -Wno-unused-parameter \ - -Wno-missing-field-initializers \ - -fvisibility=hidden \ - -pipe \ - -fPIC \ - -Wno-format \ - -m32 \ - -mmmx \ - -march=pentium4 \ - -msse2 \ - -mfpmath=sse \ - -fuse-ld=gold \ - -ffunction-sections \ - -funwind-tables \ - -g \ - -fno-short-enums \ - -finline-limit=64 \ - -Wa,--noexecstack \ - -U_FORTIFY_SOURCE \ - -Wno-extra \ - -Wno-ignored-qualifiers \ - -Wno-type-limits \ - -Wno-address \ - -Wno-format-security \ - -Wno-return-type \ - -Wno-sequence-point \ - -fno-stack-protector \ - -Os \ - -g \ - -fomit-frame-pointer \ - -fdata-sections \ - -ffunction-sections - -MY_DEFS_Debug := \ - '-DANGLE_DX11' \ - '-DANGLE_DISABLE_TRACE' \ - '-DANGLE_COMPILE_OPTIMIZATION_LEVEL=D3DCOMPILE_OPTIMIZATION_LEVEL1' \ - '-DANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ TEXT("d3dcompiler_46.dll"), TEXT("d3dcompiler_43.dll") }' \ - '-D_FILE_OFFSET_BITS=64' \ - '-DNO_TCMALLOC' \ - '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ - '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ - '-DDISABLE_NACL' \ - '-DCHROMIUM_BUILD' \ - '-DUSE_LIBJPEG_TURBO=1' \ - '-DUSE_PROPRIETARY_CODECS' \ - '-DENABLE_CONFIGURATION_POLICY' \ - '-DLOGGING_IS_OFFICIAL_BUILD=1' \ - '-DTRACING_IS_OFFICIAL_BUILD=1' \ - '-DENABLE_GPU=1' \ - '-DUSE_OPENSSL=1' \ - '-DENABLE_EGLIMAGE=1' \ - '-DENABLE_PRINTING=1' \ - '-DCOMPILER_IMPLEMENTATION' \ - '-DANDROID' \ - '-D__GNU_SOURCE=1' \ - '-DUSE_STLPORT=1' \ - '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \ - '-DCHROME_BUILD_ID=""' \ - '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \ - '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \ - '-D_DEBUG' - - -# Include paths placed before CFLAGS/CPPFLAGS -LOCAL_C_INCLUDES_Debug := \ - $(LOCAL_PATH)/third_party/angle_dx11/src \ - $(LOCAL_PATH)/third_party/angle_dx11/include \ - $(PWD)/frameworks/wilhelm/include \ - $(PWD)/bionic \ - $(PWD)/external/stlport/stlport - - -# Flags passed to only C++ (and not C) files. -LOCAL_CPPFLAGS_Debug := \ - -fno-rtti \ - -fno-threadsafe-statics \ - -fvisibility-inlines-hidden \ - -Wno-deprecated \ - -Wno-error=c++0x-compat \ - -Wno-non-virtual-dtor \ - -Wno-sign-promo \ - -Wno-non-virtual-dtor - - -# Flags passed to both C and C++ files. -MY_CFLAGS_Release := \ - --param=ssp-buffer-size=4 \ - -fno-exceptions \ - -fno-strict-aliasing \ - -Wno-unused-parameter \ - -Wno-missing-field-initializers \ - -fvisibility=hidden \ - -pipe \ - -fPIC \ - -Wno-format \ - -m32 \ - -mmmx \ - -march=pentium4 \ - -msse2 \ - -mfpmath=sse \ - -fuse-ld=gold \ - -ffunction-sections \ - -funwind-tables \ - -g \ - -fno-short-enums \ - -finline-limit=64 \ - -Wa,--noexecstack \ - -U_FORTIFY_SOURCE \ - -Wno-extra \ - -Wno-ignored-qualifiers \ - -Wno-type-limits \ - -Wno-address \ - -Wno-format-security \ - -Wno-return-type \ - -Wno-sequence-point \ - -fno-stack-protector \ - -Os \ - -fno-ident \ - -fdata-sections \ - -ffunction-sections \ - -fomit-frame-pointer \ - -fno-unwind-tables \ - -fno-asynchronous-unwind-tables - -MY_DEFS_Release := \ - '-DANGLE_DX11' \ - '-DANGLE_DISABLE_TRACE' \ - '-DANGLE_COMPILE_OPTIMIZATION_LEVEL=D3DCOMPILE_OPTIMIZATION_LEVEL1' \ - '-DANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ TEXT("d3dcompiler_46.dll"), TEXT("d3dcompiler_43.dll") }' \ - '-D_FILE_OFFSET_BITS=64' \ - '-DNO_TCMALLOC' \ - '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ - '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ - '-DDISABLE_NACL' \ - '-DCHROMIUM_BUILD' \ - '-DUSE_LIBJPEG_TURBO=1' \ - '-DUSE_PROPRIETARY_CODECS' \ - '-DENABLE_CONFIGURATION_POLICY' \ - '-DLOGGING_IS_OFFICIAL_BUILD=1' \ - '-DTRACING_IS_OFFICIAL_BUILD=1' \ - '-DENABLE_GPU=1' \ - '-DUSE_OPENSSL=1' \ - '-DENABLE_EGLIMAGE=1' \ - '-DENABLE_PRINTING=1' \ - '-DCOMPILER_IMPLEMENTATION' \ - '-DANDROID' \ - '-D__GNU_SOURCE=1' \ - '-DUSE_STLPORT=1' \ - '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \ - '-DCHROME_BUILD_ID=""' \ - '-DNDEBUG' \ - '-DNVALGRIND' \ - '-DDYNAMIC_ANNOTATIONS_ENABLED=0' - - -# Include paths placed before CFLAGS/CPPFLAGS -LOCAL_C_INCLUDES_Release := \ - $(LOCAL_PATH)/third_party/angle_dx11/src \ - $(LOCAL_PATH)/third_party/angle_dx11/include \ - $(PWD)/frameworks/wilhelm/include \ - $(PWD)/bionic \ - $(PWD)/external/stlport/stlport - - -# Flags passed to only C++ (and not C) files. -LOCAL_CPPFLAGS_Release := \ - -fno-rtti \ - -fno-threadsafe-statics \ - -fvisibility-inlines-hidden \ - -Wno-deprecated \ - -Wno-error=c++0x-compat \ - -Wno-non-virtual-dtor \ - -Wno-sign-promo \ - -Wno-non-virtual-dtor - - -LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION)) -LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION)) -LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION)) -### Rules for final target. - -LOCAL_LDFLAGS_Debug := \ - -Wl,-z,now \ - -Wl,-z,relro \ - -Wl,-z,noexecstack \ - -fPIC \ - -m32 \ - -fuse-ld=gold \ - -nostdlib \ - -Wl,--no-undefined \ - -Wl,--exclude-libs=ALL \ - -Wl,--fatal-warnings \ - -Wl,--gc-sections \ - -Wl,--warn-shared-textrel \ - -Wl,-O1 \ - -Wl,--as-needed - - -LOCAL_LDFLAGS_Release := \ - -Wl,-z,now \ - -Wl,-z,relro \ - -Wl,-z,noexecstack \ - -fPIC \ - -m32 \ - -fuse-ld=gold \ - -nostdlib \ - -Wl,--no-undefined \ - -Wl,--exclude-libs=ALL \ - -Wl,-O1 \ - -Wl,--as-needed \ - -Wl,--gc-sections \ - -Wl,--fatal-warnings \ - -Wl,--warn-shared-textrel - - -LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION)) - -LOCAL_STATIC_LIBRARIES := - -# Enable grouping to fix circular references -LOCAL_GROUP_STATIC_LIBRARIES := true - -LOCAL_SHARED_LIBRARIES := \ - libstlport \ - libdl - -# Add target alias to "gyp_all_modules" target. -.PHONY: gyp_all_modules -gyp_all_modules: third_party_angle_dx11_src_translator_glsl_gyp - -# Alias gyp target name. -.PHONY: translator_glsl -translator_glsl: third_party_angle_dx11_src_translator_glsl_gyp - -include $(BUILD_STATIC_LIBRARY) diff --git a/src/translator_glsl.target.linux-arm.mk b/src/translator_glsl.target.linux-arm.mk deleted file mode 100644 index 7c1cf91c..00000000 --- a/src/translator_glsl.target.linux-arm.mk +++ /dev/null @@ -1,275 +0,0 @@ -# This file is generated by gyp; do not edit. - -include $(CLEAR_VARS) - -LOCAL_MODULE_CLASS := STATIC_LIBRARIES -LOCAL_MODULE := third_party_angle_dx11_src_translator_glsl_gyp -LOCAL_MODULE_SUFFIX := .a -LOCAL_MODULE_TAGS := optional -gyp_intermediate_dir := $(call local-intermediates-dir) -gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared) - -# Make sure our deps are built first. -GYP_TARGET_DEPENDENCIES := - -GYP_GENERATED_OUTPUTS := - -# Make sure our deps and generated files are built first. -LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS) - -LOCAL_GENERATED_SOURCES := - -GYP_COPIED_SOURCE_ORIGIN_DIRS := - -LOCAL_SRC_FILES := \ - third_party/angle_dx11/src/compiler/CodeGenGLSL.cpp \ - third_party/angle_dx11/src/compiler/OutputESSL.cpp \ - third_party/angle_dx11/src/compiler/OutputGLSLBase.cpp \ - third_party/angle_dx11/src/compiler/OutputGLSL.cpp \ - third_party/angle_dx11/src/compiler/ShaderLang.cpp \ - third_party/angle_dx11/src/compiler/TranslatorESSL.cpp \ - third_party/angle_dx11/src/compiler/TranslatorGLSL.cpp \ - third_party/angle_dx11/src/compiler/VersionGLSL.cpp - - -# Flags passed to both C and C++ files. -MY_CFLAGS_Debug := \ - -fstack-protector \ - --param=ssp-buffer-size=4 \ - -fno-exceptions \ - -fno-strict-aliasing \ - -Wno-unused-parameter \ - -Wno-missing-field-initializers \ - -fvisibility=hidden \ - -pipe \ - -fPIC \ - -Wno-format \ - -fno-tree-sra \ - -fuse-ld=gold \ - -Wno-psabi \ - -ffunction-sections \ - -funwind-tables \ - -g \ - -fstack-protector \ - -fno-short-enums \ - -finline-limit=64 \ - -Wa,--noexecstack \ - -U_FORTIFY_SOURCE \ - -Wno-extra \ - -Wno-ignored-qualifiers \ - -Wno-type-limits \ - -Wno-address \ - -Wno-format-security \ - -Wno-return-type \ - -Wno-sequence-point \ - -Os \ - -g \ - -fomit-frame-pointer \ - -fdata-sections \ - -ffunction-sections - -MY_DEFS_Debug := \ - '-DANGLE_DX11' \ - '-DANGLE_DISABLE_TRACE' \ - '-DANGLE_COMPILE_OPTIMIZATION_LEVEL=D3DCOMPILE_OPTIMIZATION_LEVEL1' \ - '-DANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ TEXT("d3dcompiler_46.dll"), TEXT("d3dcompiler_43.dll") }' \ - '-D_FILE_OFFSET_BITS=64' \ - '-DNO_TCMALLOC' \ - '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ - '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ - '-DDISABLE_NACL' \ - '-DCHROMIUM_BUILD' \ - '-DUSE_LIBJPEG_TURBO=1' \ - '-DUSE_PROPRIETARY_CODECS' \ - '-DENABLE_CONFIGURATION_POLICY' \ - '-DLOGGING_IS_OFFICIAL_BUILD=1' \ - '-DTRACING_IS_OFFICIAL_BUILD=1' \ - '-DENABLE_GPU=1' \ - '-DUSE_OPENSSL=1' \ - '-DENABLE_EGLIMAGE=1' \ - '-DENABLE_PRINTING=1' \ - '-DCOMPILER_IMPLEMENTATION' \ - '-DANDROID' \ - '-D__GNU_SOURCE=1' \ - '-DUSE_STLPORT=1' \ - '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \ - '-DCHROME_BUILD_ID=""' \ - '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \ - '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \ - '-D_DEBUG' - - -# Include paths placed before CFLAGS/CPPFLAGS -LOCAL_C_INCLUDES_Debug := \ - $(LOCAL_PATH)/third_party/angle_dx11/src \ - $(LOCAL_PATH)/third_party/angle_dx11/include \ - $(PWD)/frameworks/wilhelm/include \ - $(PWD)/bionic \ - $(PWD)/external/stlport/stlport - - -# Flags passed to only C++ (and not C) files. -LOCAL_CPPFLAGS_Debug := \ - -fno-rtti \ - -fno-threadsafe-statics \ - -fvisibility-inlines-hidden \ - -Wno-deprecated \ - -Wno-abi \ - -Wno-error=c++0x-compat \ - -Wno-non-virtual-dtor \ - -Wno-sign-promo \ - -Wno-non-virtual-dtor - - -# Flags passed to both C and C++ files. -MY_CFLAGS_Release := \ - -fstack-protector \ - --param=ssp-buffer-size=4 \ - -fno-exceptions \ - -fno-strict-aliasing \ - -Wno-unused-parameter \ - -Wno-missing-field-initializers \ - -fvisibility=hidden \ - -pipe \ - -fPIC \ - -Wno-format \ - -fno-tree-sra \ - -fuse-ld=gold \ - -Wno-psabi \ - -ffunction-sections \ - -funwind-tables \ - -g \ - -fstack-protector \ - -fno-short-enums \ - -finline-limit=64 \ - -Wa,--noexecstack \ - -U_FORTIFY_SOURCE \ - -Wno-extra \ - -Wno-ignored-qualifiers \ - -Wno-type-limits \ - -Wno-address \ - -Wno-format-security \ - -Wno-return-type \ - -Wno-sequence-point \ - -Os \ - -fno-ident \ - -fdata-sections \ - -ffunction-sections \ - -fomit-frame-pointer - -MY_DEFS_Release := \ - '-DANGLE_DX11' \ - '-DANGLE_DISABLE_TRACE' \ - '-DANGLE_COMPILE_OPTIMIZATION_LEVEL=D3DCOMPILE_OPTIMIZATION_LEVEL1' \ - '-DANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ TEXT("d3dcompiler_46.dll"), TEXT("d3dcompiler_43.dll") }' \ - '-D_FILE_OFFSET_BITS=64' \ - '-DNO_TCMALLOC' \ - '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ - '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ - '-DDISABLE_NACL' \ - '-DCHROMIUM_BUILD' \ - '-DUSE_LIBJPEG_TURBO=1' \ - '-DUSE_PROPRIETARY_CODECS' \ - '-DENABLE_CONFIGURATION_POLICY' \ - '-DLOGGING_IS_OFFICIAL_BUILD=1' \ - '-DTRACING_IS_OFFICIAL_BUILD=1' \ - '-DENABLE_GPU=1' \ - '-DUSE_OPENSSL=1' \ - '-DENABLE_EGLIMAGE=1' \ - '-DENABLE_PRINTING=1' \ - '-DCOMPILER_IMPLEMENTATION' \ - '-DANDROID' \ - '-D__GNU_SOURCE=1' \ - '-DUSE_STLPORT=1' \ - '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \ - '-DCHROME_BUILD_ID=""' \ - '-DNDEBUG' \ - '-DNVALGRIND' \ - '-DDYNAMIC_ANNOTATIONS_ENABLED=0' - - -# Include paths placed before CFLAGS/CPPFLAGS -LOCAL_C_INCLUDES_Release := \ - $(LOCAL_PATH)/third_party/angle_dx11/src \ - $(LOCAL_PATH)/third_party/angle_dx11/include \ - $(PWD)/frameworks/wilhelm/include \ - $(PWD)/bionic \ - $(PWD)/external/stlport/stlport - - -# Flags passed to only C++ (and not C) files. -LOCAL_CPPFLAGS_Release := \ - -fno-rtti \ - -fno-threadsafe-statics \ - -fvisibility-inlines-hidden \ - -Wno-deprecated \ - -Wno-abi \ - -Wno-error=c++0x-compat \ - -Wno-non-virtual-dtor \ - -Wno-sign-promo \ - -Wno-non-virtual-dtor - - -LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION)) -LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION)) -LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION)) -### Rules for final target. - -LOCAL_LDFLAGS_Debug := \ - -Wl,-z,now \ - -Wl,-z,relro \ - -Wl,-z,noexecstack \ - -fPIC \ - -Wl,-z,relro \ - -Wl,-z,now \ - -fuse-ld=gold \ - -nostdlib \ - -Wl,--no-undefined \ - -Wl,--exclude-libs=ALL \ - -Wl,--icf=safe \ - -Wl,--fatal-warnings \ - -Wl,--gc-sections \ - -Wl,--warn-shared-textrel \ - -Wl,-O1 \ - -Wl,--as-needed - - -LOCAL_LDFLAGS_Release := \ - -Wl,-z,now \ - -Wl,-z,relro \ - -Wl,-z,noexecstack \ - -fPIC \ - -Wl,-z,relro \ - -Wl,-z,now \ - -fuse-ld=gold \ - -nostdlib \ - -Wl,--no-undefined \ - -Wl,--exclude-libs=ALL \ - -Wl,--icf=safe \ - -Wl,-O1 \ - -Wl,--as-needed \ - -Wl,--gc-sections \ - -Wl,--fatal-warnings \ - -Wl,--warn-shared-textrel - - -LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION)) - -LOCAL_STATIC_LIBRARIES := - -# Enable grouping to fix circular references -LOCAL_GROUP_STATIC_LIBRARIES := true - -LOCAL_SHARED_LIBRARIES := \ - libstlport \ - libdl - -# Add target alias to "gyp_all_modules" target. -.PHONY: gyp_all_modules -gyp_all_modules: third_party_angle_dx11_src_translator_glsl_gyp - -# Alias gyp target name. -.PHONY: translator_glsl -translator_glsl: third_party_angle_dx11_src_translator_glsl_gyp - -include $(BUILD_STATIC_LIBRARY) diff --git a/src/translator_glsl.target.linux-mips.mk b/src/translator_glsl.target.linux-mips.mk deleted file mode 100644 index b0e8e615..00000000 --- a/src/translator_glsl.target.linux-mips.mk +++ /dev/null @@ -1,271 +0,0 @@ -# This file is generated by gyp; do not edit. - -include $(CLEAR_VARS) - -LOCAL_MODULE_CLASS := STATIC_LIBRARIES -LOCAL_MODULE := third_party_angle_dx11_src_translator_glsl_gyp -LOCAL_MODULE_SUFFIX := .a -LOCAL_MODULE_TAGS := optional -gyp_intermediate_dir := $(call local-intermediates-dir) -gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared) - -# Make sure our deps are built first. -GYP_TARGET_DEPENDENCIES := - -GYP_GENERATED_OUTPUTS := - -# Make sure our deps and generated files are built first. -LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS) - -LOCAL_GENERATED_SOURCES := - -GYP_COPIED_SOURCE_ORIGIN_DIRS := - -LOCAL_SRC_FILES := \ - third_party/angle_dx11/src/compiler/CodeGenGLSL.cpp \ - third_party/angle_dx11/src/compiler/OutputESSL.cpp \ - third_party/angle_dx11/src/compiler/OutputGLSLBase.cpp \ - third_party/angle_dx11/src/compiler/OutputGLSL.cpp \ - third_party/angle_dx11/src/compiler/ShaderLang.cpp \ - third_party/angle_dx11/src/compiler/TranslatorESSL.cpp \ - third_party/angle_dx11/src/compiler/TranslatorGLSL.cpp \ - third_party/angle_dx11/src/compiler/VersionGLSL.cpp - - -# Flags passed to both C and C++ files. -MY_CFLAGS_Debug := \ - -fstack-protector \ - --param=ssp-buffer-size=4 \ - \ - -fno-exceptions \ - -fno-strict-aliasing \ - -Wno-unused-parameter \ - -Wno-missing-field-initializers \ - -fvisibility=hidden \ - -pipe \ - -fPIC \ - -Wno-format \ - -EL \ - -mhard-float \ - -ffunction-sections \ - -funwind-tables \ - -g \ - -fstack-protector \ - -fno-short-enums \ - -finline-limit=64 \ - -Wa,--noexecstack \ - -U_FORTIFY_SOURCE \ - -Wno-extra \ - -Wno-ignored-qualifiers \ - -Wno-type-limits \ - -Wno-address \ - -Wno-format-security \ - -Wno-return-type \ - -Wno-sequence-point \ - -Os \ - -g \ - -fomit-frame-pointer \ - -fdata-sections \ - -ffunction-sections - -MY_DEFS_Debug := \ - '-DANGLE_DX11' \ - '-DANGLE_DISABLE_TRACE' \ - '-DANGLE_COMPILE_OPTIMIZATION_LEVEL=D3DCOMPILE_OPTIMIZATION_LEVEL1' \ - '-DANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ TEXT("d3dcompiler_46.dll"), TEXT("d3dcompiler_43.dll") }' \ - '-D_FILE_OFFSET_BITS=64' \ - '-DNO_TCMALLOC' \ - '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ - '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ - '-DDISABLE_NACL' \ - '-DCHROMIUM_BUILD' \ - '-DUSE_LIBJPEG_TURBO=1' \ - '-DUSE_PROPRIETARY_CODECS' \ - '-DENABLE_CONFIGURATION_POLICY' \ - '-DLOGGING_IS_OFFICIAL_BUILD=1' \ - '-DTRACING_IS_OFFICIAL_BUILD=1' \ - '-DENABLE_GPU=1' \ - '-DUSE_OPENSSL=1' \ - '-DENABLE_EGLIMAGE=1' \ - '-DENABLE_PRINTING=1' \ - '-DCOMPILER_IMPLEMENTATION' \ - '-DANDROID' \ - '-D__GNU_SOURCE=1' \ - '-DUSE_STLPORT=1' \ - '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \ - '-DCHROME_BUILD_ID=""' \ - '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \ - '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \ - '-D_DEBUG' - - -# Include paths placed before CFLAGS/CPPFLAGS -LOCAL_C_INCLUDES_Debug := \ - $(LOCAL_PATH)/third_party/angle_dx11/src \ - $(LOCAL_PATH)/third_party/angle_dx11/include \ - $(PWD)/frameworks/wilhelm/include \ - $(PWD)/bionic \ - $(PWD)/external/stlport/stlport - - -# Flags passed to only C++ (and not C) files. -LOCAL_CPPFLAGS_Debug := \ - -fno-rtti \ - -fno-threadsafe-statics \ - -fvisibility-inlines-hidden \ - -Wno-deprecated \ - -Wno-uninitialized \ - -Wno-error=c++0x-compat \ - -Wno-non-virtual-dtor \ - -Wno-sign-promo \ - -Wno-non-virtual-dtor - - -# Flags passed to both C and C++ files. -MY_CFLAGS_Release := \ - -fstack-protector \ - --param=ssp-buffer-size=4 \ - \ - -fno-exceptions \ - -fno-strict-aliasing \ - -Wno-unused-parameter \ - -Wno-missing-field-initializers \ - -fvisibility=hidden \ - -pipe \ - -fPIC \ - -Wno-format \ - -EL \ - -mhard-float \ - -ffunction-sections \ - -funwind-tables \ - -g \ - -fstack-protector \ - -fno-short-enums \ - -finline-limit=64 \ - -Wa,--noexecstack \ - -U_FORTIFY_SOURCE \ - -Wno-extra \ - -Wno-ignored-qualifiers \ - -Wno-type-limits \ - -Wno-address \ - -Wno-format-security \ - -Wno-return-type \ - -Wno-sequence-point \ - -Os \ - -fno-ident \ - -fdata-sections \ - -ffunction-sections \ - -fomit-frame-pointer - -MY_DEFS_Release := \ - '-DANGLE_DX11' \ - '-DANGLE_DISABLE_TRACE' \ - '-DANGLE_COMPILE_OPTIMIZATION_LEVEL=D3DCOMPILE_OPTIMIZATION_LEVEL1' \ - '-DANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ TEXT("d3dcompiler_46.dll"), TEXT("d3dcompiler_43.dll") }' \ - '-D_FILE_OFFSET_BITS=64' \ - '-DNO_TCMALLOC' \ - '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ - '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ - '-DDISABLE_NACL' \ - '-DCHROMIUM_BUILD' \ - '-DUSE_LIBJPEG_TURBO=1' \ - '-DUSE_PROPRIETARY_CODECS' \ - '-DENABLE_CONFIGURATION_POLICY' \ - '-DLOGGING_IS_OFFICIAL_BUILD=1' \ - '-DTRACING_IS_OFFICIAL_BUILD=1' \ - '-DENABLE_GPU=1' \ - '-DUSE_OPENSSL=1' \ - '-DENABLE_EGLIMAGE=1' \ - '-DENABLE_PRINTING=1' \ - '-DCOMPILER_IMPLEMENTATION' \ - '-DANDROID' \ - '-D__GNU_SOURCE=1' \ - '-DUSE_STLPORT=1' \ - '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \ - '-DCHROME_BUILD_ID=""' \ - '-DNDEBUG' \ - '-DNVALGRIND' \ - '-DDYNAMIC_ANNOTATIONS_ENABLED=0' - - -# Include paths placed before CFLAGS/CPPFLAGS -LOCAL_C_INCLUDES_Release := \ - $(LOCAL_PATH)/third_party/angle_dx11/src \ - $(LOCAL_PATH)/third_party/angle_dx11/include \ - $(PWD)/frameworks/wilhelm/include \ - $(PWD)/bionic \ - $(PWD)/external/stlport/stlport - - -# Flags passed to only C++ (and not C) files. -LOCAL_CPPFLAGS_Release := \ - -fno-rtti \ - -fno-threadsafe-statics \ - -fvisibility-inlines-hidden \ - -Wno-deprecated \ - -Wno-uninitialized \ - -Wno-error=c++0x-compat \ - -Wno-non-virtual-dtor \ - -Wno-sign-promo \ - -Wno-non-virtual-dtor - - -LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION)) -LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION)) -LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION)) -### Rules for final target. - -LOCAL_LDFLAGS_Debug := \ - -Wl,-z,now \ - -Wl,-z,relro \ - -Wl,-z,noexecstack \ - -fPIC \ - -EL \ - -Wl,--no-keep-memory \ - -nostdlib \ - -Wl,--no-undefined \ - -Wl,--exclude-libs=ALL \ - -Wl,--fatal-warnings \ - -Wl,--gc-sections \ - -Wl,--warn-shared-textrel \ - -Wl,-O1 \ - -Wl,--as-needed - - -LOCAL_LDFLAGS_Release := \ - -Wl,-z,now \ - -Wl,-z,relro \ - -Wl,-z,noexecstack \ - -fPIC \ - -EL \ - -Wl,--no-keep-memory \ - -nostdlib \ - -Wl,--no-undefined \ - -Wl,--exclude-libs=ALL \ - -Wl,-O1 \ - -Wl,--as-needed \ - -Wl,--gc-sections \ - -Wl,--fatal-warnings \ - -Wl,--warn-shared-textrel - - -LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION)) - -LOCAL_STATIC_LIBRARIES := - -# Enable grouping to fix circular references -LOCAL_GROUP_STATIC_LIBRARIES := true - -LOCAL_SHARED_LIBRARIES := \ - libstlport \ - libdl - -# Add target alias to "gyp_all_modules" target. -.PHONY: gyp_all_modules -gyp_all_modules: third_party_angle_dx11_src_translator_glsl_gyp - -# Alias gyp target name. -.PHONY: translator_glsl -translator_glsl: third_party_angle_dx11_src_translator_glsl_gyp - -include $(BUILD_STATIC_LIBRARY) diff --git a/src/translator_glsl.target.linux-x86.mk b/src/translator_glsl.target.linux-x86.mk deleted file mode 100644 index 84defe27..00000000 --- a/src/translator_glsl.target.linux-x86.mk +++ /dev/null @@ -1,275 +0,0 @@ -# This file is generated by gyp; do not edit. - -include $(CLEAR_VARS) - -LOCAL_MODULE_CLASS := STATIC_LIBRARIES -LOCAL_MODULE := third_party_angle_dx11_src_translator_glsl_gyp -LOCAL_MODULE_SUFFIX := .a -LOCAL_MODULE_TAGS := optional -gyp_intermediate_dir := $(call local-intermediates-dir) -gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared) - -# Make sure our deps are built first. -GYP_TARGET_DEPENDENCIES := - -GYP_GENERATED_OUTPUTS := - -# Make sure our deps and generated files are built first. -LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS) - -LOCAL_GENERATED_SOURCES := - -GYP_COPIED_SOURCE_ORIGIN_DIRS := - -LOCAL_SRC_FILES := \ - third_party/angle_dx11/src/compiler/CodeGenGLSL.cpp \ - third_party/angle_dx11/src/compiler/OutputESSL.cpp \ - third_party/angle_dx11/src/compiler/OutputGLSLBase.cpp \ - third_party/angle_dx11/src/compiler/OutputGLSL.cpp \ - third_party/angle_dx11/src/compiler/ShaderLang.cpp \ - third_party/angle_dx11/src/compiler/TranslatorESSL.cpp \ - third_party/angle_dx11/src/compiler/TranslatorGLSL.cpp \ - third_party/angle_dx11/src/compiler/VersionGLSL.cpp - - -# Flags passed to both C and C++ files. -MY_CFLAGS_Debug := \ - --param=ssp-buffer-size=4 \ - -fno-exceptions \ - -fno-strict-aliasing \ - -Wno-unused-parameter \ - -Wno-missing-field-initializers \ - -fvisibility=hidden \ - -pipe \ - -fPIC \ - -Wno-format \ - -m32 \ - -mmmx \ - -march=pentium4 \ - -msse2 \ - -mfpmath=sse \ - -fuse-ld=gold \ - -ffunction-sections \ - -funwind-tables \ - -g \ - -fno-short-enums \ - -finline-limit=64 \ - -Wa,--noexecstack \ - -U_FORTIFY_SOURCE \ - -Wno-extra \ - -Wno-ignored-qualifiers \ - -Wno-type-limits \ - -Wno-address \ - -Wno-format-security \ - -Wno-return-type \ - -Wno-sequence-point \ - -fno-stack-protector \ - -Os \ - -g \ - -fomit-frame-pointer \ - -fdata-sections \ - -ffunction-sections - -MY_DEFS_Debug := \ - '-DANGLE_DX11' \ - '-DANGLE_DISABLE_TRACE' \ - '-DANGLE_COMPILE_OPTIMIZATION_LEVEL=D3DCOMPILE_OPTIMIZATION_LEVEL1' \ - '-DANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ TEXT("d3dcompiler_46.dll"), TEXT("d3dcompiler_43.dll") }' \ - '-D_FILE_OFFSET_BITS=64' \ - '-DNO_TCMALLOC' \ - '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ - '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ - '-DDISABLE_NACL' \ - '-DCHROMIUM_BUILD' \ - '-DUSE_LIBJPEG_TURBO=1' \ - '-DUSE_PROPRIETARY_CODECS' \ - '-DENABLE_CONFIGURATION_POLICY' \ - '-DLOGGING_IS_OFFICIAL_BUILD=1' \ - '-DTRACING_IS_OFFICIAL_BUILD=1' \ - '-DENABLE_GPU=1' \ - '-DUSE_OPENSSL=1' \ - '-DENABLE_EGLIMAGE=1' \ - '-DENABLE_PRINTING=1' \ - '-DCOMPILER_IMPLEMENTATION' \ - '-DANDROID' \ - '-D__GNU_SOURCE=1' \ - '-DUSE_STLPORT=1' \ - '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \ - '-DCHROME_BUILD_ID=""' \ - '-DDYNAMIC_ANNOTATIONS_ENABLED=1' \ - '-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \ - '-D_DEBUG' - - -# Include paths placed before CFLAGS/CPPFLAGS -LOCAL_C_INCLUDES_Debug := \ - $(LOCAL_PATH)/third_party/angle_dx11/src \ - $(LOCAL_PATH)/third_party/angle_dx11/include \ - $(PWD)/frameworks/wilhelm/include \ - $(PWD)/bionic \ - $(PWD)/external/stlport/stlport - - -# Flags passed to only C++ (and not C) files. -LOCAL_CPPFLAGS_Debug := \ - -fno-rtti \ - -fno-threadsafe-statics \ - -fvisibility-inlines-hidden \ - -Wno-deprecated \ - -Wno-error=c++0x-compat \ - -Wno-non-virtual-dtor \ - -Wno-sign-promo \ - -Wno-non-virtual-dtor - - -# Flags passed to both C and C++ files. -MY_CFLAGS_Release := \ - --param=ssp-buffer-size=4 \ - -fno-exceptions \ - -fno-strict-aliasing \ - -Wno-unused-parameter \ - -Wno-missing-field-initializers \ - -fvisibility=hidden \ - -pipe \ - -fPIC \ - -Wno-format \ - -m32 \ - -mmmx \ - -march=pentium4 \ - -msse2 \ - -mfpmath=sse \ - -fuse-ld=gold \ - -ffunction-sections \ - -funwind-tables \ - -g \ - -fno-short-enums \ - -finline-limit=64 \ - -Wa,--noexecstack \ - -U_FORTIFY_SOURCE \ - -Wno-extra \ - -Wno-ignored-qualifiers \ - -Wno-type-limits \ - -Wno-address \ - -Wno-format-security \ - -Wno-return-type \ - -Wno-sequence-point \ - -fno-stack-protector \ - -Os \ - -fno-ident \ - -fdata-sections \ - -ffunction-sections \ - -fomit-frame-pointer \ - -fno-unwind-tables \ - -fno-asynchronous-unwind-tables - -MY_DEFS_Release := \ - '-DANGLE_DX11' \ - '-DANGLE_DISABLE_TRACE' \ - '-DANGLE_COMPILE_OPTIMIZATION_LEVEL=D3DCOMPILE_OPTIMIZATION_LEVEL1' \ - '-DANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ TEXT("d3dcompiler_46.dll"), TEXT("d3dcompiler_43.dll") }' \ - '-D_FILE_OFFSET_BITS=64' \ - '-DNO_TCMALLOC' \ - '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ - '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ - '-DDISABLE_NACL' \ - '-DCHROMIUM_BUILD' \ - '-DUSE_LIBJPEG_TURBO=1' \ - '-DUSE_PROPRIETARY_CODECS' \ - '-DENABLE_CONFIGURATION_POLICY' \ - '-DLOGGING_IS_OFFICIAL_BUILD=1' \ - '-DTRACING_IS_OFFICIAL_BUILD=1' \ - '-DENABLE_GPU=1' \ - '-DUSE_OPENSSL=1' \ - '-DENABLE_EGLIMAGE=1' \ - '-DENABLE_PRINTING=1' \ - '-DCOMPILER_IMPLEMENTATION' \ - '-DANDROID' \ - '-D__GNU_SOURCE=1' \ - '-DUSE_STLPORT=1' \ - '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \ - '-DCHROME_BUILD_ID=""' \ - '-DNDEBUG' \ - '-DNVALGRIND' \ - '-DDYNAMIC_ANNOTATIONS_ENABLED=0' - - -# Include paths placed before CFLAGS/CPPFLAGS -LOCAL_C_INCLUDES_Release := \ - $(LOCAL_PATH)/third_party/angle_dx11/src \ - $(LOCAL_PATH)/third_party/angle_dx11/include \ - $(PWD)/frameworks/wilhelm/include \ - $(PWD)/bionic \ - $(PWD)/external/stlport/stlport - - -# Flags passed to only C++ (and not C) files. -LOCAL_CPPFLAGS_Release := \ - -fno-rtti \ - -fno-threadsafe-statics \ - -fvisibility-inlines-hidden \ - -Wno-deprecated \ - -Wno-error=c++0x-compat \ - -Wno-non-virtual-dtor \ - -Wno-sign-promo \ - -Wno-non-virtual-dtor - - -LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION)) -LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION)) -LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION)) -### Rules for final target. - -LOCAL_LDFLAGS_Debug := \ - -Wl,-z,now \ - -Wl,-z,relro \ - -Wl,-z,noexecstack \ - -fPIC \ - -m32 \ - -fuse-ld=gold \ - -nostdlib \ - -Wl,--no-undefined \ - -Wl,--exclude-libs=ALL \ - -Wl,--fatal-warnings \ - -Wl,--gc-sections \ - -Wl,--warn-shared-textrel \ - -Wl,-O1 \ - -Wl,--as-needed - - -LOCAL_LDFLAGS_Release := \ - -Wl,-z,now \ - -Wl,-z,relro \ - -Wl,-z,noexecstack \ - -fPIC \ - -m32 \ - -fuse-ld=gold \ - -nostdlib \ - -Wl,--no-undefined \ - -Wl,--exclude-libs=ALL \ - -Wl,-O1 \ - -Wl,--as-needed \ - -Wl,--gc-sections \ - -Wl,--fatal-warnings \ - -Wl,--warn-shared-textrel - - -LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION)) - -LOCAL_STATIC_LIBRARIES := - -# Enable grouping to fix circular references -LOCAL_GROUP_STATIC_LIBRARIES := true - -LOCAL_SHARED_LIBRARIES := \ - libstlport \ - libdl - -# Add target alias to "gyp_all_modules" target. -.PHONY: gyp_all_modules -gyp_all_modules: third_party_angle_dx11_src_translator_glsl_gyp - -# Alias gyp target name. -.PHONY: translator_glsl -translator_glsl: third_party_angle_dx11_src_translator_glsl_gyp - -include $(BUILD_STATIC_LIBRARY) diff --git a/tests/build_tests.gyp b/tests/build_tests.gyp index c80a4444..d485c834 100644 --- a/tests/build_tests.gyp +++ b/tests/build_tests.gyp @@ -14,6 +14,14 @@ 'sources': [ '../third_party/googletest/src/gtest-all.cc', ], + 'defines': [ + '_VARIADIC_MAX=10', + ], + 'direct_dependent_settings': { + 'defines': [ + '_VARIADIC_MAX=10', + ], + }, }, { 'target_name': 'gmock', @@ -26,6 +34,14 @@ 'sources': [ '../third_party/googlemock/src/gmock-all.cc', ], + 'defines': [ + '_VARIADIC_MAX=10', + ], + 'direct_dependent_settings': { + 'defines': [ + '_VARIADIC_MAX=10', + ], + }, }, { 'target_name': 'preprocessor_tests', @@ -35,6 +51,12 @@ 'gtest', 'gmock', ], + 'variables': { + 'ANGLE_DIR': '..', + }, + 'includes': [ + 'preprocessor_tests/preprocessor_tests.gypi', + ], 'include_dirs': [ '../src/compiler/preprocessor', '../third_party/googletest/include', @@ -42,35 +64,22 @@ ], 'sources': [ '../third_party/googlemock/src/gmock_main.cc', - 'preprocessor_tests/char_test.cpp', - 'preprocessor_tests/comment_test.cpp', - 'preprocessor_tests/define_test.cpp', - 'preprocessor_tests/error_test.cpp', - 'preprocessor_tests/extension_test.cpp', - 'preprocessor_tests/identifier_test.cpp', - 'preprocessor_tests/if_test.cpp', - 'preprocessor_tests/input_test.cpp', - 'preprocessor_tests/location_test.cpp', - 'preprocessor_tests/MockDiagnostics.h', - 'preprocessor_tests/MockDirectiveHandler.h', - 'preprocessor_tests/number_test.cpp', - 'preprocessor_tests/operator_test.cpp', - 'preprocessor_tests/pragma_test.cpp', - 'preprocessor_tests/PreprocessorTest.cpp', - 'preprocessor_tests/PreprocessorTest.h', - 'preprocessor_tests/space_test.cpp', - 'preprocessor_tests/token_test.cpp', - 'preprocessor_tests/version_test.cpp', ], }, { 'target_name': 'compiler_tests', 'type': 'executable', 'dependencies': [ - '../src/build_angle.gyp:translator_glsl', + '../src/build_angle.gyp:translator_static', 'gtest', 'gmock', ], + 'variables': { + 'ANGLE_DIR': '..', + }, + 'includes': [ + 'compiler_tests/compiler_tests.gypi', + ], 'include_dirs': [ '../include', '../src', @@ -78,9 +87,7 @@ '../third_party/googlemock/include', ], 'sources': [ - '../third_party/googlemock/src/gmock_main.cc', - 'compiler_tests/ExpressionLimit_test.cpp', - 'compiler_tests/VariablePacker_test.cpp', + 'compiler_tests/compiler_test_main.cpp', ], }, ], diff --git a/tests/compiler_tests/ExpressionLimit_test.cpp b/tests/compiler_tests/ExpressionLimit_test.cpp index 3af099de..bb83a4e9 100644 --- a/tests/compiler_tests/ExpressionLimit_test.cpp +++ b/tests/compiler_tests/ExpressionLimit_test.cpp @@ -22,17 +22,9 @@ protected: virtual void SetUp() { memset(&resources, 0, sizeof(resources)); - - ASSERT_TRUE(ShInitialize() != 0) << "Could not ShInitialize"; - GenerateResources(&resources); } - virtual void TearDown() - { - ASSERT_TRUE(ShFinalize() != 0); - } - // Set up the per compile resources void GenerateResources(ShBuiltInResources* resources) { @@ -153,7 +145,7 @@ protected: const char* source, int compileOptions, const char* expected_error) { - bool success = ShCompile(compiler, &source, 1, compileOptions); + bool success = ShCompile(compiler, &source, 1, compileOptions) != 0; if (success) { success = !expected_error; } else { diff --git a/tests/compiler_tests/compiler_test_main.cpp b/tests/compiler_tests/compiler_test_main.cpp new file mode 100644 index 00000000..02582ad6 --- /dev/null +++ b/tests/compiler_tests/compiler_test_main.cpp @@ -0,0 +1,15 @@ +// Copyright (c) 2012 The Chromium 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 "gmock/gmock.h" +#include "gtest/gtest.h" +#include "GLSLANG/ShaderLang.h" + +int main(int argc, char** argv) { + testing::InitGoogleMock(&argc, argv); + ShInitialize(); + int rt = RUN_ALL_TESTS(); + ShFinalize(); + return rt; +} diff --git a/tests/compiler_tests/compiler_tests.gypi b/tests/compiler_tests/compiler_tests.gypi new file mode 100644 index 00000000..2a5e85db --- /dev/null +++ b/tests/compiler_tests/compiler_tests.gypi @@ -0,0 +1,18 @@ +# Copyright (c) 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. + +{ + 'sources': [ + '<(ANGLE_DIR)/tests/compiler_tests/ExpressionLimit_test.cpp', + '<(ANGLE_DIR)/tests/compiler_tests/VariablePacker_test.cpp', + ], +} + + +# Local Variables: +# tab-width:2 +# indent-tabs-mode:nil +# End: +# vim: set expandtab tabstop=2 shiftwidth=2: + diff --git a/tests/preprocessor_tests/char_test.cpp b/tests/preprocessor_tests/char_test.cpp index e6576a0b..6ea5d808 100644 --- a/tests/preprocessor_tests/char_test.cpp +++ b/tests/preprocessor_tests/char_test.cpp @@ -82,7 +82,7 @@ TEST_P(CharTest, Identified) // Everything else is invalid. using testing::_; EXPECT_CALL(mDiagnostics, - print(pp::Diagnostics::INVALID_CHARACTER, _, str)); + print(pp::Diagnostics::PP_INVALID_CHARACTER, _, str)); } pp::Token token; diff --git a/tests/preprocessor_tests/comment_test.cpp b/tests/preprocessor_tests/comment_test.cpp index 27f78cf1..f0a2814f 100644 --- a/tests/preprocessor_tests/comment_test.cpp +++ b/tests/preprocessor_tests/comment_test.cpp @@ -62,7 +62,7 @@ TEST_F(BlockCommentTest, UnterminatedComment) ASSERT_TRUE(mPreprocessor.init(1, &str, 0)); using testing::_; - EXPECT_CALL(mDiagnostics, print(pp::Diagnostics::EOF_IN_COMMENT, _, _)); + EXPECT_CALL(mDiagnostics, print(pp::Diagnostics::PP_EOF_IN_COMMENT, _, _)); pp::Token token; mPreprocessor.lex(&token); diff --git a/tests/preprocessor_tests/define_test.cpp b/tests/preprocessor_tests/define_test.cpp index bb72016b..fd3ae415 100644 --- a/tests/preprocessor_tests/define_test.cpp +++ b/tests/preprocessor_tests/define_test.cpp @@ -19,7 +19,7 @@ TEST_F(DefineTest, NonIdentifier) "2\n"; EXPECT_CALL(mDiagnostics, - print(pp::Diagnostics::UNEXPECTED_TOKEN, + print(pp::Diagnostics::PP_UNEXPECTED_TOKEN, pp::SourceLocation(0, 1), "2")); @@ -46,19 +46,19 @@ TEST_F(DefineTest, RedefinePredefined) "1\n"; EXPECT_CALL(mDiagnostics, - print(pp::Diagnostics::MACRO_PREDEFINED_REDEFINED, + print(pp::Diagnostics::PP_MACRO_PREDEFINED_REDEFINED, pp::SourceLocation(0, 1), "__LINE__")); EXPECT_CALL(mDiagnostics, - print(pp::Diagnostics::MACRO_PREDEFINED_REDEFINED, + print(pp::Diagnostics::PP_MACRO_PREDEFINED_REDEFINED, pp::SourceLocation(0, 3), "__FILE__")); EXPECT_CALL(mDiagnostics, - print(pp::Diagnostics::MACRO_PREDEFINED_REDEFINED, + print(pp::Diagnostics::PP_MACRO_PREDEFINED_REDEFINED, pp::SourceLocation(0, 5), "__VERSION__")); EXPECT_CALL(mDiagnostics, - print(pp::Diagnostics::MACRO_PREDEFINED_REDEFINED, + print(pp::Diagnostics::PP_MACRO_PREDEFINED_REDEFINED, pp::SourceLocation(0, 7), "GL_ES")); @@ -73,7 +73,7 @@ TEST_F(DefineTest, ReservedUnderScore1) "__foo\n"; EXPECT_CALL(mDiagnostics, - print(pp::Diagnostics::MACRO_NAME_RESERVED, + print(pp::Diagnostics::PP_MACRO_NAME_RESERVED, pp::SourceLocation(0, 1), "__foo")); @@ -88,7 +88,7 @@ TEST_F(DefineTest, ReservedUnderScore2) "foo__bar\n"; EXPECT_CALL(mDiagnostics, - print(pp::Diagnostics::MACRO_NAME_RESERVED, + print(pp::Diagnostics::PP_MACRO_NAME_RESERVED, pp::SourceLocation(0, 1), "foo__bar")); @@ -103,7 +103,7 @@ TEST_F(DefineTest, ReservedGL) "GL_foo\n"; EXPECT_CALL(mDiagnostics, - print(pp::Diagnostics::MACRO_NAME_RESERVED, + print(pp::Diagnostics::PP_MACRO_NAME_RESERVED, pp::SourceLocation(0, 1), "GL_foo")); @@ -135,7 +135,7 @@ TEST_F(DefineTest, ObjRedefineInvalid) "(0)\n"; EXPECT_CALL(mDiagnostics, - print(pp::Diagnostics::MACRO_REDEFINED, + print(pp::Diagnostics::PP_MACRO_REDEFINED, pp::SourceLocation(0, 2), "foo")); @@ -167,7 +167,7 @@ TEST_F(DefineTest, FuncRedefineInvalid) "( a )\n"; EXPECT_CALL(mDiagnostics, - print(pp::Diagnostics::MACRO_REDEFINED, + print(pp::Diagnostics::PP_MACRO_REDEFINED, pp::SourceLocation(0, 2), "foo")); @@ -684,7 +684,7 @@ TEST_F(DefineTest, FuncMissingRightParen) "\n"; EXPECT_CALL(mDiagnostics, - print(pp::Diagnostics::MACRO_UNTERMINATED_INVOCATION, + print(pp::Diagnostics::PP_MACRO_UNTERMINATED_INVOCATION, pp::SourceLocation(0, 2), "foo")); @@ -703,15 +703,15 @@ TEST_F(DefineTest, FuncIncorrectArgCount) "\n"; EXPECT_CALL(mDiagnostics, - print(pp::Diagnostics::MACRO_TOO_FEW_ARGS, + print(pp::Diagnostics::PP_MACRO_TOO_FEW_ARGS, pp::SourceLocation(0, 2), "foo")); EXPECT_CALL(mDiagnostics, - print(pp::Diagnostics::MACRO_TOO_FEW_ARGS, + print(pp::Diagnostics::PP_MACRO_TOO_FEW_ARGS, pp::SourceLocation(0, 3), "foo")); EXPECT_CALL(mDiagnostics, - print(pp::Diagnostics::MACRO_TOO_MANY_ARGS, + print(pp::Diagnostics::PP_MACRO_TOO_MANY_ARGS, pp::SourceLocation(0, 4), "foo")); @@ -752,19 +752,19 @@ TEST_F(DefineTest, UndefPredefined) "1\n"; EXPECT_CALL(mDiagnostics, - print(pp::Diagnostics::MACRO_PREDEFINED_UNDEFINED, + print(pp::Diagnostics::PP_MACRO_PREDEFINED_UNDEFINED, pp::SourceLocation(0, 1), "__LINE__")); EXPECT_CALL(mDiagnostics, - print(pp::Diagnostics::MACRO_PREDEFINED_UNDEFINED, + print(pp::Diagnostics::PP_MACRO_PREDEFINED_UNDEFINED, pp::SourceLocation(0, 3), "__FILE__")); EXPECT_CALL(mDiagnostics, - print(pp::Diagnostics::MACRO_PREDEFINED_UNDEFINED, + print(pp::Diagnostics::PP_MACRO_PREDEFINED_UNDEFINED, pp::SourceLocation(0, 5), "__VERSION__")); EXPECT_CALL(mDiagnostics, - print(pp::Diagnostics::MACRO_PREDEFINED_UNDEFINED, + print(pp::Diagnostics::PP_MACRO_PREDEFINED_UNDEFINED, pp::SourceLocation(0, 7), "GL_ES")); diff --git a/tests/preprocessor_tests/error_test.cpp b/tests/preprocessor_tests/error_test.cpp index c9e0c40f..ac7cdba3 100644 --- a/tests/preprocessor_tests/error_test.cpp +++ b/tests/preprocessor_tests/error_test.cpp @@ -86,7 +86,7 @@ TEST_F(ErrorTest, MissingNewline) EXPECT_CALL(mDirectiveHandler, handleError(pp::SourceLocation(0, 1), " foo")); // Error reported about EOF. - EXPECT_CALL(mDiagnostics, print(pp::Diagnostics::EOF_IN_DIRECTIVE, _, _)); + EXPECT_CALL(mDiagnostics, print(pp::Diagnostics::PP_EOF_IN_DIRECTIVE, _, _)); preprocess(str, expected); } diff --git a/tests/preprocessor_tests/extension_test.cpp b/tests/preprocessor_tests/extension_test.cpp index 94b7eb70..0b8cf88b 100644 --- a/tests/preprocessor_tests/extension_test.cpp +++ b/tests/preprocessor_tests/extension_test.cpp @@ -61,7 +61,7 @@ TEST_F(ExtensionTest, MissingNewline) EXPECT_CALL(mDirectiveHandler, handleExtension(pp::SourceLocation(0, 1), "foo", "bar")); // Error reported about EOF. - EXPECT_CALL(mDiagnostics, print(pp::Diagnostics::EOF_IN_DIRECTIVE, _, _)); + EXPECT_CALL(mDiagnostics, print(pp::Diagnostics::PP_EOF_IN_DIRECTIVE, _, _)); preprocess(str, expected); } @@ -93,11 +93,11 @@ TEST_P(InvalidExtensionTest, Identified) } static const ExtensionTestParam kParams[] = { - {"#extension\n", pp::Diagnostics::INVALID_EXTENSION_DIRECTIVE}, - {"#extension 1\n", pp::Diagnostics::INVALID_EXTENSION_NAME}, - {"#extension foo bar\n", pp::Diagnostics::UNEXPECTED_TOKEN}, - {"#extension foo : \n", pp::Diagnostics::INVALID_EXTENSION_DIRECTIVE}, - {"#extension foo : 1\n", pp::Diagnostics::INVALID_EXTENSION_BEHAVIOR}, - {"#extension foo : bar baz\n", pp::Diagnostics::UNEXPECTED_TOKEN} + {"#extension\n", pp::Diagnostics::PP_INVALID_EXTENSION_DIRECTIVE}, + {"#extension 1\n", pp::Diagnostics::PP_INVALID_EXTENSION_NAME}, + {"#extension foo bar\n", pp::Diagnostics::PP_UNEXPECTED_TOKEN}, + {"#extension foo : \n", pp::Diagnostics::PP_INVALID_EXTENSION_DIRECTIVE}, + {"#extension foo : 1\n", pp::Diagnostics::PP_INVALID_EXTENSION_BEHAVIOR}, + {"#extension foo : bar baz\n", pp::Diagnostics::PP_UNEXPECTED_TOKEN} }; INSTANTIATE_TEST_CASE_P(All, InvalidExtensionTest, testing::ValuesIn(kParams)); diff --git a/tests/preprocessor_tests/if_test.cpp b/tests/preprocessor_tests/if_test.cpp index 7a7548ff..2849887e 100644 --- a/tests/preprocessor_tests/if_test.cpp +++ b/tests/preprocessor_tests/if_test.cpp @@ -612,7 +612,7 @@ TEST_F(IfTest, MissingExpression) ASSERT_TRUE(mPreprocessor.init(1, &str, 0)); EXPECT_CALL(mDiagnostics, - print(pp::Diagnostics::INVALID_EXPRESSION, + print(pp::Diagnostics::PP_INVALID_EXPRESSION, pp::SourceLocation(0, 1), "syntax error")); @@ -627,7 +627,7 @@ TEST_F(IfTest, DivisionByZero) ASSERT_TRUE(mPreprocessor.init(1, &str, 0)); EXPECT_CALL(mDiagnostics, - print(pp::Diagnostics::DIVISION_BY_ZERO, + print(pp::Diagnostics::PP_DIVISION_BY_ZERO, pp::SourceLocation(0, 1), "1 / 0")); pp::Token token; @@ -641,7 +641,7 @@ TEST_F(IfTest, ModuloByZero) ASSERT_TRUE(mPreprocessor.init(1, &str, 0)); EXPECT_CALL(mDiagnostics, - print(pp::Diagnostics::DIVISION_BY_ZERO, + print(pp::Diagnostics::PP_DIVISION_BY_ZERO, pp::SourceLocation(0, 1), "1 % 0")); pp::Token token; @@ -655,7 +655,7 @@ TEST_F(IfTest, DecIntegerOverflow) ASSERT_TRUE(mPreprocessor.init(1, &str, 0)); EXPECT_CALL(mDiagnostics, - print(pp::Diagnostics::INTEGER_OVERFLOW, + print(pp::Diagnostics::PP_INTEGER_OVERFLOW, pp::SourceLocation(0, 1), "4294967296")); pp::Token token; @@ -669,7 +669,7 @@ TEST_F(IfTest, OctIntegerOverflow) ASSERT_TRUE(mPreprocessor.init(1, &str, 0)); EXPECT_CALL(mDiagnostics, - print(pp::Diagnostics::INTEGER_OVERFLOW, + print(pp::Diagnostics::PP_INTEGER_OVERFLOW, pp::SourceLocation(0, 1), "077777777777")); pp::Token token; @@ -683,7 +683,7 @@ TEST_F(IfTest, HexIntegerOverflow) ASSERT_TRUE(mPreprocessor.init(1, &str, 0)); EXPECT_CALL(mDiagnostics, - print(pp::Diagnostics::INTEGER_OVERFLOW, + print(pp::Diagnostics::PP_INTEGER_OVERFLOW, pp::SourceLocation(0, 1), "0xfffffffff")); pp::Token token; @@ -697,11 +697,11 @@ TEST_F(IfTest, UndefinedMacro) ASSERT_TRUE(mPreprocessor.init(1, &str, 0)); EXPECT_CALL(mDiagnostics, - print(pp::Diagnostics::INVALID_EXPRESSION, + print(pp::Diagnostics::PP_INVALID_EXPRESSION, pp::SourceLocation(0, 1), "syntax error")); EXPECT_CALL(mDiagnostics, - print(pp::Diagnostics::CONDITIONAL_UNEXPECTED_TOKEN, + print(pp::Diagnostics::PP_CONDITIONAL_UNEXPECTED_TOKEN, pp::SourceLocation(0, 1), "UNDEFINED")); @@ -735,7 +735,7 @@ TEST_F(IfTest, ElseWithoutIf) ASSERT_TRUE(mPreprocessor.init(1, &str, 0)); EXPECT_CALL(mDiagnostics, - print(pp::Diagnostics::CONDITIONAL_ELSE_WITHOUT_IF, + print(pp::Diagnostics::PP_CONDITIONAL_ELSE_WITHOUT_IF, pp::SourceLocation(0, 1), "else")); @@ -749,7 +749,7 @@ TEST_F(IfTest, ElifWithoutIf) ASSERT_TRUE(mPreprocessor.init(1, &str, 0)); EXPECT_CALL(mDiagnostics, - print(pp::Diagnostics::CONDITIONAL_ELIF_WITHOUT_IF, + print(pp::Diagnostics::PP_CONDITIONAL_ELIF_WITHOUT_IF, pp::SourceLocation(0, 1), "elif")); @@ -763,7 +763,7 @@ TEST_F(IfTest, EndifWithoutIf) ASSERT_TRUE(mPreprocessor.init(1, &str, 0)); EXPECT_CALL(mDiagnostics, - print(pp::Diagnostics::CONDITIONAL_ENDIF_WITHOUT_IF, + print(pp::Diagnostics::PP_CONDITIONAL_ENDIF_WITHOUT_IF, pp::SourceLocation(0, 1), "endif")); @@ -780,7 +780,7 @@ TEST_F(IfTest, ElseAfterElse) ASSERT_TRUE(mPreprocessor.init(1, &str, 0)); EXPECT_CALL(mDiagnostics, - print(pp::Diagnostics::CONDITIONAL_ELSE_AFTER_ELSE, + print(pp::Diagnostics::PP_CONDITIONAL_ELSE_AFTER_ELSE, pp::SourceLocation(0, 3), "else")); @@ -797,7 +797,7 @@ TEST_F(IfTest, ElifAfterElse) ASSERT_TRUE(mPreprocessor.init(1, &str, 0)); EXPECT_CALL(mDiagnostics, - print(pp::Diagnostics::CONDITIONAL_ELIF_AFTER_ELSE, + print(pp::Diagnostics::PP_CONDITIONAL_ELIF_AFTER_ELSE, pp::SourceLocation(0, 3), "elif")); @@ -811,7 +811,7 @@ TEST_F(IfTest, UnterminatedIf) ASSERT_TRUE(mPreprocessor.init(1, &str, 0)); EXPECT_CALL(mDiagnostics, - print(pp::Diagnostics::CONDITIONAL_UNTERMINATED, + print(pp::Diagnostics::PP_CONDITIONAL_UNTERMINATED, pp::SourceLocation(0, 1), "if")); @@ -825,7 +825,7 @@ TEST_F(IfTest, UnterminatedIfdef) ASSERT_TRUE(mPreprocessor.init(1, &str, 0)); EXPECT_CALL(mDiagnostics, - print(pp::Diagnostics::CONDITIONAL_UNTERMINATED, + print(pp::Diagnostics::PP_CONDITIONAL_UNTERMINATED, pp::SourceLocation(0, 1), "ifdef")); diff --git a/tests/preprocessor_tests/input_test.cpp b/tests/preprocessor_tests/input_test.cpp index b6a132af..3c237297 100644 --- a/tests/preprocessor_tests/input_test.cpp +++ b/tests/preprocessor_tests/input_test.cpp @@ -34,15 +34,15 @@ TEST_F(InitTest, NullString) TEST(InputTest, DefaultConstructor) { pp::Input input; - EXPECT_EQ(0, input.count()); - EXPECT_EQ(0, input.read(NULL, 1)); + EXPECT_EQ(0u, input.count()); + EXPECT_EQ(0u, input.read(NULL, 1)); } TEST(InputTest, NullLength) { const char* str[] = {"foo"}; pp::Input input(1, str, NULL); - EXPECT_EQ(3, input.length(0)); + EXPECT_EQ(3u, input.length(0)); } TEST(InputTest, NegativeLength) @@ -50,7 +50,7 @@ TEST(InputTest, NegativeLength) const char* str[] = {"foo"}; int length[] = {-1}; pp::Input input(1, str, length); - EXPECT_EQ(3, input.length(0)); + EXPECT_EQ(3u, input.length(0)); } TEST(InputTest, ActualLength) @@ -60,7 +60,7 @@ TEST(InputTest, ActualLength) pp::Input input(1, str, length); // Note that strlen(str[0]) != length[0]. // Even then Input should just accept any non-negative number. - EXPECT_EQ(length[0], input.length(0)); + EXPECT_EQ(static_cast<size_t>(length[0]), input.length(0)); } TEST(InputTest, String) @@ -78,33 +78,33 @@ TEST(InputTest, ReadSingleString) int maxSize = 1; pp::Input input1(count, str, NULL); - EXPECT_EQ(1, input1.read(buf, maxSize)); + EXPECT_EQ(1u, input1.read(buf, maxSize)); EXPECT_EQ('f', buf[0]); - EXPECT_EQ(1, input1.read(buf, maxSize)); + EXPECT_EQ(1u, input1.read(buf, maxSize)); EXPECT_EQ('o', buf[0]); - EXPECT_EQ(1, input1.read(buf, maxSize)); + EXPECT_EQ(1u, input1.read(buf, maxSize)); EXPECT_EQ('o', buf[0]); - EXPECT_EQ(0, input1.read(buf, maxSize)); + EXPECT_EQ(0u, input1.read(buf, maxSize)); maxSize = 2; pp::Input input2(count, str, NULL); - EXPECT_EQ(2, input2.read(buf, maxSize)); + EXPECT_EQ(2u, input2.read(buf, maxSize)); EXPECT_STREQ("fo", buf); - EXPECT_EQ(1, input2.read(buf, maxSize)); + EXPECT_EQ(1u, input2.read(buf, maxSize)); EXPECT_EQ('o', buf[0]); - EXPECT_EQ(0, input2.read(buf, maxSize)); + EXPECT_EQ(0u, input2.read(buf, maxSize)); maxSize = 3; pp::Input input3(count, str, NULL); - EXPECT_EQ(3, input3.read(buf, maxSize)); + EXPECT_EQ(3u, input3.read(buf, maxSize)); EXPECT_STREQ("foo", buf); - EXPECT_EQ(0, input3.read(buf, maxSize)); + EXPECT_EQ(0u, input3.read(buf, maxSize)); maxSize = 4; pp::Input input4(count, str, NULL); - EXPECT_EQ(3, input4.read(buf, maxSize)); + EXPECT_EQ(3u, input4.read(buf, maxSize)); EXPECT_STREQ("foo", buf); - EXPECT_EQ(0, input4.read(buf, maxSize)); + EXPECT_EQ(0u, input4.read(buf, maxSize)); } TEST(InputTest, ReadMultipleStrings) @@ -115,33 +115,33 @@ TEST(InputTest, ReadMultipleStrings) int maxSize = 1; pp::Input input1(count, str, NULL); - EXPECT_EQ(1, input1.read(buf, maxSize)); + EXPECT_EQ(1u, input1.read(buf, maxSize)); EXPECT_EQ('f', buf[0]); - EXPECT_EQ(1, input1.read(buf, maxSize)); + EXPECT_EQ(1u, input1.read(buf, maxSize)); EXPECT_EQ('o', buf[0]); - EXPECT_EQ(1, input1.read(buf, maxSize)); + EXPECT_EQ(1u, input1.read(buf, maxSize)); EXPECT_EQ('o', buf[0]); - EXPECT_EQ(0, input1.read(buf, maxSize)); + EXPECT_EQ(0u, input1.read(buf, maxSize)); maxSize = 2; pp::Input input2(count, str, NULL); - EXPECT_EQ(2, input2.read(buf, maxSize)); + EXPECT_EQ(2u, input2.read(buf, maxSize)); EXPECT_STREQ("fo", buf); - EXPECT_EQ(1, input2.read(buf, maxSize)); + EXPECT_EQ(1u, input2.read(buf, maxSize)); EXPECT_EQ('o', buf[0]); - EXPECT_EQ(0, input2.read(buf, maxSize)); + EXPECT_EQ(0u, input2.read(buf, maxSize)); maxSize = 3; pp::Input input3(count, str, NULL); - EXPECT_EQ(3, input3.read(buf, maxSize)); + EXPECT_EQ(3u, input3.read(buf, maxSize)); EXPECT_STREQ("foo", buf); - EXPECT_EQ(0, input3.read(buf, maxSize)); + EXPECT_EQ(0u, input3.read(buf, maxSize)); maxSize = 4; pp::Input input4(count, str, NULL); - EXPECT_EQ(3, input4.read(buf, maxSize)); + EXPECT_EQ(3u, input4.read(buf, maxSize)); EXPECT_STREQ("foo", buf); - EXPECT_EQ(0, input4.read(buf, maxSize)); + EXPECT_EQ(0u, input4.read(buf, maxSize)); } TEST(InputTest, ReadStringsWithLength) @@ -152,7 +152,7 @@ TEST(InputTest, ReadStringsWithLength) // strlen(str[0]. We want to make sure that the last character is ignored. int length[] = {2, 3}; char buf[6] = {'\0', '\0', '\0', '\0', '\0', '\0'}; - int maxSize = 5; + size_t maxSize = 5; pp::Input input(count, str, length); EXPECT_EQ(maxSize, input.read(buf, maxSize)); diff --git a/tests/preprocessor_tests/location_test.cpp b/tests/preprocessor_tests/location_test.cpp index b615f99c..eb81555b 100644 --- a/tests/preprocessor_tests/location_test.cpp +++ b/tests/preprocessor_tests/location_test.cpp @@ -77,7 +77,7 @@ TEST_F(LocationTest, ErrorLocationAfterComment) const char* str = "/*\n\n*/@"; ASSERT_TRUE(mPreprocessor.init(1, &str, NULL)); - EXPECT_CALL(mDiagnostics, print(pp::Diagnostics::INVALID_CHARACTER, + EXPECT_CALL(mDiagnostics, print(pp::Diagnostics::PP_INVALID_CHARACTER, pp::SourceLocation(0, 3), "@")); @@ -261,7 +261,7 @@ TEST_F(LocationTest, LineDirectiveMissingNewline) using testing::_; // Error reported about EOF. - EXPECT_CALL(mDiagnostics, print(pp::Diagnostics::EOF_IN_DIRECTIVE, _, _)); + EXPECT_CALL(mDiagnostics, print(pp::Diagnostics::PP_EOF_IN_DIRECTIVE, _, _)); pp::Token token; mPreprocessor.lex(&token); @@ -292,12 +292,12 @@ TEST_P(InvalidLineTest, Identified) } static const LineTestParam kParams[] = { - {"#line\n", pp::Diagnostics::INVALID_LINE_DIRECTIVE}, - {"#line foo\n", pp::Diagnostics::INVALID_LINE_NUMBER}, - {"#line 10 foo\n", pp::Diagnostics::INVALID_FILE_NUMBER}, - {"#line 10 20 foo\n", pp::Diagnostics::UNEXPECTED_TOKEN}, - {"#line 0xffffffff\n", pp::Diagnostics::INTEGER_OVERFLOW}, - {"#line 10 0xffffffff\n", pp::Diagnostics::INTEGER_OVERFLOW} + {"#line\n", pp::Diagnostics::PP_INVALID_LINE_DIRECTIVE}, + {"#line foo\n", pp::Diagnostics::PP_INVALID_LINE_NUMBER}, + {"#line 10 foo\n", pp::Diagnostics::PP_INVALID_FILE_NUMBER}, + {"#line 10 20 foo\n", pp::Diagnostics::PP_UNEXPECTED_TOKEN}, + {"#line 0xffffffff\n", pp::Diagnostics::PP_INTEGER_OVERFLOW}, + {"#line 10 0xffffffff\n", pp::Diagnostics::PP_INTEGER_OVERFLOW} }; INSTANTIATE_TEST_CASE_P(All, InvalidLineTest, testing::ValuesIn(kParams)); diff --git a/tests/preprocessor_tests/number_test.cpp b/tests/preprocessor_tests/number_test.cpp index 13673212..9b2518b7 100644 --- a/tests/preprocessor_tests/number_test.cpp +++ b/tests/preprocessor_tests/number_test.cpp @@ -20,7 +20,7 @@ TEST_P(InvalidNumberTest, InvalidNumberIdentified) ASSERT_TRUE(mPreprocessor.init(1, &str, 0)); using testing::_; - EXPECT_CALL(mDiagnostics, print(pp::Diagnostics::INVALID_NUMBER, _, str)); + EXPECT_CALL(mDiagnostics, print(pp::Diagnostics::PP_INVALID_NUMBER, _, str)); pp::Token token; mPreprocessor.lex(&token); diff --git a/tests/preprocessor_tests/pragma_test.cpp b/tests/preprocessor_tests/pragma_test.cpp index a76fadae..de0fa98c 100644 --- a/tests/preprocessor_tests/pragma_test.cpp +++ b/tests/preprocessor_tests/pragma_test.cpp @@ -91,7 +91,7 @@ TEST_F(PragmaTest, MissingNewline) EXPECT_CALL(mDirectiveHandler, handlePragma(pp::SourceLocation(0, 1), "foo", "bar")); // Error reported about EOF. - EXPECT_CALL(mDiagnostics, print(pp::Diagnostics::EOF_IN_DIRECTIVE, _, _)); + EXPECT_CALL(mDiagnostics, print(pp::Diagnostics::PP_EOF_IN_DIRECTIVE, _, _)); preprocess(str, expected); } @@ -111,7 +111,7 @@ TEST_P(InvalidPragmaTest, Identified) EXPECT_CALL(mDirectiveHandler, handlePragma(_, _, _)).Times(0); // Unrecognized pragma warning. EXPECT_CALL(mDiagnostics, - print(pp::Diagnostics::UNRECOGNIZED_PRAGMA, + print(pp::Diagnostics::PP_UNRECOGNIZED_PRAGMA, pp::SourceLocation(0, 1), _)); preprocess(str, expected); diff --git a/tests/preprocessor_tests/preprocessor_tests.gypi b/tests/preprocessor_tests/preprocessor_tests.gypi new file mode 100644 index 00000000..daf560dc --- /dev/null +++ b/tests/preprocessor_tests/preprocessor_tests.gypi @@ -0,0 +1,35 @@ +# Copyright (c) 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. + +{ + 'sources': [ + '<(ANGLE_DIR)/tests/preprocessor_tests/char_test.cpp', + '<(ANGLE_DIR)/tests/preprocessor_tests/comment_test.cpp', + '<(ANGLE_DIR)/tests/preprocessor_tests/define_test.cpp', + '<(ANGLE_DIR)/tests/preprocessor_tests/error_test.cpp', + '<(ANGLE_DIR)/tests/preprocessor_tests/extension_test.cpp', + '<(ANGLE_DIR)/tests/preprocessor_tests/identifier_test.cpp', + '<(ANGLE_DIR)/tests/preprocessor_tests/if_test.cpp', + '<(ANGLE_DIR)/tests/preprocessor_tests/input_test.cpp', + '<(ANGLE_DIR)/tests/preprocessor_tests/location_test.cpp', + '<(ANGLE_DIR)/tests/preprocessor_tests/MockDiagnostics.h', + '<(ANGLE_DIR)/tests/preprocessor_tests/MockDirectiveHandler.h', + '<(ANGLE_DIR)/tests/preprocessor_tests/number_test.cpp', + '<(ANGLE_DIR)/tests/preprocessor_tests/operator_test.cpp', + '<(ANGLE_DIR)/tests/preprocessor_tests/pragma_test.cpp', + '<(ANGLE_DIR)/tests/preprocessor_tests/PreprocessorTest.cpp', + '<(ANGLE_DIR)/tests/preprocessor_tests/PreprocessorTest.h', + '<(ANGLE_DIR)/tests/preprocessor_tests/space_test.cpp', + '<(ANGLE_DIR)/tests/preprocessor_tests/token_test.cpp', + '<(ANGLE_DIR)/tests/preprocessor_tests/version_test.cpp', + ], +} + + +# Local Variables: +# tab-width:2 +# indent-tabs-mode:nil +# End: +# vim: set expandtab tabstop=2 shiftwidth=2: + diff --git a/tests/preprocessor_tests/token_test.cpp b/tests/preprocessor_tests/token_test.cpp index 323d4683..22898e77 100644 --- a/tests/preprocessor_tests/token_test.cpp +++ b/tests/preprocessor_tests/token_test.cpp @@ -12,7 +12,7 @@ TEST(TokenTest, DefaultConstructor) { pp::Token token; EXPECT_EQ(0, token.type); - EXPECT_EQ(0, token.flags); + EXPECT_EQ(0u, token.flags); EXPECT_EQ(0, token.location.line); EXPECT_EQ(0, token.location.file); EXPECT_EQ("", token.text); @@ -29,7 +29,7 @@ TEST(TokenTest, Assignment) token = pp::Token(); EXPECT_EQ(0, token.type); - EXPECT_EQ(0, token.flags); + EXPECT_EQ(0u, token.flags); EXPECT_EQ(0, token.location.line); EXPECT_EQ(0, token.location.file); EXPECT_EQ("", token.text); diff --git a/tests/preprocessor_tests/version_test.cpp b/tests/preprocessor_tests/version_test.cpp index 0db2fad1..1c490e50 100644 --- a/tests/preprocessor_tests/version_test.cpp +++ b/tests/preprocessor_tests/version_test.cpp @@ -57,7 +57,7 @@ TEST_F(VersionTest, MissingNewline) EXPECT_CALL(mDirectiveHandler, handleVersion(pp::SourceLocation(0, 1), 200)); // Error reported about EOF. - EXPECT_CALL(mDiagnostics, print(pp::Diagnostics::EOF_IN_DIRECTIVE, _, _)); + EXPECT_CALL(mDiagnostics, print(pp::Diagnostics::PP_EOF_IN_DIRECTIVE, _, _)); preprocess(str, expected); } @@ -104,7 +104,7 @@ TEST_F(VersionTest, AfterValidToken) using testing::_; EXPECT_CALL(mDiagnostics, - print(pp::Diagnostics::VERSION_NOT_FIRST_STATEMENT, + print(pp::Diagnostics::PP_VERSION_NOT_FIRST_STATEMENT, pp::SourceLocation(0, 2), _)); pp::Token token; @@ -122,10 +122,10 @@ TEST_F(VersionTest, AfterInvalidToken) using testing::_; EXPECT_CALL(mDiagnostics, - print(pp::Diagnostics::INVALID_CHARACTER, + print(pp::Diagnostics::PP_INVALID_CHARACTER, pp::SourceLocation(0, 1), "$")); EXPECT_CALL(mDiagnostics, - print(pp::Diagnostics::VERSION_NOT_FIRST_STATEMENT, + print(pp::Diagnostics::PP_VERSION_NOT_FIRST_STATEMENT, pp::SourceLocation(0, 2), _)); pp::Token token; @@ -143,7 +143,7 @@ TEST_F(VersionTest, AfterValidDirective) using testing::_; EXPECT_CALL(mDiagnostics, - print(pp::Diagnostics::VERSION_NOT_FIRST_STATEMENT, + print(pp::Diagnostics::PP_VERSION_NOT_FIRST_STATEMENT, pp::SourceLocation(0, 2), _)); pp::Token token; @@ -161,10 +161,10 @@ TEST_F(VersionTest, AfterInvalidDirective) using testing::_; EXPECT_CALL(mDiagnostics, - print(pp::Diagnostics::DIRECTIVE_INVALID_NAME, + print(pp::Diagnostics::PP_DIRECTIVE_INVALID_NAME, pp::SourceLocation(0, 1), "foo")); EXPECT_CALL(mDiagnostics, - print(pp::Diagnostics::VERSION_NOT_FIRST_STATEMENT, + print(pp::Diagnostics::PP_VERSION_NOT_FIRST_STATEMENT, pp::SourceLocation(0, 2), _)); pp::Token token; @@ -184,7 +184,7 @@ TEST_F(VersionTest, AfterExcludedBlock) using testing::_; EXPECT_CALL(mDiagnostics, - print(pp::Diagnostics::VERSION_NOT_FIRST_STATEMENT, + print(pp::Diagnostics::PP_VERSION_NOT_FIRST_STATEMENT, pp::SourceLocation(0, 4), _)); pp::Token token; @@ -220,10 +220,10 @@ TEST_P(InvalidVersionTest, Identified) } static const VersionTestParam kParams[] = { - {"#version\n", pp::Diagnostics::INVALID_VERSION_DIRECTIVE}, - {"#version foo\n", pp::Diagnostics::INVALID_VERSION_NUMBER}, - {"#version 100 foo\n", pp::Diagnostics::UNEXPECTED_TOKEN}, - {"#version 0xffffffff\n", pp::Diagnostics::INTEGER_OVERFLOW} + {"#version\n", pp::Diagnostics::PP_INVALID_VERSION_DIRECTIVE}, + {"#version foo\n", pp::Diagnostics::PP_INVALID_VERSION_NUMBER}, + {"#version 100 foo\n", pp::Diagnostics::PP_UNEXPECTED_TOKEN}, + {"#version 0xffffffff\n", pp::Diagnostics::PP_INTEGER_OVERFLOW} }; INSTANTIATE_TEST_CASE_P(All, InvalidVersionTest, testing::ValuesIn(kParams)); |