Commit Graph
247 Commits
Author SHA1 Message Date
Geoff Lang 2dacfb2a6d Fix EGL_D3D_TEXTURE_SUBRESOURCE_ID_ANGLE enum typo.
BUG=angleproject:1332

Change-Id: I69a5780521a4810ae93567fbe875a8c5e361850e
Reviewed-on: https://chromium-review.googlesource.com/406632
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Geoff Lang <[email protected]>
2016-11-02 19:22:22 +00:00
Qiankun Miao 705a919443 Reland "Remove invariant qualifier for input in fragment shader"
This relands https://chromium-review.googlesource.com/#/c/400005/.

ESSL and GLSL are not consistent on invariant matching in vertex shader
and fragment shader. See the following rules:
ESSL 1.00 - input and output must match
ESSL 3.00 - only output, inputs cannot be declared as invariant.

GLSL 1.10.59 - does not exist
GLSL 1.20.8  - input and output must match
GLSL 1.30.10 - input and output must match
GLSL 1.40.8  - input and output must match
GLSL 1.50.11 - input and output must match
GLSL 3.30.6  - input and output must match
GLSL 4.00.9  - input and output must match
GLSL 4.10.6  - input and output must match
GLSL 4.20.11 - input can omit invariant
GLSL 4.30.8  - input can omit invariant
GLSL 4.40.9  - input can omit invariant
GLSL 4.50.5  - input can omit invariant

Since GLSL 4.20, invariant qualifier description were changed to:
"
Only variables output from a shader (including those that are then input
to a subsequent shader) can be candidates for invariance. This includes
user-defined output variables and the built-in output variables. As only
outputs need be declared with invariant, an output from one shader stage
will still match an input of a subsequent stage without the input being
declared as invariant.
"
It's not very clear if input in fragment can be declared as invariant.
Mesa driver disallows use of input declared as invariant in fragment
shader, while other drivers may allow it. This CL removes invariant
declaration for input in fragment shader except AMD driver in Linux.
AMD's driver obviously contradicts the spec by forcing invariance to
match between vertex and fragment shaders.

BUG=chromium:639760, chromium:659326
TEST=conformance/glsl/misc/shaders-with-invariance.html and
conformance/glsl/bugs/invariant-does-not-leak-across-shaders.html

Change-Id: I0aa9be14f0cee7a11a249c91fba27c570c52ca1b
Reviewed-on: https://chromium-review.googlesource.com/404228
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Yuly Novikov <[email protected]>
2016-10-29 00:45:33 +00:00
Geoff Lang 2018c0bac4 Add a EGL_ANGLE_d3d_texture_client_buffer extension.
Allows creation of pbuffers from D3D texture objects.

BUG=540829
BUG=angleproject:1144

Change-Id: If8ea717ef011608cd01357c217837133d726d3ea
Reviewed-on: https://chromium-review.googlesource.com/316804
Commit-Queue: Geoff Lang <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2016-10-27 16:45:18 +00:00
Geoff Lang 0a9661f2b4 Implement robust the GetInternalFormativ entry point.
BUG=angleproject:1354

Change-Id: Ib25fe4905fdd6c532c67de1d4ca1ba37932f8e0b
Reviewed-on: https://chromium-review.googlesource.com/401149
Reviewed-by: Corentin Wallez <[email protected]>
Commit-Queue: Geoff Lang <[email protected]>
2016-10-20 19:01:50 +00:00
Qin Jiajia 7835b525b7 Reland "Add workaround for unused std140 and shared uniform blocks on MacOS"
On some Mac drivers with shader version 4.1, they will
treat unused std140 and shared uniform blocks' members as inactive. However,
WebGL2.0 based on OpenGL ES3.0.4 requires all members of a named uniform block
declared with a shared or std140 layout qualifier to be considered active.
The uniform block itself is also considered active.

This workaround is to reference all members of unused std140 and shared uniform blocks
at the beginning of the vertex/fragment shader's main().

BUG=chromium:618464
TEST=UniformBufferTest.ActiveUniformBlockNumber

Change-Id: I18da4e2b61b0170068bf5ea38ce54667b0737780
Reviewed-on: https://chromium-review.googlesource.com/395648
Reviewed-by: Corentin Wallez <[email protected]>
Commit-Queue: Corentin Wallez <[email protected]>
2016-10-13 15:31:57 +00:00
Geoff Lang 47110bf4b3 Implement CHROMIUM_copy_compressed_texture for D3D11.
BUG=angleproject:1356

Change-Id: Id563997d2921cf558c52a781ae66d8bde58d1f2f
Reviewed-on: https://chromium-review.googlesource.com/339847
Reviewed-by: Geoff Lang <[email protected]>
Commit-Queue: Geoff Lang <[email protected]>
2016-10-07 14:56:11 +00:00
Geoff Lang 168445c20c Add an extension for requesting a NULL Display.
BUG=angleproject:1468

Change-Id: Ief4b0e7d7a0420e59e547cd24fde53deb3718ccb
Reviewed-on: https://chromium-review.googlesource.com/388845
Commit-Queue: Geoff Lang <[email protected]>
Reviewed-by: Corentin Wallez <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2016-10-05 20:07:22 +00:00
Kenneth Russell c9e6026c51 Revert "Add workaround for unused std140 and shared uniform blocks on MacOS"
This reverts commit 9aa83fe302.

The new test UniformBufferTest.ActiveUniformNumberAndName/ES3_OPENGL is failing on multiple platforms. Examples:
https://build.chromium.org/p/chromium.gpu.fyi/builders/Mac%2010.10%20Release%20%28ATI%29/builds/12285
https://build.chromium.org/p/chromium.gpu.fyi/builders/Linux%20Release%20(ATI)

Change-Id: I78b1a4d58e9a291e40ad304eb32f990e0518f7ee
Reviewed-on: https://chromium-review.googlesource.com/391049
Reviewed-by: Kenneth Russell <[email protected]>
2016-10-01 00:16:35 +00:00
Geoff Lang ff5b2d5128 Add a GL_ANGLE_robust_client_memory extension.
This allows specifying data size to all GL functions that provide a pointer to
client memory and a length parameter for all functions in which the driver
writes to client memory.

BUG=angleproject:1354

Change-Id: Ia68be1576b957cb529c87b5e0d1bd638c7dbd371
Reviewed-on: https://chromium-review.googlesource.com/382012
Commit-Queue: Geoff Lang <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2016-09-29 18:09:19 +00:00
Qin Jiajia 9aa83fe302 Add workaround for unused std140 and shared uniform blocks on MacOS
On some Mac drivers with shader version 4.1, they will
treat unused std140 and shared uniform blocks' members as inactive. However,
WebGL2.0 based on OpenGL ES3.0.4 requires all members of a named uniform block
declared with a shared or std140 layout qualifier to be considered active.
The uniform block itself is also considered active.

This workaround is to reference all members of unused std140 and shared uniform blocks
at the beginning of the vertex/fragment shader's main().

BUG=chromium:618464
TEST=UniformBufferTest.ActiveUniformBlockNumber

Change-Id: I1d2c5e3e8da04786ac6a37fd26f7bb9c14cd76ed
Reviewed-on: https://chromium-review.googlesource.com/387169
Commit-Queue: Corentin Wallez <[email protected]>
Reviewed-by: Corentin Wallez <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2016-09-29 02:50:45 +00:00
Shao 6f0a0dca16 Workaround isnan() on Intel drivers
On some Intel drivers, calling function isnan() on highp float will get wrong
answer. This patch work arounds this bug by using an expression to emulate
this function.

BUG=chromium:650547

Change-Id: I5bc5e0352c434f42cd2c55103a74f9f7ba51a72c
Reviewed-on: https://chromium-review.googlesource.com/389834
Commit-Queue: Corentin Wallez <[email protected]>
Reviewed-by: Corentin Wallez <[email protected]>
2016-09-28 16:34:11 +00:00
Geoff Lang f41a7151a5 Add an extension to disable resource generation on bind.
BUG=angleproject:1518

Change-Id: I662f7b07da5c97831496f2617b0adadf9858bdc9
Reviewed-on: https://chromium-review.googlesource.com/386799
Reviewed-by: Antoine Labour <[email protected]>
Commit-Queue: Geoff Lang <[email protected]>
2016-09-23 14:16:37 +00:00
Geoff Lang c287ea6e0a Add WebGL validation extensions to ANGLE.
BUG=angleproject:1523

Change-Id: I6fecb5055ed8087665aeee34b3a066ea8f38d51b
Reviewed-on: https://chromium-review.googlesource.com/386281
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Antoine Labour <[email protected]>
Commit-Queue: Geoff Lang <[email protected]>
2016-09-20 15:27:28 +00:00
Jiawei-Shao e292e90280 Workaround the unary minus operator issue on Intel
On some Intel D3D drivers, evaluating unary minor operator on an
integer variable may get wrong answer in vertex shader.

This patch works around this bug by replacing -(int) with ~(int)+1
on Windows Intel.

BUG=chromium:644033

Change-Id: I0af719e84d618a33f25bcb33bde0c381fb462a31
Reviewed-on: https://chromium-review.googlesource.com/381675
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2016-09-20 14:58:29 +00:00
Qiankun Miao 09cfac606e Work around For and While loop bugs on Intel Mac OSX
Condition calculation in for and while loops has bug on Intel Mac. Work
around it by converting "CONDITION" to "CONDITION && true".

This CL also adds previous SH_EMULATE_ABS_INT_FUNCTION workaround to
the ANGLE GL back-end on OSX

BUG=chromium:644669
TEST=deqp/functional/gles3/shaderloop_for/while.html

Change-Id: I910f662b054f259fcb601b9938841b3a2d066840
Reviewed-on: https://chromium-review.googlesource.com/381678
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Qiankun Miao <[email protected]>
Commit-Queue: Corentin Wallez <[email protected]>
2016-09-15 03:14:24 +00:00
Qiankun Miao 7ebb97fc9a Use 64-bits compile options
BUG=chromium:645071

Change-Id: I31825123bf4cb45fb37a93f538e8936487beb5ff
Reviewed-on: https://chromium-review.googlesource.com/382712
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2016-09-13 20:54:59 +00:00
Olli Etuaho 966456de40 Remove SH_TIMING_RESTRICTIONS compiler flag
The timing restrictions code is not in use and not updated for ESSL3,
so it is better to remove it to make refactoring the AST easier.

It can also be argued that perfect prevention of shader timing attacks
is not feasible due to factors that are not under control of ANGLE,
such as fixed function color compression in GPUs. Such color
compression may make the use of texture bandwidth and thus performance
dependent on the content of a texture regardless of whether a
compressed format is chosen through the API.

SH_DEPENDENCY_GRAPH flag that could only be active together with the
timing restrictions flag is also removed, along with all the code that
was supporting it. The newer CallDAG code is used for different
purposes and is kept.

BUG=angleproject:1490
TEST=angle_unittests

Change-Id: I2cd10e18df366e8e43f7c3af1ca12d2a4bfb2007
Reviewed-on: https://chromium-review.googlesource.com/384511
Commit-Queue: Olli Etuaho <[email protected]>
Reviewed-by: Corentin Wallez <[email protected]>
2016-09-13 06:58:58 +00:00
Qiankun Miao e5bb72ff28 Remove SH_EMULATE_BUILT_IN_FUNCTIONS which isn't used
The flag is not used in chrome. We decide to do per emulation per flag.

BUG=chromium:642227

Change-Id: I936d53e5015186e35e672d0cb51c853a941582d2
Reviewed-on: https://chromium-review.googlesource.com/379077
Commit-Queue: Corentin Wallez <[email protected]>
Reviewed-by: Corentin Wallez <[email protected]>
2016-09-01 14:54:29 +00:00
Qiankun Miao a4e6f07433 Work around abs() issue in Intel Mac drivers
abs(i) where i is an integer returns unexpected result in Intel Mac.
This works around the issue by emulating abs(i) manually.

BUG=chromium:642227
TEST=deqp/functional/gles3/shadercommonfunction.html

Change-Id: I2a41e0f4bcb0766109d651e663283b1760468017
Reviewed-on: https://chromium-review.googlesource.com/377628
Commit-Queue: Zhenyao Mo <[email protected]>
Reviewed-by: Zhenyao Mo <[email protected]>
2016-08-31 19:40:37 +00:00
Qiankun Miao c2c5fc48e3 Remove CSS Shader related code
CSS shader has been removed from spec and chrome code base. Remove the
code in ANGLE.

BUG=chromium:233383

Change-Id: I93a35437f540e51ce7af9d49f21ca60d7c0b156a
Reviewed-on: https://chromium-review.googlesource.com/378739
Reviewed-by: Corentin Wallez <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Corentin Wallez <[email protected]>
2016-08-31 17:55:49 +00:00
Yuly Novikov e3352f94a1 Change angle_util to be a shared library
So that there will be one instance of static thread synchronization variables
in AndroidWindow.
Previously there was one instance in lib_angle_deqp_gles2_tests__library
and one in libangle_deqp_libgles2, resulting in AndroidWindow::initialize
waiting forever.

Also make the change in GYP build to fix standalone build,
and fix rpath issues on Mac.

BUG=angleproject:1471
TEST=end2end and deqp tests on standalone Win10 and end2end on GN Mac 10.11

Change-Id: I731578459400bb47d269df129aabed9b67b555e6
Reviewed-on: https://chromium-review.googlesource.com/376202
Reviewed-by: Corentin Wallez <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Yuly Novikov <[email protected]>
2016-08-30 20:50:59 +00:00
Shao 11e43ecee2 Add a workaround for Intel drivers on glsl function texelfetchoffset
GLSL function texelfetchoffset will be translated into texture.Load in
ANGLE. In D3D there is a note that When one or more of the coordinates
in Location exceeds the u, v, or w mipmap level dimensions of the
texture, Load returns zero in all components, but in glsl there is no
such restriction, which will cause the WebGL 2 dEQP test
deqp/functional/gles3/shadertexturefunction/texelfetchoffset.html fail
on Windows with Intel GPU.

Adapted from ExpandIntegerPowExpressions.cpp, this patch adds a
translation from texelFetchOffset into texelFetch to work around this
issue.

BUG=angleproject:1469

Change-Id: Iecfb9570472036acf5960789bdb1a63f191316be
Reviewed-on: https://chromium-review.googlesource.com/367883
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Corentin Wallez <[email protected]>
2016-08-27 17:51:36 +00:00
Geoff Lang 1fe74c7e2e Manually compute the mipmap size for the textureSize builtin.
There were two issues with the current implementation:
 * The GetDimensions function already takes into account the base level of the
   SRV.
 * The GetDimensions function returns doesn't return valid sizes for levels
   that don't exist in the SRV.  Instead, manually do the lod offset.

BUG=angleproject:931
BUG=angleproject:1316

TEST=dEQP-GLES3.functional.shaders.texture_functions.texturesize.sampler2d_fixed_vertex

Change-Id: I63259b563a42b93b73949e0ef7ac412099a42f13
Reviewed-on: https://chromium-review.googlesource.com/376099
Reviewed-by: Corentin Wallez <[email protected]>
Reviewed-by: Zhenyao Mo <[email protected]>
Commit-Queue: Geoff Lang <[email protected]>
2016-08-26 19:47:28 +00:00
Martin Radev 4c4c8e7252 Add compute program compilation and linking support
Compute shaders can be now compiled and linked to create programs.
Some tests are added to verify successful and unsuccessful compute
shader linking.

The patch also replaces std::array<int, 3> with a custom struct
WorkGroupSize.

BUG=angleproject:1442

TEST=angle_end2end_tests
TEST=angle_unittests

Change-Id: I4ab0ac05755d0167a6d2a798f8d7f1516cf54d84
Reviewed-on: https://chromium-review.googlesource.com/366740
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Olli Etuaho <[email protected]>
Commit-Queue: Olli Etuaho <[email protected]>
2016-08-26 09:51:18 +00:00
Yuly Novikov 55033e583b Revert "Change angle_util to be a shared library"
This reverts commit 2f9b5e6f79.

Change-Id: I90a7ba0596e79795c9549bc268eabff69c96d572
Reviewed-on: https://chromium-review.googlesource.com/376079
Reviewed-by: Yuly Novikov <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Yuly Novikov <[email protected]>
2016-08-25 18:12:11 +00:00
Yuly Novikov 2f9b5e6f79 Change angle_util to be a shared library
So that there will be one instance of static thread synchronization variables
in AndroidWindow.
Previously there was one instance in lib_angle_deqp_gles2_tests__library
and one in libangle_deqp_libgles2, resulting in AndroidWindow::initialize
waiting forever.

BUG=angleproject:1471

Change-Id: Ia529c91e34960eb352730c1bb89a91ce6336c8a0
Reviewed-on: https://chromium-review.googlesource.com/368983
Commit-Queue: Yuly Novikov <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2016-08-24 21:01:16 +00:00
Kenneth Russell bccc65d323 Flatten "#pragma STDGL invariant(all)" into varying variables.
This is implemented as a compiler option which is enabled by default
when outputting to desktop GLSL version 130 and greater, which does
not support this #pragma in fragment shaders. As a workaround, and for
better compatibility on desktop OpenGL drivers, this pragma is also
flattened into the outputs of vertex shaders, and the inputs of ESSL
1.00 fragment shaders.

TEST=conformance/glsl/misc/shaders-with-invariance.html with --enable-unsafe-es3-apis
BUG=629622, angleproject:1293

Change-Id: Ib040230915e639971505ed496d26e804c9d64e68
Reviewed-on: https://chromium-review.googlesource.com/361792
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Yuly Novikov <[email protected]>
Commit-Queue: Kenneth Russell <[email protected]>
2016-08-17 22:12:39 +00:00
Martin Radev 802abe0150 Add compute shader compilation support in the glsl compiler
Support is added for compute shader compilation. There is a small
extension to the parser so that 'local_size_x = ', 'local_size_y = '
and 'local_size_z = ' are supported as layout qualifiers.

A few shader compilation tests are added and one which checks the AST
whether the layout qualifiers are properly parsed.

BUG=angleproject:1442

TEST=angle_unittests
TEST=angle_end2end_tests

Change-Id: I67283797d1cf13fa4ac47faa2a6e66d93a2db867
Reviewed-on: https://chromium-review.googlesource.com/362300
Reviewed-by: Olli Etuaho <[email protected]>
Commit-Queue: Olli Etuaho <[email protected]>
2016-08-09 16:04:13 +00:00
Martin Radev e93d24ef1f Add es3.1 shader constants
The patch adds all shader built-in constants.

BUG=angleproject:1442

TEST=angle_unittests
TEST=angle_end2end_tests

Change-Id: I81cae479d6506a8faa2dce023d5fcc2c1291d521
Reviewed-on: https://chromium-review.googlesource.com/364460
Reviewed-by: Corentin Wallez <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Olli Etuaho <[email protected]>
2016-08-04 13:00:25 +00:00
Geoff Lang 97073d12b7 Implement CHROMIUM_copy_texture for D3D11.
BUG=angleproject:1356

Change-Id: I70246762411dbeeb3e291e317854139a68d80070
Reviewed-on: https://chromium-review.googlesource.com/339434
Reviewed-by: Corentin Wallez <[email protected]>
Commit-Queue: Geoff Lang <[email protected]>
2016-08-03 17:56:06 +00:00
Corentin Wallez aae1e4ae82 ShCheckVariablesWithinPackingLimits: remove deprecated overload
BUG=621031

Change-Id: Ib4cdd88ecd58f617813a91379a8b8b518fba149b
Reviewed-on: https://chromium-review.googlesource.com/364910
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Corentin Wallez <[email protected]>
2016-08-02 17:06:32 +00:00
Jamie Madill 1048e43f4a D3D: Work around HLSL integer pow folding bug.
BUG=angleproject:851

Change-Id: I68a47b8343a29e42c0a69ca3f2a6cb5054d03782
Reviewed-on: https://chromium-review.googlesource.com/362775
Reviewed-by: Zhenyao Mo <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2016-07-24 16:30:10 +00:00
Zhenyao Mo 7211191563 Initialize all output variables.
BUG=angleproject:1441
TEST=bots

Change-Id: Ia4cf415d8346c3234bf0f548a178ee3ea8cd35c4
Reviewed-on: https://chromium-review.googlesource.com/362110
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Zhenyao Mo <[email protected]>
Commit-Queue: Zhenyao Mo <[email protected]>
2016-07-21 23:25:10 +00:00
Martin Radev 1be913cff8 Add support for ES31 context creation
The dEQP test for context creation passes.

SH_WEBGL3_SPEC has been added, but it should be considered whether we
should keep it, remove it or rename it. It was added so that there is
a webgl mapping to es 310 shaders. Check Compiler.cpp. The bison file
has been modified so that some tokens from es3 can be also used in
es31 as well.

A separate macro ES3_1_ONLY is added so that some tokens are limited
only for es 310 shaders.

BUG=angleproject:1442
TEST=angle_unittests

Change-Id: I2e5ca227c96046c30dc796ab934f3fda9c533eba
Reviewed-on: https://chromium-review.googlesource.com/360300
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2016-07-20 12:58:19 +00:00
Corentin Wallez e58e1416a5 ShCheckVariablesWithinPackingLimits add sh::ShaderVariable overload
This overload doesn't take a stripped down version of the variable
information, which makes it possible to handle varying structs
correctly by flattening them as individual variables.

BUG=621031

Change-Id: I367629fce3d17dd7e1f876c5937eb37f3d97c7f4
Reviewed-on: https://chromium-review.googlesource.com/361460
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Corentin Wallez <[email protected]>
2016-07-19 15:22:21 +00:00
Sami Väisänen 46eaa94624 Support CHROMIUM_path_rendering fragment operations
This brings two new APIs, BindFragmentInputLocation and
ProgramPathFragmentInputGen that together dictate how the
fragment shader varyings are used.

BUG=angleproject:1382

Change-Id: I4b52fd8a3555235a73aecd4f3dba2d500789cbb0
Reviewed-on: https://chromium-review.googlesource.com/357071
Reviewed-by: Geoff Lang <[email protected]>
Reviewed-by: Sami Väisänen <[email protected]>
Commit-Queue: Sami Väisänen <[email protected]>
2016-07-15 15:18:46 +00:00
Corentin Wallez 84954988ad ShaderVars: add isSameInterfaceBlockFieldAtLinkTime
This will be used by Chromium to check for interface blocks mismatches.

BUG=621031

Change-Id: Ia6cc19e5d7b2a5c33af558d65b87885a6b72cea3
Reviewed-on: https://chromium-review.googlesource.com/359607
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Kenneth Russell <[email protected]>
Commit-Queue: Corentin Wallez <[email protected]>
2016-07-13 13:36:42 +00:00
Sami Väisänen d59ca052c0 Support instanced CHROMIUM_path_rendering
This implements instanced path rendering.

BUG=angleproject:1382

Change-Id: I4654251882975d707b22c7bb522af14ae34eb1a1
Reviewed-on: https://chromium-review.googlesource.com/355401
Reviewed-by: Geoff Lang <[email protected]>
Reviewed-by: Corentin Wallez <[email protected]>
Commit-Queue: Sami Väisänen <[email protected]>
2016-07-04 09:24:47 +00:00
Sami Väisänen e45e53bd20 Support CHROMIUM_path_rendering
This is partial support for CHROMIUM_path_rendering
and implements basic path management and non-instanced
rendering.

BUG=angleproject:1382

Change-Id: I9c0e88183e0a915d522889323933439d25b45b5f
Reviewed-on: https://chromium-review.googlesource.com/348630
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2016-06-20 12:45:43 +00:00
Geoff Lang b66a9097a3 Add support for OES_EGL_image_external and OES_EGL_image_external_essl3.
BUG=angleproject:1372

Change-Id: I8489e7fd0ab409b0775041ad5e9fbf0aab53886d
Reviewed-on: https://chromium-review.googlesource.com/344734
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Corentin Wallez <[email protected]>
Commit-Queue: Geoff Lang <[email protected]>
2016-05-19 01:09:00 +00:00
Sami Väisänen a797e066c1 Support CHROMIUM_framebuffer_mixed_samples in the GL backend
BUG=angleproject:1378

Change-Id: I634c41f3507dbdeaa56234c4de1b498f81c848ed
Reviewed-on: https://chromium-review.googlesource.com/344520
Reviewed-by: Corentin Wallez <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Commit-Queue: Sami Väisänen <[email protected]>
2016-05-18 09:26:37 +00:00
Geoff Lang 2b4ce80c65 Implement GL_CHROMIUM_sync_query for D3D9 and D3D11.
BUG=angleproject:1366

Change-Id: Iadde61968f45b969c76578a6dd9116a25d63fb4b
Reviewed-on: https://chromium-review.googlesource.com/341230
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Geoff Lang <[email protected]>
2016-05-12 19:14:40 +00:00
Ian Ewell bda7559731 Finish NV12 support via streams.
The main functionality for NV12 texture support through EGL streams has
been added. Updates to the compiler, texture code, and stream code were
added to support binding to external D3D11 NV12 textures. An end2end test
was also added to test sampling of YUV textures and converting to RGB.
There is also a new script to convert BMP files to an NV12 texture ready
to load into D3D11 for testing purposes.

BUG=angleproject:1332

Change-Id: I39b6ec393ea338e2c843fb911acc1b36cd1158a0
Reviewed-on: https://chromium-review.googlesource.com/339454
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Ian Ewell <[email protected]>
Reviewed-on: https://chromium-review.googlesource.com/341254
Reviewed-by: Ian Ewell <[email protected]>
2016-04-29 17:14:52 +00:00
Corentin Wallez 9670b03eb0 Revert "Finish NV12 support via streams."
Broke Windows Clang compilation, see https://build.chromium.org/p/chromium.gpu.fyi/builders/GPU%20Win%20Clang%20Builder%20%28dbg%29/builds/3583/steps/compile/logs/stdio and search for TextureStorage11.h

This reverts commit 9b8b359fa3.

Change-Id: I6e54305eba02b40927a35577594df39e951adb32
Reviewed-on: https://chromium-review.googlesource.com/341430
Reviewed-by: Corentin Wallez <[email protected]>
Commit-Queue: Corentin Wallez <[email protected]>
2016-04-29 11:45:12 +00:00
Ian Ewell 9b8b359fa3 Finish NV12 support via streams.
The main functionality for NV12 texture support through EGL streams has
been added. Updates to the compiler, texture code, and stream code were
added to support binding to external D3D11 NV12 textures. An end2end test
was also added to test sampling of YUV textures and converting to RGB.
There is also a new script to convert BMP files to an NV12 texture ready
to load into D3D11 for testing purposes.

BUG=angleproject:1332

Change-Id: I098940e6f25e113dcc4fc8d22ffed4b5a16fd860
Reviewed-on: https://chromium-review.googlesource.com/339454
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Ian Ewell <[email protected]>
2016-04-28 21:34:07 +00:00
Ian Ewell 4a48d9a3af Initial implementation of ANGLE_stream_producer_d3d_texture_nv12.
Add the validation and entrypoints for
ANGLE_stream_producer_d3d_texture_nv12, which is a new EGL extension
currently being written. The purpose of this extension is to allow
insertion of D3D11 NV12 textures to be inserted into a stream. This acts
as the producer of the EGL stream.

BUG=angleproject:1332

Change-Id: I50d4565cc82b63f7da7632adad4ac4c77d8800f2
Reviewed-on: https://chromium-review.googlesource.com/336695
Reviewed-by: Geoff Lang <[email protected]>
Reviewed-by: Shannon Woods <[email protected]>
Reviewed-by: Corentin Wallez <[email protected]>
Commit-Queue: Ian Ewell <[email protected]>
2016-04-08 17:10:12 +00:00
Olli Etuaho 9696316d66 Support ESSL structs containing samplers on D3D
Since HLSL can't natively handle samplers in structs, samplers need to
be extracted out of structs into separate variables in the translated
shader code. In HLSL 4.1, samplers that were in structs go into the
normal sampler arrays and are identified by index constants. In other
HLSL versions, samplers that were in structs are translated as uniform
variables.

These transformations are done inside the HLSL output classes, not as
tree transformations. This helps to keep the uniform API provided by
the shader translator intact.

Wherever a struct containing samplers is passed into a user-defined
function, the translated HLSL code passes the separate sampler
variables alongside a struct where the samplers have been removed.

The D3D backend in libANGLE queries the uniform registers of any
samplers that were in uniform structs, and adds them to the register
maps, so that correct sampler state gets assigned to them.

The extracted sampler variables are prefixed with "angle_" instead of
the usual "_" to prevent any name conflicts between them and regular
variables.

BUG=angleproject:504
TEST=angle_end2end_tests,
     dEQP-GLES*.functional.shaders.struct.uniform.* (all pass),
     dEQP-GLES*.functional.uniform_api.* (most now pass)

Change-Id: Ib79cba2fa0ff8257a973d70dfd917a64f0ca1efb
Reviewed-on: https://chromium-review.googlesource.com/333743
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Corentin Wallez <[email protected]>
Commit-Queue: Olli Etuaho <[email protected]>
2016-04-05 08:05:41 +00:00
Olli Etuaho 19d1dc998a Add option to limit the number of function parameters
Trying to compile user-defined functions that have thousands of
parameters introduces some instability in native compilers, so it is
better to reject shaders with large numbers of function parameters
in ANGLE.

The check is only enabled if the SH_LIMIT_EXPRESSION_COMPLEXITY flag
is turned on. The default limit for the number of parameters is 1024,
but it can also be configured.

BUG=angleproject:1338
TEST=angle_unittests

Change-Id: I5c9b7a4e97e67f36e77f969368336fa8fffba1c3
Reviewed-on: https://chromium-review.googlesource.com/331970
Reviewed-by: Corentin Wallez <[email protected]>
Reviewed-by: Kenneth Russell <[email protected]>
Commit-Queue: Olli Etuaho <[email protected]>
2016-03-10 16:52:12 +00:00
Ian Ewell c52a40268a Update eglext.h to latest.
The new header contains EGL_NV_stream_consumer_gltexture_yuv, which will
be implemented in the future for video rendering purposes.

BUG=angleproject:1332
Change-Id: Ia35ee7360b8f09703ad2800c641c67f0f243e927
Reviewed-on: https://chromium-review.googlesource.com/330278
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Corentin Wallez <[email protected]>
Commit-Queue: Ian Ewell <[email protected]>
2016-03-04 20:35:06 +00:00
Jamie Madill 39046169da CollectVariables: Don't include block name in field name.
The spec mandates that the instance name of a block determines how the
active uniform name for this field is reported. However, our handling
of this was a bit bugged. We would include the proper prefix on the
compiler-side, but this mangled the hashing, and was also not strictly
needed. We now also expose the instance name, so we can determine the
proper prefix for variable linking on the GL-side of things. This also
is consistent with how we handle other spec issues, where the GL-side
handles the GL-API specific functionality.

This also allows us to fix name hashing of instanced uniform blocks,
which was previously broken because we would hash the full name of the
active uniform, instead of just the field.

BUG=angleproject:1306

Change-Id: I06ace6dbc3f75fdd8129677360dcc142aa89136e
Reviewed-on: https://chromium-review.googlesource.com/326681
Reviewed-by: Geoff Lang <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2016-02-09 14:59:53 +00:00