Commit Graph
263 Commits
Author SHA1 Message Date
Alexis Hetu 9819e9ed7b GL_EXT_read_format_bgra support
Implemented DetermineBGRAReadFormatSupport in order to allow enabling
readFormat when possible with the Vulkan backend.

While reading the spec, I realized that ANGLE only seems to care
about BGRA8888 and not the new types mentioned in the extension.
Logged a new issue (http://anglebug.com/4302) to track this.

Bug: angleproject:4294
Change-Id: I071ed89574de9b4088df2301c317d3769cb31ce6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2003237
Commit-Queue: Alexis Hétu <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2020-01-17 05:43:19 +00:00
Alexis Hetu eb06bc2439 GL_EXT_float_blend support
DetermineFloatBlendSupport was added to be able to set floatBlend to
true if requirements are met. Essentially GL_EXT_float_blend complements
GL_EXT_color_buffer_float by making any non-blendable formats blendable.

Bug: angleproject:4291
Change-Id: I40d6bb7a93b8847a63de2d25c6a8dc411d6d8fbb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2001479
Commit-Queue: Alexis Hétu <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2020-01-17 04:54:39 +00:00
Alexis Hetu 41f6150edb Stubs for new required extensions
Added stubs for these soon to be added extensions:
- GL_OES_depth_texture_cube_map
- GL_EXT_read_format_bgra
- GL_NV_depth_buffer_float2
- GL_NV_read_depth
- GL_NV_read_stencil

Bug: angleproject:4293
Bug: angleproject:4294
Bug: angleproject:4295
Change-Id: I56cf1fda377e48521f30bd11f5776409bfb88701
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2001480
Commit-Queue: Alexis Hétu <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2020-01-17 00:35:26 +00:00
Alexis Hetu e0a28ba4cf Add blendable checks to GL_EXT_color_buffer_float
The GL_EXT_color_buffer_float spec
https://www.khronos.org/registry/OpenGL/extensions/EXT/EXT_color_buffer_float.txt
mentions that some of the formats must be blendable:
"Blending applies only if the color buffer has a fixed-point or
 floating-point format. If the color buffer has an integer format,
 proceed to the next operation. Furthermore, an INVALID_OPERATION
 error is generated by DrawArrays and the other drawing commands
 defined in section 2.8.3 (10.5 in ES 3.1) if blending is enabled
 and any draw buffer has 32-bit floating-point format components."

So any non 32-bit floating-point must be blendable.

Bug: angleproject:4291
Change-Id: I850fb13b71e4ad03fd07e2a265896c9106bc0ce1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2001478
Commit-Queue: Alexis Hétu <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2020-01-16 23:56:03 +00:00
Alexis Hetu d151b4592b Blendable check
- Added a blendable check to InternalFormat
- Set the blendable check to the same as the Renderbuffer check for
  most formats, except true integer formats and 32F formats
- True integer formats never support blending
- 32F formats support blending based on the GL_EXT_float_blend

Bug: angleproject:4291
Change-Id: Icffdd3e6d8791303bdfdad9ec01cfd9a1d511af0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1999495
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Commit-Queue: Alexis Hétu <[email protected]>
2020-01-16 21:08:50 +00:00
Alexis Hetu ddb99f2186 Support blendable capability
Vulkan distinguishes between a texture format that can be used as a
render target (VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT) and one that
supports blending (VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT).
This cl adds a blendable capability and sets it based on the
appropriate bit. It also adds the check in GetFormatSupportBase(),
but all uses of it are currently set to false.

In terms of behavior, this cl should be noop.

Bug: angleproject:4291
Change-Id: Ib151ac8ab7b69311b7fdef15ad87186d13e3ed78
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1999494
Commit-Queue: Alexis Hétu <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2020-01-16 17:25:41 +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
Mohan Maiya 942d91520a EGL: Add support for EGL_KHR_gl_colorspace extension
If the Vulkan backend supports VK_EXT_swapchain_colorspace extension,
enable the option for applications to create surfaces with non-linear
formats. Not all formats have non-linear versions and is platform
specific.

Tests: dEQP-EGL.functional.wide_color.*
       angle_deqp_egl_tests --use-angle=vulkan --deqp-gl-context-type=egl --deqp-case=dEQP-EGL.functional.wide_color.*
Bug: angleproject:2514
Change-Id: I441ee797cceef92c84473bfa18605c4fd8180de1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1951963
Commit-Queue: Mohan Maiya <[email protected]>
Reviewed-by: Courtney Goeltzenleuchter <[email protected]>
Reviewed-by: Shahbaz Youssefi <[email protected]>
Reviewed-by: Cody Northrop <[email protected]>
2019-12-30 23:45:18 +00:00
Yan 17b3c2f3f8 Implement SamplerVideoWEBGL for WEBGL_video_texture extension on desktop
WEBGL_video_texture is an extension that will improve uploading video frame to WebGL performance.
(https://www.khronos.org/registry/webgl/extensions/proposals/WEBGL_video_texture/)

This extension introduced a new texture type TEXTURE_VIDEO_IMAGE_WEBGL and a new sampler type
samplerVideoWEBGL to sample it.

In chromium implementation, TEXTURE_VIDEO_IMAGE_WEBGL maps to different native texture type
based on platform. On desktop, it maps to GL_TEXTURE2D(Currently supported). On Android, it
should map to GL_TEXTURE_EXTERNAL(TODO). SamplerVideoWEBGL needs to be mapped to sampler2D or
samplerExternalOES according to TEXTURE_VIDEO_IMAGE_WEBGL implementation.

This patch implements samplerVideoWEBGL in Angle to support WEBGL_video_texture on desktop. In
this case, samplerVideoWEBGL should map to sampler2D.

Bug: chromium:776222, angleproject:3889
Change-Id: Idb0a5fcde37ca75ccc1181226b91f257212e7500
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1866274
Commit-Queue: Shahbaz Youssefi <[email protected]>
Reviewed-by: Shahbaz Youssefi <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2019-12-18 16:49:26 +00:00
Shahbaz Youssefi 795a355921 Vulkan: EXT_gpu_shader5 support: precise
The precise keyword is used in tessellation shaders but introduced in
this extension.

EXT_gpu_shader5 introduces a handful of features to shaders.  This
change only implements the `precise` keyword.

Bug: angleproject:3569
Change-Id: I2252b79098eb8ba2d2faa040d7eaed7548b7051e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1939851
Commit-Queue: Shahbaz Youssefi <[email protected]>
Reviewed-by: Cody Northrop <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2019-12-05 20:20:07 +00:00
Tom Anderson 5f3456e331 Expose GL_ARB_sync for GL
BUG=chromium:1028799
R=jonahr
CC=vasilyt

Change-Id: Id17c4061b206953b1e904bf7938cb371612e33fd
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1948534
Reviewed-by: Jonah Ryan-Davis <[email protected]>
Commit-Queue: Jonah Ryan-Davis <[email protected]>
2019-12-04 18:00:50 +00:00
Geoff Lang e4ac2ff3f6 GL: Make GL_EXT_texture_format_BGRA8888 enableable.
Disable returning BGRA as an implementation read format unless
GL_EXT_texture_format_BGRA8888 is exposed.  WebGL doesn't support this extension
and returning BGRA as an implementation read format is invalid.

TEST=functional/gles3/negativebufferapi.html
TEST=functional/gles3/integerstatequery.html

BUG=angleproject:4179

Change-Id: I313721f09da0e455128b88b129bd34338d47af73
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1943407
Reviewed-by: James Darpinian <[email protected]>
Reviewed-by: Jonah Ryan-Davis <[email protected]>
Commit-Queue: Geoff Lang <[email protected]>
2019-12-03 15:16:52 +00:00
Ethan Lee a825eb70cc Implement BaseVertex draw calls for Vulkan, OpenGL, NULL contexts.
This adds support for the following functions:

- glDrawElementsBaseVertex
- glDrawRangeElementsBaseVertex
- glDrawElementsInstancedBaseVertex

Bug: angleproject:3582
Bug: angleproject:3402
Bug: angleproject:4166
Change-Id: I83770f62e3a918c0965fd4ca8c7d9e598b8b4154
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1929083
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2019-11-25 21:27:58 +00:00
Jonah Ryan-Davis a829c0b93d Expose EGL_CHROMIUM_sync_control via GLX_OML_sync_control
On GLX, we can expose the EGL_CHROMIUM_sync_control extension by
forwarding to GLX_OML_sync_control when it's available. This will help
with accurate vsync times for Chrome

Bug: 1020252
Change-Id: I9b1e8cf0f8b1a548cc7cc7202fac2d0cdb01d74d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1918104
Commit-Queue: Jonah Ryan-Davis <[email protected]>
Reviewed-by: Corentin Wallez <[email protected]>
2019-11-15 22:09:01 +00:00
shrekshao e33c1582b4 Fix EXT_texture_norm16
* Add norm16 format info for OpenGL backend
* Add validation for newly introduced norm16 formats
* Fix some logic of texture tests

Bug: chromium:1000354, angleproject:1365
Change-Id: Ie6d6e5e276da4df4b7c667be28d324d4976b35ec
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1902720
Reviewed-by: Geoff Lang <[email protected]>
Reviewed-by: Shrek Shao <[email protected]>
Commit-Queue: Shrek Shao <[email protected]>
2019-11-11 19:56:01 +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
Jamie Madill 68945f1c27 Enable "-Wredundant-parens".
This one is also required by Skia. It's purely for consistency and
code readability.

Bug: angleproject:4046
Change-Id: I9ed418a0bf6c7661f0970fef6da7088ca6ae6204
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1877478
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2019-10-25 00:26:01 +00:00
James Darpinian c42da4e57c Extend ANGLE_request_extension with DisableExtension
ARB_texture_rectangle is the only currently supported disablable
extension. This allows us to use ARB_texture_rectangle in WebGL
implementations without exposing it to WebGL user shaders.

Bug: angleproject:3956
Bug: angleproject:3770
Change-Id: I80b10d2e9c9feebe545ce15195721487165ecc51
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1838418
Commit-Queue: James Darpinian <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2019-10-12 00:42:21 +00:00
Tim Van Patten d37992d121 Vulkan: Prevent Creating ES 3.0 Context if Min. Caps. Not Met
ANGLE should not allow creating an ES 3.0 context if the device's
maxPerStageDescriptorUniformBuffers or maxVertexOutputComponents
values are too low to support the necessary minimums for GLES 3.0.

Bug: angleproject:3938
Test: CQ
Change-Id: I4fce841d1f364c1aef1a883fa5edb64a4b93f08e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1841971
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Commit-Queue: Tim Van Patten <[email protected]>
2019-10-11 01:17:15 +00:00
Le Quyen 6e65398161 Added PVRTC compression extension needed for Metal on iOS.
Bug: angleproject:2634
Change-Id: I413f754fe5551b1e248bc2b824b327b92d8c70f9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1849076
Commit-Queue: Geoff Lang <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2019-10-10 15:17:38 +00:00
Nathan Zabriskie 5d9c4ee328 Add D3D11on12 device option
This CL adds a new D3D11on12 device option which runs the D3D11
API on top of D3D12. This is done to aid in preliminary
investigations into the feasibility of creating a full D3D12
backend implementation.

Bug: angleproject:3919
Change-Id: I0ad4250eb3c93b0b74274c904aac74f03753c7ad
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1814404
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2019-10-10 02:07:39 +00:00
Geoff Lang d0cf5579fe Make sure all extension strings start with GL_
BUG=angleproject:3974

Change-Id: I01bb5e6f7dec800ac36464a7d64c26998a0b087f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1845473
Commit-Queue: Geoff Lang <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2019-10-09 17:55:32 +00:00
Jamie Madill 09495f87d9 Add ANGLE Platform Metal extension.
EGL_ANGLE_platform_angle_metal is the new extension name.

Bug: angleproject:2634
Change-Id: I6ebffbd4f6d7974bc5ef6d48849e985ee83e9808
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1848793
Reviewed-by: Le Hoang Quyen <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2019-10-09 15:41:52 +00:00
Kenneth Russell 8e7d9d6c23 Add EGL_ANGLE_device_cgl extension.
Supports querying the CGLContextObj and CGLPixelFormatObj associated
with ANGLE's underlying OpenGL context on macOS.

Minor refactorings to implementation of device attribute queries on
all platforms.

Bug: angleproject:3973
Change-Id: I24341668be4cbfed0b7f2df4c1402df1effe275e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1846733
Commit-Queue: Kenneth Russell <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2019-10-09 03:45:28 +00:00
Kenneth Russell d01ae535b3 (ANGLE) Rename CHROMIUM_compressed_texture_etc to use ANGLE_ prefix.
This is the ANGLE side of a two-sided patch including Chromium to
rename this synthetic OpenGL extension to use an ANGLE_ prefix.

Bug: chromium:1011653
Change-Id: Ice4b526a34157ebbd8c283aacc9437fae2e35d6e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1843506
Reviewed-by: Geoff Lang <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Kenneth Russell <[email protected]>
2019-10-08 18:19:23 +00:00
Mohan Maiya 1850492e30 Vulkan: Disable OES_vertex_type_10_10_10_2 on GLES 2.0
- Because of the difference in the SNORM to FLOAT conversion formula
  between GLES 2.0 and 3.0, OES_vertex_type_10_10_10_2 is disabled
  when the context version is lower than 3.0.
- Modify test conversion formula to be compliant with GLES 3.0 equation

Bug: angleproject:3868
Test: angle_end2end_tests --gtest_filter=VertexAttributeTest*Packed*Vulkan
Change-Id: I8b85d8146ee05353bc40fa0022f05d6634c33110
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1792197
Commit-Queue: Mohan Maiya <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2019-10-03 15:17:39 +00:00
Jamie Madill 8be7a4c7f7 Re-land "Vulkan: SwiftShader integration."
Re-land fixes Win7 configs and placement of the SwiftShader module for
ASAN/TSAN configs.

Adds a new EGL extension for picking SwiftShader when using the Vulkan
back-end. Also cleans up ICD enabling code RendererVk. Also includes a
change to a buffer size necessary to support SwiftShader's minimum
limits.

Bug: angleproject:3876
Bug: b/140251624
Change-Id: I5e16057ac4de07bbdbbd248542b1b9103133294f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1810065
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2019-09-21 14:00:27 +00:00
Mohan Maiya fea6576678 Vulkan: Add support for OES_vertex_type_10_10_10_2
- Add support to CPU/GPU convert vertex formats
- Add test cases for type conversion in angle_end2end_tests
- Fix a bug in shader script by adding a ceil when calculating bytes

Bug: angleproject:3192
Test: angle_end2end_tests --gtest_filter=VertexAttributeTest*Packed1010102*
Change-Id: I57bab9fc1c1041cd734746d0e52a33717b635ec0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1788495
Reviewed-by: Geoff Lang <[email protected]>
Commit-Queue: Mohan Maiya <[email protected]>
2019-09-19 19:27:53 +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 db7a36f456 Revert "Vulkan: SwiftShader integration."
This reverts commit 1224802c21.

Reason for revert: https://bugs.chromium.org/p/angleproject/issues/detail?id=3912

Original change's description:
> Vulkan: SwiftShader integration.
> 
> Adds a new EGL extension for picking SwiftShader when using the Vulkan
> back-end. Also cleans up ICD enabling code RendererVk. Also includes a
> change to a buffer size necessary to support SwiftShader's minimum
> limits.
> 
> 32-bit is currently left disabled to work around an issue on AMD Win7.
> 
> Bug: angleproject:3876
> Bug: b/140251624
> Change-Id: I33c55d994801d6154caca0cad0a608c1e808d517
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1776231
> Commit-Queue: Jamie Madill <[email protected]>
> Reviewed-by: Geoff Lang <[email protected]>

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

Change-Id: Id7464250f6941b0228a6b2a9bd0349823727275b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: angleproject:3876, b/140251624
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1808101
Reviewed-by: Zhenyao Mo <[email protected]>
Commit-Queue: Zhenyao Mo <[email protected]>
2019-09-17 00:22:43 +00:00
Jamie Madill 1224802c21 Vulkan: SwiftShader integration.
Adds a new EGL extension for picking SwiftShader when using the Vulkan
back-end. Also cleans up ICD enabling code RendererVk. Also includes a
change to a buffer size necessary to support SwiftShader's minimum
limits.

32-bit is currently left disabled to work around an issue on AMD Win7.

Bug: angleproject:3876
Bug: b/140251624
Change-Id: I33c55d994801d6154caca0cad0a608c1e808d517
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1776231
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2019-09-16 20:52:55 +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
Mohan Maiya 6caa265261 Vulkan: Support float textures and renderbuffers
Fixed support in the vulkan backend for legacy
GLES2.0 formats (luminance, alpha,
luminance_alpha)

Correctly exposed the following extensions:
OES_texture_float
OES_texture_half_float
OES_texture_float_linear
OES_texture_half_float_linear
EXT_color_buffer_float
EXT_color_buffer_half_float

Some of the above extensions have different
requirements depending on other extension support
and the context client version, and were
incorrectly assuming the most restrictive
requirements to be exposed.

Implemented end2end tests for:
OES_texture_float
OES_texture_half_float
OES_texture_float_linear
OES_texture_half_float_linear
EXT_color_buffer_float
EXT_color_buffer_half_float

Bug: angleproject:2898
Bug: angleproject:2726
Test: ./angle_end2end_tests --gtest_filter='Texture2DFloatTest*'
Change-Id: I7024aa1393eadafb5a0fb83c23e9035aae650b67
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1740276
Commit-Queue: Geoff Lang <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2019-09-13 20:59:00 +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
Mingyu Hu 7e44ec26d6 GL_EXT_multisampled_render_to_texture extension. Part 1.
Adding new parameters for extension without adding any real code change. Since no new code paths were added, we expect all tests to pass as before.

Bug: angleproject:980428
Change-Id: I551b46a66f422eabd357fd021e00cf266a991efb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1772377
Commit-Queue: Rafael Cintron <[email protected]>
Reviewed-by: Rafael Cintron <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2019-09-04 19:37:30 +00:00
Jaedon Lee 3b46885e19 Vulkan: Implement EXT_texture_type_2_10_10_10_REV
- Expose GLES 3.0 feature of 2_10_10_10_REV texture type
  on GLES 2.0 as EXT.
- Handle alpha channel value as 1.0 when used with RGB format.
- Add test for "RGB+UNSIGNED_INT_2_10_10_10_REV" case into TextureUploadFormatTest.

BUG=angleproject:3232.
Test:
 dEQP-GLES2.capability.extensions.uncompressed_texture_formats.GL_EXT_texture_type_2_10_10_10_REV
 dEQP-GLES2.functional.fbo.completeness.renderable.texture.*2_10_10_10_rev
 dEQP-GLES3.functional.fbo.completeness.renderable.texture.*2_10_10_10_rev
 KHR-GLES2.core.internalformat.*2_10_10_10_rev*
 KHR-GLES3.core.internalformat.*2_10_10_10_rev*

Change-Id: Iac00517971f9242161115c7256117a69093fb5df
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1732618
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2019-08-23 15:28:26 +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
James Darpinian 22ec7dc900 Remove all global constructors and exit time destructors.
WebKit compiles with -Wglobal-constructors, so they want this. I decided
to do -Wexit-time-destructors at the same time.

Bug: angleproject:3439
Bug: angleproject:1459
Change-Id: I4b44ae4f8e6f066e07dc7f9f6ced9a5d49dc8f8a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1738438
Commit-Queue: James Darpinian <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2019-08-07 21:34:14 +00:00
Hyunchang Kim 4c118cb3d3 Vulkan: Add support for OES_vertex_half_float
Expose GLES 3.0 feature of half_float vertex on GLES 2.0 as an extension.

Bug: angleproject:3191
Test: dEQP-GLES2.capability.extensions.vertex_data_formats.GL_OES_vertex_half_float
Change-Id: Ia093b66f9c32c81946b2cbc15ff227baea4bfb02
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1728749
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Shahbaz Youssefi <[email protected]>
Reviewed-by: Mohan Maiya <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2019-08-02 19:07:07 +00:00
Clemen Deng 8bb46c5b9f Refactor: add InternalFormat::isInt()
Bug: angleproject:3727
Change-Id: I33ee85563e3b070b4b86afc37230d3f5af54f446
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1713091
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Shahbaz Youssefi <[email protected]>
2019-07-23 18:03:22 +00:00
Geoff Lang 6a02f06dfd Implement EGL_ANGLE_create_context_backwards_compatible
This extension allows the user to specify if ANGLE should create a
context of the exact requested version or a higher version context that
is backwards compatible.

BUG=angleproject:3425

Change-Id: I7d0b75cdd7e34a2fc888aa238e1eeb67af82ae0d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1601560
Commit-Queue: Geoff Lang <[email protected]>
Reviewed-by: Shahbaz Youssefi <[email protected]>
2019-07-18 22:51:46 +00:00
Geoff Lang d9c1710779 Add support for GL_OES_texture_compression_astc
This extension adds 3D compressed texture formats, something ANGLE has
not seen before.  This requires tracking a compressed block depth for
validation and image size computations.

Update the ldr and hdr extension checks to be in line with the spec.
HDR requires LDR and is not detectable by texture formats alone.

Expose all of the ASTC extensions on the GL backend.

BUG=angleproject:3675

Change-Id: Id04c7c8ef8541e9556579536cdba899b64303caf
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1695923
Commit-Queue: Geoff Lang <[email protected]>
Reviewed-by: Shahbaz Youssefi <[email protected]>
2019-07-15 19:27:55 +00:00
shrekshao cdab03aa93 Add flags to shader translator to emulate gl_BaseVertex and gl_BaseInstance
Adds support for translating gl_BaseVertex and gl_BaseInstance for implementation of
GL_ANGLE_base_vertex_base_instance.

They will only be available in WebGL 2. Since there's no gl_VertexID and
gl_InstanceID in WebGL 1. It won't be very useful to add them to WebGL
1.

Mostly follow pattern of gl_DrawID of GL_multi_draw

BUG=angleproject:3402,chromium:891861

Change-Id: Ifcd990c52d12f6814127b904e61a779b8d382e0c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1666361
Commit-Queue: Shrek Shao <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2019-07-11 01:38:25 +00:00
Geoff Lang 69e46a186b GL: Implement EGL_ANDROID_native_fence_sync
This extension allows Chrome to use ANGLE on newer Android devices.

BUG=angleproject:3643

Change-Id: I5456d61749399ca2bbc11cc5e98b9120f8702406
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1687121
Reviewed-by: Shahbaz Youssefi <[email protected]>
Reviewed-by: Jonah Ryan-Davis <[email protected]>
Commit-Queue: Geoff Lang <[email protected]>
2019-07-10 14:47:50 +00:00
Geoff Lang 169a14ec5d Move member initializers from Caps.cpp into the struct definitions.
BUG=angleproject:3663

Change-Id: I13a1a920173e3f2e5360e6d7253f24a44bdc5e13
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1690675
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2019-07-09 12:36:21 +00:00
Geoff Lang 3fd0b2dbcf Implement EGL_ANDROID_get_native_client_buffer.
BUG=angleproject:2508

Change-Id: I21e6251cd1341c1f85f1ba16ba08f5876a8ff8de
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1238885
Commit-Queue: Geoff Lang <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2019-07-08 18:17:43 +00:00
Cody Northrop 66b5ff586c texture3D: Implement functionality and enable for Vulkan
Also update test expectations for texture3D.

Bug: angleproject:3188
Change-Id: If8a8e0a83a86c48c2afb0c36534c1e9d4120fe47
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1682782
Reviewed-by: Ian Elliott <[email protected]>
Reviewed-by: Lingfeng Yang <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Cody Northrop <[email protected]>
2019-07-03 17:11:51 +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
Sunny Sachanandani f9686af021 Add support for D3D11 texture backed EGLImages
Implement EGL_ANGLE_image_d3d11_texture extension.  Images created with
this extension might not be renderable based on bind flags and resource
usage of the client provided texture in which case attaching them to a
framebuffer won't succeed.

The intended use case is to bind the front and back buffers of a swap
chain to GL textures that can be used for rendering in the case of the
back buffer and as a shader input for the front buffer.

Bug: chromium:939655
Change-Id: Ic3328e831880292217b88be84740740df6031fa6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1646732
Commit-Queue: Sunny Sachanandani <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2019-06-18 20:14:17 +00:00
Mohan Maiya 141a23f64f Add support for OES_depth24
Allow 24-bit depth as a valid Renderbuffer format.

Bug: angleproject:3229
Test: angle_end2end_tests --gtest_filter=DepthStencilFormatsTest.DepthBuffer/*
Change-Id: I166639ec0e000595dc55848e4b8b7bef627b6471
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1661050
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Shahbaz Youssefi <[email protected]>
2019-06-18 12:32:35 +00:00