Either the implementation should tell us what Vk format it is, or it
returns VK_FORMAT_UNDEFINED and we should take the "YUV" path,
regardless of how un-YUV-like the format ID enum suggests it is.
Bug: b/223456677
Change-Id: I979e9d19c466005350aeb8f88f2e0c092b545d51
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3864024
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Lingfeng Yang <lfy@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
Auto-Submit: Lingfeng Yang <lfy@google.com>
Make the output directory configurable with the define
that turns on the dump feature.
Write each aggregate struct in its own block of memory, so that
if an aggregate changes, the binary format does not change
so easily.
Choose the filename based on the contents hash, so that multiple
dump sessions do not produce excessive amount of dumps.
Bug: angleproject:7612
Change-Id: Ifccd2d83e3361dc4633b601fd18f425c9ec44790
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3858263
Auto-Submit: Kimmo Kinnunen <kkinnunen@apple.com>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
If the shader source code uses shader storage
buffer objects, we need to check the corresponding
GL_MAX_*_SHADER_STORAGE_BLOCKS is at least of size 1.
Bug: angleproject:7583
Change-Id: I7f0e537e4dcfca8414cccb0088be8d34735633d1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3863111
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
If out-of-date can recreate the swapchain, so can suboptimal. Do so to
better support window resizing on desktop. Note that on Android this
was already being done.
Bug: angleproject:7615
Change-Id: I3d1ce8ca45b002e5382e31fda003f02753a2c94e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3859409
Reviewed-by: Steven Noonan <steven@valvesoftware.com>
Reviewed-by: Ian Elliott <ianelliott@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
This replaces our copy of gl.xml with the upstream canonical copy.
Note that one patch is required before we can remove ANGLE's copy:
https://github.com/KhronosGroup/OpenGL-Registry/pull/538
Because the upstream version uses a new method of enum groups, we
also update our enum-to-string generator to use the new groups.
This new code includes many more enums and groups in the mapping.
Bug: angleproject:6461
Change-Id: I1c0ab44c36afce8db04c9661b377bbe5762c913e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3856649
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
YUV D3D11 texture plane EGLImages can be bound to TEXTURE_EXTERNAL_OES,
but don't support rendering because ExternalImageSibling11::IsYUV()
returns true. While it might appear that IsYUV() should return true for
YUV D3D11 textures, the EGLImage siblings are actually for individual
planes which are R/RG 8/16 and they can indeed be bound as render
targets if we just return false for IsYUV().
This CL makes IsYUV() return false and adds a test for rendering to
YUV EGLImages.
Bug: angleproject:7610
Change-Id: I6c95a9521448e83a53153c1efaca70bd73e49818
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3856660
Auto-Submit: Sunny Sachanandani <sunnyps@chromium.org>
Commit-Queue: Sunny Sachanandani <sunnyps@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
std::this_thread::get_id() gets recycled. It's pthread_self()
under the hood on Linux and Android which gets recycled, for
example when one thread terminates and another one starts
it is likely to return the same value.
Bug: angleproject:7602
Change-Id: I83d818bc17ead5cce8bce7f7d88fc1c7c0fa860c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3855041
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Overview:
This CL makes the validation of *CopyTextureCHROMIUM* and
*CopySubTextureCHROMIUM* in ANGLE behave consistently with CHROMIUM.
The new behavior is:
```
INVALID_OPERATION is generated on ES 2.0 if <sourceId> refers to an
external texture (OES_EGL_image_external), <destId> refers to a texture
with an integer-type internal format, and the underlying context does
not support OES_EGL_image_external_essl3.
```
Tests:
===== CopyTextureCHROMIUM =====
add a test in ES 2.0 to test the API with the error case.
===== CopySubTextureCHROMIUM =====
add a test in ES 3.0 to test the error case. in ES 2.0, the error case
cannot happen because "glTexImage2D()" doesn't support integer formats
- ran all CopyTextureTest on gLinux: ```autoninja -C out/Debug &&
xvfb-run out/Debug/angle_end2end_tests
--gtest_filter=*CopyTextureTest* --verbose```
- ran all CopyTextureTest on Android test phone: ```autoninja -C
out/Android && out/Android/angle_end2end_tests
--gtest_filter=*CopyTextureTest* --verbose```
Bug: angleproject:4228
Change-Id: I1cb77c72750add5f399013d3d30eed7acf8d0a50
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3826166
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Delete callback fixes b/179188489 as delete[] will get called from the
same module where allocation happens. When decompress/delete callbacks
not provided, new[] and delete[] are called from the fixture.
AFAICT, gBinaryData == nullptr every time, even with a single test and
--gtest_repeat=N, so we never delete the uncompressed data. When
running multiple tests locally, I see RES usage grow significantly
on Linux which this CL fixes. I don't think this matters for bot runs as
we run tests one by one there.
Bug: b/179188489
Change-Id: Iee3bccb9d6d72c315c4358b70ec9c3c0ac963258
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3858185
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Roman Lavrov <romanl@google.com>
Need to be packed and found in the application bundle.
Bug: angleproject:5417
Change-Id: Iaf84ced0de6674a807aa747e71dbbf2715bbd6fb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3860831
Auto-Submit: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
* Re-enable shader cache feature
* Improve BlobCache thread-safety test
* Improve EGLProgramCacheControlTest to not check the size
of the BlobCache, since the shader cache interferes with this.
* Include the arguments to ConstructCompiler() and Compile()
in the key hash for the shader cache.
Bug: angleproject:7036
Change-Id: Ied4e11f9160552f2f9358d99b5656315239ba856
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3851161
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Eddie Hatfield <eddiehatfield@google.com>
Patch by: David Kilzer <ddkilzer@apple.com>
Use unsigned int as the seed type as expected,
instead of unsigned long long. Helps compiling
with strict compile flags.
Also fix a bug where short buffers would test
XXH64 instead of intended XXH32.
Bug: angleproject:7618
Change-Id: If63318fbc932349db4ab82aa8abadc9bab655989
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3860830
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Auto-Submit: Kimmo Kinnunen <kkinnunen@apple.com>
If the vertex shader uses shader storage buffer objects,
we need to check GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS
is at least of size 1.
Bug: angleproject:7185
Change-Id: I98d83f9f0cc30e92fdcaee15541fdde96652b38e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3858144
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
On Android, the EGL loader supports and implements the necessary
functionality for the following colorspace extensions -
1. EGL_EXT_gl_colorspace_display_p3
2. EGL_EXT_gl_colorspace_display_p3_linear
3. EGL_EXT_gl_colorspace_display_p3_passthrough
4. EGL_EXT_gl_colorspace_scrgb
5. EGL_EXT_gl_colorspace_scrgb_linear
Add support for "EGL_ANGLE_colorspace_attribute_passthrough"
extension that allows vendors that support wide color gamut
to passthrough colorspace attribute values to the underlying
Vulkan implementation to be used during VkImage creation.
Bug: angleproject:7319
Test: PbufferColorspaceTest.CreateSurfaceWithColorspace*
Change-Id: Ibd78bb5fea4ede394f4dc5027c1d4a730746f2ee
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3855048
Commit-Queue: mohan maiya <m.maiya@samsung.com>
Reviewed-by: Ian Elliott <ianelliott@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
The ESSL spec has a bug with images as function arguments. The
recommended workaround is to inline functions that accept image
arguments.
Bug: angleproject:7484
Change-Id: I8fc0826f330c68150de5c3d1758c10c3e37bbf04
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3813050
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Use validationErrorF to annotate all unsupported enum errors with the
corresponding value of the enum in hex.
This makes the errors more meaningful and reduces the amount of
debugging required to find out the invalid enum used.
Add kEnumInvalid error string in cases an InvalidEnum is provided and
can't be resolved to the given GL enum.
Before:
glEnable: GL error: HIGH: Enum is not currently supported.
After:
glEnable: GL error: HIGH: Enum 0x809D is currently not supported.
Bug: angleproject:7595
Bug: angleproject:7596
Change-Id: Iff060a1c3a2f482f4df5b5b7ea036b93025df7d9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3849475
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Lubosz Sarnecki <lubosz.sarnecki@collabora.com>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
In addition to not exposing the dedicated ANGLE-specific
extension name, do not add these formats to the internal
formats table.
Bug: angleproject:7601
Change-Id: I2e3fdd99129823b8092bfa35cb95023ae5008edd
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3853591
Auto-Submit: Alexey Knyazev <lexa.knyazev@gmail.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Adds a new internal memory qualifier to the compiler called
"rasterOrdered", which we set in RewritePixelLocalStorage.cpp when D3D
11.3 Rasterizer Order Views are supported. The HLSL translator then
generates RasterizerOrderedTexture2D<> instead of RWTexture2D<> when
this qualifier is set.
Bug: angleproject:7279
Change-Id: I39b8c3279b7bff93b7e57272e8fb84d9c0312616
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3830288
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Chris Dalton <chris@rive.app>
Use validationErrorF to annotate all internal format errors with the
corresponding value of the internal format enum in hex.
This makes the errors more meaningful and reduces the amount of
debugging required to find out the invalid format used.
Before:
glCompressedTexImage2D: GL error: HIGH: Invalid internal format.
After:
glCompressedTexImage2D: GL error: HIGH: Invalid internal format 0x8B94.
Bug: angleproject:7595
Bug: angleproject:7596
Change-Id: I6b9c116863e0116f96b8ff0e71e9734947a1c1c6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3849476
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Lubosz Sarnecki <lubosz.sarnecki@collabora.com>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Instead override the supported APIs in registry_xml.py, which
will transfer to using the canonical gl.xml. Note these are
desktop-GL-only extensions that ANGLE exposes in GLES:
GL_ARB_sync
GL_NV_robustness_video_memory_purge
Bug: angleproject:6461
Change-Id: I25778149ecfc3cb4be0aca2104c08273c260c564
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3856648
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Auto-Submit: Jamie Madill <jmadill@chromium.org>
Use FramebufferCaptureFuncs when capturing glBindRenderbuffer calls on
GLES1 contexts, since they require the GL_OES_framebuffer_object
extension and will otherwise crash on certain native GL drivers.
Bug: angleproject:7596
Change-Id: I7be1b0dee38c9186b657489ca76bf769f47caeb1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3849478
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Lubosz Sarnecki <lubosz.sarnecki@collabora.com>
The GLSL mac-only options were being listed as unsupported only when the
output is not GLSL. However, they should also be listed as unsupported
on GLSL output when not on mac.
Bug: chromium:1355076
Bug: chromium:1355281
Change-Id: I5a87d9a529e534b2ea6c030ad7132cd0f698e7d1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3855700
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Because any of the tests could flakily hang, it's better that we
skip the group entirely until we have the ability to add flaky
retries as test expectations.
Bug: angleproject:6261
Change-Id: I59d686d983ff5123a2c8cb40f3c1d808c611b20e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3856651
Auto-Submit: Jamie Madill <jmadill@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
This switches ANGLE to use the upstream XML files for the CL, EGL
GLX and WGL APIs. Since gl.xml has a few more significant diffs
from the upstream version, that work will come in another CL.
This also removes an ANGLE EGL ext that was added upstream.
Bug: angleproject:6461
Change-Id: I29ead5edc13a4256d1f702c330a5d3d233502cd4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3854318
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
MEC replay requires an unpack alignment of one. When creating a
trace the call to set this alignment is emitted, but it is not
actually set in the context, so that the captured context state
records the actual unpack alignment. When replaying, the call
to set the unpack alignment to one is executed, and the context
state changed, so that comparing the captured context to the
replay context will fail if the original alignement was not one.
Restore the original alinment in the context setup functions to
ensure that the context state holds the same state information
when replaying like when the trace was captured.
Bug: angleproject:7564
Bug: angleproject:7180
Change-Id: I09d9bf77bc0193bdf9f41b6183f1ee8d66c5e563
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3827346
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Analogously to FramebufferCaptureFuncs, append OES suffixes to vertex
array related functions on GLES1 contexts. These functions require the
GL_OES_vertex_array_object extension and will crash on certain native
drivers without the OES suffix.
This resolves the following validation error when replaying GLES1
traces captured using MEC on ANGLE:
glBindVertexArray: GL error: HIGH: OpenGL ES 3.0 Required.
Bug: angleproject:7596
Bug: angleproject:7608
Change-Id: I603efae4a8d61b84b7711effb2e7e1d8d52e3d83
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3849477
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Lubosz Sarnecki <lubosz.sarnecki@collabora.com>
When MEC re-creates the program creation, it first creates the
program, and then the shader stages, and since the Handles are
handed out from the same handle allocator, the numbers are
different if the creation order is different. Since the logic
to capture a shader program is more involved to be changed,
re-arrange the calls in CompileProgramInternal.
Bug: angleproject:7564
Change-Id: I28617cc67e7ca59d8ce181785cc159fe876655b1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3826257
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Gert Wollny <gert.wollny@collabora.com>
The extension needs to be `.chromium` for compatibility with
tools/licenses.py
Bug: chromium:1355665
Change-Id: Iabc26bd96ec8b71cf8546ff0ec05172fb8d82ca1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3855396
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Yuxin Hu <yuxinhu@google.com>
Right now this is only enabled if async queue submission is enabled. I
think this is a bug that we have to always enable the lock, since
suballocation destroy could come from any threads.
Bug: b/236098131
Change-Id: I0fda61e5db3ff60f776b8d4917a9f10dafed6b1a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3855203
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Ian Elliott <ianelliott@google.com>
Test: Run glxgears and hit unimplemented in ANGLE
Bug: angleproject:7533
Change-Id: Ic7ed7506b6d0c5ef5022ae6899cbd6c4d351b178
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3852631
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Eddie Hatfield <eddiehatfield@google.com>
Reviewed-by: Cody Northrop <cnorthrop@google.com>