Commit Graph
543 Commits
Author SHA1 Message Date
Jonah Ryan-Davis 806ba5663b Extend ANGLE_iosurface_client_buffer to Vulkan backend for Swangle
Implement an IOSurface-backed pBuffer surface for the Vulkan backend
on Mac, through SwANGLE. ANGLE will pass a raw pointer to Swiftshader
and handle locking/unlocking the IOSurface.

Bug: chromium:1015454
Change-Id: Ia3ead55334736003d405b54ba8dcc7701706fbb2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1965434
Commit-Queue: Jonah Ryan-Davis <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2020-02-05 21:19:16 +00:00
Alexey Knyazev 9e774041f8 Update S3TC GL extension strings
Added avoid_dxt1_srgb_texture_format workaround

Bug: angleproject:4266
Change-Id: I286a9c66f6ea1d2c9d3587f6ca85608336eb44a6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2033065
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Jonah Ryan-Davis <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2020-02-04 14:37:37 +00:00
Tobin Ehlis 1736c47b74 Vulkan: Remove transient cmd buffer workaround
We no longer need this workaround. Also mCommandPoolFreeList dead code.

Bug: angleproject:3508
Change-Id: Ib73ddd431eb1bf9a55c3421111af4df5976cc1fb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2033485
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Tobin Ehlis <[email protected]>
Commit-Queue: Tobin Ehlis <[email protected]>
2020-01-31 20:33:22 +00:00
Jeff Gilbert a805ac7cbe Allow overriding ANGLE_PLATFORM_EXPORT.
Bug: angleproject:4365
Change-Id: I4098ebdd718624e9d0578e0ee69f0a84a5b78183
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2033064
Commit-Queue: Geoff Lang <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2020-01-31 18:43:28 +00:00
Charlie Lao 71153201dc Vulkan: Disable restartRenderPassAfterLoadOpClear workaround
This workaround was added due to qualcomm driver bug b/129281932. But
this has been fixed with recent drivers. Removing the WR here so that it
will not negatively affect performance.

Bug: angleproject:4344
Change-Id: Iea2ec86082a0ced64bfe843bf916c6bdb2aea60b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2029210
Commit-Queue: Charlie Lao <[email protected]>
Reviewed-by: Tobin Ehlis <[email protected]>
2020-01-31 18:22:58 +00:00
Kenneth Russell e196bc85ac Add driver bug workaround for rewriting row major matrices.
Joint work with syoussefi@, who wrote the RewriteRowMajorMatrices
pass, and revised it for this CL to not rely on the
NameNamelessUniformBuffers pass - which was breaking it on the GL
backend.

Hook up previously written RewriteRowMajorMatrices transformation, and
enable on all GPU types on macOS. It is needed at least for AMD and
Intel GPUs.

Add a new test which verifies the behavior of dynamically-indexed
arrays of row-major matrices.

Bug: angleproject:2273
Bug: angleproject:3843
Change-Id: Id582f9cf6b9b1a59091aab1786539174f360b705
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2008717
Commit-Queue: Kenneth Russell <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2020-01-30 22:08:39 +00:00
shrekshao eca11cc81c SH_CLAMP_INDIRECT_ARRAY_BOUNDS logic update
Remain the old hardware requirement for turning on clampArrayAccess. But
also turns it on universally for WebGL context. So that we won't suffer
from clampArrayAccess not handled properly on some compute shader deqp
tests.

Bug: chromium:1042252, angleproject:4361
Change-Id: Ib11affd6df27ce7d2100980d2b8decdee36876e8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2026029
Reviewed-by: James Darpinian <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Commit-Queue: Shrek Shao <[email protected]>
2020-01-29 16:53:37 +00:00
Shahbaz Youssefi f1f082e137 Vulkan: Set varying location & xfb decorations in SPIR-V
The shader translator outputs arbitrary location indices.  Once compiled
by glslang, the SPIR-V transformer modifies these decorations.  If the
transform feedback extension is used, it will also add the relevant
decorations to the varyings that are captured.

Bug: angleproject:3394
Change-Id: I5ecafd0536408612a5d4b920dbabbfabe650657c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2008468
Commit-Queue: Shahbaz Youssefi <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2020-01-29 15:01:27 +00:00
Shahbaz Youssefi 71e6afb1c1 Vulkan: Set set/binding in SPIR-V
This change introduces a SPIR-V transformer that modifies shader
interface variable decorations directly in SPIR-V instead of
manipulating the input GLSL.  Currently, descriptor set and binding
indices are set by the transformer.

The shader translator outputs arbitrary set and binding indices.  Once
compiled by glslang, the SPIR-V transformer modifies these decorations.
The ultimate goal is to be able to modify the SPIR-V again when program
pipeline objects decide a different set/binding is necessary.

Bug: angleproject:3394
Change-Id: If358265a72bf1fe9f5676562b39a632cb2e05dc4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2001477
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Shahbaz Youssefi <[email protected]>
Commit-Queue: Shahbaz Youssefi <[email protected]>
2020-01-29 05:24:40 +00:00
Jonah Ryan-Davis 1a1a1427fd Expose eglGetMscRateCHROMIUM from EGL_CHROMIUM_sync_control
When ANGLE is using the GL backend on GLX, we can expose
eglGetMscRateCHROMIUM via glXGetMscRateOML. Otherwise, this function
should return false.

Bug: chromium:1042393
Change-Id: Id9b308c2217e07ee9860e2869be0e23b7a0c7411
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2017048
Commit-Queue: Jonah Ryan-Davis <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2020-01-27 19:30:45 +00:00
Shahbaz Youssefi b36e46ab02 Vulkan: Line raster emulation through specialization constant
In preparation for compiling shaders early at link time, this change
reworks line raster emulation such that it uses specialization constants
instead of a preprocessor condition.  This means drawing both triangles
and lines with this program will still result in a one-time shader
compilation.

The compilation is still done at draw time in this change.

Bug: angleproject:3394
Change-Id: I0bf91398868d7f7147456533b728906b505192b2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1992365
Commit-Queue: Shahbaz Youssefi <[email protected]>
Reviewed-by: Tim Van Patten <[email protected]>
2020-01-22 22:26:11 +00:00
Jamie Madill 62475e95da Allow tests to pick ANGLE features.
This uses the EGL_ANGLE_feature_control extension through the test
harness to control feature selection via a test config. This obviates
the need for the hacky platform methods table override.

Also adds a command graph feature that will be used to prototype the
command graph linearization for Vulkan.

Bug: angleproject:4029
Change-Id: Id37fadd5d2c317c9d9dd90dfab1fdc8e4ac3701f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2007612
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Jonah Ryan-Davis <[email protected]>
Reviewed-by: Shahbaz Youssefi <[email protected]>
2020-01-20 21:45:20 +00:00
Kenneth Russell 86f7309717 Upstream support for iOS Simulator.
Originally authored in the WebKit repository:
https://bugs.webkit.org/show_bug.cgi?id=205618

Has been tested with WebKit's WebGL backend on top of ANGLE inside the
iOS Simulator. TODOs will be addressed in forthcoming CLs.

Bug: angleproject:4263
Change-Id: Ic879866aaee5f933599d956b0646d0c01db55d0d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1995824
Reviewed-by: Shahbaz Youssefi <[email protected]>
Reviewed-by: Jonah Ryan-Davis <[email protected]>
Commit-Queue: Kenneth Russell <[email protected]>
2020-01-14 21:08:21 +00:00
Shahbaz Youssefi 6b2754066a Vulkan: Workaround vertex attributes vs stride issue on AMD
Under robustBufferAccess, Vulkan states that:

Vertex input attributes are considered out of bounds if the offset of
the attribute in the bound vertex buffer range plus the size of the
attribute is greater than either:

- vertexBufferRangeSize, if bindingStride == 0; or
- (vertexBufferRangeSize - (vertexBufferRangeSize % bindingStride))

The latter implies that if the buffer size is not a multiple of the
vertex attribute stride, what lies beyond the last multiple of stride is
considered out of bounds.

It also says:

Out-of-bounds buffer loads will return any of the following values:

- Values from anywhere within the memory range(s) bound to the buffer
  (possibly including bytes of memory past the end of the buffer, up to
  the end of the bound range).
- Zero values, or (0,0,0,x) vectors for vector reads where x is a valid
  value represented in the type of the vector components and may be any
  of ...

The first bullet point indicates that the driver is allowed to load the
attribute values from the buffer if its range still lies within the
buffer size.

Take the following example:

- Buffer size = 12
- Attribute stride = 8
- Attribute offset = 0
- Attribute size = 4

Basically the buffer is thus laid out as follows:

          attr stride
      _________/\_________
     /                    \
    +----------+----------+----------+
    | vertex 0 | padding  | vertex 1 |
    +----------+----------+----------+
     \___ ____/
         V
     attr size

In the above example, the attribute for vertex 1 is considered out of
bounds, but the driver is allowed to either read it correctly, or return
(0, 0, 0, 1) for it.

Most drivers implement the former, while AMD implements the latter.
This change introduces a workaround for AMD where
GL_MAX_VERTEX_ATTRIB_STRIDE is limited to 2048 (the common value for it
according to gpuinfo.org) and conservatively rounds up every buffer
allocation to that size.

While technically, this workaround should be applied on any device with
the robustBufferAccess feature enabled, it is currently limited to AMD
to avoid the inefficiency.  A possible future revision of Vulkan may
relax the above restrictions.

Bug: angleproject:2848
Change-Id: Ida5ae5d777da10f22ce8be5a09a7644b5bbd778e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1991709
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Tim Van Patten <[email protected]>
Commit-Queue: Shahbaz Youssefi <[email protected]>
2020-01-11 06:07:42 +00:00
Kenneth Russell 12ce8f687d Upstream WebKit's iOS port of ANGLE.
Added the EAGL backend authored by Dean Jackson from Apple, and the
refactoring changes needed to support it side-by-side with the macOS
backend. Ran "git cl format" against these diffs.

Defined the EGL_ANGLE_device_eagl extension and allocated an enum out
of ANGLE's reserved range.

The iOS backend is not yet included in any of the GN files.

Bug: angleproject:4263
Change-Id: I631c32930433c03bb16a242955ffedf55174bb29
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1987278
Reviewed-by: Shahbaz Youssefi <[email protected]>
Reviewed-by: Jonah Ryan-Davis <[email protected]>
Reviewed-by: James Darpinian <[email protected]>
Commit-Queue: Kenneth Russell <[email protected]>
2020-01-10 02:00:18 +00:00
Kenneth Russell 7a37d3acf5 Work around Intel driver bug with CopyTex{Sub}Image2D/DeleteTextures.
Dependencies seem to be incorrectly tracked in some Intel OpenGL
drivers (on macOS specifically), causing crashes in glDeleteTextures
if a GL command buffer is being constructed where those textures are
destinations of CopyTexImage2D/CopyTexSubImage2D. Work around this bug
by flushing before texture deletion if CopyTex{Sub}Image have been
called recently. The tracking is only done on a per-context rather
than a per-device basis, but seems sufficient to work around the
problem as identified.

Tested both with new ANGLE test on affected hardware, and in WebKit's
ANGLE backend for WebGL. Works around the crash reported in
https://bugs.webkit.org/show_bug.cgi?id=205707 .

Bug: angleproject:4267
Change-Id: I2266a5590759f6a3f19080def08710ef4b66d463
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1987932
Commit-Queue: Kenneth Russell <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Reviewed-by: Shahbaz Youssefi <[email protected]>
2020-01-09 23:58:27 +00:00
James Darpinian 27db24581e Optimize disabling ARB_texture_rectangle
In https://crrev.com/c/1838418 I added the ability to disable
ARB_texture_rectangle so that we can use it in the WebGL implementation
but disable it when compiling user shaders. Unfortunately disabling
and re-enabling the extension causes the shader translator to be
reinitialized which turns out to be more expensive than the actual
work of shader translation, at least for small shaders. It's slow enough
to cause timeouts in WebKit's WebGL conformance test runs.

This introduces an alternate method of disabling ARB_texture_rectangle
in the translator which is much faster because it avoids reinitializing
the translator.

Bug: angleproject:3956
Change-Id: I5d31b683ff19a59bdfd289cfd3c609f64ef5e25b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1991969
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Commit-Queue: James Darpinian <[email protected]>
2020-01-09 17:46:38 +00:00
Shahbaz Youssefi 0721cc8ba0 Vulkan: No line raster emulation code if extension
A flag is added to the translator to disable generation of Bresenham
line raster emulation code when the Bresenham line raster Vulkan
extension is present.  This is primarily for the sake of conversion of
line raster emulation condition to specialization constant:

- Avoid dead SPIR-V code in every shader
- Avoid ANGLEUniforms being active in every shader stage even if it's
  not used anywhere but in line raster emulation.
- Optimize SPIR-V transformations by both having fewer instructions to
  iterate through, and to avoid generating line raster patches.
- Reduce the severity of anglebug.com/4251 where the location assignment
  of ANGLEPosition can incorrectly overlap a varying array or struct, by
  making only platforms without Bresenham extension afflicted by the
  bug.

Bug: angleproject:3394
Change-Id: Ic0ae6ce0392b4eae0cc79cb94bbcd0805b276a31
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1986379
Reviewed-by: Cody Northrop <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Shahbaz Youssefi <[email protected]>
2020-01-06 21:05:38 +00:00
Jeff Vigil 3311ef6568 update date comments to 2020
run_code_generation.py updated comments with 2019 to 2020.
Put all date updates into this one CL.
This also updated hashes.

Bug: angleproject:4262
Change-Id: Ia213dd5e47f155986cbb4161d777724355878af0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1986994
Commit-Queue: Mohan Maiya <[email protected]>
Reviewed-by: Mohan Maiya <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2020-01-06 16:25:35 +00:00
shrekshao 81ee4d2919 Workaround EXT_texture_norm16 for OpenGL ES drivers
Implement a workaround for widespread bugs calling glReadPixels with
RGBA/UNSIGNED_SHORT against R16/RG16 color attachments. Read back the
data using the GL_IMPLEMENTATION_COLOR_READ_FORMAT, and then rearrange
the read back pixels to fit the RGBA layout.

Also skip RGB16/RGB16_SNORM texture sample test on Nexus 5X/Nexus 6P
due to a another driver bug.

Bug: chromium:1000354, angleproject:4214, angleproject:4215, angleproject:4245
Change-Id: Iedea6f4136878cac5ad0dec3757c77b73502e1cd
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1952166
Reviewed-by: Kenneth Russell <[email protected]>
Commit-Queue: Shrek Shao <[email protected]>
2020-01-03 17:56:58 +00:00
Xinghua Cao 1fdf6ca514 D3D11: Restrict to translate uniform block to StructuredBuffer
Only translate uniform block to StructuredBuffer when system is
Windows 10 and later.

Bug: angleproject:3682
Change-Id: I27e3f4503392791883a44e1d486ffe9512e04bd8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1984863
Commit-Queue: Xinghua Cao <[email protected]>
Reviewed-by: Shahbaz Youssefi <[email protected]>
2020-01-02 14:13:13 +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
Xinghua Cao 0af8b59612 D3D11: Translate uniform blocks to StructuredBuffer when necessary
fxc exhibits slow compile performance with dynamic cbuffer indexing.
So when a uniform block contains only one large array member, which is
an array of structures, translate this uniform block to
a StructuredBuffer instead.

Bug: angleproject:3682
TEST=angle_end2end_tests.UniformBufferTest.*
Change-Id: Ife80dba8aae65b761737e095895e00a570230f88
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1782046
Commit-Queue: Xinghua Cao <[email protected]>
Reviewed-by: Kenneth Russell <[email protected]>
Reviewed-by: Shahbaz Youssefi <[email protected]>
2019-12-21 03:35:38 +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
Le Hoang Quyen d1860ea17e Metal: support OES_depth_texture
Also added Depth32 & Depth16 texture data upload tests.

Bug: angleproject:2634
Change-Id: I103f1cda1dc915f0dc8b04f7aaa2d8c0f9220cda
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1919281
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2019-12-15 14:44:43 +00:00
Hyunchang Kim caa6eccde3 Vulkan: Implement Transform Feedback support via extension
Implemented transform feedback extension path. Where
VK_EXT_transform_feedback is supported, extension path will be taken
over an emulation path. Extension path has advantages in terms of
performance.

BUG=angleproject:3206
Test: dEQP-GLES3.functional.transform_feedback.*
      angle_end2end_tests --gtest_filter=TransformFeedbackTest*

Change-Id: Ia07c23afb289d9c67073469a97b714ec96f5265a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1882767
Commit-Queue: Mohan Maiya <[email protected]>
Reviewed-by: Mohan Maiya <[email protected]>
Reviewed-by: Shahbaz Youssefi <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Cody Northrop <[email protected]>
2019-12-10 21:33:32 +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
Courtney Goeltzenleuchter 33a00efd7c Add Compute Shared Memory Size Validation
Add tracking of shared memory declarations in compute shaders.

Test:
  angle_deqp_gles31_tests --gtest_filter=dEQP.GLES31/functional_debug_negative_coverage_callbacks_compute_exceed_shared_memory_size_limit

Bug: 4173
Change-Id: If2a86d467a82f73fa5b2ee0ced752701acfe1872
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1934653
Commit-Queue: Courtney Goeltzenleuchter <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2019-12-04 19:45:47 +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 f9c3eaf457 Add ability to disable all ANGLE features
Chrome has a --disable-gpu-driver-bug-workarounds flag that needs to be
able to be forwarded to ANGLE

Bug: 1016377
Change-Id: Ied6c8656742e25c32d508b8bfe76a902d82bcf93
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1925249
Commit-Queue: Jonah Ryan-Davis <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2019-11-20 17:01:23 +00:00
Jiawei Shao 0303cf6b95 OpenGL: Port all Intel-related workaround conditions from gpu_driver_bug_list.json
This patch ports all the Intel-related shader workarounds defined in
gpu_driver_bug_list.json used by Chromium validating command buffer
into ANGLE so that they can also take effect in Chromium passthrough
command buffer.

Bug: 1020467
Bug: 642605
Bug: 403957
Change-Id: I8e4866fc34d5e8f1b2f4dbfa8e526b80249ba166
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1889386
Commit-Queue: Jonah Ryan-Davis <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2019-11-20 16:00:28 +00:00
Ethan Lee 736164ff79 Headers: Add EGLAPI to SwapBuffersWithFrameTokenANGLE
Bug: angleproject:4116
Change-Id: I83392c7bad002d9b6b939983385ace7c9ebcc090
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1919633
Reviewed-by: Geoff Lang <[email protected]>
Reviewed-by: Shahbaz Youssefi <[email protected]>
Commit-Queue: Geoff Lang <[email protected]>
2019-11-19 23:34:33 +00:00
Jamie Madill 3f647b1bf9 Vulkan: Improve Bresenham line emulation.
Clamps the vertex position to the subpixel grid before interpolation.
This will give more correct results on systems that have less than
8 bits of subpixel accuracy.

Also uses a more accurate formulation for the emulation filter in the
fragment shader using dfdx and dfdy.

Fixes line raster CTS tests on SwiftShader. Still does not produce spec
conformant lines. Updates the public docs to indicate this.

Bug: angleproject:2830
Change-Id: Ib9a268df3e7d986bd2b1348be664389fe8fc0ef2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1826598
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Tim Van Patten <[email protected]>
2019-11-12 14:32:58 +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 c898ec1a5e Add EGL GGP extensions.
This CL adds two new extensions:

 * EGL_ANGLE_ggp_stream_descriptor:
    Introduces a new attribute to CreateWindowSurface. Allows the app
    to pass in a stream descriptor to VkCreateSurfaceKHR.
    Mirrors VK_GGP_stream_descriptor_surface.

 * EGL_ANGLE_swap_with_frame_token:
    Introduces a new function 'eglSwapBuffersWithFrameTokenANGLE'. This
    allows the app to pass a GGP frame token down to vkQueuePresentKHR.
    Mirrors VK_GGP_frame_token.

Bug: angleproject:4078
Change-Id: I4313ac4c264e68999905049f661bc64b44f72fab
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1897315
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Cody Northrop <[email protected]>
2019-11-05 01:50:17 +00:00
Tim Van Patten 0c541c30cf Fix Platform methods list
Functions have to be added to the end of the list to prevent breaking
EGL on Android.

Bug: angleproject:2634
Change-Id: I19705144d8ab873c13891038f840b9fc96a79103
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1897646
Commit-Queue: Tim Van Patten <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2019-11-04 19:02:48 +00:00
shrekshao 35f74cd6f8 Reorder BaseVertexBaseInstance draw calls parameters
To match the parameter order of MultiDraw* calls.
And potentially expose in chromium directly with ANGLE_ prefix.

Bug: angleproject:3402, chromium:891861
Change-Id: I19548f4c3c7faa422e43905850b218039de43015
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1894241
Commit-Queue: Shrek Shao <[email protected]>
Reviewed-by: Kenneth Russell <[email protected]>
2019-11-01 20:14:45 +00:00
Le Quyen fe26bae452 Metal backend implementation pt 2
This is without Metal specific shader translator implemented yet.

Bug: angleproject:2634
Change-Id: I95d589442251c9ba111bd05a2dc379a36739046c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1855069
Reviewed-by: Jonah Ryan-Davis <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2019-11-01 17:37:15 +00:00
Alexis Hetu 5e6be1d627 Provoking vertex feature support enabled
Added support in ANGLE for the provoking vertex feature,
which allows to choose the provoking vertex convention
(first or last) for flat shading.

Just copying the vk_ext_provoking_vertex.h file into ANGLE src tree for now.
When the extension lands in the vulkan header we'll migrate to that and remove this
file from ANGLE.

With this, all these tests pass with SwANGLE:
dEQP-GLES3.functional.fragment_out.* (fixes 526 failures)
dEQP-GLES3.functional.rasterization.flatshading.* (fixes 6 failures)
dEQP-GLES3.functional.shaders.linkage.varying.* (already passing before, still passing)

Bug: angleproject:3430
Bug: angleproject:3677
Bug: angleproject:4063
Change-Id: Icc361f567072c12472398e37a94a61d7f95007ad
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1855681
Commit-Queue: Alexis Hétu <[email protected]>
Reviewed-by: Alexis Hétu <[email protected]>
2019-10-31 13:24:52 +00:00
Tim Van Patten 287b0a670f Vulkan: Enable forceOldRewriteStructSamplers for all Android ICDs
Both Qualcomm and SwS require forceOldRewriteStructSamplers to be
enabled, so this change will enable that feature for all of Android.

We aren't sure yet why this is required for SwS also, but that will be
chased as part of issue 2703.

Bug: angleproject:4045
Change-Id: I83b2ac18e0111ed35438ffd457bfe120911a7767
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1879711
Commit-Queue: Courtney Goeltzenleuchter <[email protected]>
Reviewed-by: Courtney Goeltzenleuchter <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2019-10-29 15:40:49 +00:00
Jamie Madill 0964988b77 Fixups to ANGLE_get_image boilerplate.
- Remove level parameter from GetRenderbufferImage.
- Add packed enum handling to GetTexImage.
- Fix ext spec reference to table 8.4.

Bug: angleproject:3944
Change-Id: I8f67608396217aaddb789dd95d0f3e2378ce918d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1879960
Reviewed-by: Cody Northrop <[email protected]>
Reviewed-by: Tim Van Patten <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2019-10-28 15:21:53 +00:00
Jamie Madill 04ee27efff Capture/Replay: Add ANGLE_get_image extension.
Will be used for mid-execution capture. Only has a
stubbed-out implementation right now.

Bug: angleproject:3944
Change-Id: I6ddae07907ecbdbd3be9a5d2d3fcafeb425445e4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1878888
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Cody Northrop <[email protected]>
2019-10-25 19:02:16 +00:00
jchen10 df9a7500d3 Remove forceNonZeroScissor workaround
The original driver bug no longer exists after upgrading the bots. This
workaround has the side effect causing the bug 3867.

Bug: angleproject:3407
Bug: angleproject:3867
Change-Id: I64f2e41729f209a1cef5ba49140650207666992c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1870845
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2019-10-23 03:12:21 +00:00
jchen10 b307010280 Add SH_REMOVE_DYNAMIC_INDEXING_OF_SWIZZLED_VECTOR
This is a workaround for the webgl2 conformance test case
WebglConformance_conformance2_glsl3_vector_dynamic_indexing_swizzled_lvalue.
Dynamic indexing of swizzled lvalue like "v.zyx[i] = 0.0" is problematic on
various platforms. This removes the indexing by translating it this way:

void dyn_index_write_vec3(inout vec3 base, in int index, in float value){
  switch (index) {
    case (0):
      (base[0] = value);
      return ;
    case (1):
      (base[1] = value);
      return ;
    case (2):
      (base[2] = value);
      return ;
    default:
      break;
  }
  if ((index < 0))
  {
    (base[0] = value);
    return ;
  }
  {
    (base[2] = value);
  }
}

...
dyn_index_write_vec3(v.zyx, i, 0.0);
...

Bug: chromium:709351
Change-Id: I971b38eb404209b56e6764af1063878c078a7e88
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1869109
Commit-Queue: Jie A Chen <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2019-10-23 02:45:10 +00:00
Geoff Lang 0b779a7c4e GL: Emulate primitive restart when PRIMITIVE_RESTART_FIXED_INDEX is unavailable.
PRIMITIVE_RESTART_FIXED_INDEX isn't available until desktop GL 4.3. When it is
not available, emulate it by enabling PRIMITIVE_RESTART and set the primitive
restart index before each draw call based on the index type.

TEST=deqp/functional/gles3/primitiverestart/*

BUG=angleproject:3997

Change-Id: Id736f1056cb07da91c6d592693406333142e6265
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1853885
Commit-Queue: Geoff Lang <[email protected]>
Reviewed-by: Jonah Ryan-Davis <[email protected]>
2019-10-22 23:20:01 +00:00
Tobin Ehlis be1fa7d8cd Vulkan: Enable VK_EXT_line_rasterization
Plumbing to make ANGLE use VK_EXT_line_rasterization
extension when available.

Bug: angleproject:3981
Change-Id: I12913c20bff69ab0b7c16462c10b8b5fd8e1c2a5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1865027
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Alexis Hétu <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2019-10-22 20:45:20 +00:00
Jonah Ryan-Davis ae1b7786b8 Fix ANGLE_FEATURE_CONDITION style issue
Macro should end with a ;

Bug: angleproject:3976
Change-Id: I4aaa146464d9d7e6230a3de44c30cfd1179a89ae
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1864620
Commit-Queue: Jonah Ryan-Davis <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2019-10-16 22:32:04 +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
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
Ian Elliott aa292a59f9 Generate GLES 3.2 entry points
This is a combination of:

- Changing the "scripts/generate_entry_points.py" script to tell it to
  also auto-generate GLES 3.2.  Also changing "scripts/gen_proc_table.py".

- Generating new and modified files needed to add GLES 3.2 to the
  ANGLE front-end.  This is done by running the following command:
  "python scripts/run_code_generation.py".

- Creating the following files:

  - src/libANGLE/validationES32.h
  - src/libANGLE/validationES32.cpp
  - src/libANGLE/capture_gles_3_2_params.cpp

- Hand-editing the following files:

  - src/libGLESv1_CM/libGLESv1_CM.cpp
  - include/GLES2/gl2ext_angle.h
  - src/libGLESv2.gni
  - src/libANGLE/Context.h
  - src/libANGLE/Context.cpp
  - src/libANGLE/Context_gl.cpp
  - src/libANGLE/ErrorStrings.h
  - src/libANGLE/State.h
  - src/libANGLE/validationES1.cpp
  - src/libANGLE/validationGL3.cpp
  - src/libANGLE/validationGL31.cpp
  - src/libANGLE/validationGL32.cpp
  - src/libANGLE/validationGL33.cpp
  - src/libANGLE/validationGL4.cpp
  - src/libANGLE/validationGL43.cpp
  - src/libANGLE/validationGL45.cpp

Bug: angleproject:3649
Change-Id: I5b67f72e3e3b55e74039ec3e28aa8d399ec08cf2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1850231
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Commit-Queue: Ian Elliott <[email protected]>
2019-10-10 16:15:48 +00:00