Zhenyao Mo
5e70cf9d0b
Add an option to unfold short circuiting in AST.
...
We replace "a || b" with "a ? true : b",
"a && b" with "a ? b : false".
This is to work around short circuiting bug in Mac drivers.
ANGLEBUG=482
TEST=webgl conformance tests
[email protected] , [email protected]
Review URL: https://codereview.appspot.com/14529048
2013-10-15 12:59:30 -07:00
Shannon Woods
d34a0d1b17
Update to most recent khrplatform.h
...
BUG=480
Signed-off-by: [email protected]
2013-10-02 18:25:42 -04:00
Jamie Madill
a0bd8ef0ac
Use ANGLE_TRANSLATOR_STATIC to enforce a static build of the translator in chromium.
...
This prevents strange warnings from defining COMPONENT_BUILD=0.
Also rename COMPILER_IMPLEMENTATION to ANGLE_TRANSLATOR_IMPLEMENTATION
for better consistency in chromium.
ANGLEBUG=477
[email protected]
BUG=
Review URL: https://codereview.appspot.com/14294046
2013-10-02 17:40:57 -04:00
Jamie Madill
8935267f0b
Fix some syntax errors in the gyp build configuration, and make some modifications so the tests should work with chromium in component build.
...
We use a separate static translator for linking directly with unit tests, so they have more direct access to the translator classes.
ANGLEBUG=477
BUG=
[email protected] , [email protected]
Review URL: https://codereview.appspot.com/13971043
2013-09-27 16:50:13 -04:00
Zhenyao Mo
fc75e21762
Add an option in ANGLE shader translator to initialize gl_Position to vec4(0.0, 0.0, 0.0, 1.0).
...
This is to work around driver bugs where shader compile or program link would fail incorrectly if gl_Position is not set in vertex shader.
At the moment at least Linux NVIDIA driver has this bug.
ANGLEBUG=472
[email protected] , [email protected]
Review URL: https://codereview.appspot.com/13509043
2013-09-09 10:59:31 -07:00
Zhenyao Mo
0bd6d11778
Expose the packing function so we can check varyings packing per program
...
ANGLEBUG=471
[email protected]
Review URL: https://codereview.appspot.com/13322043
2013-08-29 15:23:27 -07:00
Zhenyao Mo
41159326ab
Add static_use to shader variable info query.
...
BUG=249018
ANGLEBUG=465
[email protected]
Review URL: https://codereview.appspot.com/13158043
2013-08-22 16:18:03 -07:00
Zhenyao Mo
827fb6ad61
Build fix: not all types support precisions.
...
Currently Angle translator made the wrong assumption that all variables have a precision, and ASSERT that.
BUG=276031
[email protected]
Review URL: https://codereview.appspot.com/13113044
2013-08-19 18:05:59 -07:00
Zhenyao Mo
76985f3ca0
Expose varying variables and also precision for all variables.
...
ANGLEBUG=457
[email protected] , [email protected]
Review URL: https://codereview.appspot.com/12487043
2013-08-14 14:36:08 -07:00
[email protected]
38fee6f195
Merged EXT_frag_depth changes into dx11proto branch
...
BUG=429
Review URL: https://codereview.appspot.com/9738048
git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@2419 736b8ea6-26fd-11df-bfd4-992fa37f6226
2013-05-31 16:44:51 +00:00
[email protected]
da8ea02234
Add expression complexity and call stack depth limits.
...
git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@2254 736b8ea6-26fd-11df-bfd4-992fa37f6226
2013-05-29 22:53:27 +00:00
[email protected]
86cfba18f4
Control the creation of DX9 or DX11 renderers through eglGetDisplay.
...
TRAC #23029
Signed-off-by: Jamie Madill
Signed-off-by: Shannon Woods
Author: Nicolas Capens
git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@2223 736b8ea6-26fd-11df-bfd4-992fa37f6226
2013-05-17 23:33:27 +00:00
shannon.woods%[email protected]
194161c27a
Add necessary defines and function prototypes for EXT_draw_buffers and multiple color attachment points to gl2ext.h.
...
TRAC #22656
Signed-off-by: Nicolas Capens
Signed-off-by: Shannon Woods
Author: Jamie Madill
git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@2003 736b8ea6-26fd-11df-bfd4-992fa37f6226
2013-03-23 18:39:22 +00:00
[email protected]
185e739750
Bump ANGLE_SH_VERSION to 110.
...
The bump to 109 in r1984 collided with a similar version change in dx11proto branch (r1738).
Review URL: https://codereview.appspot.com/7446050
git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1992 736b8ea6-26fd-11df-bfd4-992fa37f6226
2013-03-05 19:49:38 +00:00
[email protected]
36aef7c130
Added preprocessor support for GL_FRAGMENT_PRECISION_HIGH.
...
I will send the tests in a separate patch because I need to refactor the way compiler_tests are setup.
Review URL: https://codereview.appspot.com/7402051
git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1990 736b8ea6-26fd-11df-bfd4-992fa37f6226
2013-03-05 19:49:22 +00:00
[email protected]
550cd09889
Add support for extension EXT_draw_buffers.
...
Review URL: https://codereview.appspot.com/7308107
git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1963 736b8ea6-26fd-11df-bfd4-992fa37f6226
2013-02-28 23:19:54 +00:00
[email protected]
d64b3dab06
Fixed 64-bit integer truncation issues in shader translator.
...
This is an incompatible API change, but one which is necessary in
order to improve correctness of the code. The API version in
ShaderLang.h is updated and, unfortunately, the define renamed to
something less ambiguous due to conflicts on some Android buildbots.
Temporary patches in Chromium and WebKit will be landed separately to
support this upgrade.
BUG=403,404,405,406,407,408,409
Review URL: https://codereview.appspot.com/7300058
Conflicts:
include/GLSLANG/ShaderLang.h
git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1960 736b8ea6-26fd-11df-bfd4-992fa37f6226
2013-02-28 23:19:26 +00:00
[email protected]
1d432bb570
Incorporated patch from haixia@ changing the default implementation of
...
array index clamping to use the clamp intrinsic. This works more
reliably on pure OpenGL ES devices and on Windows.
Added a mechanism in ShBuiltInResources to choose the strategy for
array index clamping.
BUG=none
TEST=various out-of-bounds array indexing tests and various WebGL content
Review URL: https://codereview.appspot.com/7194051
git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1798 736b8ea6-26fd-11df-bfd4-992fa37f6226
2013-01-25 21:57:28 +00:00
[email protected]
8204334b61
Fix and extend essl_to_hlsl to support DX11 HLSL.
...
TRAC #22330
Signed-off-by: Daniel Koch
Author: Nicolas Capens
git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1740 736b8ea6-26fd-11df-bfd4-992fa37f6226
2013-01-25 21:49:34 +00:00
[email protected]
b73964e328
Pass the desired HLSL version down to the HLSL generator.
...
TRAC #22330
Signed-off-by: Geoff Lang
Signed-off-by: Daniel Koch
Author: Nicolas Capens
git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1738 736b8ea6-26fd-11df-bfd4-992fa37f6226
2013-01-25 21:49:14 +00:00
[email protected]
4167cc9102
Incorporated BSD-licensed changes implementing array bounds clamping.
...
BUG=none
TEST=ran associated WebKit layout tests in Chromium
Review URL: https://codereview.appspot.com/6999052
git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1701 736b8ea6-26fd-11df-bfd4-992fa37f6226
2013-01-11 04:11:53 +00:00
[email protected]
043da138a7
Provide an API for accessing the uniform array.
...
TRAC #22239
Signed-off-by: Daniel Koch
Signed-off-by: Shannon Woods
Author: Nicolas Capens
git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1625 736b8ea6-26fd-11df-bfd4-992fa37f6226
2012-12-20 21:12:22 +00:00
[email protected]
0aa3b5a2b2
Implement user-defined name hashing.
...
ANGLEBUG=315
Review URL: https://codereview.appspot.com/6818109
git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1469 736b8ea6-26fd-11df-bfd4-992fa37f6226
2012-11-28 19:43:24 +00:00
[email protected]
c23f4611be
Interface design for user-defined name hashing.
...
1) We use BuiltInResources to pass the hash function to
ANGLE, deciding whether we applies hash function or not.
2) We use 64 bits hashing function, because 64 bits is 16
bytes using hex representation, plus the "webgl_" prefix,
we can keep the names under 128 (WebGL allows 5 levels of
nesting in structures). If chooseing 128 bits, we will
go beyond 128 characters, and some drivers can't handle
that safely.
ANGLEBUG=315
Review URL: https://codereview.appspot.com/6822077
git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1466 736b8ea6-26fd-11df-bfd4-992fa37f6226
2012-11-28 19:42:57 +00:00
[email protected]
8d80479954
Add Variable Packing checks to ANGLE
...
BUG=373
TEST=unit tests
git-svn-id: https://angleproject.googlecode.com/svn/trunk@1317 736b8ea6-26fd-11df-bfd4-992fa37f6226
2012-10-17 21:33:48 +00:00
[email protected]
3ce8dbcd7e
Add placeholder entry points for GL_OES_get_program_binary.
...
Review URL: https://codereview.appspot.com/6279054
git-svn-id: https://angleproject.googlecode.com/svn/trunk@1146 736b8ea6-26fd-11df-bfd4-992fa37f6226
2012-06-08 17:52:30 +00:00
[email protected]
430f5e0c75
Add the SH_CSS_SHADERS_SPEC flag.
...
Review URL: https://codereview.appspot.com/6270050/
git-svn-id: https://angleproject.googlecode.com/svn/trunk@1145 736b8ea6-26fd-11df-bfd4-992fa37f6226
2012-06-08 17:47:59 +00:00
[email protected]
66ebd0143e
Add the SH_TIMING_RESTRICTIONS compile flag and dependency graph implementation.
...
Description of the algorithm:
http://code.google.com/p/mvujovic/wiki/ShaderControlFlowAnalysis
This flag is one potential solution to timing attacks on textures containing cross-domain content
or user agent data.
This kind of analysis could be useful for both WebGL and CSS Shaders.
The SH_TIMING_RESTRICTIONS flag will reject a shader if it uses texture dependent data to affect
control flow.
Other ways of affecting shader timing such as using NaNs in basic arithmetic operations or using
built-in functions (e.g. atan) with different inputs are still under investigation.
Issue=329
Review URL: http://codereview.appspot.com/6195062/
git-svn-id: https://angleproject.googlecode.com/svn/trunk@1101 736b8ea6-26fd-11df-bfd4-992fa37f6226
2012-05-30 22:18:11 +00:00
[email protected]
d2820bfb69
Add entry points and constants for GL_ANGLE_instanced_arrays.
...
TRAC #19489
Signed-off-by: Daniel Koch
Author: Nicolas Capens
git-svn-id: https://angleproject.googlecode.com/svn/trunk@968 736b8ea6-26fd-11df-bfd4-992fa37f6226
2012-01-27 15:38:48 +00:00
[email protected]
6575602ea6
Finished off the GLSL compiler's support for parsing shaders using OES_EGL_image_external.
...
The GLSL to HLSL translator work is not done yet so the extension is disabled in Shader.cpp.
Review URL: https://codereview.appspot.com/5530081
git-svn-id: https://angleproject.googlecode.com/svn/trunk@946 736b8ea6-26fd-11df-bfd4-992fa37f6226
2012-01-17 21:45:38 +00:00
[email protected]
8983cbc5a9
Refresh EGL/eglext.h from Khronos
...
git-svn-id: https://angleproject.googlecode.com/svn/trunk@944 736b8ea6-26fd-11df-bfd4-992fa37f6226
2012-01-17 14:10:19 +00:00
[email protected]
35be8c1fb2
Refresh GLES2/gl2ext.h from Khronos
...
git-svn-id: https://angleproject.googlecode.com/svn/trunk@943 736b8ea6-26fd-11df-bfd4-992fa37f6226
2012-01-17 14:10:08 +00:00
[email protected]
56d46abe08
Add GL_ANGLE_pack_reverse_row_order. Performs vertical flip in readPixels and
...
may write direct to client ptr.
Bug=none
Test= Tested in a modified version of Chromium using canvas2D.
Review URL: http://codereview.appspot.com/5373104
git-svn-id: https://angleproject.googlecode.com/svn/trunk@889 736b8ea6-26fd-11df-bfd4-992fa37f6226
2011-11-23 14:53:10 +00:00
[email protected]
205fef3389
Added support for GL_ARB_texture_rectangle to shader validator.
...
Parser was regenerated with the flex/bison shipped with Ubuntu 10.04.
BUG=251
TEST=tested with new Core Animation plugin rendering path on Mac OS X
Review URL: http://codereview.appspot.com/5432044
git-svn-id: https://angleproject.googlecode.com/svn/trunk@888 736b8ea6-26fd-11df-bfd4-992fa37f6226
2011-11-22 20:50:02 +00:00
[email protected]
afaa049050
Upstream android's change for angle
...
BUG=
TEST=
Review URL: http://codereview.appspot.com/5410050
git-svn-id: https://angleproject.googlecode.com/svn/trunk@887 736b8ea6-26fd-11df-bfd4-992fa37f6226
2011-11-21 21:14:23 +00:00
[email protected]
43911ec8e6
Add new function prototypes to gl2ext.h
...
Trac #18608
Signed-off-by: Nicolas Capens
git-svn-id: https://angleproject.googlecode.com/svn/trunk@877 736b8ea6-26fd-11df-bfd4-992fa37f6226
2011-11-12 04:30:04 +00:00
[email protected]
7d18c17f88
Added the texture usage parameter.
...
TRAC #18732
Signed-off-by: Daniel Koch
Author: Nicolas Capens
git-svn-id: https://angleproject.googlecode.com/svn/trunk@860 736b8ea6-26fd-11df-bfd4-992fa37f6226
2011-11-11 04:18:21 +00:00
[email protected]
ff941aa986
Added support for floating-point and BGRA storage textures.
...
TRAC #18730
Signed-off-by: Daniel Koch
Author: Nicolas Capens
git-svn-id: https://angleproject.googlecode.com/svn/trunk@859 736b8ea6-26fd-11df-bfd4-992fa37f6226
2011-11-11 04:17:09 +00:00
[email protected]
64a0fb2a82
Implemented glTexStorage2DEXT.
...
TRAC #18730
Signed-off-by: Daniel Koch
Author: Nicolas Capens
git-svn-id: https://angleproject.googlecode.com/svn/trunk@857 736b8ea6-26fd-11df-bfd4-992fa37f6226
2011-11-11 04:10:40 +00:00
[email protected]
d30bd0a7fb
Added the immutable parameter.
...
TRAC #18730
Signed-off-by: Daniel Koch
Author: Nicolas Capens
git-svn-id: https://angleproject.googlecode.com/svn/trunk@856 736b8ea6-26fd-11df-bfd4-992fa37f6226
2011-11-11 04:10:34 +00:00
[email protected]
4ff960d916
Implemented context creation with reset notification.
...
TRAC #18607
Signed-off-by: Daniel Koch
Authors: Shannon Woods, Nicolas Capens
git-svn-id: https://angleproject.googlecode.com/svn/trunk@848 736b8ea6-26fd-11df-bfd4-992fa37f6226
2011-11-09 17:47:09 +00:00
[email protected]
17f548cb6b
Implemented reset status.
...
TRAC #18607
Signed-off-by: Daniel Koch
Authors: Shannon Woods, Nicolas Capens
git-svn-id: https://angleproject.googlecode.com/svn/trunk@847 736b8ea6-26fd-11df-bfd4-992fa37f6226
2011-11-09 17:47:02 +00:00
[email protected]
22eab922e7
Allowed translator_hlsl and glsl to be built as shared libs on windows.
...
The problem was gyp was out-of-date (I rolled it to 1080) and ShaderLang.cpp exports were not being exported because it was in translator_common which is a static lib.
I tested shared library and static library builds in debug and release and also the checked in ANGLE.sln build.
See original attempt: http://codereview.appspot.com/5305052/ .
Review URL: http://codereview.appspot.com/5305053
git-svn-id: https://angleproject.googlecode.com/svn/trunk@801 736b8ea6-26fd-11df-bfd4-992fa37f6226
2011-10-21 01:16:42 +00:00
[email protected]
50297fc19a
Assign proper enum to GL_TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE
...
Trac #18416
Signed-off-by: Nicolas Capens
git-svn-id: https://angleproject.googlecode.com/svn/trunk@785 736b8ea6-26fd-11df-bfd4-992fa37f6226
2011-10-05 18:43:27 +00:00
[email protected]
a574f78fcf
Add an extension for querying translated HLSL shader source.
...
Review URL: http://codereview.appspot.com/5149046
git-svn-id: https://angleproject.googlecode.com/svn/trunk@780 736b8ea6-26fd-11df-bfd4-992fa37f6226
2011-10-03 21:45:23 +00:00
[email protected]
32e97315e2
Emulate certain buil-in functions to work around driver bugs.
...
This is implemented by adding a new compile option SH_EMULATE_BUILT_IN_FUNCTIONS. The emulated functions are names as webgl_originalName_emu so there will never be naming conflicts.
At the moment only three functions are emulated: normalize, abs, sign. Also, the compile option will emulate all three. However, the mechanism to emulate only a selected subset is also imeplemented. It can be turned on easily.
ANGLEBUG=196
TEST=with this option, the failed test with abs.frag passes.
Review URL: http://codereview.appspot.com/4916043
git-svn-id: https://angleproject.googlecode.com/svn/trunk@738 736b8ea6-26fd-11df-bfd4-992fa37f6226
2011-08-24 01:03:11 +00:00
[email protected]
0c6bb7a653
Add an compile option to unroll for-loops with integer indices.
...
ANGLEBUG=193
TEST=with this option, for-loops with integer indices will be unrolled.
Review URL: http://codereview.appspot.com/4899047
git-svn-id: https://angleproject.googlecode.com/svn/trunk@734 736b8ea6-26fd-11df-bfd4-992fa37f6226
2011-08-17 19:39:58 +00:00
[email protected]
09c323a40a
Add an option to support for GL_OES_EGL_image_external.
...
Comes with this extension is the new sampler type samplerExternalOES.
ANGLEBUG=175
TEST=compile the attached shader file
Review URL: http://codereview.appspot.com/4809076
git-svn-id: https://angleproject.googlecode.com/svn/trunk@728 736b8ea6-26fd-11df-bfd4-992fa37f6226
2011-08-12 18:22:25 +00:00
[email protected]
50c526d210
Add support for DXT3 and DXT5
...
TEST=none
BUG=none
Review URL: http://codereview.appspot.com/4809068
git-svn-id: https://angleproject.googlecode.com/svn/trunk@721 736b8ea6-26fd-11df-bfd4-992fa37f6226
2011-08-10 05:19:44 +00:00
[email protected]
bb1d1713ac
Add Wayland typedefs to eglplatform.h
...
Issue=188
Author: Daniel Nicoara
git-svn-id: https://angleproject.googlecode.com/svn/trunk@709 736b8ea6-26fd-11df-bfd4-992fa37f6226
2011-07-29 16:32:31 +00:00