|
d07965b3
|
2023-09-25T16:54:00
|
|
Workaround for the ETC2 transcoding bug on some AMD GPUs.
We now perform alpha encoding first, in 8-bit alpha mode. While this
should not make any difference from a logic perspective, it does fix a
bug on certain AMD GPUs. See b/300672851 for details.
Tested on a Radeon RX 560X Series GPU, which current drivers.
Bug: b/300672851
Change-Id: I5d2bfbca36a27f064918f19e7330dd7467a320cd
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4892879
Reviewed-by: Hailin Zhang <hailinzhang@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
2c0f9d20
|
2023-09-26T11:50:54
|
|
Metal: Protect against invalid locations in setUniformImpl
Chrome disables validation and a common bug is that the wrong program
is used during uniform setting in Skia. Make this bug less catastrophic
while the root cause is investigated.
Bug: chromium:1484878
Change-Id: I521e99cdf6cebc56775e484fa8d61ad18f506479
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4886384
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
|
|
7cacb537
|
2023-09-26T11:27:49
|
|
Limit the uncompressed data size when decompressing blobs.
If the data in the blob cache is invalid for any reason, ANGLE will
take the last 32 bits of it an interpret it as a size for
decompressing the blob. Add some reasonal upper bounds on the
decompressed data size so that if the data is invalid it will simply
fail decompression instead of allocating giant buffers.
Bug: chromium:1485277
Change-Id: Ifb807f5ea836b692f37734b20789f5daefcca5c9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4887599
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
|
|
7f5b5f74
|
2023-09-19T07:35:16
|
|
Tests: Add Batman: The Telltale Series trace
Test: angle_trace_tests --gtest_filter="*batman_telltale*"
Bug: b/301024256
Change-Id: Ice5aa3ed093901c04486fca64121592eb8805f93
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4883428
Auto-Submit: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Roman Lavrov <romanl@google.com>
Commit-Queue: Roman Lavrov <romanl@google.com>
|
|
97a48912
|
2023-09-26T10:31:58
|
|
Turn is-link-thread-safe feature into a positive condition
Chrome's --disable-gpu-driver-bug-workarounds currently sets every
feature to false, which breaks the GL backend.
Bug: angleproject:8297
Change-Id: I284d0699e356d7c1a362eb992cdc0d052f9ea7c2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4887598
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Roman Lavrov <romanl@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
1579eed5
|
2023-09-25T18:21:39
|
|
BufferHelperPointerVector -> BufferHelperQueue (deque)
DynamicBuffer.mBufferFreeList is a vector<unique_ptr>.
DynamicBuffer::allocate erases an element from the front, which is what
deque is exactly good for.
Changed other uses too (mBufferFreeList,
VertexArrayVk.mCachedStreamIndexBuffers) per Charlie's recommendation.
Yields a significant power improvement in words_crush trace.
Bug: b/302020992
Change-Id: I1b0242481404b8fc2cfdc27611252308b922f4d7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4886367
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Roman Lavrov <romanl@google.com>
|
|
c9955641
|
2023-09-25T14:31:01
|
|
Avoid malloc in angle::Mat4 by using array instead of vector
angle::Matrix<float>::inverse() showed up in cpu profile of "minetest"
trace at ~10%. It's a gles1 trace. Multiple objects are constructed
and require malloc due to the use of std::vector.
Called here:
https://crsrc.org/c/third_party/angle/src/libANGLE/GLES1Renderer.cpp;drc=eb0d59973d21f845b5785563f5d56b8ebb617478;l=371
This CL decouples Mat4 from angle::Matrix (some of the functionality had
to be copied over) to switch from std::vector to std::array.
Testing "minetest" on a phone I saw a ~20% cpu power improvement due to
this CL.
There is an existing unit test coverage: MatrixUtilsTest.Mat4InvTr
Moved 4x4 cofactor matrix code to a helper with transposition included
Bug: b/301977186
Change-Id: I1e4c2201d19759dd37c0fee44fb44f4d24a58a6b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4885501
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Roman Lavrov <romanl@google.com>
|
|
6b0ddce0
|
2023-09-22T13:13:38
|
|
Backends need to handle invalid render area during a clear
1. Frontend no longer noops empty scissors during clear
2. FramebufferVk is updated to handle invalid render area by restaging
deferred clears in clearImpl(...) if render area is invalid
Bug: angleproject:8348
Tests: EGLSurfaceTest*WindowThenScissoredClear*
Change-Id: Iec51914a083a59bad7f939798c932dffada56a6c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4867641
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: mohan maiya <m.maiya@samsung.com>
|
|
826e5f95
|
2023-09-24T09:48:55
|
|
Vulkan: Rename redeferClears as restageDeferredClears
This is a simple rename to better reflect implementation
and has no functional changes.
Bug: angleproject:8348
Change-Id: I53ce42e8bb14687a0dda167b8d79eba1eb357254
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4888691
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: mohan maiya <m.maiya@samsung.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
be8739f2
|
2023-09-22T14:36:45
|
|
Vulkan: Fix StatInfo in vk_mem_alloc_wrapper.h to match VMA
Right now we are defining our own StatInfo structure in
vk_mem_alloc_wrapper.h to avoid inclusion of VMA header directly in
other ANGLE code. This caused this struct no longer matches VMA's
structure since VMA 3.0 switch. For quick fix, this CL just update
StatInfo to match VMA 3.0 define.
Bug: b/301653706
Change-Id: Ic510c362f30d9296a13964e6ba9c617e80e49ceb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4888625
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
6399f8d3
|
2023-09-24T05:01:22
|
|
Bugfix in HandleAllocator::reset(...)
Cache "maximumHandleValue" passed in via constructor
and use this value in reset(...)
Bug: angleproject:8354
Test: HandleAllocatorTest.ResetAndReallocate
Change-Id: I63bb953186a07d32582a0276af3ac8cb26a007a5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4888690
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: mohan maiya <m.maiya@samsung.com>
|
|
9fc3baf5
|
2023-07-26T10:29:13
|
|
Add the missing GraphicsPipelineDesc legacy dither bit update
When the app calls glEnable(GL_DITHER) or glDisable(GL_DITHER),
we need to update the legacy dither bit of the renderpass that
belongs to ContextVk::mGraphicsPipelineDesc. If not, there is a
change that the graphics pipeline will be created with a
renderpass that has outdated legacy dither bit. This results
the dither being applied to the render results incorrectly:
e.g. the app calls glDisable(GL_DITHER),
but the render results have dithering applied.
Bug: b/286921997
Bug: b/292282210
Bug: b/293349058
Bug: b/284462263
Change-Id: Ie24b95898526c9021be6e3cb7620e4050f9faaaf
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4722446
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Roman Lavrov <romanl@google.com>
Commit-Queue: Yuxin Hu <yuxinhu@google.com>
|
|
141bada9
|
2023-09-22T10:25:30
|
|
Vulkan: add prefer cached memory type for dynamic buffer usage.
Bug: b/288119108
Change-Id: I0fb5d91780e83af06762b9f3e6122313e76624da
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4886846
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Hailin Zhang <hailinzhang@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
|
|
e1d2e88a
|
2023-09-20T11:53:15
|
|
Check pending garbage after some buffer releases
* Embedded BufferHelper::releaseBufferAndDescriptorSetCache() inside
a new ContextVk method: releaseBufferAllocation()
* After releasing the buffer, there is a check for excess pending
garbage. If the tracked pending garbage size is larger than the
threshold, the context will be flushed.
* Unskipped the test "BufferDataInLoopManyTimes", which was failing
on Android devices.
Bug: b/280304441
Change-Id: Ib34319f3291dd2200fc1a92e30645f9d1da8e2b9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4879086
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
a1e3abc0
|
2023-09-22T10:14:43
|
|
Add ES2 support for copying GL_SRGB8_ALPHA8 to GL_RGBA8
Bug: angleproject:7907
Change-Id: I02ae9785ea1f942e85983c18155cfd75ec39b5c2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4887271
Commit-Queue: ccameron chromium <ccameron@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
7b1b8a01
|
2023-09-21T20:15:29
|
|
Metal: Allow using GL_RGB with either RGBA/BGRA IOSurface.
Previously we only allowed GL_RGB internal format to be used with BGRA
IOSurface and GL_RGBX8_ANGLE to be used with RGBA IOSurface
respectively.
However, there are currently many places in Chrome prefer GL_RGB to be
able to be used with both RGBA and BGRA IOSurface.
This CL allows such combinations. Instead of deducing angle::FormatID of
the IOSurface pbuffer based on the input GL internal format & type, we
will take into account the pixel format of the IOSurface as well.
For example, when we call eglCreatePbufferFromClientBuffer with GL_RGB
internal format attribute:
- if IOSurface's pixel format is 'RGBA' ->
deduced angle::FormatID is R8G8B8A8_UNORM.
- if IOSurface's pixel format is 'BGRA' ->
deduced angle::FormatID is B8G8R8A8_UNORM.
This CL also removes GL_RGBX8_ANGLE support from Metal backend. Because
there are many places in Chrome that use this format enum for both RGBA
& BGRA IOSurface when the extension is available. It's redundant to
support that since GL_RGB already covers most of the required cases.
Bug: angleproject:8350
Change-Id: I5a121a97e031a42d0779721d4348f373dfaee9a0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4881742
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Quyen Le <lehoangquyen@chromium.org>
Reviewed-by: Sunny Sachanandani <sunnyps@chromium.org>
|
|
26148a02
|
2023-09-21T11:25:16
|
|
Vulkan: Minor cleanup of mPrevUploadedMutableTexture
When texture is transit from mutable to immutable, we need to remove it
from SharedGroupVk::mPrevUploadedMutableTexture if it is pointing to.
Right now we did not clear the pointer, but rely on next texImage call
to detect that mPrevUploadedMutableTexture is pointing to a immutable
texture and then set it to new tetxure. This is a bit confusing since we
only add a mutable texture to this mPrevUploadedMutableTexture pointer
but at some point it becomes immutable. This CL changes to immediately
reset the pointer when texture is respecified from mutable to immutable,
and added assertion that mPrevUploadedMutableTexture is mutable.
Bug: b/301289624
Change-Id: I97a11616887367cd4c2069419fe17d3dea052b50
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4879087
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
73252f34
|
2023-09-20T16:46:47
|
|
Fix ASSERT and potential bug with UnlockedTailCall
ASSERT happened in the Instagram application.
- record REEL using camera;
- press "Next" button;
- return to the previous screen;
- ASSERT happens.
Crash details:
pid: 31451, tid: 2938, name: mediacompositio >>> com.instagram.android <<<
signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
Abort message: 'FATAL: entry_points_egl_autogen.cpp:437 (EGL_GetError): ! Assert failed in EGL_GetError (../../src/libGLESv2/entry_points_egl_autogen.cpp:437):
backtrace:
...
#07 pc 0000000000627740 /vendor/lib64/egl/libGLESv2_samsung.so (gl::LogMessage::~LogMessage()+140) (BuildId: acced3587e668343)
#08 pc 000000000027e79c /vendor/lib64/egl/libGLESv2_samsung.so (EGL_GetError+360) (BuildId: acced3587e668343)
#09 pc 000000000007c14c /system/lib64/libEGL.so (android::eglGetErrorImpl()+28) (BuildId: 5b32b014e5c062afdd3d1abd3ba13dd2)
#10 pc 0000000000079464 /system/lib64/libEGL.so (eglDestroyImageKHR+20) (BuildId: 5b32b014e5c062afdd3d1abd3ba13dd2)
#11 pc 000000000000e540 /system/lib64/libnativedisplay.so (android::EGLConsumer::EglImage::~EglImage()+44) (BuildId: 3b0b03d2c8ab7eb49d16eb7be29eb3fd)
#12 pc 000000000000e598 /system/lib64/libnativedisplay.so (android::EGLConsumer::EglImage::~EglImage()+16) (BuildId: 3b0b03d2c8ab7eb49d16eb7be29eb3fd)
#13 pc 000000000000e434 /system/lib64/libnativedisplay.so (android::EGLConsumer::onFreeBufferLocked(int)+156) (BuildId: 3b0b03d2c8ab7eb49d16eb7be29eb3fd)
#14 pc 000000000000bda0 /system/lib64/libnativedisplay.so (android::SurfaceTexture::freeBufferLocked(int)+48) (BuildId: 3b0b03d2c8ab7eb49d16eb7be29eb3fd)
#15 pc 00000000000bc294 /system/lib64/libgui.so (android::ConsumerBase::onBuffersReleased()+172) (BuildId: f219f4196018eeed01e28ec428c73c99)
#16 pc 000000000008d9d4 /system/lib64/libgui.so (android::BufferQueue::ProxyConsumerListener::onBuffersReleased()+92) (BuildId: f219f4196018eeed01e28ec428c73c99)
#17 pc 0000000000099608 /system/lib64/libgui.so (android::BufferQueueProducer::disconnect(int, android::IGraphicBufferProducer::DisconnectMode)+184) (BuildId: f219f4196018eeed01e28ec428c73c99)
#18 pc 00000000000eb3ec /system/lib64/libgui.so (android::Surface::disconnect(int, android::IGraphicBufferProducer::DisconnectMode)+268) (BuildId: f219f4196018eeed01e28ec428c73c99)
#19 pc 00000000000eaf04 /system/lib64/libgui.so (android::Surface::hook_perform(ANativeWindow*, int, ...)+264) (BuildId: f219f4196018eeed01e28ec428c73c99)
#20 pc 0000000000031214 /system/lib64/libvulkan.so (vulkan::driver::DestroySurfaceKHR(VkInstance_T*, VkSurfaceKHR_T*, VkAllocationCallbacks const*)+56) (BuildId: 44c563855311012ead3ce5e7afdb9792)
#21 pc 000000000039bb40 /vendor/lib64/egl/libGLESv2_samsung.so (void std::__Cr::__function::__policy_invoker<void (void*)>::__call_impl<std::__Cr::__function::__default_alloc_func<rx::WindowSurfaceVk::destroy(egl::Display const*)::$_0, void (void*)> >(std::__Cr::__function::__policy_storage const*, void*)+140) (BuildId: acced3587e668343)
#22 pc 0000000000522114 /vendor/lib64/egl/libGLESv2_samsung.so (angle::UnlockedTailCall::runImpl(void*)+56) (BuildId: acced3587e668343)
#23 pc 000000000027dcec /vendor/lib64/egl/libGLESv2_samsung.so (EGL_DestroySurface+260) (BuildId: acced3587e668343)
This CL will fix the ASSERT as well as remove possibility of calling
same callback twice.
Bug: angleproject:8127
Change-Id: I8e56981d0db2ef5723afedc22d5286421237444b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4874040
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Igor Nazarov <i.nazarov@samsung.com>
|
|
1833a686
|
2023-09-20T16:21:21
|
|
Fix FixedVector bugs and unit tests
Problems:
- test was not testing assignment operators;
- fixed compilation error in r-value assignment operator;
- r-value constructor/assignment were not resetting size.
Additionally updated FixedVector.Constructors to better test copy and
assignment operations.
Bug: angleproject:2435
Bug: angleproject:8127
Change-Id: Ic501b8d85af0280801c7abec8fb20a0ddf67580b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4874039
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Igor Nazarov <i.nazarov@samsung.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
8fcd4a50
|
2023-09-19T14:08:14
|
|
Cleanup POD struct usage to make them more consistent
In recent months, I have made many CLs to wrap various data structures
into a trivially copy-able struct. Some of them uses different
terminology. This CL replaces all of these to use a consistent name
"pod" in the struct, and "mPod" in a class.
This CL also turns ActiveVariable methods into macros to remove the code
duplication.
This CL also moves ProgramInput/ProgramOutput struct implementations
from Program.cpp to ProgramExecutable.cpp
Bug: b/275102061
Change-Id: Ia2a4210a9ea633f3d323bebe674ee74f8b90b363
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4877335
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Roman Lavrov <romanl@google.com>
|
|
9ca025d2
|
2023-09-18T15:50:48
|
|
Flatten BufferVariable/ShaderVariableBuffer/InterfaceBlock struct
InterfaceBlock inherits from ShaderVariableBuffer, ShaderVariableBuffer
is not a trivially copyable struct, this made InterfaceBlock not
trivially copyable. InterfaceBlock is being used by some app traces for
uniform blocks. BufferVariable inherits from sh::ShaderVariable which is
very complicated and not trivially copyable. This CL flattens all of
these three structs to simple structs without inheritance, and wraps all
trivially copyable data into one POD struct, thus load/save are cheaper.
Bug: b/275102061
Change-Id: I96f89176ce3d3131cb1d3ea3280c3c36c257560f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4874610
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Roman Lavrov <romanl@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
120e90eb
|
2023-09-08T11:23:11
|
|
Add test for copying GL_SRGB8_ALPHA8 to GL_RGBA8
The pixel values should be the same (no conversion should happen).
Include sub-tests with and without alpha premultiplication.
Bug: angleproject:7907
Change-Id: I2e3d657d5b8513cd06df357e84027572ebce03ff
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4852258
Commit-Queue: ccameron chromium <ccameron@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
f5842350
|
2023-08-21T00:00:00
|
|
Vulkan: Flatten secondary fragment output arrays
Added a SPIR-V transformation that makes them private
and copies their values into regular fragment outputs.
Fixed: angleproject:8336
Change-Id: Ide62dd183426e0de70fd4ac6d2b8c6a4b4b33994
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4875327
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
|
|
44c6effd
|
2023-09-20T11:21:49
|
|
Fix potential timeout of FixedQueue.ConcurrentPushPop test
The test some times times out in bots. I think what happens is that when
dequeue thread went to sleep and then wake up, during sleep the enqueue
thread already finished and exited (maybe because of timer runs out),
then it will forever stuck in the while loop. This CL adds the check for
other thread is finished or not and exit while loop if other thread has
finished.
Bug: b/301283364
Change-Id: Id6d846600b1749ce0bcb7b080b3b8ce3ad3d1dc4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4879083
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
b480ba30
|
2023-09-18T17:30:09
|
|
CopySubTexture: Fix premultiplied alpha
When copying from an sRGB texture to a non-sRGB texture, un-do the
sRGB-to-linear transform independently of the premultiply vs
unpremultiply properties of the texture.
The sRGB-to-linear transform performed during sampling is performed
on the RGB part of the pixel, independent of the alpha channel's
value. Un-do this part immediately before examining the alpha
channel's value (and its premultiply vs unpremultiply state).
Bug: angleproject:7907
Change-Id: I50c8f56182a46957febcd1f7b7887b0956074bb8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4872047
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: ccameron chromium <ccameron@chromium.org>
|
|
bfae8072
|
2023-09-20T06:48:06
|
|
Metal: Support RGBA IOSurface pbuffer.
Currently only BGRA IOSurface is supported by ANGLE.
This CL adds RGBA IOSurface support to Metal backend.
- Added GL_RGBX8_ANGLE & GL_UNSIGNED_BYTE attributes combo to specify
that the IOSurface is RGBX. Only supported on Metal backend for now.
- Added GL_RGBA & GL_UNSIGNED_BYTE combo to specify that the IOSurface
is RGBA. Only supported on Metal backend for now.
Bug: angleproject:8350
Change-Id: I0e05762870c9c034bca78e8989aedf346406df57
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4874484
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Quyen Le <lehoangquyen@chromium.org>
|
|
e3054599
|
2023-09-04T23:20:19
|
|
Metal: Don't use implicit MSAA for render buffers.
This CL removes the usage of implicit MSAA from render buffers.
Implicit MSAA added an extra single-sampled texture & resolve step when
clients render to a multisampled render buffer. It is as if
EXT_multisampled_render_to_texture extension is always used even though
users might not request for it. Not to mention this extension's
implementation is incomplete.
Furthermore, it is hidden from users. Thus
the only way for them to use the render buffer after rendering
(presentting to screen, sampling the pixels, etc) is manually resolving
the render buffer with glBlitFramebuffer. This results in another
redudant texture copy operation.
This CL also removes no-longer used function
FrameBufferMtl::getReadableViewForRenderTarget()
Bug: angleproject:8301
Change-Id: I63053b9e1d1a5cf47a023291b8fcb31d3636d3ff
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4840154
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Quyen Le <lehoangquyen@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
ae9c7857
|
2023-09-19T13:40:52
|
|
Suppress BufferDataInLoopManyTimes for Linux/Intel
* Skipped BufferDataInLoopManyTimes for Linux/Intel due to the long
execution time, suspected to be causing errors on the bots.
Bug: angleproject:8351
Change-Id: Ib7b640800edf5b30e251b47cfabfd34cc1ecea28
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4877693
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
|
|
53e3ce59
|
2023-09-08T17:41:56
|
|
Add device lost handle after finishImpl
It is possible that the during context destroy,
when calling finishImpl, the vulkan device is lost,
e.g.
https://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/6447#issuecomment-1711479164.
We should check vulkan device lost after finishImpl().
Bug: b/289544394
Change-Id: I75aa650cdd38d81815f7354770639e896e3376a7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4854763
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Yuxin Hu <yuxinhu@google.com>
|
|
ecf11eca
|
2023-09-19T15:18:04
|
|
Add ContextMutex unit tests
Test: angle_unittests --gtest_filter=ContextMutex*
Bug: angleproject:8226
Change-Id: I55b69ce8bb89d572a2bf5d28f428635505771fa1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4874388
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Igor Nazarov <i.nazarov@samsung.com>
|
|
4b724130
|
2023-06-27T18:08:27
|
|
Rename SharedContexMutex into ContexMutex
Follow up after:
Replace (Single/Shared)ContextMutex classed with ContextMutex
Renamed build option:
angle_enable_shared_context_mutex -> angle_enable_context_mutex
Renamed because there is no more SharedContexMutex class and
ContextMutex is now used for both Shared and not Shared Contexts.
Bug: angleproject:8226
Change-Id: I68eea84aa59441d9c5b19870910b2bb499311e08
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4650350
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Igor Nazarov <i.nazarov@samsung.com>
|
|
ca4dc52e
|
2023-06-22T15:20:12
|
|
Replace (Single/Shared)ContextMutex classed with ContextMutex
This CL removes `SingleContextMutex` class and not 100% safe
`Context::lockAndActivateSharedContextMutex()` method.
`SharedContextMutex<>` was replaced with `ContextMutex` with static
mutex type which is defined in "SharedContextMutex.h":
- ContextMutexType = std::mutex
Above refactoring also allows storing `State::mContext` by value,
instead by pointer. Actual mutex is referenced by `ContextMutex::mRoot`
member. This removes extra pointer indirection and slightly improves
performance.
If newly created Context uses shared textures/samplers, then it uses
`Display::mManagersMutex` root as its root.
Performance in Single/Shared cases now will be the same, and it should
be slightly faster then old Shared case (because of the reduced
complexity).
Bug: angleproject:8226
Change-Id: I7ca4d9ea008c665cbea98ace1c6e7bbc544f54b5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4632729
Commit-Queue: Igor Nazarov <i.nazarov@samsung.com>
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
eb0d5997
|
2023-09-15T16:41:13
|
|
Move set/get uniform machinery to ProgramExecutable
This is done because some uniforms are internally added by the compiler
(draw ID, base vertex, and base instance) and are automatically set **on
the installed executable**.
This change fixes scenarios where a draw is done after a program has
failed a relink, and therefore is unable to correctly set the uniforms
(as it does not have access to the executable that is installed).
It also fixes draws that use those uniforms in a PPO.
Bug: angleproject:8297
Change-Id: Id74b4984b88aa09b5b81be1c91412d6c91711136
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4864693
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
936694e3
|
2023-09-15T16:03:25
|
|
Cache isSeparable in the executable
For convenience, particularly for the next CL.
Bug: angleproject:8297
Change-Id: I55690aecf3936a51a2a2163d7c354a710b81d7f8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4864069
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
c8e16b07
|
2023-09-18T12:00:57
|
|
Vulkan: Ignore VVL errors from GOOGLE extension
We're seeing VUID-VkSamplerCreateInfo-pNext-pNext fire
when rolling vulkan-deps.
It is complaining about an unknown VkStructureType (1000264000)
The type is implemented by VK_GOOGLE_sampler_filtering_precision,
which is a private extension.
We can ignore this VVL error.
Bug: angleproject:8349
Change-Id: Ie424458873192b668371d8215dadf9788479f8dd
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4874597
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
91ef1f3c
|
2023-09-08T16:39:53
|
|
Move buffer suballocation callers to ContextVk
* Moved the following functions from BufferHelper to ContextVk.
* initBufferForBufferCopy()
* initBufferForImageCopy()
* initBufferForVertexConversion()
Bug: b/280304441
Change-Id: I890f4396b00b0c20feb44f0ad113c55924ce1014
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4854760
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
|
|
a1f52f1b
|
2023-09-07T14:44:24
|
|
Vulkan: Flush pending image garbage more often
* Added a counter to the context object to keep track of the size of
the pending image garbage: mEstimatedPendingImageGarbageSize.
* Modified hasExcessPendingGarbage() to use the sum of the size of
the image and and suballocation garbage.
* RendererVk::calculatePendingGarbageSizeLimit() provides the limit.
* Currently the limit is based on the available heap sizes. It will
use a fraction of the largest memory heap size.
* The portion is currently kGarbageSizeLimitCoefficient = 0.2f.
* Unskipped the test "TextureDataInLoopManyTimes", which was failing
on Android devices.
Bug: b/280304441
Change-Id: Ibcced1d118ea8a1f347028b62d29cfbd9e38e8c0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4851252
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
|
|
27896999
|
2023-08-16T16:44:22
|
|
Vulkan: Flush pending suballoc garbage more often
* Added a counter to the renderer object to keep track of the pending
suballocation garbage.
* mPendingSuballocationGarbageSizeInBytes
* Once it surpasses a limit (mPendingSuballocationGarbageSizeLimit), it
will flush the context so the pending garbages can be freed.
* Currently the limit is based on the available heap sizes. It will
use a fraction of the largest memory heap size.
* The portion is currently kGarbageSizeLimitCoefficient = 0.2f.
* At the end of the render pass, it is checked if the limit has been
reached. If so, context flush will occur.
Bug: b/280304441
Change-Id: I08e6028cfe20059ece2b2e4e971ece897544cd6d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4787950
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
|
|
65220256
|
2023-09-18T12:29:59
|
|
Add ProgramOutput struct for ProgramExecutable::mOutputVariables
Right now ProgramExecutable::mOutputVariables is a vector of
sh::ShaderVariable. ShaderVariable. itself is not a POD struct and can't
memcpy. And most of variables are not needed for mOutputVariables. This
CL adds a custom struct for mOutputVariables so that we only store what
we actually needed and data can be memcpy.
Bug: b/275102061
Change-Id: I045d0618b6dab5f8d58afe40e55147d12987cf61
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4862977
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
602cc1f1
|
2023-09-18T11:59:22
|
|
Don't pack gl_TessLevelInner/Outer
Per the GL spec:
The built-in outputs gl_TessLevelOuter and gl_TessLevelInner are not
counted against the per-patch limit.
Bug: angleproject:3572
Change-Id: I9fb2255d730988e7bfd6b76f9b5fdab8c475c468
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4873400
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
|
|
1b450b92
|
2023-09-15T11:07:25
|
|
Vulkan: Fix buffer storage reuse bug when robustAccess is enabled
There is an optimization in vulkan backend that when the bufferData is
called and current storage size is big enough for new bufferData call,
we just reuse the storage. Mean while, when hasRobustAccess() is true,
we must use the VkBuffer with the exact user size that glBufferData call
provides so that driver can set proper access boundary. In order to
satisfy both requirement, if robust resource access is enabled, we
create a separate VkBuffer with the exact user provided size but bind to
the same memory. There is a bug here that if robustAccess is true, this
buffer of user provided size is not been recreated when storage is
reused but with different user size (both has same allocation size).
This causes we keep using the smaller VkBuffer and subsequently causes
missing triangles. This CL clears mBufferWithUserSize when size changes
and storage is reused.
The other bug here is that previously we are checking
isRobustResourceInitEnabled, which is incorrect. We should check
hasRobustAccess. This appears works for chrome possibly due to both are
enabled. This CL switches it to check hasRobustAccess.
This CL also renames mBufferForVertexArray to mBufferWithUserSize to
reflect what its true meaning.
Bug: chromium:1476475
Change-Id: I843cc3a705f8a582a97bc0307f03aa1eb9fad3ff
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4864003
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
503c0db1
|
2023-09-12T18:01:23
|
|
Add the missing multisample and rgb565-no-depth-no-stencil tests.
We need different --deqp-gl-config-name values
for different test applications, to create RenderTarget
with different properties needed for different test
applications, such as multisample, rgb formats.
This CL adds an array of
vector<const char*> gTestSuiteConfigParameters
to store the --deqp-gl-config-name
values for different test applications. Each element
in this array can hold multiple const char* values.
In the upcoming CLs, we can add more customized config
values for each test applications, such as
--deqp-screen-rotation for angle_deqp_gles*rotate*tests.
Rename the gEGLConfigName to gEGLConfigNameFromCmdLine.
The default value for gEGLConfigNameFromCmdLine is empty
string, and its value can be overwritten by specifying
--deqp-gl-config-name when running the tests from command
line. If we pass --deqp-gl-config-name from command line,
then use the value passed from the command line to replace
the values in gTestSuiteConfigParameters.
Bug: b/297901032
Change-Id: Ibf8762c55d7d0cdf7bcf33f384568587023b369c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4851048
Reviewed-by: Roman Lavrov <romanl@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Yuxin Hu <yuxinhu@google.com>
|
|
29561184
|
2023-09-06T22:08:33
|
|
Remove forward-to-executable helpers from program
This helps avoid accidental usage of the executable that is in the
program instead of the installed executable in the GL context.
The program's executable is still accessed in specific cases of:
- During link
- GL program queries
Bug: angleproject:8297
Change-Id: I40a956e740944f2ecfbf6e4a3060aac08c21f7f3
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4864448
Commit-Queue: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
d62db89e
|
2023-09-18T13:30:54
|
|
Vulkan: Disable VK_EXT_host_image_copy on Fuchsia
An old version of VVL is used, causing incorrect failures.
Bug: angleproject:8341
Change-Id: I0fc605616671343a49fed6ff02ecd67eea672dca
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4873440
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
|
|
f1345d1c
|
2023-08-02T14:23:59
|
|
Call ReleaseThread() entry point from ThreadCleanupCallback
Change relevant only for the Android platform.
Fixes problems:
1. Current code calls `thread->setCurrent(nullptr)` in
`Display::threadCleanup()` method, while not executing other code
that will actually unmake Context from current. This will affect
following EGL calls from the application's side in its own thread
cleanup callback. For example, calls to `eglMakeCurrent()` (to unmake
from current) or `eglReleaseThread()` will be no-op. This may lead to
memory leak if context was previously marked for destruction.
2. The `Display::threadCleanup()` did not also clears
the `CurrentValidContext`. This may cause crashes or other UB if an
application will call some GLES API in its thread termination
callback (for example `glFinish()`), if ANGLE already destroyed the
context in its ThreadCleanupCallback (use after delete).
3. Context will remain current to a thread that terminated. Current
implementation of GLES drivers on Mali/Adreno GPUs automatically
unmade context from current, so the application may make this context
current to some other thread. ANGLE should mimic this behavior to
avoid possible bugs.
All of the above problems may be fixed by simply calling from the
ThreadCleanupCallback either:
- MakeCurrent(t, d, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT)
- ReleaseThread(t)
This CL choose to call `ReleaseThread()` because this is the API that
the application may call in its own thread cleanup callback. And if
application's callback will be called later than ANGLE's callback, then
application's `eglReleaseThread()` call we be a no-op.
Even if the application does not have its own thread cleanup callback
(like most of the applications), there is no harm to call
`ReleaseThread()` anyway. The only difference with `MakeCurrent()` is
that it will also cleanup invalid objects and some other memory
depending on the backend.
This CL naturally replaces existing logic with Display termination when
there is no active threads thanks to the previous CL:
"Perform Display terminate(InternalCleanup) from makeCurrent()".
Bug: angleproject:6723
Bug: angleproject:8283
Test: angle_end2end_tests --gtest_filter=EGLContextSharingTest.ThreadCleanupCallback*
Test: angle_end2end_tests --gtest_filter=EGLContextSharingTest.UnmakeFromCurrentOnThreadExit*
Change-Id: I8c5b31f34f91c4bfdac165ac30c213ff5fef992e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4742383
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Igor Nazarov <i.nazarov@samsung.com>
|
|
c38f3374
|
2023-09-15T19:22:44
|
|
Fix "win-asan-test" random failures and timeouts
While exact reason for the failures is unknown, it seems like disabling
Vulkan Loader DLL unloading fixes the problem. More details in the issue
8347.
This CL also sets the variable on the Linux platform, because it does
not hurt and will probably help with similar issues.
Bug: angleproject:8347
Change-Id: I398d55a7c13f1ce6790988983fdf8fee7cc5776c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4868220
Commit-Queue: Igor Nazarov <i.nazarov@samsung.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
22b6ca1c
|
2023-08-21T00:00:00
|
|
Remove obsolete EXT_blend_func_extended expectations
Bug: angleproject:5981
Bug: angleproject:6585
Bug: angleproject:7177
Change-Id: I25da401f03ff0bfa7a77c3ce7a3fecd0a119d6a4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4870916
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
9d99f85f
|
2023-09-14T15:01:14
|
|
Add multithreaded texture upload test
Bug: angleproject:8341
Change-Id: I8561a64fb28681509a1d65c490888dfa1a423835
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4864467
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
|
|
b2e6a196
|
2023-09-11T15:27:20
|
|
Vulkan: Use VK_EXT_host_image_copy for texture uploads
Of all the scenarios where host image copy may be useful, this is likely
the most common case. There are numerous conditions for when the copy
may be done on the host:
- The image format must support it,
- It must be unused by the GPU,
- It must not have any pending updates (this can potentially be
mitigated if needed), and
- It must be in a host-copyable layout.
However, many texture uploads are done:
- To compressed formats, where support is highly likely,
- On init, where:
- the image is never previously used,
- the image has no previous uploads
- the image is in the UNDEFINED layout
which satisfies the conditions above.
As a result of this change, when the upload is done on the host,
creation of a temp buffer is avoided which greatly reduces memory
pressure (specially during app loading which is when most texture data
is uploaded) and may even improve performance (due to avoiding a double
copy).
Testing the first 3 frames of the following traces with a SwiftShader
implementation shows the amount of buffer allocated for staged uploads
changed as such:
- Black Desert: 185MB -> 65MB
- Genshin Impact: 125MB -> 12MB
- Asphalt 9: 138MB -> 0MB
Bug: angleproject:8341
Change-Id: Id71dcc4a7a0f8b67960d2d283fe9d19ce7429a03
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4856676
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
92218933
|
2023-09-15T10:33:49
|
|
Add VMA version to logcat
This is a temporary CL. It will be used to confirm that Android
uses VMA 3.0 with ANGLE as the default driver.
* Added the VMA version log when the renderer is being initialized.
Bug: b/295208838
Change-Id: I054a4e0e080aa5d06533bd7785eea608e14bba39
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4868086
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
|
|
cd8495b0
|
2023-09-14T20:00:32
|
|
Re-enable Metal on AMD FirePro.
Instead of disabling Metal altogether, test whether it works to just
disable the rescobeGlobalVariables compiler workaround on FirePro
devices.
Bug: angleproject:8317
Change-Id: Ia93a1fef04a387c5756d14660a2da4eb39b8db08
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4864732
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
ffd6ec26
|
2023-09-07T15:39:19
|
|
Reland "Make egl surface uncurrent when being destroyed"
This relands commit 497440cdcb7d2ee59bca612dd07fc13cf09a6a57.
This is to workaround errors when app does below behaviors:
1) while there is a context still bound to the current
rendering thread and the surface, call eglDestroySurface()
2) create a new surface eglCreateWindowSurface()
3) call eglMakeCurrent() with the surface created in step 2)
4) does work on the new surface
The old surface won't be destroyed in step 1) because
it was still bound by the context of the current rendering
thread. When creating new surface on step 2), some hardware
will return error code EGL_BAD_ALLOC, because the old egl
surface is still associated with the native window.
To workaround, when destroying surface, if the surface
is still bound by the context of the current rendering
thread, release the context and surface by passing
EGL_NO_CONTEXT and EGL_NO_SURFACE to eglMakeCurrent().
The workaround is controlled by a frontend feature
uncurrentEglSurfaceUponSurfaceDestroy. This feature
is only enabled on vulkan backends.
Bug: b/292285899
Change-Id: Id4c47f1b20e0f90d1013a68893fd70e917c030e2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4867066
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Yuxin Hu <yuxinhu@google.com>
|
|
b4852ef9
|
2023-02-08T14:18:06
|
|
Vulkan: Drop support for Vulkan 1.0
Bug: angleproject:7959
Change-Id: Ib673679ea1a503af22b37092dbff1ee1fd34fba6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4233092
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Ian Elliott <ianelliott@google.com>
|
|
68bfa1ed
|
2023-08-22T22:02:15
|
|
Support for link to be entirely parallelized
The link job is split as such:
- Front-end link
- Back-end link
- Independent back-end link subtasks (typically native driver compile
jobs)
- Post-link finalization
Each step depends on the previous. These steps are executed as such:
1. Program::link calls into ProgramImpl::link
- ProgramImpl::link runs whatever needs the Context, such as releasing
resources
- ProgramImpl::link returns a LinkTask
2. Program::link implements a closure that calls the front-end link and
passes the results to the backend's LinkTask.
3. The LinkTask potentially returns a set of LinkSubTasks to be
scheduled by the worker pool
4. Once the link is resolved, the post-link finalization is run
In the above, steps 1 and 4 are done under the share group lock. Steps
2 and 3 can be done in threads or without holding the share group lock
if the backend supports it. Step 2 is not yet made independent of the
Context on some backends, and a frontend feature is used to make that
step either run on the main thread or as a worker thread.
Bug: angleproject:8297
Change-Id: I12f1e6bbaf365543dfcac969e166e0b5aa622104
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4808191
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
5afc76e3
|
2023-09-12T11:05:08
|
|
Disable Metal on AMD FirePro devices.
These older drivers are crashing in the driver for unknown reasons.
Only 0.5% of Chrome users are on these devices, so we'll disable
Metal on them.
Bug: angleproject:8317
Change-Id: Ia3ca5c3fa8e96aab903e15d989cfbd459679b15d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4859020
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Kenneth Russell <kbr@chromium.org>
|
|
d3d81498
|
2023-09-11T16:11:33
|
|
Add metrics for shader compilation time and shader blob size
Log the time it takes for the system compiler to compile Metal and D3D
shaders.
Log the D3D shader blob size to get a sense of storage size needed.
Bug: chromium:1481238
Change-Id: I300102dcb035f42e91d7819cd9465ff18436abf3
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4851196
Reviewed-by: Peng Huang <penghuang@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
|
|
8a7ad933
|
2023-09-13T15:11:46
|
|
Revert "Make egl surface uncurrent when being destroyed"
This reverts commit 497440cdcb7d2ee59bca612dd07fc13cf09a6a57.
Reason for revert: this caused chromium webview tests failures: https://chromium-review.googlesource.com/c/chromium/src/+/4860891.
Original change's description:
> Make egl surface uncurrent when being destroyed
>
> This is to workaround errors when app does below behaviors:
>
> 1) while there is a context still bound to the current
> rendering thread and the surface, call eglDestroySurface()
> 2) create a new surface eglCreateWindowSurface()
> 3) call eglMakeCurrent() with the surface created in step 2)
> 4) does work on the new surface
>
> The old surface won't be destroyed in step 1) because
> it was still bound by the context of the current rendering
> thread. When creating new surface on step 2), some hardware
> will return error code EGL_BAD_ALLOC, because the old egl
> surface is still associated with the native window.
>
> To workaround, when destroying surface, if the surface
> is still bound by the context of the current rendering
> thread, release the context and surface by passing
> EGL_NO_CONTEXT and EGL_NO_SURFACE to eglMakeCurrent().
>
> The workaround is controlled by a frontend feature
> uncurrentEglSurfaceUponSurfaceDestroy. This feature
> is only enabled on vulkan and gl backends.
>
> Bug: b/292285899
> Change-Id: I872d2e116ba6860f58d1176f011a5ef7c5a5af4e
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4851255
> Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
> Reviewed-by: Charlie Lao <cclao@google.com>
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> Commit-Queue: Yuxin Hu <yuxinhu@google.com>
Bug: b/292285899
Change-Id: I760054d856294e6691e79e165fd73ce9e560621f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4862958
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
|
|
e7a77053
|
2023-09-12T13:40:47
|
|
Update VulkanMemoryTest after adding context flush
After adding context flushing to the memory allocation fallbacks
in a previous CL (https://crrev.com/c/4787949), some tests in the
VulkanMemoryTest suite no longer test the success path of the fallback
to wait for submitted commands to finish.
* Updated AllocateVMAImageAfterFreeing2DGarbageWhenDeviceOOM
* The test now uses an additional allocation and draw after the
first sync, followed by a second sync. During the allocation
of the last texture, it would wait to finish the submitted
command and free the garbage without flushing the whole context.
Bug: b/280304441
Change-Id: Idc583e120b8d9e1cc550f6cba4cb0b2b197e4944
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4860367
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
|
|
497440cd
|
2023-09-07T15:39:19
|
|
Make egl surface uncurrent when being destroyed
This is to workaround errors when app does below behaviors:
1) while there is a context still bound to the current
rendering thread and the surface, call eglDestroySurface()
2) create a new surface eglCreateWindowSurface()
3) call eglMakeCurrent() with the surface created in step 2)
4) does work on the new surface
The old surface won't be destroyed in step 1) because
it was still bound by the context of the current rendering
thread. When creating new surface on step 2), some hardware
will return error code EGL_BAD_ALLOC, because the old egl
surface is still associated with the native window.
To workaround, when destroying surface, if the surface
is still bound by the context of the current rendering
thread, release the context and surface by passing
EGL_NO_CONTEXT and EGL_NO_SURFACE to eglMakeCurrent().
The workaround is controlled by a frontend feature
uncurrentEglSurfaceUponSurfaceDestroy. This feature
is only enabled on vulkan and gl backends.
Bug: b/292285899
Change-Id: I872d2e116ba6860f58d1176f011a5ef7c5a5af4e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4851255
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Yuxin Hu <yuxinhu@google.com>
|
|
e7418836
|
2023-08-16T14:25:52
|
|
Vulkan: Add context flushing as OOM fallback
* As a new fallback for out-of-memory errors, if an allocation results
in device OOM, the context is flushed and the allocation is retried.
* Functions related to buffer/image allocations now return a VkResult
value instead of angle::Result, which will be bubbled up to a higher
level for safer handling.
* The OOM is no longer handled at the level where the allocation
happens, but is moved up to the context.
* Added two functions to ContextVk for allocating memory for images and
buffer suballocations, which also include the fallback options.
* initBufferAllocation(): Uses BufferHelper::initSuballocation()
* initImageAllocation(): Uses ImageHelper::initMemory()
* Moved initNonZeroMemory() out of the following functions:
* BufferHelper::initSuballocation()
* Moved to ContextVk::initBufferAllocation().
* ImageHelper::initMemory()
* Moved to ContextVk::initImageAllocation().
* Also moved to new function:
ImageHelper::initMemoryAndNonZeroFillIfNeeded().
This function replaced the rest of initMemory() usages outside
initImageAllocation().
* New macros for memory allocation
* VK_RESULT_TRY()
* If the output of the command inside it is not VK_SUCCESS, it will
return with the error result from the command.
* VK_RESULT_CHECK()
* If the output of the command inside it is not VK_SUCCESS, it will
return with the input error.
* Added a test in which allocation would fail due to too much pending
garbage without the fix on some platforms. The test ends once there
has been a submission.
* New suite: UniformBufferMemoryTest
* Added a similar test for flushing texture-related pending garbage.
* New suite: Texture2DMemoryTestES3
Bug: b/280304441
Change-Id: I60248ce39eae80b5a8ffe4723d8a1c5641087f23
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4787949
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
2fe7bbae
|
2023-09-07T13:21:29
|
|
Tests: Add Oxenfree trace
Test: angle_trace_tests --gtest_filter=TraceTest.oxenfree
Bug: b/298613720
Change-Id: Ie577dff75faf58ee97c0898a28766e9ed7c87459
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4851250
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Cody Northrop <cnorthrop@google.com>
|
|
ce263437
|
2023-09-11T12:25:28
|
|
Vulkan: Perform CPU wait in clientWait outside the global lock
Leverage UnlockedTailCall and move the CPU side wait
during a clientWait outside of the global mutex lock.
Bug: angleproject:8340
Tests: FenceSyncTest.BasicOperations*
Tests: EGLSyncTest.EglClientWaitSync*
Change-Id: I8c05e62e74cc64d38bf8797d28faaf49135e71fc
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4851649
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: mohan maiya <m.maiya@samsung.com>
Reviewed-by: Charlie Lao <cclao@google.com>
|
|
b185c3ea
|
2023-09-11T12:28:43
|
|
Vulkan: Add host-image-copy usage to images when optimal
The change currently doesn't actually copy on host, but prepares the
image for it.
Bug: angleproject:8341
Change-Id: I4458712dca46ef9872020e158a3f902e94f5eb93
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4856146
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
|
|
6553225d
|
2023-09-11T11:33:19
|
|
Vulkan: Refactor image usage/flags support check logic
The function that checks whether a format supports a specific usage is
moved to ImageHelper. For VK_EXT_host_image_copy, Renderbuffer, AHB etc
may also use this function.
Bug: angleproject:8341
Change-Id: I6ebc06f97fd29e66aa8d43fcf045f51717d27864
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4856144
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
d4e1493c
|
2023-09-11T22:38:32
|
|
Optimize compressed texture loads
Similar to LoadToNative, which has a fast-path for when the pitches
align (and a single memcpy is used), LoadCompressedToNative is made to
use a single memcpy when the pitches align.
Bug: angleproject:8341
Change-Id: I4893f9ec26bb80d83593fc102990bd84c38bd12b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4856674
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
f57b0c3a
|
2023-09-08T14:26:18
|
|
Merge GetAndroidSdkLevel and GetAndroidSDKVersion
Now we funnel all the Android property queries through the one utility
funciton in android_utils.
Bug: chromium:1479277
Change-Id: I7313064208895f095319ed129b6f7d2edf31b427
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4852681
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
|
|
e4d0db32
|
2023-09-11T22:41:05
|
|
Mark native compressed data uploads as not requiring conversion
The requiresConverion flag in LoadImageFunctionInfo is used to choose
faster paths during data upload (when it's false). This flag was set on
native compressed image load functions, even though they are simple
memcpys.
Bug: angleproject:8341
Change-Id: I81c217eb2e92b3c33b65bf4ff295b68a7a5814f8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4856675
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
58c8fc8b
|
2023-09-06T23:54:20
|
|
CopySubTexture: Handle sRGB source in Metal backend
CopySubTexture should ignore the color encoding of both the source
and destination. The implementation currently ignores the color
encoding of the destination (and CopyTextureVariationsTest tests
this).
The implementation does not always ignore the color encoding of the
source. As an example of the consequences of this, an RGBA pixel
value of 0xFF/80/00/FF, when copied from a GL_SRGB8_ALPHA8 texture
to a GL_RGBA8 texture may result in a value of 0xFF/37/00/FF, if the
copy was executed using a shader (in which case the sRGB-to-linear
function was applied 0x80, resulting in the 0x37).
Update the Metal shaders that do this blit, adding an option to apply
a linear-to-sRGB transformation to undo the transformation applied by
the sampler.
The linear-to-sRGB transformation must be applied on unpremultiplied
values. Ensure that the sequence of operations in all shaders is
first unpremultiply, then linear-to-sRGB, then premultiply. Also
remove optimizations to have the unpremultiply and premultiply
cancel each other out, if there is also a linear-to-sRGB being applied.
Bug: angleproject:7907
Change-Id: I7237bde1c61251a2f83968755e98a139ba949b59
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4848327
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
ec89b1a2
|
2023-09-11T12:25:10
|
|
Vulkan: Bugfix in waitForResourceUseToFinishWithUserTimeout
The commit 6d282d62b39b177e5762e01de3d382984494f07d
introduced a bug where <result> was not being set
in all code paths, now we do.
Bug: b/255411748
Bug: angleproject:8340
Change-Id: Ic191f9e09c35a64ae2393d9670a3a9e33cd5e102
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4854941
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: mohan maiya <m.maiya@samsung.com>
Reviewed-by: Charlie Lao <cclao@google.com>
|
|
c5d19d76
|
2023-09-07T09:58:24
|
|
Reland "Load mUniformLocations using loadVector"
This is a reland of commit 6f526b8f52d17bf89082a901f06df6edb75a7dbd
Original change's description:
> Load mUniformLocations using loadVector
>
> Bug: b/275102061
> Change-Id: I1da5bdd6bf0ec40cd877c2274a8fe1ee0b11267a
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4849551
> Reviewed-by: Roman Lavrov <romanl@google.com>
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> Commit-Queue: Charlie Lao <cclao@google.com>
Bug: b/275102061
Change-Id: If501db97a37b00104a9d16fc40200f772ffcd2fc
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4856749
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
ee7f6ed5
|
2023-09-07T16:50:54
|
|
Refactor dEQP test classes
Rename dEQP to dEQPTest.
Move the static functions and variables that
are shared between all individual dEQP tests
in the same test suite into the dEQPTestSuiteStat
class.
This new dEQPTestSuiteStat class is responsible
for updating the test counts, succeeded tests,
and failed tests of a test suite. Add a static member
of type dEQPTestSuiteStat to the dEQPTest class,
so that all of the dEQPTest instances shared the
same instance of dEQPTestSuiteStat, and as each dEQPTest
TestBody() executes, it can update the data in the same
dEQPTestSuiteStat.
Each deqp test application will create multiple
dEQPTest instances based tests listed in one of the
mustpass list in gCaseListFiles array. And each
deqp test application will only create one test suite.
This is done through testing::RegisterTest(). The
testSuiteName passed to testing::RegisterTest()
for each dEQP test application remains
the same for all of the dEQP tests created.
This change also replaces the below legacy function
names with the new function names:
SetUpTestCase() --> SetUpTestSuite()
TearDownTestCase() --> TearDownTestSuite()
Bug: b/297901032
Change-Id: I9439d7ac314d70a9a5d9ad72c0a3f58cd11e559b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4851047
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Roman Lavrov <romanl@google.com>
|
|
eb5acc3e
|
2023-09-08T15:34:44
|
|
Tests: Add ONE PIECE TREASURE CRUISE trace
Test: angle_trace_tests --gtest_filter="*one_piece_treasure_cruise*"
Bug: b/299681746
Change-Id: I3b5a9de18613df37181feb3c207105dba411d2a7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4854449
Commit-Queue: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Roman Lavrov <romanl@google.com>
|
|
1249fc1f
|
2023-09-07T14:39:26
|
|
Tests: Support capture_tests on Android and enable on CI
Enables angle_with_capture_by_default = true on Android bots
similarly to Linux and Windows.
Enables the capture test on Pixel 4 and 6 bots (it takes only a few
seconds to run)
Enables support for capture in android_helper in general.
For example, this now works the same way it would on say Linux, but
runs the capture on the device an pulls files to OUT_DIR.
% ANGLE_CAPTURE_LABEL=gacha_club ANGLE_CAPTURE_OUT_DIR=/tmp/capt2 ANGLE_CAPTURE_FRAME_START=16 ANGLE_CAPTURE_FRAME_END=16 out/AndroidPerformance/angle_trace_tests --gtest_filter=TraceTest.gacha_club --use-angle=vulkan --retrace-mode --max-steps-performed=20
For end2end tests it's a bit trickier as we're still using the Chromium
wrappers for e.g. out/AndroidPerformance/angle_end2end_tests - which is
why capture_tests.py is currently using angle_android_test_runner.py
Bug: b/296397568
Change-Id: I2606e74a17c90e381bb49ec8d555a6d24851b4f7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4850889
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Roman Lavrov <romanl@google.com>
|
|
0510fb49
|
2023-09-11T18:11:50
|
|
[code health] Use more standard enumerator names
Use more standard enumerator names in ANGLE
https://google.github.io/styleguide/cppguide.html#Enumerator_Names
There are still some non-standard enumerator names in the //cc
directory, which will be modified in subsequent patches.
Bug: chromium:1480233
Change-Id: I96d534f0eb74a8583237c754f6ef867bd1b33d4a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4853030
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Ho Cheung <uioptt24@gmail.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
1f1b5ee8
|
2023-09-07T00:00:00
|
|
GL: Disable clip distance state when unused
Some OpenGL drivers experience runtime failures
when clip distances are enabled but the program
does not statically use them.
Bug: angleproject:4452
Change-Id: I90fc4ccf1aa669f1b202a1726be49b1e5401a435
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4853743
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
|
|
79691400
|
2023-09-09T20:50:24
|
|
Revert "Load mUniformLocations using loadVector"
This reverts commit 6f526b8f52d17bf89082a901f06df6edb75a7dbd.
Reason for revert: Suspected cause of MSAN failure. See:
https://chromium-review.googlesource.com/c/angle/angle/+/4851776
Original change's description:
> Load mUniformLocations using loadVector
>
> Bug: b/275102061
> Change-Id: I1da5bdd6bf0ec40cd877c2274a8fe1ee0b11267a
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4849551
> Reviewed-by: Roman Lavrov <romanl@google.com>
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> Commit-Queue: Charlie Lao <cclao@google.com>
Bug: b/275102061
Bug: chromium:1480543
Change-Id: I50c39758d180320465b152ad32ba9447878f7d8a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4855538
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
|
|
9740b01b
|
2023-09-08T16:30:08
|
|
Enhance UnlockedTailCall run method
UnlockedTailCall::CallType is now std::function<void(void *)>
This is in preparation for upcoming changes where unlocked
tail calls need access to objects outside block and namespace
scope.
Bug: angleproject:8340
Tests: UnlockedTailCall*
Change-Id: Ida6822b701c5c11ce4b8f6e3aae53108755e2cad
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4852021
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: mohan maiya <m.maiya@samsung.com>
|
|
e234c182
|
2023-09-08T16:19:29
|
|
Add features for VK_EXT_host_image_copy
Bug: angleproject:8341
Change-Id: Id076e6c9e040f3c19a1eb221f6099ac11d4d091a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4852280
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
48e2c605
|
2023-09-07T14:30:46
|
|
More instances of program usage converted to executable
Bug: angleproject:8297
Change-Id: I8e4eeef8f4f20610bbe0f994ce1141c17d588765
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4850888
Reviewed-by: Shahbaz Youssefi <syoussefi@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
1bd9fc24
|
2023-09-07T00:21:13
|
|
D3D: Remove more usages of program instead of executable
Only usage of getProgram() and getLinkedProgram() in the d3d backend
remains for multidraw, which will be fixed separately as it involves
setting uniforms (currently done through the program).
Bug: angleproject:8297
Change-Id: I48b3ec66837888c8ebf58f43a6d8a2f483dd4659
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4846954
Reviewed-by: Shahbaz Youssefi <syoussefi@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
fce1e574
|
2023-09-08T14:21:58
|
|
FrameCapture: Skip output dir check if disabled
* In order to improve performance and avoid errors when running
with capture support, change the output dir checks to be optional.
* The checks are expensive on Android due to reading the process
name and filesystem locations.
* We want want to continue emitting errors if the user wants to
capture but didn't create the output dir.
Test: Android apps with and without capture enabled via properties
Bug: b/296397568
Change-Id: If3adbe0c569db49fd8e8e430b7c57ae8585ca4d7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4854443
Reviewed-by: Roman Lavrov <romanl@google.com>
Commit-Queue: Cody Northrop <cnorthrop@google.com>
|
|
74b7ec03
|
2023-09-08T14:26:18
|
|
GL: Don't use system info for Android SDK queries.
It can be queried directly from the system property without fully
gathering system info. System info often uses Vulkan which is known
to be unstable on some older devices.
Bug: chromium:1479277
Change-Id: Ic6ee1d0182b047b0a3210dd1067f6b7250e3da02
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4851775
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
|
|
57761d85
|
2023-09-08T10:02:48
|
|
Attempt to fix the MSan failure on chromium bots
struct BlockMemberInfo was not tightly packed. This CL makes it packed.
Bug: b/296433003
Change-Id: I38da3e463cf304028236e651b6b4e334ce9220e2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4851063
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
98b0855b
|
2023-09-08T10:50:58
|
|
Add drm format ABGR16161616F to linux
We need to support drm 16f formats for lacros HDR.
Bug: chromium:1473267
Change-Id: Idd3cb5e75e1fabf046c8aa21a6b7f51aafde15e7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4851773
Reviewed-by: Peng Huang <penghuang@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Peng Huang <penghuang@chromium.org>
|
|
765bca2f
|
2023-09-08T09:15:52
|
|
Add <cstring> include to FastVector.h
This resolves the call to `std::memcpy` which was failing in recent skia
skia rolls with an error that looked like this:
error: no member named 'memcpy' in namespace 'std'; did you mean simply 'memcpy'?
Bug: None
Change-Id: If54ed266812315cfea35d95a57c758f75bcb270b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4851062
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Auto-Submit: Arman Uguray <armansito@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
99d39241
|
2023-09-07T16:48:22
|
|
Metal: Increase the size of the default uniform block
Use a buffer pool per shader type and size it to be a nice multiple of
the block that will be allocated for each uniform update.
Set the buffer pool size to unbounded. When the pool runs out of
buffers it currently does a full CPU/GPU sync which is catastrophic
for performance when uniforms are updated every draw call.
Bug: angleproject:8301
Change-Id: I7f826feb4e766fd1cf1b2db01954af7089e3fe90
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4850950
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
|
|
a412b149
|
2023-09-07T12:08:40
|
|
Suppress out of bounds on no robust contexts tests
dEQP-EGL.functional.robustness.reset_context.shaders.out_of_bounds_non_robust.reset_status.writes.uniform_block.vertex
failed occasionally due to VVL error.
The test first results in vulkan device lost,
which is an acceptable behavior. When we clean up the
vulkan resources, the VVL is complaning the resources
have not finished execution. However, VVL should check
if the vulkan device is already lost, as there is no way to
finish resource execution when device is lost.
Will remove the test from the skip list when the VVL
issue filed
https://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/6310
is resolved.
Bug: b/289544394
Change-Id: Ideb676e6629cc17a4f8101ccc083a331a1d3c864
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4851049
Commit-Queue: Yuxin Hu <yuxinhu@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
|
|
6f526b8f
|
2023-09-07T09:58:24
|
|
Load mUniformLocations using loadVector
Bug: b/275102061
Change-Id: I1da5bdd6bf0ec40cd877c2274a8fe1ee0b11267a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4849551
Reviewed-by: Roman Lavrov <romanl@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
cdbc45a9
|
2023-09-07T15:45:11
|
|
Tests: capture_tests: remove ANGLE_FEATURE_OVERRIDES_ENABLED
Unnecessary for this test, should only matter for tests involving
serialization etc.
Bug: b/296397568
Change-Id: I1b3e12b11358778cf23dd6d7a5aab69be41c1ab4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4850548
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Roman Lavrov <romanl@google.com>
|
|
204c07a5
|
2023-09-07T10:49:08
|
|
Initialize bitfield using constructor
default member initializer for bit-field is a C++20 extension. This CL
changes it to use constructor to avoid build failure.
Bug: b/296433003
Change-Id: I33a45394644719b160f71eadca3a85a4d92f5c4e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4849554
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
9c0748d3
|
2023-08-16T09:15:22
|
|
Capture/Replay: Trim inactive Texture resources
As is done with Shader and Program objects, trim inactive Texture
objects from default trace execution playback and update
CapturedTest with new use cases.
Bug: b/297031925
Change-Id: I734d8f1fa66a24be7790391deaeee24cf570d12a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4802281
Reviewed-by: Roman Lavrov <romanl@google.com>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Mark Łobodziński <mark@lunarg.com>
|
|
fc7a2853
|
2023-09-07T17:10:56
|
|
Revert "Verify shader link correctness after looking up in program cache"
This reverts commit 60b56591dee59bc0bc770577f43d90be4b18863c.
Reason for revert: Flakiness if the attached shaders are not compiled
Original change's description:
> Verify shader link correctness after looking up in program cache
>
> Since the program cache takes shader sources into account, if the cache
> is hit the shaders should have been correct for link.
>
> Bug: angleproject:8297
> Change-Id: I115c7eb807ed620d30b9e30669c99fffb5c7912d
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4817830
> Reviewed-by: Geoff Lang <geofflang@chromium.org>
> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Bug: angleproject:8297
Change-Id: Icf4058e4bea471f097caed950b18f690d8d0456d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4846389
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
06411d16
|
2023-09-06T13:23:34
|
|
GL: Use the executable instead of program
In a few places, the program was still being directly referenced instead
of the executable (in particular when dealing with multiview).
Bug: angleproject:8297
Change-Id: I15d0865bf58376a9f85efeec739dd93b49ceaea7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4846475
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
632ded9e
|
2023-09-01T13:43:11
|
|
Load ShaderInterfaceVariableInfoMap data members with readStruct
This CL groups the remaining data members of
ShaderInterfaceVariableInfoMap into a POD (plain old data) struct and
load it with readSTruct call (and save it with writeStruct).
This CL also uses readVector for
mDefaultUniformBlocks[shaderType]->uniformLayout instead of individual
reads of each basic elements.
Bug: b/296433003
Change-Id: I48b508822cb414cea75a6e384a0794f245460f57
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4833690
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Roman Lavrov <romanl@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
014e584f
|
2023-08-21T15:51:30
|
|
Vulkan: Separate out XFB data from ShaderInterfaceVariableInfo
Right now the transform feedback data is embedded in the
ShaderInterfaceVariableInfo. This caused ShaderInterfaceVariableInfo
becomes non-trivial copy-able. This CL moves transform feedback related
data out and into its own array, and entire vector of
ShaderInterfaceVariableInfo is now memcpied. Further, most programs
don't use transform feedback. Right now because transform feedback data
is embedded in the ShaderInterfaceVariableInfo, it bloated the size of
ShaderInterfaceVariableInfo even if you do not use XFB. This CL makes
transform feedback variable info data a std::unique_ptr so that if not
used, it is just a nullptr. When we load/save the structure, the ones
that has nullptr gets skipped.
Bug: b/296433003
Change-Id: I61940a683611717ab0445fcbf44b89b1b7166ee4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4799344
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Roman Lavrov <romanl@google.com>
|
|
60b56591
|
2023-08-28T15:40:26
|
|
Verify shader link correctness after looking up in program cache
Since the program cache takes shader sources into account, if the cache
is hit the shaders should have been correct for link.
Bug: angleproject:8297
Change-Id: I115c7eb807ed620d30b9e30669c99fffb5c7912d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4817830
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
00daa451
|
2023-08-28T16:30:23
|
|
Vulkan: Include minImageCount in swapchain check
The following VVL error has been firing for traces run in
landscape mode:
[ VUID-VkSwapchainCreateInfoKHR-presentMode-02839 ]
vkCreateSwapchainKHR(): pCreateInfo.minImageCount 4, which is outside
the bounds returned by vkGetPhysicalDeviceSurfaceCapabilitiesKHR()
(i.e. minImageCount = 5, maxImageCount = 64).
On Android, rotation can cause minImageCount to change.
We need to detect this as an out of date swapchain.
Test: angle_trace_test --gtest_filter=TraceTest.among_us
Bug: b/289274676
Change-Id: Ie75adec5f5318b73c0c27efc134f10f53485692d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4819790
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
|
|
7b0bb0f6
|
2023-09-01T13:52:28
|
|
Properly "install" program executables
According to GL:
- The program has an executable
- The executable is overwritten during link.
- After a failed link, queries of the executable may return
half-linked information
- On glUseProgram, the executable is installed in the context
- On glUseProgramStages, the executable is installed in the program
pipeline
- After a successful link, the executable is updated wherever the
previous executable of the program was installed.
This change implements exactly the above:
- The program's and the program pipeline's executables are now
shared_ptr. References to an executable in the context and PPO are
also through a shared_ptr. Installing an executable thus translates
to sharing the executable.
- The context and PPOs are made to not reference the program directly,
but work solely through the executable. As a result, the program is
free to create a new executable for link.
With this change, the link job will be free to modify the executable as
necessary because that will not be accessed until the link is done.
Note that previous changes made the backend executable accessed through
the frontend one, and moved all link results to the frontend and backend
executables as appropriate.
Bug: angleproject:6358
Bug: angleproject:8297
Change-Id: Ie636b23ff7420ad284d18b525ec4f5fb559dd9d1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4823089
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
|
|
9f332fe7
|
2023-09-06T15:08:38
|
|
rx::mtl::ColorBlitUtils: Use a hash map for shaders
We're going to be adding another parameter here (linear-to-sRGB
conversion). Prepare the ground by moving this to a hash map.
See the similar operation in https://crrev.com/443362.
Bug: angleproject:7907
Change-Id: I33f815c55f209927fc7c24e5d8459e337f70cfb4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4847067
Commit-Queue: ccameron chromium <ccameron@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
1b8ab538
|
2023-09-05T13:44:40
|
|
Metal: Use a flat hash map for tracking resource ids.
This set is very mutable. It makes many insertions, allocating
memory each time. Useing a absl::flat_unordered_set we can avoid
allocating memory at insertion time.
This was a hotspot for Google Earth, taking up about 10% of ANGLE's
CPU time.
Bug: angleproject:8301
Change-Id: I7363ea8fdc5ff230a289af7c1ae25dc577188a18
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4843709
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|