Commit Graph
122 Commits
Author SHA1 Message Date
Alexis Hetu 94de306d8b Extensions suffixes
Added NV/OES suffixes to relevant Extensions members.

Bug: angleproject:3104
Change-Id: Ia1798157086230bde8d11c6fcb4fe93211e996ab
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2013168
Reviewed-by: Alexis Hétu <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2020-01-22 13:24:28 +00:00
Ian Elliott 7f8b6e3fab Vulkan: Add support for GL_IMAGE_FORMAT_COMPATIBILITY_TYPE
For some reason, this wasn't implemented when texture image load and
store was implemented.

Bug: angleproject:4311
Change-Id: I24c508660ad7eb3aa944601175803751b54ce0ff
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2011324
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Shahbaz Youssefi <[email protected]>
Commit-Queue: Ian Elliott <[email protected]>
2020-01-21 16:07:02 +00:00
Jeff Vigil 8c0bbfbbf5 EGL: Implement EGL_ANDROID_framebuffer_target
Add attribute to configs.
Add attribute matching logic.
Does not set attribute in Vulkan configs, need solution to
query Android for which formats are valid. anglebug.com/4208
New end2end test.

Bug: angleproject:3961
Test: angle_end2end_tests --gtest_filter=EGLAndroidFramebufferTargetTest*
Change-Id: I7e14c47b39e9539f6181c3c1d75c76fe63ca0f8c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1960508
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Courtney Goeltzenleuchter <[email protected]>
Commit-Queue: Mohan Maiya <[email protected]>
2020-01-07 01:10:47 +00:00
Jamie Madill e167f76b08 Capture/Replay: Pass gl::State to capture functions.
This replaces passing gl::Context. Using a gl::State directly will more
easily let the mid-execution replay code pass a mocked gl::State
instead of having to modify the real underlying Context state. For
example when capturing pixel pack and unpack parameters the states
could not be overridden without changing the gl::Context itself.
Similarly when capturing client side data.

Also moves a query parameter info function into queryutils so it can be
accessible to the State-based capture.

Refactoring change only.

Bug: angleproject:3611
Change-Id: I3c064001cfa83ebbb67a2b8fc8b6180491edd215
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1899728
Reviewed-by: Cody Northrop <[email protected]>
Reviewed-by: Tim Van Patten <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2019-11-07 13:39:59 +00:00
Jamie Madill dfc20daf5a Plumb more logic for ANGLE_get_image.
Also implements and tests validation / negative API.

Bug: angleproject:3944
Change-Id: I3385a4255f4fab6a12eee2abfa5ffcce2107359a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1879961
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Cody Northrop <[email protected]>
2019-10-28 20:51:04 +00:00
Mingyu Hu 2d0e5b554d GL_EXT_multisampled_render_to_texture extension. Part 2.
For textures that use this extension, a multisampled texture is
implicitly created for the texture.
Upon write or read, the multisampled texture is either return
to be drawn to or resolved and returned as a single sampled texture.

This is the functionality change with end2end tests.

Bug: angleproject:980428
Change-Id: I5776875a132fed7a3f4f00fb02f9e8e250684630
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1773717
Commit-Queue: Rafael Cintron <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2019-10-15 01:09:07 +00:00
Le Quyen d200a77a22 Metal backend skeleton implementation.
Bug: angleproject:2634
Change-Id: I34be82f4a80a6851fecb53a51e069b134d82613a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1849079
Commit-Queue: Le Hoang Quyen <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2019-10-10 17:27:38 +00:00
Tim Van Patten 616a4dc0f2 Vulkan: Full support for program interface queries
Program interface queries are a generic way to query attributes of
the program like uniforms, samplers, attributes, etc. This change
supports those queries for program outputs.

Bug: angleproject:3596
Test: dEQP-GLES31.functional.program_interface_query.*
Test: ProgramInterfaceTest.cpp
Change-Id: I0f13692949073b45988b6f930eee9eaa6411bbe2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1801998
Commit-Queue: Tim Van Patten <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2019-10-01 20:47:19 +00:00
Jamie Madill f703443b1f Use Resource IDs in RefCountObject.
This lets us use strongly typed IDs pretty much everywhere. Only one or
two additional places still use GLuint IDs. Mostly for external queries
and for Framebuffer Attachments.

With some clever type reflection helpers lets us define a single
template function for handling operator== and != for resource IDs.

Refactor in preparation for more Capture/Replay work.

Bug: angleproject:3611
Change-Id: I1c0c848e89eb8a4b769714d57686f816daf01634
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1815550
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Tobin Ehlis <[email protected]>
2019-09-25 23:39:34 +00:00
Jeff Vigil a7003d5fc3 Reland "EGL: Implement EGL_KHR_no_config_context"
Add extension string and flag to all renderers that pass
Modify eglCreateContext to accept EGL_NO_CONFIG
Modify eglQueryContext per specification
Modify eglMakeCurrent to bypass surface-context config compatibility checks
Add check for client API
Create new end2end test EGLNoConfigContextTest
Disable on most renderers to prevent possible fail with future configs

Bug: angleproject:3635
Test: dEQP-EGL.functional.create_context.no_config*
      angle_end2end_tests --gtest_filter=EGLNoConfigContextTest*
Change-Id: I88c1922a1e75afcc49922a9eccb4f1ae046c024a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1806140
Commit-Queue: Mohan Maiya <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2019-09-17 22:05:51 +00:00
Zhenyao Mo d32dae1bb3 Revert "EGL: Implement EGL_KHR_no_config_context"
This reverts commit c4b1fbd69b.

Reason for revert: https://crbug.com/1003971

Original change's description:
> EGL: Implement EGL_KHR_no_config_context
> 
> Add extension string and flag to all renderers that pass
> Modify eglCreateContext to accept EGL_NO_CONFIG
> Modify eglQueryContext per specification
> Modify eglMakeCurrent to bypass surface-context config compatibility checks
> Add check for client API
> Create new end2end test EGLNoConfigContextTest
> Disable on most renderers to prevent possible fail with future configs
> 
> Bug: angleproject:3635
> Test: dEQP-EGL.functional.create_context.no_config*
>       angle_end2end_tests --gtest_filter=EGLNoConfigContextTest*
> Change-Id: I7fbb137f1222ae7eebff4192013b7d3c5fcf0436
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1762709
> Commit-Queue: Mohan Maiya <[email protected]>
> Reviewed-by: Geoff Lang <[email protected]>

[email protected],[email protected],[email protected],[email protected],[email protected]

Change-Id: I849aa796803e3cda9b480a39be813ef9105325bb
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: angleproject:3635
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1803789
Reviewed-by: Zhenyao Mo <[email protected]>
Commit-Queue: Zhenyao Mo <[email protected]>
2019-09-13 22:07:11 +00:00
Jeff Vigil c4b1fbd69b EGL: Implement EGL_KHR_no_config_context
Add extension string and flag to all renderers that pass
Modify eglCreateContext to accept EGL_NO_CONFIG
Modify eglQueryContext per specification
Modify eglMakeCurrent to bypass surface-context config compatibility checks
Add check for client API
Create new end2end test EGLNoConfigContextTest
Disable on most renderers to prevent possible fail with future configs

Bug: angleproject:3635
Test: dEQP-EGL.functional.create_context.no_config*
      angle_end2end_tests --gtest_filter=EGLNoConfigContextTest*
Change-Id: I7fbb137f1222ae7eebff4192013b7d3c5fcf0436
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1762709
Commit-Queue: Mohan Maiya <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2019-09-13 14:58:06 +00:00
Tim Van Patten 790abf03b6 Vulkan: Support program interface queries for inputs
Program interface queries are a generic way to query attributes of
the program like uniforms, samplers, attributes, etc. This change
supports those queries for program inputs.

Bug: angleproject:3596
Test: dEQP-GLES31.functional.program_interface_query.*
Test: ProgramInterfaceTest.cpp
Change-Id: Ie904274f4efd87357256f559b69e148e8eda6119
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1775458
Reviewed-by: Geoff Lang <[email protected]>
Commit-Queue: Tim Van Patten <[email protected]>
2019-09-11 21:26:40 +00:00
Tim Van Patten 90a58622fd Refactor ShaderVariable to Remove Specializations
The following structs are being refactored and moved into the parent
struct ShaderVariable:

VariableWithLocation
Uniform
Attribute
OutputVariable
InterfaceBlockField
Varying

Bug: angleproject:3899
Test: CQ
Change-Id: I389eb3ab4ed44a360e09fca75ecc78d64a277f83
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1785877
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Courtney Goeltzenleuchter <[email protected]>
Commit-Queue: Tim Van Patten <[email protected]>
2019-09-06 14:51:31 +00:00
Stuart Morgan 9d737966ac Standardize copyright notices to project style
For all "ANGLE Project" copyrights, standardize to the format specified
by the style guide. Changes:
- "Copyright (c)" and "Copyright(c)" changed to just "Copyright".
- Removed the second half of date ranges ("Y1Y1-Y2Y2"->"Y1Y1").
- Fixed a small number of files that had no copyright date using the
  initial commit year from the version control history.
- Fixed one instance of copyright being "The ANGLE Project" rather than
  "The ANGLE Project Authors"

These changes are applied both to the copyright of source file, and
where applicable to copyright statements that are generated by
templates.

BUG=angleproject:3811

Change-Id: I973dd65e4ef9deeba232d5be74c768256a0eb2e5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1754397
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2019-08-14 23:05:33 +00:00
Jamie Madill ee21a18734 Store angle::Format in gl::VertexAttribute.
Instead of storing type/size/normalized/pureInteger we instead store a
pointer to the angle::Format. This makes some code logic simpler and
will let us more easily check if a vertex attribute format changes in
calls to VertexAttribPointer or VertexAttribFormat.

This CL adds extra information to angle::Format to represent the vertex
format info needed. It also caches the channel count so that it can be
queried faster.

Also renames "Int" -> "Sint" in UtilsVk for consistency.

Bug: angleproject:3256
Change-Id: I5ef9b983dad8a58c341113c802500b89ce081566
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1684293
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Jonah Ryan-Davis <[email protected]>
2019-07-04 14:11:46 +00:00
Geoff Lang 857880e5b8 GL: Add extensions to enable hardware video decode on Android.
The Android SurfaceTexture API has to be initialized with a texture id
which Chrome has to query from an ANGLE external texture. It also
rebinds and sets the texture dimensions on calls to
SurfaceTexture.updateTexImage so ANGLE must be notified about these
changes so that state tracking and validation continue to function.

BUG=967410

Change-Id: I92e9077f75835b088da3a8caffb3ff40e9ad0361
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1630293
Commit-Queue: Geoff Lang <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2019-06-18 21:10:07 +00:00
Jamie Madill 124f78c2ff Remove gl::Context parameter from Observer functions.
It was only used in exactly one instance in VertexArray. Instead we can
cache a bool and avoid needing to pass it around.

Will make signaling dirty easier in the Vulkan back-end.

Bug: angleproject:3539
Change-Id: Ia570aec051a24a5280df49edc4345c54022b46ec
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1663838
Reviewed-by: Jonah Ryan-Davis <[email protected]>
Reviewed-by: Shahbaz Youssefi <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2019-06-18 18:06:17 +00:00
Jamie Madill e4faae213d Rename state change notification messages.
This makes the style use CamelCase instead of ALL_CAPS. It also cleans
up some of the naming. It also changes some uses of the messages in
some of the objects to hopefully be more consistent. See the comments
added to the enum SubjectMessage in Observer.h for more details.

Bug: angleproject:3427
Change-Id: I6dff4f6d335ecf1a27e48df65743b1490bd3025a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1600411
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2019-05-10 15:08:22 +00:00
Tim Van Patten e76c5c3c32 Vulkan: Enable drawRangeElements()
Enable drawRangeElements() for the Vulkan backend and the associated
tests.

Test: angle_deqp_gles3_tests
Bug: angleproject:3420
Change-Id: I98770631ce1387131bb45e2c1e9df24e911bc692
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1595101
Commit-Queue: Tim Van Patten <[email protected]>
Reviewed-by: Shahbaz Youssefi <[email protected]>
2019-05-07 15:54:23 +00:00
Geoff Lang fb6fbdbc58 Return that polling queries have completed after context loss.
KHR_robustness says that certain queries that poll such as GetSynciv with
SYNC_STATUS should still generate errors after context loss but also return
that the result is available.

BUG=angleproject:3379

Change-Id: Ibf61f8481bc7c3d1b4fa8979dc404d0ca3952fcd
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1566142
Commit-Queue: Geoff Lang <[email protected]>
Reviewed-by: Kenneth Russell <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2019-04-25 16:13:34 +00:00
Mingyu Hu 7d64c4863d GL_ANGLE_multiview has been renamed to GL_OVR_multiview2.
changes include:
1) GL_OVR_multiview to GL_OVR_multiview2 extension directive change
2) Removal of all references to side by side. We no longer support multiple views in a single 2DTexture. Only 2DTextureArray's are supported
3) WebGL 2 (ES3) is required for multiview

Bug: angleproject:3341
Change-Id: Ie0c1d21d7610f8feebdb2e4d01c6947f57e69328
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1552023
Commit-Queue: Rafael Cintron <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2019-04-16 17:37:10 +00:00
James Darpinian 5fd08af41f Sampler state overrides texture state if set
The new validation added in http://crbug.com/809237 failed to consider
that sampler object state overrides texture object state if a sampler
object is bound. State caching makes this complicated to fix.

Fixes WebGL conformance test incompatible-texture-type-for-sampler.html
https://github.com/KhronosGroup/WebGL/pull/2823

Bug: 940080, 809237
Change-Id: I26b0fb35c5630c36248edae80f0298a0cb7e14b8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1522364
Commit-Queue: James Darpinian <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2019-03-28 02:33:51 +00:00
Ian Elliott 3d6e3004f0 Implement EGL_ANDROID_recordable for Vulkan back-end.
This initial implementation provides the extension, and always answers
that the ANativeWindow is not recordable.

BUG=angleproject:2511

Change-Id: Id3c57351dd1029bff7adf7166f9c82eee6e634b3
Reviewed-on: https://chromium-review.googlesource.com/c/1412507
Commit-Queue: Ian Elliott <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2019-02-02 00:22:48 +00:00
Shahbaz Youssefi 5313c8a899 Implement EGL_KHR_fence_sync and EGL_KHR_wait_sync
EGL_KHR_fence_sync introduces the EGLSync object and associated
create/destroy/clientWait functions.  EGL_KHR_wait_sync adds the
serverWait function on top of that.

Bug: angleproject:2466
Change-Id: Iebb239a85c4471ea18b3c3a8a83b793af555e31d
Reviewed-on: https://chromium-review.googlesource.com/c/1412261
Commit-Queue: Shahbaz Youssefi <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2019-01-23 04:12:20 +00:00
Jamie Madill dd34b3b9b7 Pack VertexAttribType enum.
This improves performance slightly in vertex array format checks.
Instead of needing to switch on GLenum values we can use packed arrays
and tables to determine the values we need.

Does not significantly affect performance but will enable future work.

Bug: angleproject:3074
Change-Id: I6f4821a463e9b41fe3f8c8967eb3ed4c1d6b84be
Reviewed-on: https://chromium-review.googlesource.com/c/1393903
Reviewed-by: Shahbaz Youssefi <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2019-01-16 18:25:16 +00:00
Jamie Madill 7c985f5c4f Make angle::Result an enum.
This moves away from a class type to a value type. This should improve
performance when using angle::Result as a return value. Previously the
generated code would return a pointer instead of a value.

Improves performance in the most targeted microbenchmark by 10%. In
more realistic scanarios it will have a smaller improvement. Also
simplifies the class implementation and usage.

Includes some unrelated code generation changes.

Bug: angleproject:2491
Change-Id: Ifcf86870bf1c00a2f73c39ea6e4f05ca705050aa
Reviewed-on: https://chromium-review.googlesource.com/c/1356139
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2018-12-07 04:59:23 +00:00
Jamie Madill e3e680ca47 Remove State::syncProgramTextures.
Removes the concept of the program textures dirty object. Instead we
use a set of dirty bits to represent dirty texture samples. We mark
certain textures dirty and update state structures whenever there is
a new Texture/Program/Sampler bound, or when Texture/Program/Sampler
state changes.

This is in preparation for making clearing the uncleared active
textures into a dirty bit as well.

Also includes new dirty bit handling for texture image units. These are
a GLES 3.1 feature.

Bug: angleproject:2966
Change-Id: Ibb8619dd2669bb39fdbcd75e3685be9a8aeeee91
Reviewed-on: https://chromium-review.googlesource.com/c/1346649
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Shahbaz Youssefi <[email protected]>
2018-12-04 00:23:05 +00:00
Jamie Madill 4f6592fa4c Remove gl::Error.
Removes several TODOs. Only egl::Error remains.

Also slightly decreases binary size.

Bug: angleproject:2491
Change-Id: I3a9d1c22eb0884ca9e37362463fddd0083faf826
Reviewed-on: https://chromium-review.googlesource.com/c/1337462
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Yuly Novikov <[email protected]>
2018-11-28 00:59:29 +00:00
Geoff Lang 6ba22ee137 GL: Implement EGL_ANDROID_get_frame_timestamps.
BUG=angleproject:2936

Change-Id: I758d797d185b2de330cce3401bfeef76c7df590e
Reviewed-on: https://chromium-review.googlesource.com/c/1302836
Commit-Queue: Geoff Lang <[email protected]>
Reviewed-by: Yuly Novikov <[email protected]>
2018-11-02 16:43:05 +00:00
Till Rathmann b854363004 Support GL_OES_texture_border_clamp
Added support for GL_TEXTURE_BORDER_COLOR and GL_CLAMP_TO_BORDER in
OpenGL/OpenGLES, Direct3D9 and Direct3D11 backends.
For integer textures in OpenGLES3 contexts these additional entry points
are available now:

void glTexParameterIivOES(enum target, enum pname, const int *params);
void glTexParameterIuivOES(enum target, enum pname, const uint *params);

void glGetTexParameterIivOES(enum target, enum pname, int *params);
void glGetTexParameterIuivOES(enum target, enum pname, uint *params);

void glSamplerParameterIivOES(uint sampler, enum pname, const int *params);
void glSamplerParameterIuivOES(uint sampler, enum pname, const uint *params);

void glGetSamplerParameterIivOES(uint sampler, enum pname, int *params);
void glGetSamplerParameterIuivOES(uint sampler, enum pname, uint *params);

BUG=angleproject:2890
TEST=angle_end2end_tests.TextureBorderClamp*

Change-Id: Iee3eeb399d8d7851b3b30694ad8f21a2111f5828
Reviewed-on: https://chromium-review.googlesource.com/c/1257824
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2018-10-26 18:45:54 +00:00
Jamie Madill f4a789f98d Use angle::Result in front-end (Part 6)
Refactors the gl::Program, gl::Compiler and gl::Query classes.

Bug: angleproject:2491
Change-Id: I96acecdc6af301a89201bd7f5222a180433e5eb2
Reviewed-on: https://chromium-review.googlesource.com/c/1289711
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2018-10-19 21:46:06 +00:00
Joonatan Saarhelo bbd532d164 Fix querying large vertex attrib divisors
glGetVertexAttribIuiv previously returned an incorrect value
for GL_VERTEX_ATTRIB_ARRAY_DIVISOR, because the divisor was
treated as an integer even though it is an unsigned integer.

BUG=angleproject:2281

Change-Id: I4d1c9df15244db855c6a000fc8fb6cc786bfcb85
Reviewed-on: https://chromium-review.googlesource.com/c/1273300
Reviewed-by: Geoff Lang <[email protected]>
Commit-Queue: Geoff Lang <[email protected]>
2018-10-15 17:01:17 +00:00
Geoff Lang 79b914075c Add an extension for querying esimated GPU memory size of resources.
BUG=892288

Change-Id: I56fc3ab00c06d711e1a21eb1ad4b2224126730dc
Reviewed-on: https://chromium-review.googlesource.com/c/1262021
Reviewed-by: Yuly Novikov <[email protected]>
Reviewed-by: Shahbaz Youssefi <[email protected]>
Commit-Queue: Geoff Lang <[email protected]>
2018-10-12 20:04:34 +00:00
Olli Etuaho 0ca0975339 Add GLES3 support for EXT_blend_func_extended
This adds GLES3 API support for EXT_blend_func_extended. The patch
includes the API entrypoints, validation and also implementation on
the desktop GL backend.

Instead of having built-in fragment color variables, ESSL 3.00 has
custom output variables, which can now be bound to either primary or
secondary output color locations. The "index" set to a custom output
variable determines whether it's used a primary or secondary blending
source color.

The shader layout qualifier takes precedence over the bind call. This
is not specified in the EXT spec, but is specified in desktop OpenGL
specs.

BUG=angleproject:1085
TEST=angle_end2end_tests

Change-Id: Ia24e8e5dadcc165e5e8fbd7c653c7fab6217db88
Reviewed-on: https://chromium-review.googlesource.com/c/1249361
Commit-Queue: Olli Etuaho <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2018-10-05 09:12:42 +00:00
Jamie Madill e25b800611 Move sampler sync out of syncProgramTextures.
We only need to call the syncState for samplers when they are dirty.
Also includes changes to refactor out the sampler sync in GL. Adds
observer bindings so sampler sync is handled correctly in resource
sharing scenarios.

Bug: angleproject:2763
Change-Id: I762f0738ee7572ae29ce6bd5384a30aa9588c848
Reviewed-on: https://chromium-review.googlesource.com/1227797
Reviewed-by: Shahbaz Youssefi <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2018-09-21 05:32:45 +00:00
jchen10 a155bacf99 ParallelCompile: Parallelize shader translation
This changes to construct a new ShHandle of compiler for each Shader,
and use it to translate the shader source in a background thread.

Bug: chromium:849576

Change-Id: Ib49952c7292321ee6aa1c5996f8f7927f40d8f04
Reviewed-on: https://chromium-review.googlesource.com/1177195
Commit-Queue: Jie A Chen <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2018-09-19 00:49:23 +00:00
Jamie Madill 097d3c0cb1 Make SamplerState a contained class.
This will more easily allow us to use a cached completeness comparison
value. The cached value only gets updated on certain setters.

Bug: angleproject:2763
Change-Id: Ib80db8517560617087ae8360f7af69d6c2392b76
Reviewed-on: https://chromium-review.googlesource.com/1171507
Reviewed-by: Shahbaz Youssefi <[email protected]>
Reviewed-by: Frank Henigman <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2018-09-13 22:00:20 +00:00
Shahbaz Youssefi c14ab2a7aa Fix dEQP_GLES3.functional.negative_api.shader.program_binary
The frontend was not taking into account the fact that some drivers do
not support program binaries.  The fix is that now

    glGetProgramiv(GL_PROGRAM_BINARY_LENGTH)

returns 0 under such circumstances.

Bug: angleproject:2780

Change-Id: I4ea2cda6bb4612e69dbd7e00b3d43b97ee3b3c3d
Reviewed-on: https://chromium-review.googlesource.com/1188768
Reviewed-by: Geoff Lang <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Shahbaz Youssefi <[email protected]>
2018-08-27 15:39:56 +00:00
Lingfeng Yang 6e5bf36ff5 GLES1: Fixes for Gets() test
- Fixed wrong face parameter for glGetMaterial*.
- Enabled GL_LINE_SMOOTH capability in state only (no rendering yet)
- Enabled logical operation capability in state only (no rendering yet)
- Fixed wrong handling of GL_RGB/ALPHA_SCALE and
GL_POINT_COORD_REPLACE_OES

Test: Enable and pass Gets() GLES1 conformance test

BUG=angleproject:2306

Change-Id: Ib5c50a2055129b76ad24053baf0dac24dcc00761
Reviewed-on: https://chromium-review.googlesource.com/1176161
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Lingfeng Yang <[email protected]>
2018-08-16 15:43:07 +00:00
jchen10 3fd614d06e Refactor Context dependency for resolveCompile
The context parameter of Shader::resolveCompile method causes a bad
impact that many methods in Shader, Program etc. have to have a same
context parameter. By removing it, these methods can be decoupled
from Context.

BUG=chromium:849576

Change-Id: Ia5545ee9dce45794550f6086bc0e6c4707e1276e
Reviewed-on: https://chromium-review.googlesource.com/1172202
Commit-Queue: Jie A Chen <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2018-08-16 02:29:46 +00:00
jchen10 7ae70d8fb3 ParallelCompile: Parallelize D3D linking
This adds a new linking state to Program. If a Program is in linking
state, on the one hand the foreground thread may continue issuing more
GL calls, and on the other hand the background linking threads may be
accessing Program internally too. Without a proper constraint there
must be conflicts between them. For this purpose, we block any further
GL calls to Program until it's actually linked. In addition, we
prohibit parallel linking an active program, so that ProgramD3D does
not have to worry about such similar conflicts.

Also changes the WorkerThread to support limiting the number of
concurrently running worker threads.

BUG=chromium:849576

Change-Id: I52618647539323f8bf27201320bdf7301c4982e6
Reviewed-on: https://chromium-review.googlesource.com/1127495
Commit-Queue: Jie A Chen <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2018-08-11 10:48:43 +00:00
Jamie Madill b983a4b28b Pass Context to Framebuffer::invalidateCompletenessCache.
This will be useful for validation state caching.

Bug: angleproject:2747
Change-Id: I0737adca7406f79b9e15429f30ae22e1299cd7e4
Reviewed-on: https://chromium-review.googlesource.com/1158611
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Frank Henigman <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2018-08-07 13:11:21 +00:00
LRN 03d132eb80 Support EGL_(WIDTH|HEIGHT) in eglSurfaceAttrib(), fixed resize
Setting EGL_WIDTH or EGL_HEIGHT results in mFixedWidth and mFixedHeight
changing their values.

Whenever the swap chain is tested for needing a resize, surfaces with
mFixedSize are treated as if they should be resized to mFixedWidth and
mFixedHeight from their current size. This way fixed-size surfaces
can be resized - it's enough to do a couple of eglSurfaceAttrib() calls
and then either let ANGLE check surface for needing a resize in due course,
or force that by calling eglWaitNative().

BUG=angleproject:2725

Change-Id: I2932d8ecd5a2f10500e4aa8583a169aa09bf01bb
Reviewed-on: https://chromium-review.googlesource.com/1139055
Commit-Queue: Geoff Lang <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2018-07-27 18:31:28 +00:00
Jamie Madill a0691b77c3 Pass Context to Fence Impl methods.
This is needed for the error refactoring and also for the Vulkan
implementation.

Bug: angleproject:2738
Change-Id: I4e1bed7f67ef17feb5554b5838a2ed5feb22bba0
Reviewed-on: https://chromium-review.googlesource.com/1150091
Reviewed-by: Yuly Novikov <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2018-07-25 16:50:06 +00:00
Lingfeng Yang f97641c1e3 GLES1: Texture parameters
Note: minimum buffer size is now checked for texture parameters in
GLES2.

- Mipmap generation hint
- Crop rect
- Update test expectations

BUG=angleproject:2306

Change-Id: Ib459b8191111732a1326b44f2226b72ca297325a
Reviewed-on: https://chromium-review.googlesource.com/1111575
Reviewed-by: Geoff Lang <[email protected]>
Commit-Queue: Lingfeng Yang <[email protected]>
2018-06-27 19:44:44 +00:00
Lingfeng Yang 9c4c0926ac Reland "GLES1: Point rasterization (partial implementation)"
This is a reland of 4004ae0e03

Fix: Put the missing early-out in ValidatePointParameterCommon

Original change's description:
> GLES1: Point rasterization (partial implementation)
>
> - Not included: Smooth points
>
> - GL_OES_point_sprite
> - Update test expectations. Note: due to different random sampling,
> edge cases were hit in UserClip. Disabling that test for now.
>
> BUG=angleproject:2306
>
> Change-Id: If8367bc3321804b3299d3bc381d6a8e236754baa
> Reviewed-on: https://chromium-review.googlesource.com/1101910
> Reviewed-by: Corentin Wallez <[email protected]>
> Commit-Queue: Lingfeng Yang <[email protected]>

Bug: angleproject:2306
Change-Id: Id8e71352a77ff0ce71cb604965effbfb8aca613e
Reviewed-on: https://chromium-review.googlesource.com/1108458
Reviewed-by: Corentin Wallez <[email protected]>
Commit-Queue: Lingfeng Yang <[email protected]>
2018-06-20 19:42:32 +00:00
Frank Henigman a58d69e90b Revert "GLES1: Point rasterization (partial implementation)"
This reverts commit 4004ae0e03.

Crash in PointParameterTest.NegativeEnum/ES1_OPENGL.
https://ci.chromium.org/p/chromium/builders/luci.chromium.ci/Mac%20FYI%20GPU%20ASAN%20Release/1178
angle_end2end_tests on Intel GPU on Mac on Mac-10.12.6 
angle_end2end_tests on ATI GPU on Mac Retina on Mac-10.12.6

Original change's description:
> GLES1: Point rasterization (partial implementation)
> 
> - Not included: Smooth points
> 
> - GL_OES_point_sprite
> - Update test expectations. Note: due to different random sampling,
> edge cases were hit in UserClip. Disabling that test for now.
> 
> BUG=angleproject:2306
> 
> Change-Id: If8367bc3321804b3299d3bc381d6a8e236754baa
> Reviewed-on: https://chromium-review.googlesource.com/1101910
> Reviewed-by: Corentin Wallez <[email protected]>
> Commit-Queue: Lingfeng Yang <[email protected]>

[email protected],[email protected],[email protected],[email protected]

Change-Id: I776ce0506d349382b3af035c962aa2c3f6826b99
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: angleproject:2306
Bug: angleproject:2680
Reviewed-on: https://chromium-review.googlesource.com/1108457
Reviewed-by: Frank Henigman <[email protected]>
Reviewed-by: Lingfeng Yang <[email protected]>
Commit-Queue: Frank Henigman <[email protected]>
2018-06-20 18:12:00 +00:00
Lingfeng Yang 4004ae0e03 GLES1: Point rasterization (partial implementation)
- Not included: Smooth points

- GL_OES_point_sprite
- Update test expectations. Note: due to different random sampling,
edge cases were hit in UserClip. Disabling that test for now.

BUG=angleproject:2306

Change-Id: If8367bc3321804b3299d3bc381d6a8e236754baa
Reviewed-on: https://chromium-review.googlesource.com/1101910
Reviewed-by: Corentin Wallez <[email protected]>
Commit-Queue: Lingfeng Yang <[email protected]>
2018-06-19 21:26:41 +00:00
Jiawei Shao a880247775 ES31: Implement FramebufferTextureEXT on OpenGL back-ends
This patch intends to implement FramebufferTextureEXT on OpenGL
back-ends.
1. Support layered framebuffer attachments.
2. Add new framebuffer completeness rules on layered framebuffer
   attachments.
3. Support FRAMEBUFFER_ATTACHMENT_LAYERED_EXT as a valid <pname>
   parameter of GetFramebufferAttachmentParameteriv.

Note that for an entire level of a cube map:
1. It has no TextureTarget because TEXTURE_CUBE is not a valid
   target for TexImage*D.
2. It corresponds to 6 ImageDescs (that represents its faces) in
   class Texture, so when the cube map is cube complete, we return
   the ImageDesc of its first face, meanwhile we do not allow
   querying ImageDesc if it is not cube complete.

BUG=angleproject:1941
TEST=angle_end2end_tests
     dEQP-GLES31.functional.geometry_shading.query.framebuffer_attachment_layers
     dEQP-GLES31.functional.geometry_shading.query.framebuffer_incomplete_layer_targets
     dEQP-GLES31.functional.geometry_shading.layered.*
     dEQP-GLES31.functional.geometry_shading.instanced.invocation_per_layer_*
     dEQP-GLES31.functional.geometry_shading.instanced.multiple_layers_per_invocation_*

Change-Id: I44393b513ec8f1a682fd1c47d3eaa6f3b3fae877
Reviewed-on: https://chromium-review.googlesource.com/1075811
Commit-Queue: Jiawei Shao <[email protected]>
Reviewed-by: Corentin Wallez <[email protected]>
2018-06-12 02:06:20 +00:00