We accumulate image barriers in two places:
* for GL sampler textures
* for GL framebuffer attachments (Render Targets)
Then we issue the barriers together in a single call before the RP.
This fixes a bug where we were missing a layout transition in some
cases when transitioning between a sampler and a render target. It
should also be faster to issue a single barrier before a RP than issue
several smaller barriers.
Bug: angleproject:3539
Bug: angleproject:4029
Change-Id: I180b770f0df6b44d209e5c618ba36bcc1c6372e4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2044236
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Small fix to progress Manhattan MEC.
Bug: angleproject:4091
Test: Working through Manhattan frames 5-10, TRex still works
Change-Id: I7981e19a64f121b2ecca4451574ca2886641c6ac
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2039532
Commit-Queue: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
These tests are flaky because of a bug in ANGLE's Vulkan robust
resource init. Mark them as failing until we can resolve the bug.
Bug: angleproject:4255
Bug: angleproject:4384
Change-Id: I8e18a8532850848fc7a25e137dce27dd0d19fa55
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2046053
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
When running flatland on android-10.0.0_r21 (Pixel 3), libgui's ~EglImage calls
eglTerminate which grabs angle's EGL entry point mutex. The path continues
to libvulkan where eventually another egl call happens (eglDestroyImageKHR) and
it will attempt to take the mutex at the entry point again. So we try to get the
mutex multiple times from the same thread.
Change this mutex to a recursive_mutex to allow for this re-entry of EGL calls
Tests: android-10.0.0_r21/frameworks/native/cmds/flatland
Bug: angleproject:4354
Change-Id: If8a817df45e9f58d5f06884510350e17d7127fa9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2029218
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
This also includes support for compressed formats, which
required a small refactor to streamline the code, since all
of the entrypoints have slightly different parameter lists
for imageSize and data.
Bug: angleproject:3662
Test: Working through Manhattan frames 5-10, TRex still works
Change-Id: I007ad9366934fff773f367ecb6387bc8b0d13aa0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2039530
Commit-Queue: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Allows error handling in these functions. Necessary for the Vulkan
back-end.
Bug: angleproject:4209
Change-Id: I2092e58e719c6ee562807e1c7e8ad26988342855
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2040196
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Vulkan mandates that vertex buffer offsets are within the size of the
buffer even if robust buffer access is enabled. Do a check in
VertexArrayVk::syncDirtyAttrib to guard against this.
Bug: angleproject:3350
Change-Id: Ia01deb9b7335dd8f632f2cf9b32d2908ba55645c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2044491
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Found when working on the command graph refactor. Also replace the
offsets array with nullptr which should have the same effect.
Bug: angleproject:4029
Change-Id: I72e31c5403c645d72619e14aafef612e454183f1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2043270
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
This bug was hit by a KHR ES 3.1 test.
This CL just applies the obvious fix already noted by jmadill@.
Test: KHR-GLES31.core.shader_image_size.*-nonMS-*
Bug: angleproject:4008
Bug: angleproject:4108
Change-Id: I5d05c0a7432f7b70d2b995fd8b11224c119ece5f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2042491
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Cody Northrop <cnorthrop@google.com>
Scenic places our window in with its center in the corner if we don't
apply any translation. Therefore we only see 1/4 of the surface.
Translate the surface so the full size is visible. Also account for
display scaling as we're sizing in pixels and scenic is sizing in
density independent pixels.
Bug: angleproject:4382
Test: angle_end2end_tests
Change-Id: I1ae0b877c0ed7cf9d810bb2c8317b9842bd322a1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1716226
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Instead of using rand(), use a fixed seed RNG. This can ensure runs
use the same draw call counts no matter the time of day.
Note: there may have been a setting somewhere that was seeding the RNG
because I wasn't seeing variation between test runs locally. This
change makes it explicit.
Bug: angleproject:4029
Change-Id: Ic51bf2a6779da3b96a3357eed99c0f7fa9d81648
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2042210
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
If a uniform location is unused, but a call to glBindUniformLocation has
explicitly bound the uniform, ANGLE validation still treated the uniform
as unused and returned errors. The correct behavior is to ignore the
uniform and silently fail.
Bug: angleproject:4374
Change-Id: Ic7b97f23cf8bc2d5380129322595e51b3d4a9fcc
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2036676
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Since line raster emulation was changed to use specialization constants,
it has been possible to compile shaders at link time. However, program
pipeline objects would have required keeping the shader sources around
for recompilation. Now that all necessary decorations are modified
directly in SPIR-V, it's possible to compile the shaders at link time
and forget about their sources. Program pipeline objects then simply
"reconfigure" the generated SPIR-V.
A next step could be to also create the Vulkan pipeline object at link
time. A number of failures due to gaps in CTS testing prevent that work
currently. In particular, in some situations the generated SPIR-V is
not per spec, for example it may contain vertex attributes with aliasing
locations, or have transform feedback capture of array elements
misconfigured.
Bug: angleproject:3394
Bug: angleproject:4253
Change-Id: I54c0884cf056b511a4a306225cc6ed2cef84d257
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2023186
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Implements queries with the new command graph syntax. The T-Rex
capture benchmark uses queries so this fixes several errors.
Bug: angleproject:4029
Change-Id: Ia785f8e31257116aa3c75032dd66471b49926a78
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2021003
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tobin Ehlis <tobine@google.com>
ES 2.0 is feature complete.
Passes all of the angle_end2end_tests with the new linear command
recording method. Also runs the T-Rex benchmark without any obvious
glitches. Likely has issues with creating too many RenderPasses. ES3
is mostly untouched.
Bug: angleproject:4029
Change-Id: Ic5acf3d768495fbffd07b07bf0a6f2b5787c51f8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2012900
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
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 <jonahr@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
This CL is intended to move and factorize code only.
Move DisplayAndroid::generateConfigs to DisplayEGL::generateConfigs
because the code is generic and not Android specific. It will be
useful later to provide a default implementation of rx::DisplayEGL.
Same for createWindowSurface and createPbufferSurface, they have
been moved without changes from DisplayAndroid to DisplayEGL.
Unimplemented functions in DisplayOzone and DisplayAndroid have
been moved to DisplayEGL.
Bug: angleproject:4328
Change-Id: Ibbd36f99ea457cbd69391beb4a83f23403bc40fb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2038286
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Allows the application to override ANGLE behaviour without having to
modify the code or use the ANGLE extension. Useful for testing with the
command graph refactor.
Adds a new string utility for parsing lists of strings from environment
variables.
Bug: angleproject:4029
Change-Id: Ibae93b743c0c385392cd259d9604ce2f2ed988dc
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2037784
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
This change breaks the assumption everywhere that varyings can be
identified uniquely by name throughout all stages of the pipeline.
It further implements linking of varyings by location, if specified.
Bug: angleproject:4355
Change-Id: Ie45e48879008c3f0c22d1da3d0d26f37c655e54e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2030026
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
gl.xml was modified as two enums were missing from their proper group.
dxgi_support_data.json was fixed to not expect BC4 and BC5 on FL9_3
Bug: angleproject:3149
Change-Id: Ieb97a8cf8e92258c1b44e090e823fac227997174
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2033068
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Commit-Queue: Kenneth Russell <kbr@chromium.org>
Rather than try to read back compressed data using ANGLE_get_image
(which does not yet support compressed formats), track a shadow copy
of the compressed image and store it like client data.
Test: Mid-execution capture and replay of TRex frames using ETC1
Bug: angleproject:4036
Change-Id: Id15be60f7444cc2e1356e76ff18069c42e552663
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2015818
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Commit-Queue: Cody Northrop <cnorthrop@google.com>
Useful debugging information for benchmarks. Also helpful when working
with the command graph to ensure we don't regress performance.
Bug: angleproject:4029
Bug: angleproject:4320
Change-Id: Ibe224c40a3acaca9231bf3869486a0f8bba07ba0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2036402
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Tobin Ehlis <tobine@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
The Display now owns scratch buffers and loans them out to contexts
while they are current. This allows us to to only allocate one scratch
buffer in a single-threaded use case.
Tick the scratch buffers every time a new context is made current.
Lower the lifetime from 1000 to 64 to ensure that in the worst case,
the buffers are cleared after not being used for ~1 second.
BUG=chromium:1030835
BUG=angleproject:4363
Change-Id: I83552424e2beac62b9e41152876b04fc84f53692
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2031698
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
There are multiple failing tests on Windows on ARM which are related to drawing differences.
They seem to be similar to an already reported issue (anglebug.com/3748).
Bug: angleproject:4356
Bug: angleproject:4357
Change-Id: Ide5cc2e6f42d4c4b6fb88352833d20e517005c14
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2033067
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
The spec doesn't require implementation to validate indices against
range. This extra validation is costing performance dearly, thus should
be removed.
Bug: angleproject:4373
Change-Id: I61b0628e75de368d9e869008b7c99c429222fd6f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2033495
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Tobin Ehlis <tobine@google.com>