Nicolas Capens
4648508683
Implement EXT_shader_texture_lod
...
BUG=angle:551
Change-Id: I81d7574a15861f1b24ddf6147cf71adbf20e10f3
Reviewed-on: https://chromium-review.googlesource.com/194960
Tested-by: Nicolas Capens <[email protected] >
Reviewed-by: Shannon Woods <[email protected] >
2014-04-16 19:30:22 +00:00
John Bauman
3dc300a592
Allow creating fixed-size window surfaces.
...
BUG=320021
Change-Id: I97cdd65ac17ee142700dbf0f363891500e967571
Reviewed-on: https://chromium-review.googlesource.com/184205
Reviewed-by: John Bauman <[email protected] >
Tested-by: John Bauman <[email protected] >
Reviewed-on: https://chromium-review.googlesource.com/190563
Reviewed-by: Jamie Madill <[email protected] >
Reviewed-by: Nicolas Capens <[email protected] >
Tested-by: Shannon Woods <[email protected] >
2014-03-26 04:57:42 +00:00
Zhenyao Mo
3cdfcce86b
Remove SH_MAP_LONG_VARIABLE_NAMES
...
We use hashing to map all variables/strcuture field names, etc,
so we no longer need this option.
Checked with Firefox and WebKit, they no longer use this option
either. Time to remove it.
Change-Id: Ie3e79b91a05258b04af419a9c42b2fd1b00e67c4
Reviewed-on: https://chromium-review.googlesource.com/189236
Reviewed-by: Kenneth Russell <[email protected] >
Reviewed-by: Shannon Woods <[email protected] >
Tested-by: Zhenyao Mo <[email protected] >
Reviewed-on: https://chromium-review.googlesource.com/189568
2014-03-11 18:25:18 +00:00
Zhenyao Mo
550c600b99
Improvement on loop unrolling with loops indexing sampler arrays
...
1) Before this workaround is hardwired on mac, now we move it behind a compil
2) Fix the issue where "break" inside the loop isn't handled while unrolled.
BUG=338474
TEST=webgl conformance test sampler-array-using-loop-index.html
Change-Id: I4996a42c2dea39a8a5af772c256f8e3cb383f59a
Reviewed-on: https://chromium-review.googlesource.com/188079
Reviewed-by: Zhenyao Mo <[email protected] >
Tested-by: Zhenyao Mo <[email protected] >
Conflicts:
include/GLSLANG/ShaderLang.h
src/compiler/translator/ValidateLimitations.cpp
Change-Id: I546197bd7df1634ebccdd380be14c3250cd56151
Reviewed-on: https://chromium-review.googlesource.com/189061
Reviewed-by: Shannon Woods <[email protected] >
Tested-by: Zhenyao Mo <[email protected] >
2014-03-07 18:59:18 +00:00
Zhenyao Mo
4a667fe96e
Add an option to initialize varyings without static use in vertex shaders
...
ANGLEBUG=554
TEST=webgl conformance test on mac: shaders-with-varyings.html
[email protected] ,[email protected]
[email protected] ,[email protected]
Change-Id: I2e692d43fb15f1cf3ade3e398020d1fedb2b32f0
Reviewed-on: https://chromium-review.googlesource.com/185922
Reviewed-by: Zhenyao Mo <[email protected] >
Tested-by: Zhenyao Mo <[email protected] >
Conflicts:
src/common/version.h
src/compiler/translator/Compiler.cpp
Change-Id: If7db13ef345bd6199d4ea0d7786f0de20885f2f3
Reviewed-on: https://chromium-review.googlesource.com/186144
Reviewed-by: Nicolas Capens <[email protected] >
Reviewed-by: Kenneth Russell <[email protected] >
Reviewed-by: Zhenyao Mo <[email protected] >
Tested-by: Zhenyao Mo <[email protected] >
2014-02-12 23:21:53 +00:00
Zhenyao Mo
7cab38b594
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
Conflicts:
src/build_angle.gypi
src/compiler/translator/Compiler.cpp
Change-Id: Ic2384a97d58f54294efcb3a012deb2007a9fc658
Reviewed-on: https://chromium-review.googlesource.com/178996
Reviewed-by: Jamie Madill <[email protected] >
Commit-Queue: Jamie Madill <[email protected] >
Tested-by: Shannon Woods <[email protected] >
2013-12-09 21:51:57 +00:00
Geoff Lang
31f0dc0a09
Merge a0bd8ef0ac from master.
...
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=
2013-10-17 09:52:41 -04:00
Shannon Woods
93780289a7
Update to most recent khrplatform.h
...
Signed-off-by: Geoff Lang
Signed-off-by: Jamie Madill
2013-10-04 11:12:49 -04:00
Zhenyao Mo
ac44cd2b07
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-24 15:13:06 -04:00
Zhenyao Mo
a15f3e84bf
Expose the packing function so we can check varyings packing per program
...
ANGLEBUG=471
[email protected]
Review URL: https://codereview.appspot.com/13322043
2013-09-24 15:13:06 -04:00
Zhenyao Mo
d2d340b0da
Add static_use to shader variable info query.
...
BUG=249018
ANGLEBUG=465
[email protected]
Review URL: https://codereview.appspot.com/13158043
2013-09-24 15:13:05 -04:00
Zhenyao Mo
fa3c346fe9
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-09-24 15:13:05 -04:00
Zhenyao Mo
74da9f2f24
Expose varying variables and also precision for all variables.
...
ANGLEBUG=457
[email protected] , [email protected]
Review URL: https://codereview.appspot.com/12487043
2013-09-24 15:13:04 -04:00
Jamie Madill
47fdd13e7c
Pass varyings to the GLES API from the translator using a direct pointer.
...
Instead of parsing them indirectly from HLSL, the pointer will allow us to more flexibly
support new types, especially compound types such as structures.
TRAC #23754
Signed-off-by: Nicolas Capens
Signed-off-by: Shannon Woods
2013-09-09 15:27:50 -04:00
Nicolas Capens
2a1d8a381d
Add shadow samplers to the compiler front-end.
...
TRAC #23394
Signed-off-by: Jamie Madill
Signed-off-by: Shannon Woods
Author: Nicolas Capens
2013-07-19 18:08:12 -04:00
Jamie Madill
2aeb26a4f6
Added support for EXT_frag_depth
...
This change also required that support be added for associating built-in
variables with an extension, similar to how functions could be associated with
extensions previously.
[email protected]
Review URL: https://codereview.appspot.com/9827044
git-svn-id: https://angleproject.googlecode.com/svn/trunk@2248 736b8ea6-26fd-11df-bfd4-992fa37f6226
TRAC #23333
Authored-by: [email protected]
Signed-off-by: Shannon Woods
Signed-off-by Nicolas Capens
Merged-by: Jamie Madill
2013-07-19 18:08:08 -04:00
Jamie Madill
eb1a010f0f
Add expression complexity and call stack depth limits.
...
git-svn-id: https://angleproject.googlecode.com/svn/trunk@2242 736b8ea6-26fd-11df-bfd4-992fa37f6226
TRAC #23333
Authored-by: [email protected]
Signed-off-by: Shannon Woods
Signed-off-by Nicolas Capens
Merged-by: Jamie Madill
Conflicts:
src/common/version.h
2013-07-19 18:06:52 -04:00
Nicolas Capens
8772b58871
Support sampler2DArray throughout the compiler.
...
TRAC #23377
Signed-off-by: Jamie Madill
Signed-off-by: Shannon Woods
Author: Nicolas Capens
2013-07-19 18:05:15 -04:00
Nicolas Capens
da07535fa9
Support sampler3D throughout the compiler.
...
TRAC #23365
Signed-off-by: Jamie Madill
Signed-off-by: Shannon Woods
Author: Nicolas Capens
2013-07-19 18:05:13 -04:00
Nicolas Capens
2ffe0bbe34
Support usampler throughout the compiler.
...
TRAC #23360
Signed-off-by: Jamie Madill
Signed-off-by: Shannon Woods
Author: Nicolas Capens
2013-07-19 18:05:12 -04:00
Nicolas Capens
344e7142ed
Support isampler throughout the compiler.
...
TRAC #23359
Signed-off-by: Jamie Madill
Signed-off-by: Shannon Woods
Author: Nicolas Capens
2013-07-19 18:05:10 -04:00
Jamie Madill
defb674aad
Add a new path for querying active attributes from the shader translator, for use with layout qualifier support.
...
TRAC #23269
Signed-off-by: Geoff Lang
Signed-off-by: Nicolas Capens
Author: Jamie Madill
2013-07-19 18:05:04 -04:00
Jamie Madill
46131a3832
Proper support for fragment output variables for GLSL ES shader version 300.
...
TRAC #22704
Signed-off-by: Geoff Lang
Signed-off-by: Nicolas Capens
Authored-by: Jamie Madill
2013-07-19 18:05:03 -04:00
[email protected]
6b7099111f
Add support for the unsigned integer scalar type to the shader translator.
...
TRAC #23080
Signed-off-by: Nicolas Capens
Signed-off-by: Shannon Woods
Author: Jamie Madill
git-svn-id: https://angleproject.googlecode.com/svn/branches/es3proto@2403 736b8ea6-26fd-11df-bfd4-992fa37f6226
2013-05-30 00:20:04 +00:00
[email protected]
8da034cc6a
Add non-square mat support to the shader language interface.
...
TRAC #23081
Signed-off-by: Geoff Lang
Signed-off-by: Nicolas Capens
Author: Jamie Madill
git-svn-id: https://angleproject.googlecode.com/svn/branches/es3proto@2397 736b8ea6-26fd-11df-bfd4-992fa37f6226
2013-05-30 00:19:15 +00:00
[email protected]
3f68bf0e3b
Enable the translator to pass parsed interface blocks back to the ANGLE API via the shader translator layer.
...
TRAC #22930
Signed-off-by: Nicolas Capens
Signed-off-by: Geoff Lang
Author: Jamie Madill
git-svn-id: https://angleproject.googlecode.com/svn/branches/es3proto@2346 736b8ea6-26fd-11df-bfd4-992fa37f6226
2013-05-30 00:12:43 +00:00
[email protected]
eff3a1272e
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/es3proto@2328 736b8ea6-26fd-11df-bfd4-992fa37f6226
2013-05-30 00:10:04 +00:00
[email protected]
74b86cffad
Add new GLSL ES 3.0 built-in constants and split off 1.0 ones.
...
TRAC #22863
Signed-off-by: Jamie Madill
Signed-off-by: Shannon Woods
Author: Nicolas Capens
git-svn-id: https://angleproject.googlecode.com/svn/branches/es3proto@2274 736b8ea6-26fd-11df-bfd4-992fa37f6226
2013-05-30 00:02:58 +00:00
shannon.woods%[email protected]
0bbed38f41
Accept shader version 300 on ES3 contexts.
...
TRAC #22712
Signed-off-by: Jamie Madill
Signed-off-by: Shannon Woods
Author: Nicolas Capens
git-svn-id: https://angleproject.googlecode.com/svn/branches/es3proto@2121 736b8ea6-26fd-11df-bfd4-992fa37f6226
2013-04-13 03:38:07 +00:00
shannon.woods%[email protected]
f3c5249109
Updates EGL headers
...
TRAC #22805
Signed-off-by: Jamie Madill
Signed-off-by: Geoff Lang
Author: Shannon Woods
git-svn-id: https://angleproject.googlecode.com/svn/branches/es3proto@2088 736b8ea6-26fd-11df-bfd4-992fa37f6226
2013-04-13 03:33:04 +00:00
shannon.woods%[email protected]
f26ddae9ac
Added the GLES3 headers and updated all locations where the GLES2 headers were included to also include the GLES3 headers.
...
TRAC #22694
Signed-off-by: Jamie Madill
Signed-off-by: Shannon Woods
Author: Geoff Lang
git-svn-id: https://angleproject.googlecode.com/svn/branches/es3proto@2069 736b8ea6-26fd-11df-bfd4-992fa37f6226
2013-04-13 03:29:13 +00:00
shannon.woods%[email protected]
5f339332e1
Updated gl2.h and gl2ext.h.
...
TRAC #22694
Signed-off-by: Jamie Madill
Signed-off-by: Shannon Woods
Author: Geoff Lang
git-svn-id: https://angleproject.googlecode.com/svn/branches/es3proto@2068 736b8ea6-26fd-11df-bfd4-992fa37f6226
2013-04-13 03:29:02 +00:00
shannon.woods%[email protected]
d24fcd7aea
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/es3proto@2061 736b8ea6-26fd-11df-bfd4-992fa37f6226
2013-04-13 03:28:09 +00:00
shannon.woods%[email protected]
fc84e0adfa
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/es3proto@2060 736b8ea6-26fd-11df-bfd4-992fa37f6226
2013-04-13 03:28:03 +00:00
shannon.woods%[email protected]
cbb6b6a041
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/es3proto@2058 736b8ea6-26fd-11df-bfd4-992fa37f6226
2013-04-13 03:27:47 +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