|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
5116f54e
|
2023-09-05T13:50:50
|
|
CopySubTexture: Handle sRGB source in GL backend
CopySubTexture should ignore the color encoding of both the source
and destination. The implementation currently ignores the color
encoding of the destination.
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 OpenGL and 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: Iad5537e6b98f75d32a33be419a320129493e53a0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4839262
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: ccameron chromium <ccameron@chromium.org>
|
|
d664543f
|
2023-09-01T23:11:59
|
|
Metal: Move setupDraw and associated code to executable
Last bits of state left in ProgramMtl that are now moved to
ProgramExecutableMtl, and now ContextMtl does not reference the program
at all.
This fix was necessary for a follow up change that allows the program to
be modified while the executable is installed, and the metal backend was
crashing after a failed relink due its direct access to the program.
Bug: angleproject:8297
Change-Id: Iadf623bf6baf612767ff372adee2e7f4eeedb593
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4833624
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
0ff71d5e
|
2023-09-05T12:55:50
|
|
D3D: Fix FramebufferD3D reading the wrong program executable
Read the currently bound program executable instead of the possibly
incomplete one from the currently bound program.
Bug: angleproject:6358
Bug: angleproject:8297
Change-Id: Ieda50767b20562436ea9f9bf541965205b578017
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4842929
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
|
|
93402d6f
|
2023-09-05T12:57:16
|
|
D3D: Move the program serial into ProgramExecutableD3D
The program executable tracks the specific shaders being used which are
no longer tied to the ProgramD3D.
Bug: angleproject:6358
Bug: angleproject:8297
Change-Id: Ic34b4f229de7fb7daea8c6ef906bf87d8c0b37d9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4842930
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
17c4741d
|
2023-09-01T00:00:00
|
|
Metal: Disable blending for masked out attachments
Avoid pipeline failure when the following conditions
are simultaneously true for the same color attachment:
* Dual-source blending is enabled
* All color channels are masked out
* There is no bound fragment output
Bug: angleproject:8015
Change-Id: Ie60f4f6dff5a9023677ea9b581e920b0e1e53532
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4836558
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
|
|
e691a4ed
|
2023-09-04T15:35:39
|
|
Delete obsolete VUID
VUID-VkGraphicsPipelineCreateInfo-topology-08890
was renamed to
VUID-VkGraphicsPipelineCreateInfo-topology-08773
Bug: angleproject:8237
Change-Id: Icb3f3f28664d0beac31f2541d90d5dbbada9a3b6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4840195
Auto-Submit: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
179bd776
|
2023-09-01T00:00:00
|
|
GL: Adjust disableRenderSnorm condition
Current Mesa drivers do not pass the
tests when using OpenGL ES contexts.
Bug: angleproject:8315
Change-Id: I00e931d0b97917fd7fe02890290f2938d7c872e7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4834483
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
7c3c7b7b
|
2023-08-29T16:40:50
|
|
Add more test for GL_SRGB8 format
And follow up changes from crrev.com/c/4819053
Bug: b/298037344
Change-Id: Ib27cc2fb8418d05d0b25f4abbdcf052d1f51c9ca
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4824046
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
1192e5e8
|
2023-08-31T15:03:53
|
|
Manual roll vulkan-deps from a446c6320b6b to 988fe1c529b0 (28 revisions)
Suppress new VUIDs:
VUID-VkGraphicsPipelineCreateInfo-topology-08773
VUID-VkDescriptorImageInfo-imageView-07796
Manual roll requested by ynovikov@google.com
https://chromium.googlesource.com/vulkan-deps.git/+log/a446c6320b6b..988fe1c529b0
Changed dependencies:
* spirv-tools: https://chromium.googlesource.com/external/github.com/KhronosGroup/SPIRV-Tools.git/+log/b6893ccdfb..9b923f7cc3
* vulkan-tools: https://chromium.googlesource.com/external/github.com/KhronosGroup/Vulkan-Tools.git/+log/6087a58444..389110e460
* vulkan-validation-layers: https://chromium.googlesource.com/external/github.com/KhronosGroup/Vulkan-ValidationLayers.git/+log/b2f5094203..70be16c58d
If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/vulkan-deps-angle-autoroll
Please CC angle-team@google.com,ynovikov@google.com on the revert to
ensure that a human
is aware of the problem.
To file a bug in ANGLE:
https://bugs.chromium.org/p/angleproject/issues/entry
To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug
Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Bug: angleproject:8318, angleproject:8237, angleproject:8334
Change-Id: I4b868b67b0c8158179fee61018933104c4ed55d3
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4832731
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
|
|
6ff209bc
|
2023-08-30T00:02:30
|
|
Clean up InfoLog usage during link
The info log doesn't really belong to ProgramExecutable; it belongs to
ProgramState. However, it is placed there for convenience since many
functions access it.
This change cleans up usage of InfoLog so the one in ProgramExecutable
is consistently used, but also that is turned into a reference to
ProgramState's InfoLog.
This is necessary for a follow up change that restores the previous
executable on link failure (and would thus otherwise lose the info log
of the failing link).
Bug: angleproject:8297
Change-Id: I088408e3fce9ebb35b1ec4ad3dc599bdb90bf5c5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4825624
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
|
|
d4756a94
|
2023-08-29T15:26:15
|
|
D3D11: Fix register index of read-only storage images
On D3D11 read-only storage images should consume SRV registers ("t")
instead of UAV registers ("u"), so baseUAVRegister shouldn't be
related to read-only storage images.
fixed: angleproject:4404
Bug: angleproject:7121
Change-Id: I3ca35497992de599d0427fae10d750aff7cf7d9e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4819797
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
0b20cd6a
|
2023-08-28T17:45:00
|
|
d3d11: avoid exit-time-destructor warning
Applies to use_custom_libcxx=false on Windows builds. On MSVC's C++
runtime, std::mutex has a destructor.
Bug: angleproject:8327
Change-Id: I6118753569ce0529015e82673571c961a38f30e6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4819793
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Auto-Submit: Steven Noonan <steven@uplinklabs.net>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
aed8ec2a
|
2023-08-22T16:34:10
|
|
Handle Qualcomm's Windows vendor ID.
The vendor ID chosen to represent Qualcomm was their PCI database ID.
On Windows, Qualcomm devices are ACPI and use a different ID.
Since these platforms don't inersect at all (yet), if-def the
Qualcomm vendor ID per-platform so that all the helper functions
continue to work.
Bug: chromium:1464799
Change-Id: Iee8e823ab54399ad2c2f21499b5d581be5c1c0c9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4804367
Reviewed-by: Steven Noonan <steven@uplinklabs.net>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Rafael Cintron <rafael.cintron@microsoft.com>
|
|
33472e77
|
2023-08-30T09:45:43
|
|
D3D11: Fix the compilation of vertex shader with storage image
This patch adds the missing declaration of storage images in vertex
shader. With this patch the vertex shaders with storage image
declarations can be correctly compiled on D3D11 backends.
Bug: angleproject:7121
Change-Id: I32b8c632df83a64a34318e9668e9aa8d376cca56
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4819792
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
6258d479
|
2023-08-30T22:11:38
|
|
Vulkan: disallow pbo copies when offset is incompatible with vulkan
Per spec of vkCmdCopyImageToBuffer:
If srcImage does not have either a depth/stencil or a multi-planar
format, then for each element of pRegions, bufferOffset must be a
multiple of the texel block size
This change disallows pbo copies if violating that spec vu.
Bug: b/297927542
Test: org.skia.skqp.SkQPRunner#UnitTest_TransferPixelsFromTextureTest
Change-Id: I7df4bee5fa574c44dd872f7225567049c5562a99
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4827694
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Auto-Submit: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
|
|
519d330c
|
2023-08-28T15:41:18
|
|
Add GL_RGBX8_SRGB_ANGLEX and GL_BGRX8_SRGB_ANGLEX formats
If app creates AHB with sRGBX format, and then create a EGLImage,
Image::initialize() will retrieve the sized format from AHB, which is
GL_RGBX_ANGLE, and then try to convert to sRGB color space. The bug here
is that GetNonLinearFormat will pick GL_SRGB8 for all these formats
:GL_RGB8, GL_BGRX8_ANGLEX, GL_RGBX8_ANGLE. This means that different
AHBS with these three different format will end up createing a tetxure
with same format which sRGB. I think the reason somone did it this way
initially simply because there is no sRGB corresponding format available
for BGRX8 and RGBX8. This CL adds sRGB internal version of these two
formats, thus make it straight forward to pick the correct sRGB format.
The other change here is for AHBs, right now we are always force
mRequiredImageAccess to be Renderable. This actually workedaround the
bug that mentioned earlier that we are picking the wrong format. Because
of forced renderable, we end up with SRGB fallback to SRGBA. But
external images should not fallback, we should use its existing format
as is since it can be accessed via AHB interface directly.
Bug: b/298037344
Change-Id: I6119c4015cc5bf0effdf0530cb756b6c4656c38f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4819053
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
0d67d1bb
|
2023-08-29T11:19:35
|
|
Vulkan: Support EGL_EXT_gl_colorspace_bt2020
Add support for following 3 BT2020 colorspace extensions
1. EGL_EXT_gl_colorspace_bt2020_hlg
2. EGL_EXT_gl_colorspace_bt2020_linear
3. EGL_EXT_gl_colorspace_bt2020_pq
Bug: angleproject:8330
Tests: EGLSurfaceTest.CreateWithEGLConfig1010102Support*
Change-Id: I3a6ca0daa9ad4400da3834f43678b0db816ba6e4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4824045
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: mohan maiya <m.maiya@samsung.com>
|
|
c8fe53ab
|
2023-08-09T06:25:38
|
|
egl: Fix device fallback if native display eglInitialize fails
Mesa's EGL implementation may return an EGLDisplay that fails to
initialize (e.g. an X11-backed EGLDisplay for `EGL_DEFAULT_DISPLAY` that
fails to eglInitialize if the X server is inaccessible). Handle this
case properly to ensure that ANGLE will properly fall back to using EGL
devices.
Bug: angleproject:8331
Change-Id: I629e95fc22f5618d10be082a3897857bcc79f890
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4749335
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
6698fb69
|
2023-08-25T22:21:32
|
|
Vulkan: Stop passing both ProgramExecutable and ...Vk around
Now that ProgramExecutableVk is accessible through ProgramExecutable.
Bug: angleproject:8297
Change-Id: Ie08770ef97400195d63b87f2d4b7e2a2c8f4ad24
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4812147
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
|
|
ae67a24b
|
2023-08-25T14:51:50
|
|
Metal: Move program state to ProgramExecutableMtl
Bug: angleproject:8297
Change-Id: I1d13f7aee1ff5b0ce799b486d8a57c83c4481983
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4812047
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
4c0c837e
|
2023-08-25T13:46:36
|
|
GL: Move program state to ProgramExecutableGL
Bug: angleproject:8297
Change-Id: Ie6a1d536c93f841c792052c58249952e8468348d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4811439
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
7c72fbe9
|
2023-08-22T16:22:12
|
|
Return the vendor string as hex when it is unknown.
ANGLE's vendor strings would include the generic "Unknown" when we
did not recognize the driver's vendor ID. Print the vendor ID so that
we can future-proof ourselves against new GPU vendors.
Bug: chromium:1464799
Change-Id: Idac67b369bc95c3c49eb754e8c681d5930a1f494
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4804365
Reviewed-by: Rafael Cintron <rafael.cintron@microsoft.com>
Commit-Queue: Rafael Cintron <rafael.cintron@microsoft.com>
|
|
3822ea3a
|
2023-08-24T22:42:43
|
|
D3D: Move program state to ProgramExecutableD3D
Bug: angleproject:8297
Change-Id: Ieead87d2f0ebe5937f262f598443a00504ea1492
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4812139
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
bb135f0e
|
2023-08-24T15:29:11
|
|
Make ProgramExecutableImpl managed by ProgramExecutable
This change allows both parts of the program executable to be safely
backed up and swapped on link.
Bug: angleproject:8297
Change-Id: I17e4b6c05e4e481a66a227d6047dbf943d2c2603
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4812138
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
57388ab2
|
2023-08-24T14:44:48
|
|
Vulkan: Make sure ProgramVk has no members other than executable
The program is really just an interface to the executable. It should
not hold on to any data on its own. The SpvProgramInterfaceInfo member
did not even need to be a member, and was left over from previous
refactorings.
Bug: angleproject:8297
Change-Id: I4edb53c1c8b27e242a62fb4fc253ade58bd8dde1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4812137
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
|
|
4376a8c8
|
2023-08-16T12:02:57
|
|
Metal: Reduce link job dependence to context
The dependence on ContextMtl is not entirely removed, though it seems
feasible. In particular, ContextDevice is passed around while only the
real underlying device is needed. Some refactoring is needed here to
address that.
Additionally, I haven't verified if all that is accessed through the
display is thread-safe, which would be a pre-requisite to moving the
entire link job to a worker thread on this backend.
Bug: angleproject:8297
Change-Id: Ifd4b02694b0997a33d17aad0b47eb7ac4de104e5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4784667
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
44b5715c
|
2023-08-15T15:06:25
|
|
D3D: Remove link job dependence to context
The part of link that needs the context is moved up. Usage of
gl::Context and gl::State is eliminated from the rest of the link.
Bug: angleproject:8297
Change-Id: I2064b21a6724d602f6a84f53a8ae5fe42fe4e837
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4781566
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
571b4cdb
|
2023-08-14T16:55:28
|
|
Vulkan: Move pipeline/desc-set layout creation to link job
The pipeline and desc-set layout caches are consequently made
thread-safe. The reference counter on the layouts are also made atomic.
With this change, practically all of the link in the Vulkan backend is
moved to the link job.
Bug: angleproject:8297
Change-Id: Iba694ece5fc5510d34cce2c34441ae08ca5bb646
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4774787
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
b8d5a423
|
2023-08-21T14:43:42
|
|
Add static_assert(std::is_trivially_copyable<LinkedUniform>(),"")
Since we are using memcpy for LinkedUniform, it is desirable to utilize
compile time assertion to ensure that in future if anyone modifies POD
struct (and the class of data members of POD struct) and made it that no
longer memcopy-able, we would immediately caught at compile time.
std::is_trivially_copyable<>is exactly for this reason. In order to make
this work, the POD struct and any data it uses can not have user defined
copy constructor. The problem is that right now ANGLE is using
clang_use_chrome_plugins=true, and chrome-style generates warnings if
the complex struct (has more than 10 data members) does not define a
copy constructor, and that warning causes build failure with -Werror. So
clang_use_chrome_plugins=true and std::is_trivially_copyable have this
conflicting requirements that I can not apply both. This has been raised
to compiler team, but before we get a solution from them, if we have to
make a choice, I think the better choice is to disable
clang_use_chrome_plugins and apply std::is_trivially_copyable, since the
later is more critical to ensure safety, while chrome-style is mostly
trying to minimize the code size, but won't affect
correctness/robustness. This CL sets clang_use_chrome_plugins to false,
and removes the copy constructor and copy assignment operator from
BitSetT and LinkedUniform and added static assertion
is_trivially_copyable for LinkedUniform. Same thing applied to
ProgramInput as well.
In future once we have a better solution from compile team, we can
re-enable clang_use_chrome_plugins and disable only for structs that
requires is_trivially_copyable assertion.
Bug: b/275102061
Change-Id: If33415ea61deda568d855a7dd6a4fd6042058be5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4799342
Reviewed-by: Roman Lavrov <romanl@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
03f9dff6
|
2023-08-21T16:57:12
|
|
Separate out std::vector<GLuint> boundTextureUnits from SamplerBinding
SamplerBinding struct is trivial copy-able except the
std::vector<GLuint> boundTextureUnits. This CL moves boundTextureUnits
out of the SamplerBinding struct and becomes a vector in
ProgramExecutable. This means all of sampler binding's texture units
will be stored in one vector and SamplerBinding will remember where its
own texture units is stored in that vector by keeping
textureUnitsStartIndex and textureUnitsCount. In other word,
SamplerBinding::boundTextureUnits (before this CL) is equivalent to
mSamplerBoundTextureUnits[SamplerBinding.textureUnitsStartIndex], ...,
mSamplerBoundTextureUnits[SamplerBinding.textureUnitsStartIndex +
SamplerBinding.textureUnitsCount - 1] after this CL. With this,
ProgramExecutable::mSamplerBindings are load/stored with one
readBytes/writeBytes call since it is trivially copyable.
Bug: b/275102061
Change-Id: I0974cf940875ecbcf655b4469b3bbc910717f1ec
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4798195
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Roman Lavrov <romanl@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
a8d77dc4
|
2023-08-18T15:23:39
|
|
Vulkan: Move mVariableInfoMap load/save to its own class
This is mechanical change only. This CL moves mVariableInfoMap load/save
logic from ProgramExecutableVk to ShaderInterfaceVariableInfoMap class.
Bug: b/296433003
Change-Id: I9a934fd2223c559fba899f166e40efc17fa1be2e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4794752
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Roman Lavrov <romanl@google.com>
|
|
607f2636
|
2023-08-17T11:31:59
|
|
Vulkan: Switch ShaderInfo::load to use readBytes
Right now it is using readIntVector<uint32_t>, which end up doing a for
loop and memcpy each integer. This CL switch to readBytes so that one
memcpy is used.
Bug: b/296433003
Change-Id: Ibb10f97af4a86a4e93abb825007847a65f934237
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4790827
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Roman Lavrov <romanl@google.com>
|
|
0b648252
|
2023-08-23T18:15:38
|
|
GL: Fix EAGL build
Bug: angleproject:3031
Change-Id: Id6e30804d8eb066cc2353830cbefb798e08e3c0d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4808979
Commit-Queue: Solti Ho <solti@google.com>
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Solti Ho <solti@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
0688a940
|
2023-08-21T00:00:00
|
|
GL: Disable EXT_texture_mirror_clamp_to_edge on Mesa
Although the extension string is exposed,
the new enum is currently rejected when
using an OpenGL ES context.
Bug: angleproject:8319
Change-Id: I17c4105344fe7ca3038a79e0e09528db1d96376b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4807744
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
|
|
cfd9ccd0
|
2023-08-09T17:21:20
|
|
Reland: Vulkan: Move SPIR-V set up to link job
This is a reland of 10f54902e816fa7e4cf314384e00590e2b9bfa1d
Bug: angleproject:8297
Change-Id: I701b750a13ac5b17df67dee5b6c37c13c60f5b10
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4793219
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
8f64b51d
|
2023-08-09T16:51:13
|
|
Reland: Vulkan: Move default uniform init to link job
This is a reland of d8cd4dcdc9c55c88f030f7fca41357e99e600ed2
Bug: angleproject:8297
Change-Id: Ib4f8e9dd258da71d44983bbb619b6b4abda0b109
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4793218
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
9f258f8a
|
2023-08-21T00:00:00
|
|
GL: Add disableRenderSnorm workaround
Disable the extension on Mesa versions that
clamp negative snorm values to zero on read.
Fixed: angleproject:8315
Change-Id: I5459db40cb08c546fba15f5e6d70578029a8218a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4804324
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
|
|
d8f088e0
|
2023-08-14T11:07:24
|
|
GL: Remove parallel compile/link without driver support
This feature was practically disabled everywhere due to various bugs,
and is complicating the code. In effect, the code was always spawning a
thread for the compilation and link jobs, immediately fail it (due to a
workaround), then do the job when compile/link is resolved (much closer
to draw time). This leads to bad user experience, but also is racy
because the shaders may get recompiled in the meantime and there is
little the GL backend could do to stop that (efficiently).
After this change, parallel compile/link
is either done by the driver (if supported), or it isn't done.
This is a partial revert of a100d8f471f79b9f88d387164992cc5bd9c6ee9f.
Bug: angleproject:3031
Bug: chromium:922936
Bug: chromium:1184692
Bug: chromium:1202928
Change-Id: I6348bee3249ccb3828bb98ac2a69dc7d305f821c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4774785
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
cb1c5ca4
|
2023-08-22T10:13:17
|
|
Manual roll vulkan-deps from aa121378c102 to 2cb515574109 (9 revisions)
Includes an adjustment to syncval message format.
https://chromium.googlesource.com/vulkan-deps.git/+log/aa121378c102..2cb515574109
Changed dependencies:
* glslang: https://chromium.googlesource.com/external/github.com/KhronosGroup/glslang.git/+log/c5117b328a..db8719ae07
* spirv-tools: https://chromium.googlesource.com/external/github.com/KhronosGroup/SPIRV-Tools.git/+log/bfc94f63a7..714966003d
* vulkan-tools: https://chromium.googlesource.com/external/github.com/KhronosGroup/Vulkan-Tools.git/+log/300d9bf6b3..b441f434a0
* vulkan-validation-layers: https://chromium.googlesource.com/external/github.com/KhronosGroup/Vulkan-ValidationLayers.git/+log/d1ff40512a..ebab3bc86c
If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/vulkan-deps-angle-autoroll
Please CC angle-team@google.com,syoussefi@google.com on the revert to
ensure that a human
is aware of the problem.
To file a bug in ANGLE:
https://bugs.chromium.org/p/angleproject/issues/entry
To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug
Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Bug: None
Change-Id: I94f05554452f1c8b97a1426fb4b61ac1a1fa4b1a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4802525
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Roman Lavrov <romanl@google.com>
|
|
f3c1de36
|
2023-08-17T15:29:24
|
|
Make shader recompile while parallel linking safe
Prior to this change, Program* objects held references to Shader*
objects. This poses a problem where a shader recompile can race with a
program link, if the program link is done in parallel.
As a result, a good chunk of the link job is done serially and under the
share group lock. After this change, that is no longer a problem, and
most of the link can be made lockless/parallelized.
This change separates out the "compiled state" from the rest of the
shader state. This was already done for the front-end state (for the
sake of caching), but is also now done for the backends that need it.
The compiled state in turn is placed in a shared_ptr, and is shared with
the program. When a shader is compiled, its own shared_ptr is replaced
with a new object, leaving all programs currently compiling unaffected
and using the previous compilation results.
Once a program is linked, its references to compiled shader states is
updated.
Bug: angleproject:8297
Change-Id: Iff7094a37088fbad99c6241f1c48b0bd4c820eb2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4791065
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
|
|
1bd45c4f
|
2023-07-17T14:18:53
|
|
Add tiling mode for GL_EXT_memory_objects
Add set and get TexParameter for pName GL_TEXTURE_TILING_EXT
Add test case to VulkanImageTest for import LINEAR memory object
Bug: angleproject:8274
Change-Id: I4432093e41f45e3926a27e3dee00d48c0438cae5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4752793
Reviewed-by: Jeff Vigil <j.vigil@samsung.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: mohan maiya <m.maiya@samsung.com>
Reviewed-by: mohan maiya <m.maiya@samsung.com>
|
|
27836f21
|
2023-08-21T00:00:00
|
|
Metal: Support incomplete integer textures
Ensure that a compatible placeholder
texture is created for sampling from
an incomplete texture.
Covered by these tests with Metal API Validation:
* IncompleteTextureTestES3.IntegerType
* IncompleteTextureTestES3.UnsignedIntegerType
Bug: angleproject:5594
Change-Id: Ib7322b7cf32cadabf40eb6050476c1bde98ee404
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4801369
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
|
|
084643d9
|
2023-08-22T11:04:32
|
|
EGL: Make sure unitialize values don't leak into configs
Old Android emulators did not implement many of the eglGetConfigAttrib
parameters, including EGL_COLOR_BUFFER_TYPE. They return EGL_SUCCESS
without writing the attribute value and DisplayEGL::getConfigAttrib
would write an uninitialized temporary value to the config in this
case.
Make sure the default config value is stored when eglGetConfigAttrib
behaves this way.
Add more logging about unexpected color buffer types to diagnose issues
like this from logcat more easily.
Bug: chromium:1442132
Change-Id: Ifbbbbfba43658bcd59c73cbb6586b76f636479e5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4791066
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Peng Huang <penghuang@chromium.org>
|
|
280e79e1
|
2023-08-10T14:08:00
|
|
Rescope globals only used in one function to function-local.
We can demote global variables when they are only used in one function.
This has performance implications on Metal.
Bug: angleproject:8311
Change-Id: Id666e6b167be771c14768cd73efa61fdacd897d4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4771215
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
aaeeea0c
|
2023-08-17T14:28:12
|
|
D3D11: Add device id to the render string
To get device id from GL_RENDER string when using D3D11 backend.
Bug: angleproject:3026
Change-Id: Ied666a481575ece077126c3e1177b150e7358a01
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4786902
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
be60f879
|
2023-06-28T17:29:45
|
|
Workaround for tex buffer type mismatch
In the event of a mismatch between a texture buffer format (eg GL_R32F)
and the shader sampler type (eg usamplerBuffer), adjust the tex buffer
format to match the sampler (eg GL_R32UI).
Test: angle_end2end_tests \
--gtest_filter="TextureBufferTestES31.TexBufferFormatMismatch*"
Bug: b/233119699
Change-Id: I3461bcecabfe1d96be6350c43c15b32d35265b23
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4769137
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Mike Schuchardt <mikes@lunarg.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
cf2c9c56
|
2023-08-17T10:45:51
|
|
Vulkan: Add VMA 3.0 support in ANGLE
* Updated the VMA hash in the dependencies to the 3.0 version.
* Updated ANGLE_VMA_VERSION in the build_override GN file to 3.0.
* The ANGLE_VMA_VERSION in the root BUILD.gn is unchanged.
* The flags and thresholds for the buddy algorithm are only used when
the used VMA version is less than 3.0.
* The general algorithm is used for all cases for VMA 3.0.
Bug: b/295208838
Change-Id: I00a95a2c2513112f8888c40931da4e2e5db97e2b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4777337
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
|
|
5217beb2
|
2023-08-15T13:43:12
|
|
Reland "Tightly pack LinkedUniform by using int16_t"
This is a reland of commit 152cf62b38874238095a91307e4ea9bcdedf8f46
Original change's description:
> Tightly pack LinkedUniform by using int16_t
>
> There is a check of vector size when we link uniforms and the maximum
> vector size is 4096 due to we clamp the maxUniformBlockSize to 64KB. In
> reality, if we exceeds this number, program link will take really long
> time and then hit failure. So there is no real need to keep all the
> variables in 32 bit integer. This CL changes to 16 bit integer. Further,
> sh::BlockMemberInfo and ActiveVariable data members are embeded into
> LinkedUniform struct as well so that the unused variables can be removed
> and data can be tightly packed. This also makes LinkedUniform easier to
> maintain as a simple struct with basic data types. With this change,
> LinkedUniform size is reduced from 108 bytes down to 60 bytes, 48 bytes
> reduction. Given some apps has 200-ish uniforms, this CL reduces 48
> bytes x 200 = ~9K memory just for uniforms per program (which goes
> through hash compute and decompression and file reads).
>
> Bug: b/275102061
> Change-Id: I7fae20f5b75f3239305e2094a992e3040b8c8e4c
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4754133
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> Commit-Queue: Charlie Lao <cclao@google.com>
Bug: b/275102061
Change-Id: I1cdec9407e930608d3239a104dcbf77c8d8e2113
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4791661
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
1e1c9d9d
|
2023-08-11T15:16:26
|
|
Pack and reduce Program::mProgramInput size
Right now mProgramInput is std::vector<sh::ShaderVariable>. It really
only need a subset of ShaderVariable struct. This CL adds a ProgramInput
struct so that we can add data members that actually required. This CL
also makes bools into bitfield and some variables to uint16_t to further
compact the size. This CL also groups the data memebers other than
string to basicDataTypeStruct which only contains basic data types and
the entire struct is memcpied during program binary load and save. This
not just reduces number of memcpy calls, but also improves reliability
so that when someone adds a new member into the struct, it will
automatically load/save correctly.
Bug: b/275102061
Change-Id: Ic055c986453ed46e56057a0122c9926245fef4d1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4776267
Reviewed-by: Roman Lavrov <romanl@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
aa8d60aa
|
2023-08-14T00:00:00
|
|
D3D11: Normalize blend state for MIN/MAX operations
Use default blend factors for MIN/MAX operations to
reduce the number of unique keys and to avoid D3D11
state allocation failures.
Fixed: angleproject:8305
Change-Id: I6abcf93240653de8d7d8e174c1f8109d12de63e6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4776071
Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
4ba4af61
|
2023-08-17T11:28:18
|
|
Revert recompile blocking on link
Causing timeouts on some platforms. An alternative implementation will
follow.
This change also reverts two changes that depend on it:
Vulkan: Move SPIR-V set up to link job
10f54902e816fa7e4cf314384e00590e2b9bfa1d.
Vulkan: Move default uniform init to link job
d8cd4dcdc9c55c88f030f7fca41357e99e600ed2.
Bug: angleproject:8297
Change-Id: I9a258460e7bcaeac214be5e63c16c20681e0bcde
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4789843
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
|
|
9f48f931
|
2023-08-16T06:38:15
|
|
Revert "Tightly pack LinkedUniform by using int16_t"
This reverts commit 152cf62b38874238095a91307e4ea9bcdedf8f46.
Reason for revert: Suspect cause of failure in for several Linux MSan Tests, e.g.
https://ci.chromium.org/ui/p/chromium/builders/ci/Linux%20MSan%20Tests/42403/overview
https://ci.chromium.org/ui/p/chromium/builders/ci/WebKit%20Linux%20MSAN/22174/overview
https://ci.chromium.org/ui/p/chromium/builders/ci/Linux%20MSan%20Tests/42403/overview
Original change's description:
> Tightly pack LinkedUniform by using int16_t
>
> There is a check of vector size when we link uniforms and the maximum
> vector size is 4096 due to we clamp the maxUniformBlockSize to 64KB. In
> reality, if we exceeds this number, program link will take really long
> time and then hit failure. So there is no real need to keep all the
> variables in 32 bit integer. This CL changes to 16 bit integer. Further,
> sh::BlockMemberInfo and ActiveVariable data members are embeded into
> LinkedUniform struct as well so that the unused variables can be removed
> and data can be tightly packed. This also makes LinkedUniform easier to
> maintain as a simple struct with basic data types. With this change,
> LinkedUniform size is reduced from 108 bytes down to 60 bytes, 48 bytes
> reduction. Given some apps has 200-ish uniforms, this CL reduces 48
> bytes x 200 = ~9K memory just for uniforms per program (which goes
> through hash compute and decompression and file reads).
>
> Bug: b/275102061
> Change-Id: I7fae20f5b75f3239305e2094a992e3040b8c8e4c
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4754133
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> Commit-Queue: Charlie Lao <cclao@google.com>
Bug: b/275102061
Change-Id: Id344e306307553731097f06edafc40bfeb73ff80
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4780494
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
|
|
be7ab480
|
2023-08-10T12:04:45
|
|
gles: disable MSRTT on Windows/NVIDIA
The angle_end2end_tests for MSRTT fail on Windows/NVIDIA/GLES, at least
on driver version 536.99. Let's add Windows NVIDIA to the list of known
bad configurations for disableMultisampledRenderToTexture.
Bug: angleproject:8304
Change-Id: Ic102881bb6d483d5ff2bd0e86a07bf5fe3683fcb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4771740
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Auto-Submit: Steven Noonan <steven@uplinklabs.net>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
152cf62b
|
2023-08-15T13:43:12
|
|
Tightly pack LinkedUniform by using int16_t
There is a check of vector size when we link uniforms and the maximum
vector size is 4096 due to we clamp the maxUniformBlockSize to 64KB. In
reality, if we exceeds this number, program link will take really long
time and then hit failure. So there is no real need to keep all the
variables in 32 bit integer. This CL changes to 16 bit integer. Further,
sh::BlockMemberInfo and ActiveVariable data members are embeded into
LinkedUniform struct as well so that the unused variables can be removed
and data can be tightly packed. This also makes LinkedUniform easier to
maintain as a simple struct with basic data types. With this change,
LinkedUniform size is reduced from 108 bytes down to 60 bytes, 48 bytes
reduction. Given some apps has 200-ish uniforms, this CL reduces 48
bytes x 200 = ~9K memory just for uniforms per program (which goes
through hash compute and decompression and file reads).
Bug: b/275102061
Change-Id: I7fae20f5b75f3239305e2094a992e3040b8c8e4c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4754133
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
59f158c1
|
2023-08-10T00:00:00
|
|
GL: Add explicitFragmentLocations workaround
Some drivers produce incorrect results when
a fragment output has an implicit location
and gl_SampleMask[] is written to.
Fixed: angleproject:8308
Change-Id: I615952ef61b1cb611984ec7defb189d89ab3281c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4777702
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
|
|
29aae8ac
|
2023-08-14T15:33:16
|
|
Vulkan: Don't access the XFB object during link
The descriptor set layout set up for XFB emulation lived in
TransfromFeedbackVk, but did not access anything in that object at all.
More importantly, it doesn't make any sense to look at the current XFB
object when linking a program.
Bug: angleproject:8297
Change-Id: I8bd0e747b7d3e3783ef053f20378cc42d2c1d997
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4774786
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
|
|
10f54902
|
2023-08-09T17:21:20
|
|
Vulkan: Move SPIR-V set up to link job
Bug: angleproject:8297
Change-Id: I2c7eb0281d181560c8fa3ace007b1e547b6cf18e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4764619
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
|
|
d8cd4dcd
|
2023-08-09T16:51:13
|
|
Vulkan: Move default uniform init to link job
Bug: angleproject:8297
Change-Id: I5bab916f452439d92afa65b9172574000ee0b587
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4762838
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
|
|
424f43e4
|
2023-08-11T17:07:16
|
|
Prevent shaders from recompiling while a link job is in progress
This will prevent a guarantee that link jobs can take further advantage
of. In particular, a good chunk of the link job is done serially and
under the share group lock due to this recompile-while-link issue.
After this change, that is no longer a problem, and most of the link can
be made lockless/parallelized.
Bug: angleproject:8297
Change-Id: Ic41ac62fb8c40131a69cd90fa9430584964677fa
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4776338
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
745023ef
|
2023-08-14T10:47:11
|
|
Vulkan: Ensure mComputeDirtyBits is set for potential submission.
When ContextVk::flushOutsideRenderPassCommands is called and we run out
of serial numbers reserved for outsideRPCommands (which means we have an
already started renderpass)., we will call flushCommandsAndEndRenderPass
so that we can have new queue serials for both renderPass and outsideRP
commands. When this happens, the current bug is that we will not add
mNewComputeCommandBufferDirtyBits to mComputeDirtyBits. If another
thread comes in did the submission, and then this context calls
dispatchCompute again without any state change, we will get a new
primprary command buffer without dirty bits for the new command buffer.
This CL ensures we always add mNewComputeCommandBufferDirtyBits
immediately after mRenderer->flushOutsideRPCommands call.
Bug: b/295533354
Change-Id: I1c672310b3b00cd9be25b5ee55a0a060239102a9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4778445
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Hailin Zhang <hailinzhang@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
d48a0d59
|
2023-08-11T16:57:23
|
|
Metal: optimize emulated texture formats.
Optimize the following aspects of emulated texture formats like
luminance, luminance-alpha and RGB:
1) Redundantly clearing the emulated channels in the texture, for
example the alpha channel in RGB textures. If TexImage2D redefines the
texture and it hasn't changed format, for example, it's not necessary
to re-fill the emulated channels.
2) Clearing the emulated channels was being done on the CPU. Refactor
PreferStagedTextureUploads to allow InitializeTextureContents to take
the GPU clearing path for emulated textures assuming the texture is
renderable.
3) Row-by-row data repacking and upload was allocating a staging
buffer for each row. Forcibly disable staging buffers on the
row-by-row code paths.
Zoom's web client performs well on ANGLE's Metal backend on Intel GPUs
with these optimizations.
Fixed: chromium:1472087
Change-Id: Ie8b1e9e64fcc82797de76dd07958dd0a5aaa0203
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4771988
Auto-Submit: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
|
|
f11c972b
|
2023-08-04T15:06:39
|
|
Update requiredFlags use for VMA image allocations
For the OOM fallbacks, we currently remove bits from the required
bits when device memory allocation is no longer possible. In doing so,
allocating on the device has become a strong preference rather than a
requirement. Therefore, we change this method a bit in this CL.
* Removed the device-local bit from the required flags when calling
allocateAndBindMemory().
* preferredFlags is now used in lieu of requiredFlags initially within
allocateAndBindMemory() to signal to the VMA to prioritize allocating
on the device. If it fails, we use requiredFlags for the fallback.
Bug: b/280304441
Change-Id: Id47a224cd74dacd3fb12d4fbfd815d8cefc016c4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4753758
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
|
|
16cfa28e
|
2023-08-08T22:08:24
|
|
Vulkan: Basic infra for parallel link
This change moves pipeline warm up to a parallelizable task, mostly as
an exercise to put in the infrastructure for parallel link in the Vulkan
backend. Follow up changes will move more of the link step to this
task.
The end goal is to be able to make the link task independent of
ContextVk, which would allow it to be run as an UnlockedTailCall, even
if not using a worker thread.
Bug: angleproject:8297
Change-Id: I17047162b2a41f0d681d9e3ee33f2e0239b4280d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4764231
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
237ff2b7
|
2023-08-11T14:18:38
|
|
Fix assertion failure with EGL_FOREVER_KHR.
Calling eglClientWaitSync passing EGL_FOREVER_KHR overflows
std::chrono and causes an assertion failure. This prevents
optimization of Chromium's backpressure fences. Clamp the internal
wait value to 1 day.
Bug: angleproject:8301
Change-Id: Idfc400351204dee648723a8d951ade7e56c25cb9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4776162
Commit-Queue: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Auto-Submit: Kenneth Russell <kbr@chromium.org>
|
|
6092e0b7
|
2023-08-10T00:00:00
|
|
D3D11: Ensure that clip depth mode is synced
Syncing clip depth mode driver uniform
should not depend on a viewport state.
Bug: angleproject:6554
Change-Id: I6ff2549a88fe3795eef20acfc48d0e945f19c4e0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4775599
Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
ffe81dd3
|
2023-08-03T14:53:32
|
|
Vulkan: allow opt-in to MSRTT emulation via overrides
The existing enableMultisampledRenderToTexture feature combines
conditions for device feature support and the policy decision of whether
to allow MSRTT emulation.
This change splits it into two features, allowing application developers
to control the policy condition for the emulation path without impacting
the device capability checks.
Bug: angleproject:8291
Change-Id: Ic1525c878906b10df777c582e44b931028aae928
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4749525
Auto-Submit: Steven Noonan <steven@uplinklabs.net>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
833f7f69
|
2023-08-09T10:49:51
|
|
Vulkan: improve XFB feature dependency checks
Some features need to account for the possible override of
supportsTransformFeedbackExtension == false.
Since we now frontload the overrides, we also can remove the explicit
overrides for the dependent features in TransformFeedbackTest.
Bug: angleproject:8291
Change-Id: I0ec54dc0fce440ef3e7bfe9987d0ea19fb9dafaa
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4763096
Auto-Submit: Steven Noonan <steven@uplinklabs.net>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
f395f34b
|
2023-08-03T13:58:43
|
|
features: frontload feature overrides
This allows us to have features that depend on the state of other
features more reliably.
For example, let's say you have two features:
ANGLE_FEATURE_CONDITION(&mFeatures, allowX, (benefitsFromX || isSpecificHardware) && !isBadHardware);
ANGLE_FEATURE_CONDITION(&mFeatures, supportsX, hardware.featureXSupported && mFeatures.allowX.enabled);
Before this change, if you overrode allowX, the override would be
applied too late for the supportsX test.
This also helps with disabling dependent features via overrides. For
example, if you disable "supportsRenderpass2", it will also disable
features depending on it, such as "supportsDepthStencilResolve" and
"supportsFragmentShadingRate".
By frontloading the feature overrides, we can have cross-dependencies
between "feature supported on this platform" and "allow this feature by
policy".
Bug: angleproject:8291
Change-Id: Id6da2c89428fa896d677fe8d5a41369277a21b31
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4749524
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Auto-Submit: Steven Noonan <steven@uplinklabs.net>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
7c69116f
|
2023-08-08T10:14:47
|
|
Vulkan: Fix data race with DynamicDescriptorPool
Right now DynamicDescriptorPool::destroyCachedDescriptorSet can be
called from garbage clean up thread, while simultaneously accessed from
context main thread, and data race will happen and cause bugs. This can
only happen when the buffer is not being suballocated. In this case,
suballocation owns the bufferBlock and bufferBlock gets destroyed when
suballocation is destroyed from garbage collection thread. If buffer is
suballocated, the shared group owns pool which owns bufferBlocks and
they gets destroyed from shared group with the share group lock. This CL
avoids this race problem by release the shared cacheKey when the buffer
is released, while we still had the shared group lock.
Bug: chromium:1469542
Change-Id: Ic1f99e6b6083d63e4efb9c3f408921da62c006ac
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4761365
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
ae8a5cfd
|
2023-08-09T12:00:53
|
|
GL: Accept more config options when creating the EGL context
Some drivers fail to find any configs in ANGLE but succeed with
Chrome's config searching. Widen ANGLE's config searching to include
565 configs and configs without depth stencil.
Refactor the config search logic to be used for both backend
context and mock pbuffers instead of hard-coded pbuffer config.
Bug: chromium:1442132
Change-Id: I52378ec66542ec7aa56849ec8470f8eadb4abf58
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4764230
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Peng Huang <penghuang@chromium.org>
|
|
a990ba34
|
2023-08-02T17:21:00
|
|
Fix write out of bounds on non robust contexts crashes
dEQP-EGL.functional.robustness.reset_context.shaders.out_of_bounds_non_robust.reset_status.writes.*
tests are failing, because the test expectes EGL_SUCCESS
upon eglMakeCurrent(EGL_NO_CONTEXT), regardless of whether
the context was lost.
This CL:
1) Changes the validation function of eglMakeCurrent:
if the EGLContext passed to eglMakeCurrent
is EGL_NO_CONTEXT, do not return EGL_CONTEXT_LOST even if
the context is already lost.
2) Adds a lost context check in checkOneCommandBatch.
If the context is lost, do not check fence status and
assume all of the vulkan commands have finished execution,
so that we can properly destroying all
the resources before destroying the context.
3) Changes the GL error code from GL_INVALID_OPERATION
to GL_CONTEXT_LOST when there is a vulkan device lost.
Bug: b/286921997
Bug: b/289544394
Change-Id: I91e8a4105f0d7a3ec3b59bae58da80bc64ffa94a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4728466
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
|
|
fa3ecccb
|
2023-08-09T10:48:36
|
|
Vulkan: make fragment shading rate depend on renderpass2
The extension depends on renderpass2 and will raise a VVL failure if
it's not available and enabled.
Note that this doesn't yet work as intended if you only override
supportsRenderpass2=false. A subsequent commit will fix this.
Bug: angleproject:8291
Change-Id: I6843b342909fb9000ebdcea80e006670c865f858
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4763095
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Auto-Submit: Steven Noonan <steven@uplinklabs.net>
Commit-Queue: Steven Noonan <steven@uplinklabs.net>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
df76f5b1
|
2023-08-08T15:13:54
|
|
Respect KHR_parallel_shader_compile for program link
Parellel shader compilation was using the single-threaded vs
multi-threaded pool appropriately, while program link was always being
multi-threaded.
This change makes sure the program link tasks uses the same pool as
shader compilation per KHR_parallel_shader_compile.
Bug: angleproject:8297
Change-Id: I0508617678a6e875fc0719a2d447cf1a9c5ca40f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4762086
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
2d87c31d
|
2023-08-09T07:47:20
|
|
Revert "Metal: initialize std::arrays in mtl_render_utils"
This reverts commit c40d31b02690788cf61f93d71bbe094ddbb1a004.
Reason for revert: Invalid rationale, it does not solve the
problem. std::array does run the default constructors
of the AutoObjCPtrs held in them.
Original change's description:
> Metal: initialize std::arrays in mtl_render_utils
>
> The std::array default constructor does not initialize the memory.
> This leads to uninitialized access in mtl_render_utils *Utils.
>
> Fix by initializing them.
>
> Bug: angleproject:8293
> Change-Id: I597df067f3c19907a038bb4899a178734158302c
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4756783
> Reviewed-by: Kenneth Russell <kbr@chromium.org>
> Commit-Queue: Geoff Lang <geofflang@chromium.org>
> Auto-Submit: Kimmo Kinnunen <kkinnunen@apple.com>
> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Bug: angleproject:8293
Change-Id: Ibacacd70fc196b5ecb3d0bc971d6565f7f578d4c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4765207
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
|
|
719165c8
|
2023-08-04T12:13:37
|
|
Remove "const UniformTypeInfo *typeInfo" from struct LinkedUniform
This is a cached pointer to the const kInfoTable. There isn't much of
performance benefit to cache here compare to directly retrieve from the
table. This cached pointer is removed in this CL, which means we do not
need to update the pointer in the ProgramExecutable::load().
This and a few earlier CLs that attempt to do memcpy for entire
mUniforms reduced average frame time of blade_and_soul_revolution app
trace 3%, from 4.3359 ms to 4.2066ms on pixel 7 pro.
Bug: b/275102061
Change-Id: I6fd34d665234e3a5cc85344924049bf5b13aaa80
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4753933
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
|
|
c40d31b0
|
2023-08-07T12:33:42
|
|
Metal: initialize std::arrays in mtl_render_utils
The std::array default constructor does not initialize the memory.
This leads to uninitialized access in mtl_render_utils *Utils.
Fix by initializing them.
Bug: angleproject:8293
Change-Id: I597df067f3c19907a038bb4899a178734158302c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4756783
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Auto-Submit: Kimmo Kinnunen <kkinnunen@apple.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
f7d7be8d
|
2023-08-04T14:16:38
|
|
Metal: upstream "UBO convert only whole block".
Authored by Dan Glastonbury; reviewed by Dean Jackson.
This upstreams https://commits.webkit.org/264375@main .
OpenGL doesn't guarantee that the buffer backing uniform blocks needs
to be a multiple of the block size. When converting OpenGL layout
blocks to Metal layout, ConvertUniformBufferData is rounding up the
size of the backing buffer to a multiple of the block size which leads
to reading out of bounds.
To ensure we don't read outside the source buffer, this change
replaces calls to `memcpy` with `memcpy_guarded` which accepts a
pointer to the limit of available data and copies as much data as is
available, writing zeroes for any unavailable amount.
Conversion of bools didn't use memcpy, so the raw pointer is checked
against maxSrcPtr and only dereferenced if valid, otherwise zero is
used.
This has been tested with ASan and UBSan enabled against the OpenGL
dEQP tests for Uniform Buffer Objects in ANGLE.
Fixed: angleproject:8292
Change-Id: I0d472277889f073e54a9049f01bc04f6965a7b68
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4754175
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Auto-Submit: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
|
|
e50d3876
|
2023-08-04T14:47:41
|
|
Vulkan: Retain loadOp when there is a resolve attachment
Rendertargets with resolve attachments cannot optimize away loadOp
Load or Clear even if they are marked ResourceAccess::Unused and
storeOp is RenderPassStoreOp::DontCare.
Bug: angleproject:4836
Bug: angleproject:5981
Tests: ImageTest.SourceAHBTarget2DMSRTTInteraction*
Change-Id: I39ec67a457de6876ed0bd47d66a963cc59fab064
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4753735
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: mohan maiya <m.maiya@samsung.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
eff12c1e
|
2023-08-03T12:10:05
|
|
Move name and mappedName out of LinkedUniform struct
These are std::string objects. This CL moves these two data out of
LinkedUniform and into ProgramExecutable class, side by side with
mUniforms. With these two data moved out, LinkedUniform is now a simple
struct with basic data types, and I can memcpy entire vector of
uniforms.
Bug: b/275102061
Change-Id: I9ae13e7daca85f8e5f3662a4718f190bebb5f5d2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4750442
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
4963febf
|
2023-08-02T16:52:52
|
|
Vulkan: Remove type indices with host-visible bit
Currently, the memory type index for VMA image allocations are
selected and returned by the API. However, it could potentially
choose a type index with more flags than required or preferred,
and ignore the index with exactly the flags we want. For example,
it could pick a type index with the host-visible property flag,
even if is unnecessary and a type index with a device-local flag
would suffice.
Using memoryTypeBits during the allocation allows us to filter
the unwanted type indices out and use the other indices initially.
* Added a new function to RendererVk.cpp to try to remove the memory
type indices with the host-visible bit for VMA image allocations
if they should be device-local.
* GetMemoryTypeBitsExcludingHostVisible()
* It also removes the indices with the protected bit if it is not
required.
* If the allocation is unsuccessful, the fallback resets the field
for memoryTypeBits, allowing all available type indices to be used
for the allocation.
* Added memory type index to the pending allocation log during OOM.
Bug: b/294085818
Change-Id: Icc1b218df075170a6baa7ec57c837ed59cd4fa96
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4743604
Reviewed-by: Kaiyi Li <kaiyili@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
|
|
9c588180
|
2023-08-02T16:39:44
|
|
Change LinkedUniform::arraySizes from std::vector to unsigned int
We always flatten multiple dimensional arrays in the uniform to a one
dimensional array, so the arraySizes can be simplified to unsigned int
instead of a vector. With this, we can now move the arraySize into the
simple mFixedSizeData struct and the normal memcpy will cover the
load/save.
Bug: b/275102061
Change-Id: I24c026f783b755f7aa691a5db5746b6309a21227
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4735275
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
d2a6b2a0
|
2023-08-04T14:15:11
|
|
Use offscreen DisplayVk on ChromeOS
Currently, we always use DisplayVkHeadless on ChromeOS which can
fail if the drivers do not support VK_EXT_headless_surface (like on
Intel). At the end of the day, CrOS never really uses Vulkan WSI, so
it shouldn't need a WSI extension anyways.
This CL introduces a simple DisplayVkOffscreen that requires no WSI.
We then configure CrOS to use this new DisplayVk.
Bug: b/292249282
Change-Id: I1fcbb48d187eb656c6e03bc7ac7b15ac8ad0a4ae
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4752416
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Brian Ho <hob@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
8ba04f1c
|
2023-08-05T00:48:35
|
|
Metal: disable fastmath less often.
Stop disabling fastmath if atan is used in the shader. Application
developers will surely prefer the significant performance improvement
of the fastmath optimizations over corner-case differences in
precision.
Make disabling fastmath more precise: only if it's forcibly disabled
as a driver bug workaround, or if the shader uses invariance and
preserveInvariance is not available.
Suppress the test:
dEQP-GLES[23].functional.shaders.invariance.lowp.loop_2
which fails when fastmath is enabled for shaders using atan and
invariance.
Fixed: chromium:1320111
Change-Id: I6e33b14b1d05faedc15373f24af3e22a4074a35b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4754018
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Auto-Submit: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
|
|
ee019f58
|
2023-08-01T17:03:24
|
|
Group fixed sized data of LinkedUniform into a struct
Most of gl::LinkedUniform struct is a basic types and can be simply
initialized with memcpy. This CL groups these together and encapsulate
them with get APIs. The load/save is now a single memcpy for the entire
fixed size data structure of basic types.
Bug: b/275102061
Change-Id: I49120c06ec941c783790ac0ecb0ee314a4234b26
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4740298
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Roman Lavrov <romanl@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
7bb13226
|
2023-08-01T12:10:44
|
|
Pack booleans inside struct LinkedUniform into bitfields
Right now every bool is load/stored as integer, which itself is a
memcpy. This CL moves them into a bitfield and load/store with one
uint32_t, thus improves efficiency of cache load/save.
Bug: b/275102061
Bug: angleproject:8223
Change-Id: Id8e8e8861c8fcbd75dbef6056e4ff6c8ad2fc4a1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4740292
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Roman Lavrov <romanl@google.com>
|
|
34a99db4
|
2023-08-03T16:46:36
|
|
Metal: Check the full generated default shader in
Add the default MSL shader text in the repo.
Fix an error with include path setup to make the script runnable
from an arbitrary directory, for WebKit purposes.
WebKit would compile that to a compile-specific metallib and then
attach that metallib to the compilation as .h.
Current upstream behavior is to compile the metallib once few platforms.
Bug: angleproject:8284
Change-Id: Icbf7c0055718496cb380fad0b73d5b9b0d0abb0e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4748400
Commit-Queue: Kenneth Russell <kbr@chromium.org>
Auto-Submit: Kimmo Kinnunen <kkinnunen@apple.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
|
|
1b94197a
|
2023-08-03T13:45:34
|
|
Metal: Enable fast math based on runtime OS version checks.
Chrome compiled with a recent SDK but a low minimum required OS version
so fast math was always disabled at compile time. Turn this into a two-
part check: Use macros to make sure preserveInvariance can be compiled
and @available to do the runtime OS check.
Fix the UseFastMathForShaderCompilation check. It was incorrectly
inverting two negative conditions.
Mark some dEQP precision tests as failing due to fast math. We would
prefer to have the performance improvement over some precision loss.
Bug: chromium:1468346
Bug: angleproject:8287
Change-Id: I31d9c732a12841cb4d0bc1a555ea1f1ea8a434fc
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4750199
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
|
|
95f09c88
|
2023-08-01T20:48:45
|
|
Vulkan: Drop VkAHBFormatPropertiesANDROID for BLOB
VkAndroidHardwareBufferFormatPropertiesANDROID is only valid for
images.
Test: details in ag/24283178
Bug: b/293592961
Change-Id: I72077ceac867da8522620a67d81f7093efa591f3
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4739718
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Solti Ho <solti@google.com>
|
|
79973750
|
2023-07-27T17:53:24
|
|
Let UniformLinker uses its own struct instead of LinkedUniform
UniformLinker itself needs more detailed information than the final
linked uniforms. Right now they are using the same data structure. This
CL adds a new structure for linker to use. Since the linker data
structure is temporary, we never needs to load/save from cache, we have
more freedom here to use complex data types. The benefit of separate out
intermediate structure from LinkedUniform is that it allows us to
further simplify LinkedUniform structure without change much of
ProgramLinkedResource implementation. As result of this, this CL removes
field and outerArraySizes (both are std::vector type) from
LinkedUniform.
Bug: b/275102061
Change-Id: Ic1291b51b8906ac586a2f25eb1dbbe74eae8fdc5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4727742
Reviewed-by: Roman Lavrov <romanl@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
335c6b86
|
2023-08-02T00:00:00
|
|
D3D11: Do not specialize HLSL for multisampled rendering
Pass the required state as a driver uniform instead of
triggering fragment shader recompilation at draw calls.
Bug: angleproject:8097
Bug: angleproject:8131
Fixed: chromium:1468993
Change-Id: I15825c0522b29d48eb2c3b341ba96f139ef26460
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4742579
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
|
|
01ee134b
|
2023-08-02T13:43:36
|
|
Revert "GL: Remove EGL_EXTERNAL_CONTEXT_SAVE_STATE_ANGLE"
This reverts commit 4e0250f1926d25e39023c4ad7862ed358a0ec4b6.
Reason for revert: Chromium change was reverted. crbug.com/1468956
Original change's description:
> GL: Remove EGL_EXTERNAL_CONTEXT_SAVE_STATE_ANGLE
>
> Now that Chromium no longer uses it.
>
> Bug: angleproject:5509
> Change-Id: Ibb8d9cdc4d67dad77ca50437423b18d81e838203
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4724768
> Reviewed-by: Peng Huang <penghuang@chromium.org>
> Reviewed-by: Geoff Lang <geofflang@chromium.org>
> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Bug: angleproject:5509
Change-Id: Id8143b1715ec8162be9351437fbd34a2aa4c2e00
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4742521
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|