This EGL extension will add support for creating EGLClientBuffer
backed by an Android window buffer (struct ANativeWindowBuffer)
which can be later used to create an EGLImage.
Bug: angleproject:5018
Tests: angle_end2end_tests --gtest_filter=ImageTest.SourceNativeClientBufferTarget*
Change-Id: If78ed7b80ad09629b8c5f5b5a0eb07a548e82e6e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2404320
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
This moves the debug callback code into a common location. For ease of
access it's in shader_utils since that file has access to the GL API.
Bug: angleproject:5040
Change-Id: Iab9de47c2d520a5618ea6825852f8afa63565c8a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2408715
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Currently is_linux is set to true on Chrome OS build,
but it is planned to set to false. This CL is the preparation
to keep the current behavior.
Bug: chromium:1110266
Test: Built locally. Tryjob.
Change-Id: I4124dfb251d68a519fed3e08555d1aa5a694c77c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2404500
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
EGL_WINDOW_BIT is now specifically requested for tests that open a
window (those that aren't WithNoFixture). This makes sure pbuffer-only
configs are not selected for the window.
Additionally, a few WithNoFixture tests are made more robust in the
presence of no-window configs.
In the context of crbug.com/1034840, this means that a subset of end2end
tests would be able to run in a remote desktop environment. Tested on
Linux/X11 by turning a subset of configs PBUFFER-only.
Bug: chromium:1034840
Change-Id: I09fd149d43d3b865856fe6b9491c5f333f4a2efc
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2378922
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: back sept 10 - Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
- Metal's built-in blit based mipmap generator doesn't use box
filtering. Hence manual generation using compute is needed.
- Compute based mipmap gen can generate up to 4 mips per pass if the
base level is power of 2.
- This approach can be extended to 2D/cube texture's mipmap generation
in future.
Bug: angleproject:4921
Bug: angleproject:2634
Change-Id: I7f997669fe39afef075b2bca2406e9424cbb3016
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2336120
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Commit-Queue: Le Hoang Quyen <le.hoang.q@gmail.com>
For use_x11 && use_ozone build, use X11 backend by default.
For ozone only, continue using Ozone impl, which is basically
gbm.
Bug: chromium:1085700
Change-Id: Iac104e983135e566b0d42a58e00d3c83b430d6dc
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2346276
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
FramebufferVk::resolveColorWithCommand() is currently using the wrong
mip level value by using the GL index value, rather than calculating the
VK value from (index value - the base level).
Bug: angleproject:4753
Test: FramebufferTest_ES31::MultisampleResolveIntoMipMapWithBlit()
Change-Id: I8ddaeb21c4957b46880f5ef5f6a78242c04b4dcd
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2349951
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Tim Van Patten <timvp@google.com>
This extension is core in 3.2
Bug: angleproject:3573
Change-Id: If08736759da2fdc680cfa396d354dbfa97d1a60f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2317040
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
This will allow the Trace tests to load a custom GL after the GL
window has already loaded the default entry points.
Bug: angleproject:4845
Change-Id: Ic1b65b6cf1a582ea7c2f58a9f76077760e5cf0d8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2315626
Reviewed-by: Manh Nguyen <nguyenmh@google.com>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
This is required to have use_x11 && use_ozone builds at the same time.
Bug: chromium:1085700
Change-Id: I3d4cdf590e1ecf79af9e2d4bd585955c3f1b7af6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2315031
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
This will facilitate intercepting the GL calls and implementing
emulation paths for offscreen redering. Or other EGL/GL features.
It does not yet override the GLES loader and uses the shared
'angle_util' loader as it did before.
Bug: angleproject:4845
Change-Id: I68806c307f59e1852999299e88dc358781817f12
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2305042
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Manh Nguyen <nguyenmh@google.com>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
This CL adds a reverse JNI call to our Android Native Activity that
sets the orientation of the screen based on width and height.
To achieve this we:
* Attach to the java thread once at the beginning to grab JNI env.
* Detach from the thread once when platform sends APP_CMD_DESTROY
* Set the orientation during test init
Bug: angleproject:4327
Change-Id: Ifbe31a6a84dd60a0dfe7d7032962c99b290d8b81
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2289054
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Commit-Queue: Cody Northrop <cnorthrop@google.com>
Changes how context states are serialized during capture run. Now,
context states are serialized after each frame until the end frame
is reached, or context is destroyed.
Adds an api to the trace files to query serialization results of
multiple frames. Makes change to CaptureReplayTest to serialize
multiple frames then compares the serialization results with the ones
retrieved from said api.
Adds to capture replay the ability to produce working, compilable trace
files even when end frame is not reached.
Adds to the generated trace files config information and makes
CaptureReplayTest utilize said config information to reproduce the exact
environment of the captured application.
Bug: angleproject:4817
Change-Id: Ie3d487af2bacf349dc3ff6f6b1b5f89e1169dc84
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2282885
Commit-Queue: Manh Nguyen <nguyenmh@google.com>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
In MultisammpleTest, a custom OSWindow object is created. Sometimes this
window's internal Objective-C window object is not released after the
test finishes, thus input events such as mouse/keyboard are still
forwarded to this window. However its content view is already released
causing the crash.
call [mWindow setContentView:nil] inside OSXWindow::destroy() seems to
fix this bug.
Bug: angleproject:4815
Change-Id: If00398ff0082624ade5e8be8ad3b0f91d17c23ed
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2281782
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
GN recently added support for Apple frameworks to link, rather than
overloading the libs lists. This pulls .frameworks out of the libs
lists, so that GN can stop supporting .frameworks in libs in the
future.
Bug: chromium:1052560
Change-Id: I3aed298db01bdb5f6e7f37a74c1bbc06f99d760c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2279931
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Adds to frame capture the ability to serialize a frame's pre-swap
GL state and store it in the binary data file
Adds to CaptureReplayTests the ability to compare its serialized GL
state with the serialized state pulled from the binary data file
Adds a serialization module that serializes framebuffers' GL states
and the contents of their color attachments
Adds checks to automation script so that it would skips tests that
do not produce the expected trace files
Adds exception handling to automation script so that it will not crash
when a replay build crashes
Bug: angleproject:4779
Change-Id: I40a02e018073749e79f0ddbfd3d4065745548f46
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2258295
Commit-Queue: Manh Nguyen <nguyenmh@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
frame_capture_utils.h is only used in tests so changing the name to be
frame_capture_test_utils.h is more appropriate. Also
frame_capture_utils.h will now be a file in libANGLE_with_capture
library where serialization code is stored.
Bug: angleproject:4806
Change-Id: I7482693a75b2d0edda7e84ae9b777fd3f46f1855
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2273917
Commit-Queue: Manh Nguyen <nguyenmh@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Add the ability to release and reacquire the high-power GPU, and to
respond to changes in the active GPU. In Chromium, the GPU process can
not access the WindowServer. An external process must inform ANGLE
that the active GPU has changed, and that ANGLE should switch its
internal context to the new GPU.
Incorporates a couple of functions from WebKit, used with permission,
to effect this GPU switch.
A follow-on change in Chromium which uses these new APIs will make the
existing dual-GPU tests pass with ANGLE and the passthrough command
decoder.
Carry forward Chromium's workaround of disabling GPU switching on
older MacBook Pros to ensure stability.
Document the process of adding new EGL extensions to ANGLE.
Bug: chromium:1091824
Change-Id: I499739156e851b493555d4d6e4aef87d8b97fa31
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2240638
Commit-Queue: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Add support for creating EGL pixmaps from X11 pixmaps using GLX.
Pixmaps are needed for various external APIs such as VAAPI.
Add support for EGL_NOK_texture_from_pixmap to allow binding
pixmaps to textures.
BUG=angleproject:4560
Change-Id: I4a6d3ad7e87151ff5317bbdaaf093ac1b46daf5f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2153805
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Will be reused in a test in a following change.
Bug: angleproject:2914
Change-Id: I4e255d5c762f2a6c064b06c558519d82ec6ead5f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2239085
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Use BlitGL to reimplement copyTex[Sub]Image2D on iOS.
Bug: angleproject:4674
Change-Id: Ie3018d6d33da57797162922410f76557124df4b6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2222718
Commit-Queue: James Darpinian <jdarpinian@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
"platform.h" is too common a name and causes headers to be
included incorrectly. Disambiguate the header using a more
specific name.
Solves a problem that came up with the GLES 1 tests and the
standalone test harness.
Bug: angleproject:3162
Change-Id: I88229a2c9407e0db57f5beee44daa11a4075f700
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2229065
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Now works when run in a sequence. Also saves RGB images to avoid
issues with the alpha being inconsistent and also flips images
vertically to fix the rendering.
Bug: angleproject:4615
Change-Id: I8d3b38c5d914e0ca2227320ac42a0e28acd12c4d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2187971
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
This adds a "--screenshot-dir" argument to capture screenshots.
If we're running with screenshot capture then the test will
early exit after the first capture. The screenshots use the same
naming pattern as the test name:
TracePerfTest.Run/vulkan_trex_200 -> angle_vulkan_trex_200.png
Note the screenshot dir is relative to the test binary directory,
not the CWD. Also adds a PNG saving utility function.
Bug: angleproject:4615
Change-Id: I1de8ae6a6e6892586bb0b743e7b9a842f90f98e5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2184834
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Adds support for Linux and Android native EGL testing.
This can be useful for doing performance comparisons of ANGLE vs
a native GL driver. Only enabled for the trace perf tests due to
limitations in the test harness.
Bug: angleproject:4596
Change-Id: Iba6d3ccd7c1275cf095893fab824a0ea33dc3a79
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2116254
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
When attempting to link a new program, the program must be marked
as unlinked, but the validation-related caching should not be
cleared yet, since we can still use the previously linked program
if linking fails at this point.
Added an angle end2end test which fails without this fix and
passes with this fix.
Fixes the following WebGL 1.0.4 test with SwANGLE:
conformance/programs/program-test.html
Bug: angleproject:3557
Change-Id: Ib6722ba88803979e8f292c9b7b81f85cc0304662
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2173538
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Alexis Hétu <sugoi@chromium.org>
This CL adds two program pipeline object (PPO) tests based on code
inspection during review. They are both disabled awaiting fixes.
* The first (DetachAndModifyShader) tests a bug that shaders aren't
detached immediately on call.
* The second (DifferentTextureTypes) tests PPOs with mismatched
texture types. They should not link if the programs use a texture in
non-matching ways.
Test: ProgramPipelineTest31.DetachAndModifyShader*
Test: ProgramPipelineTest31.DifferentTextureTypes*
Bug: b/151462886
Bug: b/151449648
Bug: angleproject:3570
Change-Id: Ief0937397d31c972bf5e3a8d56b02d2dbd5a604b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2146997
Commit-Queue: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
EGL_CONTEXT_OPENGL_DEBUG is only exposed as of EGL 1.5.
We can also now properly test for no_error extension strings.
Do not require backwards compatible context extensions.
Fixes parts of using EGLWindow to load native EGL drivers.
Bug: angleproject:4596
Change-Id: I4de8f492f265d29f6603ed1b35b123e362699c54
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2176271
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
For some reason this line of code confused git cl format
in that it would generate different results depending on when
it was called:
"PFNEGLSTREAMCONSUMERGLTEXTUREEXTERNALATTRIBSNVPROC
ANGLE_EGL_StreamConsumerGLTextureExternalAttribsNV;"
I wasn't able to root cause the bug. Instead I worked around
it by changing the signatures for this file.
Bug: angleproject:4596
Change-Id: I4f18e03d27d378480b19831de51c4e85d815ca66
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2176157
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Mohan Maiya <m.maiya@samsung.com>
This should prevent debuggers like RenderDoc from getting confused
about symbol names. It's also generally good practice to avoid
overloading names.
Change-Id: Ie9fd3f77f45479bdf6925dae3e03fb4ac85bdb8a
Bug: angleproject:4596
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2171684
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Covegl test is hard to suit gtest, so just compile it without gtest
(angle_gles1_covegl_no_gtest), we can get the test result by exit code.
Bug: angleproject:2303
Change-Id: I67a930c91f23c02e72022329c712a0749e4a903c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2126587
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
eglGetMscRateCHROMIUM was added to EGL_CHROMIUM_sync_control based
on the original extension GLX_OML_sync_control. However, this new
function is not universally implemented. This CL moves it to a new
extension, EGL_ANGLE_sync_control_rate, and renames it to
eglGetMscRateANGLE.
Bug: chromium:1064078
Change-Id: Ia2a29c6776b2b2bf2b98e58ee83b5f141ed01301
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2118154
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
* Move DecompressBinaryData to a shared helper
* Start using it in CaptureReplay sample
* Error out if decompress callback isn't set correctly
Test: AngryBirds and CandyCrush captures replay on desktop
Test: angle_perftests --gtest_filter="*Trace*"
Bug: angleproject:4484
Change-Id: I0432004fdb0cfb0fd61f9a66f792591c9aa40d9b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2118790
Commit-Queue: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
This file was no longer referenced and is dead code.
Bug: None
Change-Id: Id4469b9575a14e31c6f715c2d290f2f8945cd25b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2110331
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
This reduces code duplication by including a common set of sources in a
single place. New test sets will be a bit easier to add. It also
encapsulates the dependencies a bit better when we pull the test utils
out of the test targets.
Unblocks a follow-up CL that moves the trace perf test sources into
their own file so we can re-enable optimizations in the main perf test
target.
New warnings popped up in a few of the files because of the new source
set enabling more warnings. This CL also fixes all of those.
Bug: angleproject:3630
Change-Id: Ic30cb30fb4288c4dbbbd29f9bdf04be51e8a6b30
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2103083
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Swiftshader does not currently have the ability to behave in a way
for ANGLE to support KHR_robustness. Disable for now until that
functionality is available.
Bug: angleproject:3058
Bug: swiftshader:145
Change-Id: I1c1b8147f6b9cf6f8d0da633dfe0f61ebfab5175
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2097053
Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Ian Elliott <ianelliott@google.com>
This entry point is specifically for retrieving very large timestamp
values from EXT_disjoint_time_query. In GLES 2.0 contexts with the
Vulkan back-end we were getting some astronomical values that couldn't
be cast to 32-bit ints.
Also fix missing dependencies in generate_loader.py.
Bug: angleproject:4433
Change-Id: I59146dcc1a163a24ac2d7c37546f4551a7a8890a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2080595
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
This extension allows setting independent blend state (and color write mask) for each draw buffer. OES and EXT versions provide exactly the same functionality. It is also included in GLES 3.2 core.
Bug: angleproject:4394
Change-Id: I0c27c419472622e309a038dd1463fa0b3e4ca595
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2078587
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Only enabled for specific tests at the moment. This CL allows our tests
to sanitizes memory for the robust resource access extension. It is
quite slow so should not be enabled by default.
Only works for 1 level 2D color textures and buffers. Makes several
flaky robust resource initialization tests consistently fail.
Controlled via an angle::Feature in FeaturesVk.
It works by initializing memory to an abitrary non-zero value:
- if newly allocated memory is mappable, we map it in init and set it
- if a buffer or texture can be a transfer destination, we use a
staging resource
- otherwise we don't attempt to initialize the resource.
Bug: angleproject:4384
Change-Id: I9b4f347bfcddf3096f491ed0243bef86837feaa0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2043271
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>