|
65f6c2ea
|
2023-10-22T18:07:55
|
|
Metal: always implicitly resolve MSAA render buffers on tiled GPUs.
On tile based GPUs, implicitly resolving MSAA render buffers to
single-sampled is preferred. Because it would save bandwidth by avoiding
storing the MSAA textures to memory. Furthermore resolving as
StoreAction is almost a free operation on these GPUs.
Traditional desktop GPUs almost always store MSAA textures to memory
anyway, so this feature would have no benefit besides adding additional
resolve step as well as memory overhead of the hidden single-sampled
textures.
Bug: chromium:1486094
Change-Id: I5eb3b1314560024dd5c0834b0c0b43a6b4d3d51b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4962114
Commit-Queue: Quyen Le <lehoangquyen@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
e4a267e5
|
2023-10-20T16:10:50
|
|
Vulkan: Fix YUV external format resolve attachment load/storeOp
When YUV external format resolve attachment is used, and
nullColorAttachmentWithExternalFormatResolve is true, the loadOp and
storeOp are packed in color attachments.When we setup the resolve
attachment, we must use the color attachment information instead of
general resolve code path (where there is always a color attachment).
Without this fix, the resolve attachment is always uses loadOp=DontCare
which is wrong.
Bug: b/223456677
Change-Id: Ib41eb438aedbcd9a37c356540e81cdf7b9610a20
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4960502
Reviewed-by: Chris Forbes <chrisforbes@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
9298baa9
|
2023-10-20T10:26:00
|
|
Vulkan: Fix ImageTestES3.RenderToYUVAHB assertion
The bug here is that for YUV resolve, we always set mTransience to
YuvResolveTransient. And isImageTransient() returns true if mTransience
!= Default. And if image is transient, we will do unresolve, which is
incorrect here. For nullColorAttachmentWithExternalFormatResolve() case,
the image is actually not transient. This CL will only set transience to
YuvResolveTransient if we need to create a transient color attachment.
This CL looks at mImage->getExternalFormat() as the answer for
isYUVResolve instead of rely on transience.
Bug: b/223456677
Change-Id: I1bc176df22b0abc91d668a178e48d6b90eacbdd7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4959194
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Chris Forbes <chrisforbes@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
6188c0a6
|
2023-10-23T16:47:10
|
|
Unsuppress VUID-vkCmdEndDebugUtilsLabelEXT-commandBuffer-01912
VUID removed in
http://github.com/KhronosGroup/Vulkan-ValidationLayers/pull/5941
Bug: chromium:1420265
Change-Id: I8e3b9462df5e250c97c6bff02635cd28fec2a4e4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4967241
Auto-Submit: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Roman Lavrov <romanl@google.com>
Commit-Queue: Roman Lavrov <romanl@google.com>
|
|
6258acae
|
2023-10-19T00:00:00
|
|
GL: Add resyncDepthRangeOnClipControl workaround
Some drivers do not apply GL_CLIP_ORIGIN_EXT and
GL_CLIP_DEPTH_MODE_EXT state changes until other
transformation states are updated.
As a workaround, force-resync the depth range on
clip control updates.
Fixed: angleproject:8381
Change-Id: I26f95108e9419be30ea0b562e02ab4bae78f65bb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4966525
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
ec29008a
|
2023-10-19T00:00:00
|
|
GL: Fix extended dirty bits sync
* Use extendedBitMask when syncing
extended dirty bits to skip bits
ignored by the current operation.
* Use extendedBitMask for unsetting
backend-local extended dirty bits.
Fixed: angleproject:8382
Change-Id: I0bda18d801805b30d7cb071366353af05a44ab57
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4960055
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
ba65feb4
|
2023-10-18T17:33:38
|
|
Vulkan: Limit mutable texture flush to one update
In case there are many updates for a mutable texture, flushing
it preemptively can reduce performance, especially if it is done
repeatedly.
* Added getLevelUpdateCount() to ImageHelper.
* Previous mutable textures will now be flushed only if they have
exactly one update per mip level/cubemap face (if defined).
* This means that mutable textures with no data will also not be
flushed.
* Added unit tests for single-level texture flushing and situations
with no updates or more than one update.
Bug: b/285613719
Change-Id: I1592ecf502051a55ebfbb7fcd22577c9ce87bf43
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4953847
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
d2de7451
|
2023-10-19T14:10:44
|
|
Vulkan: Fix VK_android_external_format_resolve VVL error part 5
Fix assertion in RendererVk::getFormatFeatureBits(). When formatID is
external format, we can not use vkGetPhysicalDeviceFormatProperties to
get the formatFeature (since VkFormat is undefined). To fix this, we
keep the formatFetaure that returned from AHB in the
ExternalYuvFormatInfo and use that in getFormatFeatureBits() if it is
external format.
This also fixes the VVL error VUID-VkImageCreateInfo-pNext-02396: The
Vulkan spec states: If the pNext chain includes a
VkExternalFormatANDROID structure whose externalFormat member is not 0,
flags must not include VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT
Bug: b/223456677
Change-Id: I625c2bf4fe534fa206918b16772ac3ac7c6fa79a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4956117
Reviewed-by: Chris Forbes <chrisforbes@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
80e2d8d7
|
2023-10-19T13:53:32
|
|
Vulkan: Update PipelineProgram if mStreamingVertexAttribsMask dirty
When mStreamingVertexAttribsMask bit chnages, we are going to switch
between a internal buffer and user's buffer. We must update graphics
pipeline program, even if bufferOnly is true.
Bug: b/303219048
Change-Id: I0536cb7bcd6ed8f1de39aaea5bd6cd6eef61c5e1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4957193
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
c153d4a5
|
2023-10-18T18:12:19
|
|
Set isYUV to true for "EXTERNAL" formats
These external formats are all YUVs so far. It is more correct to set
isYUV to true than set to false.
Bug: b/223456677
Change-Id: Ib9eb937754f4c085fbcc6768bb7a93d3c28317c1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4953919
Reviewed-by: Chris Forbes <chrisforbes@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
464dbb61
|
2023-10-18T17:49:14
|
|
Vulkan: Fix VK_android_external_format_resolve VVL error part 4
VUID-VkWriteDescriptorSet-descriptorType-01946: The Vulkan spec states:
If descriptorType is VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, then the
imageView member of each pImageInfo element must have been created
without a VkSamplerYcbcrConversionInfo structure in its pNext chain. The
bug here is that right now these angle::Format::External{n} returns
isYUV false. This CL changes the check of isYUV to
getYcbcrConversionDesc().valid().
Bug: b/223456677
Change-Id: Ifc97f738972a24c4e5dec3e37d8d5896efa9fe80
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4953917
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Chris Forbes <chrisforbes@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
4d7fc442
|
2023-10-18T12:49:06
|
|
Vulkan: Fix VK_android_external_format_resolve VVL error part 3
VUID-VkRenderPassAttachmentBeginInfo-pAttachments-parameter: The Vulkan
spec states: If attachmentCount is not 0, pAttachments must be a valid
pointer to an array of attachmentCount valid VkImageView handles. The
bug here is that when nullColorAttachmentWithExternalFormatResolve is
true, there is no color attachment, but the RenderPassDesc still appears
having a color attachment because we need to store the formatID in it.
This CL changes to use mFramebuffer.getImageViews().size() instead of
mRenderPassDesc.attachmentCount() which is more correct anyway.
Bug: b/223456677
Change-Id: I0f0947f0c642bac9cd18a80525b92c62ef0723ec
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4952969
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Chris Forbes <chrisforbes@google.com>
|
|
fce367c9
|
2023-10-18T11:36:59
|
|
Vulkan: Fix VK_android_external_format_resolve VVL error part 2
VUID-VkFramebufferCreateInfo-flags-03201 The Vulkan spec states: If
flags includes VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, the usage member of
any element of the pAttachmentImageInfos member of a
VkFramebufferAttachmentsCreateInfo structure included in the pNext chain
that refers to an attachment used as a color attachment or resolve
attachment by renderPass must include
VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT. The bug here is that when we create
VkImage for AHB for rendering, we specify mUsage as Sample. This CL adds
COLOR_ATTACHMENT if it supports resolve.
This CL also adds VkAndroidHardwareBufferFormatProperties2ANDROID format
query for debug logging.
VUID-VkImageViewCreateInfo-usage-08931 is temporary added to skip list
due to ARM driver bug. The bufferFormatProperties returned does include
VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT. Will remove once driver is
fixed.
Bug: b/223456677
Change-Id: Ibccf5f19975654fd94b00ae10e15ac986f7866dd
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4952962
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Chris Forbes <chrisforbes@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
889b01ef
|
2023-10-17T12:13:10
|
|
Vulkan: Fix VK_android_external_format_resolve VVL error part 1
VUID-VkSubpassDescription2-nullColorAttachmentWithExternalFormatResolve-09337:
The Vulkan spec states: If the
nullColorAttachmentWithExternalFormatResolve property is VK_TRUE and
pResolveAttachments is not NULL, for each resolve attachment that has a
format of VK_FORMAT_UNDEFINED, the corresponding color attachment must
have the value VK_ATTACHMENT_UNUSED
VUID-VkFramebufferCreateInfo-attachmentCount-00876 The Vulkan spec
states: attachmentCount must be equal to the attachment count specified
in renderPass
Fix assertion in FramebufferVk::getFramebuffer()
Bug: b/223456677
Change-Id: I538a44753a2ba9b432fa3b1814748942cd8a3500
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4948652
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
05c5cef0
|
2023-10-17T21:16:52
|
|
Manual roll vulkan-deps from 68a0a794aa0a to 92b29883afea (1 revision)
Manual roll requested by solti@google.com
https://chromium.googlesource.com/vulkan-deps.git/+log/68a0a794aa0a..92b29883afea
Changed dependencies:
* vulkan-validation-layers: https://chromium.googlesource.com/external/github.com/KhronosGroup/Vulkan-ValidationLayers.git/+log/7ef2b9a6bb..deb215c083
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,solti@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://issues.skia.org/issues/new?component=1389291&template=1850622
Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Bug: b/306178740
Tbr: solti@google.com
Change-Id: I1060b8e021e28e70ca11305dc60a8fa8462e1eff
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4950550
Commit-Queue: Solti Ho <solti@google.com>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
|
|
384a29a8
|
2023-07-27T10:51:07
|
|
Reland: GL: Remove EGL_EXTERNAL_CONTEXT_SAVE_STATE_ANGLE
Now that Chromium no longer uses it.
This is a reland of:
https://chromium-review.googlesource.com/c/angle/angle/+/4724768
Bug: angleproject:5509
Change-Id: I650e598580539fbe404f2ec4b56b20b56b948f6c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4903079
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
cfc40d2b
|
2023-07-19T17:47:13
|
|
Vulkan: Adjust clear color precision for GL_RGB5_A1 FBO
When clear color has more precision than the framebuffer
format can hold, dithering is automatically applied on
some hardware.
This issue causes below dEQP tests to fail when the FBO
color attachment format is RGB5_A1:
KHR-GLES31.core.draw_buffers_indexed.color_masks
KHR-GLES32.core.draw_buffers_indexed.color_masks
Adjust the clear color precision for RGB5_A1 format to
workaround the issue.
We can remove this workaround once the vulkan driver
fixes the auto-dithering problem.
Bug: b/292282210
Change-Id: Ic3ffebd2d20c8782612619a60d1ec2cc6d613c22
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4937472
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Roman Lavrov <romanl@google.com>
Commit-Queue: Yuxin Hu <yuxinhu@google.com>
|
|
36439d9c
|
2023-10-12T00:00:00
|
|
Metal: Fix PBO uploads of PVRTC1 textures
Do not override row pitch values for PVRTC1
textures during internal backend operations.
Instead, set bytesPerRow to 0 before calling
replaceRegion just to pass Metal Validation.
Enforce CPU path for PBO uploads until
GPU block linearization is implemented.
Bug: angleproject:8376
Change-Id: I80b9ec69364d55cd9f51005f4d1a180e05e71c2c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4949350
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
|
|
cc61dded
|
2023-10-17T13:21:14
|
|
Vulkan: Remove fixed VU suppressions
Bug: angleproject:2866
Bug: angleproject:4928
Bug: angleproject:5027
Bug: angleproject:7843
Bug: angleproject:8076
Bug: b/175584609
Change-Id: I1a3ccdc92be73874e7599961bae2a0e8c7497b1a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4947653
Commit-Queue: Charlie Lao <cclao@google.com>
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
|
|
0be59b3d
|
2023-10-17T17:31:05
|
|
Vulkan: disable warmUpPipelineCacheAtLink for Venus
The same cache miss is seen on MESA ANV and MESA RADV drivers. Together
with already disabled ARM drivers, we'd disable for Venus as a whole for
monolithic pipelines. This won't affect later Venus GPL enablement on
supported host drivers like ANV and RADV.
Bug: b/299532942
Test: affected title is semi-playable
Change-Id: Iaec0d43b15b64b6b74dfa68021f8a5f2fe6cca8d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4948694
Commit-Queue: Yiwei Zhang <zzyiwei@chromium.org>
Commit-Queue: Cody Northrop <cnorthrop@google.com>
Auto-Submit: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
|
|
3b28bca0
|
2023-10-11T09:49:54
|
|
Allow using RGBA IOSurfaces with GL_RGBA format for EAGL backend
As https://crrev.com/c/4877334 switched RGBA IOSurfaces to GL_RGBA
to work with ANGLE/Metal, some tests(e.g. web tests) on iOS failed
to create an IOSurface because ANGLE'S EGL backend still still
binds IOSurfaces as GL_BGRA_EXT even though we expect the IOSurface
to really be RGBA. To fix it, this CL allows using RGBA IOSurfaces
with GL_RGBA format by adding a GL_RGBA entry to kIOSurfaceFormats.
See also the comment[1] for better explanation.
[1] https://crrev.com/c/4918590/comments/1e44e971_50c3d780
Bug: chromium:1489586
Change-Id: Ifa215318401edb892fd5527c35c7d30871e82a83
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4930309
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Sunny Sachanandani <sunnyps@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
|
|
e076d6cf
|
2023-10-17T11:39:10
|
|
Move invalid uniform protection to the frontend.
The frontend potentialy indexes into mUniformLocations with invalid
uniform locations while validation is disabled too. Move the validation
from the Metal backend to the frontend.
Bug: chromium:1484878
Change-Id: I92bc43aa28cfa26d601bb28f318860375f618608
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4947652
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
2e11fcc5
|
2023-10-16T16:40:35
|
|
Vulkan: Fix assertion when YUV image attached to resolve attachment
When YUV image attached to resolve attachment, mSamples is 1. Righ now
the code assumes resolve is a MSRT attachment, so it asserts mSamples>1.
This CL adds a new API packYUVResolveAttachment so that we can assert
properly for YUV and MSRT.
Bug: b/223456677
Change-Id: Ib65fd3fe1e6561b85395cc27204bbd85c1f464c3
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4942907
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Chris Forbes <chrisforbes@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
58ffa778
|
2023-10-11T09:41:23
|
|
Vulkan: Implement YUV_TARGET use VK_ANDROID_external_format_resolve
This implements EXT_YUV_TARGET using VK_ANDROID_external_format_resolve
extension.
This CL is based on Chris Forbes's CL on android gerrit.
Bug: b/223456677
Change-Id: Ieb6970a0787b0c2a72a76b208695a678d2c79e80
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4857459
Reviewed-by: Chris Forbes <chrisforbes@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
1ea49a22
|
2023-10-13T11:28:41
|
|
Move uniform dirty bits to ProgramExecutable
Rather than try to funnel them through Program and ProgramPipeline to
the executable in the backend, just move them to ProgramExecutable in
the front end.
This fixes Dota Underlords at the same time due to not needing to set
the Program dirty to propagate bits.
Test: Dota Underlords
Test: ProgramPipelineTest31.ProgramPipelineBindBufferRange
Bug: b/299532942
Change-Id: Ic73c45608e22f89ca400ebf684f8cd287ed2f43a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4922969
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Cody Northrop <cnorthrop@google.com>
|
|
fee512d9
|
2023-10-11T18:22:13
|
|
Vulkan: Add mapping between FormatID and externalFormat
This CL adds support to query the external format from AHB and convert
that to one of angle::FormatID::EXTERNALn. Then at the time to create
renderPass, we convert that angle::FormatID::EXTERNALn back to actual
vendor specific external format that returned from vulkan driver. With
this, the rest of angle code should not need to worry about actual
vulkan external formats.
This CL is based on Chris Forbes's CL on android gerrit.
Bug: b/223456677
Change-Id: I6d8150741bc590809a9962c1a11a6026f1ebbb74
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4932361
Reviewed-by: Chris Forbes <chrisforbes@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
2450b59e
|
2023-10-16T15:23:48
|
|
Vulkan: Attempt to fix the perf/mem regression of previous CL
We should get the size before destroy garbage. Otherwise the size
returned likely is "garbage". The accounting may affect other logic and
cause memory and perf regression.
Bug: b/305752495
Bug: b/305791801
Change-Id: If89bc95c11f43ff3da61fdab3ae961c0211ca92a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4943169
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Reviewed-by: Roman Lavrov <romanl@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
57fcee54
|
2023-10-11T14:48:53
|
|
Vulkan: Add feature flag for externalFormatResolve
This CL adds supportsExternalFormatResolve feature flag and enable the
vulkan extension if existed.
This CL is split from Chris Forbes's CL on android gerrit.
Bug: b/223456677
Change-Id: I731f35dc629c12c7290c6ed24ff54967e2e4eab7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4932592
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Chris Forbes <chrisforbes@google.com>
|
|
3870655e
|
2023-10-10T17:04:04
|
|
Vulkan: Add 8 external format ID for external_format_resolve
For external formats ANGLE does not know the exact that is. The idea is
we reserve 8 external format ID for these driver defined formats. Each
ID represents one uniquely defined external format. Then we will use
this format ID pass around ANGLE just like any other format ID.
Eventually vulkan backend will convert this formatID to the actual
external format structure that returned from driver. Right now we
reserved 8 IDs for this usage. Based on our survey, this is more than
enough for now. We will deal with it if we need more than 8 in future.
This CL is split from Chris Forbes's CL on android gerrit.
Bug: b/223456677
Change-Id: I9cf442179af95e04a44796125e0c03dde702a8f3
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4929749
Reviewed-by: Chris Forbes <chrisforbes@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
493ca47c
|
2023-10-13T23:22:34
|
|
Vulkan: remove unused image view creation
remove unused image view creation.
Bug: b/303708135
Change-Id: I5e20788a6f3e042db04d739144236c065c407209
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4940252
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Hailin Zhang <hailinzhang@google.com>
|
|
dc8c053e
|
2023-10-12T00:00:00
|
|
Split row and depth pitch computation for compressed formats
Besides doing extra operations, computeCompressedImageSize
cannot be used for computing pitch values for formats that
have minimum block layout requirements, such as PVRTC1.
Fixed: angleproject:8375
Change-Id: Id276e8cf723f0bb99b6f4a9b20d6d84e4840f6d7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4935568
Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
c54c2f81
|
2023-10-12T00:00:00
|
|
Sync border color on format updates
When a texture is redefined, its border color should
be resynced because of format-specific adjustments.
Used memcmp for comparing ColorGeneric structs.
Bug: angleproject:7969
Change-Id: If0e3e0bc7761c26dab6d00ab24462c789f5b90bb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4935866
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
|
|
6154bd93
|
2023-10-12T15:27:44
|
|
Remove binding from DescriptorInfoDesc.
The issue with hitting the cache falsely is no longer reproduced
(tests added in https://crrev.com/c/4104121)
Charlie had changed the cache so mWriteDescriptors are no longer part of
this class, so some of those changes might have affected that.
Also mDescriptorInfos was previously a map and now is a vector, which
imposes a specific ordering - and that might be taking care of the
sampler swap hitting the cache falsely.
Charlie suggested that https://crrev.com/c/4581881 might have
taken care of this as textureUnit was used instead of bindingIndex:
https://chromium-review.googlesource.com/c/angle/angle/+/4936096/comment/ad2c0aa0_441bd33d/
Bug: angleproject:7974
Change-Id: I58391790a4362313c07c7bd28ed6f38f30720781
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4936096
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Roman Lavrov <romanl@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
76608554
|
2023-10-02T15:07:45
|
|
Vulkan: use cpu transcoding for small texture size.
Bug: b/250042517
Change-Id: I9a70fb7d4823d10b09f498bfc01b5384951e2ce4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4908660
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Hailin Zhang <hailinzhang@google.com>
|
|
b870956e
|
2023-10-05T00:00:00
|
|
GL: Limit depth/stencil texture mode updates
The DEPTH_STENCIL_TEXTURE_MODE state must affect only
DEPTH_STENCIL textures (OpenGL ES 3.2, Section 8.16).
Some drivers do not follow this rule and exhibit various
side effects when this mode is set to STENCIL_INDEX for
textures of other formats.
Bug: angleproject:2373
Change-Id: I20a8168d858cf070762ff0b3b7111cdf30e8166d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4936374
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
|
|
90dd58a2
|
2023-10-04T11:54:22
|
|
Vulkan: Reduce mGarbageMutex lock contention
Right now mGarbageMutex is used to control access to mSharedGarbage,
mPendingSubmissionGarbage, mSuballocationGarbage,
mPendingSubmissionSuballocationGarbage and mOrphanedBufferBlocks. Some
times garbage clean up does take a bit longer time, especially on some
VM platforms. This some times causes lock contention between main render
thread and background garbage clean up thread, which defeats the benefit
of having garbage clean up in the background thread. This CL utilizes
angle::FixedQueue for garbage list so that enqueue and dequeue can be
concurrent, which avoids this lock contention.
Bug: b/302739073
Change-Id: I44b2b0e7f9f5ef438266fa277b24a2cb1606e689
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4899299
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Hailin Zhang <hailinzhang@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
2608c622
|
2023-10-06T13:32:49
|
|
Vulkan: Refactor SharedGarbageList into templated class
This CL mostly involves non-functional changes to prepare for next CL.
No behavior change is expected.
This CL wraps the garbage list into its own templated class which
maintains std::queue and tracks number bytes in the queue etc.
This CL also renames SharedBufferSuballocationGarbageList to
BufferSuballocationGarbageList to reduce verbosity a bit.
This CL deleted GarbageAndQueueSerial and GarbageQueue since they are no
longer being used.
This renames vk::GarbageList to vk::GarbageObjects to reduce name
confusion with SharedGarbageList.
Bug: b/302739073
Change-Id: I7370c147847ffe69ad8aa3b48251d8b5762f97f9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4919816
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Hailin Zhang <hailinzhang@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
6f794eab
|
2023-10-05T11:23:30
|
|
Change angle::FixedQueue's storage from std::array to std::vector
Right now angle::FixedQueue uses std::array as the storage. In the case
when queue is full, the only choice is to wait for dequeue thread to run
until there is more room to enqueue. This CL try to add extra
flexibility. In this CL< it switches storage to std::vector so that we
could reallocate to double the storage when it is full. The trick is
that before doing that, you must ensure no one is accessing the queue
other than check the size. In a lot of usage cases that is easy to do by
just grabbing the necessary locks.
Bug: b/302739073
Change-Id: Ibefe0fd0e3e89c17dd6ee2cac6adc3368122adb9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4915811
Reviewed-by: Hailin Zhang <hailinzhang@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
53e37a3e
|
2023-09-29T14:15:37
|
|
Replace mActiveTextures.fill(nullptr) with memset
std::array::fill yields unoptimized, unrolled loop with 8 byte
increments.
Surprisingly high (>2%) effect on the instructions counter in my tests
(first frame of real_racing3 trace)
The number of samples hitting this spot in profiling is also
signficantly reduced.
Impact on power harder to judge due to noise but does seem to be a bit
better.
Added a FillWithNullptr utility to check that nullptr is 0 and used it
in other places where fill(nullptr) was used in ContextVk. It's not used
elsewhere in vulkan.
Bug: b/302708437
Change-Id: If7fab66d858bc10ca356418d2ab26232bb9a9ce7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4902288
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Roman Lavrov <romanl@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
|
|
0afc3ec9
|
2023-10-05T00:00:00
|
|
Metal: Fix robust initialization of PVRTC1 textures
Replace Region Validation: rowBytes must be 0 for:
* MTLPixelFormatPVRTC_RGB_2BPP
* MTLPixelFormatPVRTC_RGB_2BPP_sRGB
* MTLPixelFormatPVRTC_RGB_4BPP
* MTLPixelFormatPVRTC_RGB_4BPP_sRGB
* MTLPixelFormatPVRTC_RGBA_2BPP
* MTLPixelFormatPVRTC_RGBA_2BPP_sRGB
* MTLPixelFormatPVRTC_RGBA_4BPP
* MTLPixelFormatPVRTC_RGBA_4BPP_sRGB
Fixed: angleproject:8370
Change-Id: I153bea5bb487f79b0966be0b8670a2ee4e3aeb39
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4915704
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
|
|
5149d210
|
2023-10-02T22:27:11
|
|
Vulkan: Deduplicate sync's clientWait logic
As a side effect, both GL_NV_fence's client wait and external fence
client wait is also done in an unlocked tail call.
Bug: angleproject:8340
Change-Id: Ia0b882cc67ecf7ac5b2a8f9dc9e721060cca3c9e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4908351
Reviewed-by: mohan maiya <m.maiya@samsung.com>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
adb17c80
|
2023-10-06T10:39:17
|
|
Vulkan: Copy 3D<->2DArray images with vkCmdBlitImage anyway
Despite the validation error, do the copy with vkCmdBlitImage anyway.
Drivers seem to work correctly, and the validation restrictions seem
unintentional.
Bug: angleproject:7291
Change-Id: Ie7a0ecfe559be44738da3eada281ea97424b38ab
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4916359
Reviewed-by: Roman Lavrov <romanl@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
65e8ae30
|
2023-10-06T09:42:45
|
|
Vulkan: ANGLE_device_vulkan is incompatible w/ asyncCommandQueue
The application may use EGL_ANGLE_device_vulkan to retrieve ANGLE's
Vulkan queue for direct usage. There is no mechanism for the
application to synchronize with the internal thread that uses the same
queue when the asyncCommandQueue feature is enabled.
This was causing flakiness where VVL reported this error. This change
makes sure an ASSERT catches this incompatible usage.
Bug: angleproject:7204
Bug: b/299693666
Change-Id: Idf349f99d80b7bbddeb9a0b2d72e3dd7c707fa5c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4915594
Reviewed-by: Roman Lavrov <romanl@google.com>
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
8c341cfd
|
2023-10-04T12:49:59
|
|
Vulkan: Fix blits involving 3D images
The layer vs depth value involved with 3D images when calling
vkCmdBlitImage is fixed in this change.
However, that brought to light that the combination of
VUID-vkCmdBlitImage-srcImage-00240 and
VUID-vkCmdBlitImage-dstImage-00252 make it impossible to blit between 3D
and 2D array images, which is likely a spec oversight.
This change makes 3D<->2DArray blits fall back to draw-based blit. This
in turn exposed the fact that 3D images as src were not handled in
BlitResolve.frag. A new Blit3DSrc.frag shader is added which shares
code with BlitResolve.frag to implement this. This is a separate shader
to avoid creating unnecessary and invalid combinations of shaders.
VK_EXT_image_2d_view_of_3d could have been used to avoid this new
shader, but that is not ubiquitous.
Bug: angleproject:7291
Bug: dawn:1962
Change-Id: I6a96162f95829304b4731d43208d9d054f538105
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4911800
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
|
|
3d75b794
|
2023-10-04T11:10:34
|
|
Vulkan: enable preferSubmitAtFBOBoundary for Virtio-GPU Venus
Now we see perf gain for the concerning title Asphalt 9 with
ANGLE-on-Venus even for low end devices. So enable this by default for
Venus since it mitigates 3DMark Sling Shot Physics score regression.
Bug: b/302230555
Test: top app affected by the feature and 3DMark
Change-Id: I2e115e022eb085a3dc693378fe2f0a960890b7d5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4911958
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Auto-Submit: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
f8f98477
|
2023-10-04T12:54:06
|
|
Suppress VUID-VkRenderPassBeginInfo-renderPass-00904
Getting a lot of these, for example:
dEQP-GLES31.functional.blend_equation_advanced.basic.multiply
Bug: b/303441816
Change-Id: I78bf5c0e34bb65f349c71f324ea1c71ae8b416e3
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4911799
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Auto-Submit: Roman Lavrov <romanl@google.com>
|
|
276e0c78
|
2023-10-04T12:42:23
|
|
Also suppress VUID-VkGraphicsPipelineCreateInfo-pStages-00739
dEQP-GLES31.functional.primitive_bounding_box.points.*
are hitting this one
Bug: b/303219657
Change-Id: I26ae20ce6feeb84019488689667fa66fb7ca2925
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4911798
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Roman Lavrov <romanl@google.com>
Commit-Queue: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Auto-Submit: Roman Lavrov <romanl@google.com>
|
|
43abae13
|
2023-10-04T10:49:44
|
|
Suppress VUID-VkGraphicsPipelineCreateInfo-pStages-00738
Bug: b/303219657
Change-Id: Ibc23ccc700b15c351b2d7ab644bd8fc28bc07dcf
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4911795
Auto-Submit: Roman Lavrov <romanl@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Roman Lavrov <romanl@google.com>
|
|
ffb32380
|
2023-10-02T16:01:37
|
|
Vulkan: Fix device creation on multi-queue devices
When multiple eligible queue families are exposed by the device, ANGLE
defers devices creation until a surface is made current, at which point
it selects a queue family that supports presentation to that surface.
This path was largely untested and was broken:
- Some post-device-creation initialization was not deferred until the
device was actually created
- Some cap calculation depended on the chosen queue family index
- Query of device capabilities was done too late, such that ANGLE could
not correctly determine the level of support for ES versions.
Bug: angleproject:8300
Change-Id: I2a35396d1fd08ed26d217dff07d10e9a9c1ac55f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4907895
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Roman Lavrov <romanl@google.com>
|
|
75409184
|
2023-10-03T18:57:42
|
|
Revert "Add VMA version to logcat"
This reverts commit 92218933df79a4427b9bd29d0b7af892108e410e.
Reason for revert: VMA 3.0 usage is confirmed. Log can be removed.
Original change's description:
> 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>
Bug: b/295208838
Change-Id: If1b9883c02c78121ff72601b650ac04aef685527
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4909899
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
|
|
7f5143c2
|
2023-10-02T15:38:15
|
|
Vulkan: Notify VAO when VBO's mBufferWithUserSize changed.
When buffer robust access is enabled, and bufferData is called with
different size and we end up reusing the underline storage, we will have
to recreate VkBuffer with user's size, and driver is relying on
VkBuffer's size to implement robust access. The bug here is that we
notify VAO when storage changes. But when storage is reused and we have
dedicated VkBufer with user size and that VkBuffer changed, we were not
notifying the VAO. This CL adds that notification so that VAO gets
notified and dirty bits processed and its cache of VkBuffer gets updated
Bug: chromium:1488055
Bug: b/303138134
Change-Id: Ie693c92c2edde9a22a41a25f5bde493397550d95
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4906568
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
d919870f
|
2023-09-14T16:00:07
|
|
Vulkan: Do host image copy without holding the share group lock
When an application uploads texture data such as with `glTexSubImage2D`,
the share group lock is being hold while the data is being copied.
Without VK_EXT_host_image_copy, this is a copy to a staging buffer,
which may itself be expensive. With VK_EXT_host_image_copy, the cost of
the copy is higher and so the lock would be held for a longer duration.
This is particularly harmful to applications that spawn a separate
thread for texture uploads (as the main thread is unable to make GL
calls). This change moves the actual copy call to the tail of the call
after the share group lock has been released. As a result:
- The upload thread may be a bit slower, but
- The copy does not interfere with the main thread, and
- The copy does not interfere with the GPU's rendering work.
As a result, games that load content seamlessly during gameplay should
experience less stutter during texture uploads.
Bug: angleproject:8341
Change-Id: I818c4389d4bf828847578da89414623e4b5e844e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4864290
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
4ace4da1
|
2023-09-28T00:00:00
|
|
Metal: Add 2D array and 3D texture type mappings
Do not try to copy texture levels with mismatching
layer counts to avoid triggering Metal validation.
Fixed: angleproject:8364
Change-Id: I4bc72be753a62dd78dc131562c62e14eb540ab2a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4901993
Reviewed-by: Quyen Le <lehoangquyen@chromium.org>
Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
|
|
84c30b76
|
2022-07-12T20:42:00
|
|
Vulkan: Add single-level mutable texture flushing
So far, the feature to flush mutable textures after switching to a
new texture only applied to textures with at least two mip levels. In
that case, the whole mip chain would be allocated for those textures.
This change will add single-level texture flushing as well. However,
the it should be optimized to prevent allocating the whole mip chain
for only one defined level, and reduce memory usage.
* Updated the code for previous texture flushing to include one-mip
textures as well.
* Added the condition that the mutable texture not be bound as an
attachment for flushing.
* Changed ImageMipLevels::FullMipChain to ::EnabledLevels in order
to limit the number of allocated mips.
* Removed ::FullMipChain from ImageMipLevels.
Bug: b/285613719
Change-Id: Ibc76917345820c5a0991f700e9fb93e4cda6efae
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3763841
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
5ab344be
|
2023-09-28T17:26:29
|
|
Remove old VUIDs after renaming
Some of the VUIDs were renamed in a recent VVL roll. The new VUIDs
for those that were skipped were also added to the list in a prior
fix CL.
After the related VVL change and the fix also rolled into Chromium,
the old VUIDs can be safely removed from the skip list.
* Removed the following VUIDs from the skip list
* VUID-VkBufferViewCreateInfo-buffer-00934
* VUID-VkPipelineInputAssemblyStateCreateInfo-topology-00428
Bug: angleproject:8358
Change-Id: I63474cb36408637be8a60def9add1f77c48e9c93
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4903984
Reviewed-by: Roman Lavrov <romanl@google.com>
Auto-Submit: Amirali Abdolrashidi <abdolrashidi@google.com>
Commit-Queue: Roman Lavrov <romanl@google.com>
|
|
34c8778b
|
2023-09-26T13:45:06
|
|
Use atomic counters early in perf warning macros
Before this CL, snprintf was called repeatedly to format the warning
message which was then discarded after 4 logs. snprintf showed up in
profiling at ~2% and this CL appears to yield an ~8% power
improvement in one of the traces (egypt_1500).
A mutex was previously used to avoid the race condition on the static
sRepeatCount variable. This CL avoids the need for that by using static
atomics instead.
Also updated the Debug macro to use the VK macro vararg approach so that
formatting only happens when the message is actually logged.
Bug: b/302112423
Change-Id: Ia8a18361cfb5a9f2aa19ff939499754ba861efb7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4886388
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Roman Lavrov <romanl@google.com>
|
|
6717a65b
|
2023-09-28T00:00:00
|
|
Metal: Skip maximum render target size validation for Mac GPUs
Only GPUs that do not support Mac families have this limitation.
Bug: angleproject:8268
Change-Id: I3f9174dd104c2ba4e9781272fbc7062fe14d78a9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4903722
Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Kyle Piddington <kpiddington@apple.com>
|
|
d55893cd
|
2023-09-27T16:40:58
|
|
Issue 1484512: Out of bounds access to Metal uniform blocks
Fixed conversion offset for Uniform buffers: Dynamic buffers
were being allocated and copied from the 'updateBufferSubData'
offset, than from the previously allocated offset. This meant that when
creating a new dynamic buffer to hold the metal uniforms,
ANGLE didn't re-convert blocks from the initial source offset,
nor did we allocate enough space to read those blocks.
Important use cases to test include any UBO-heavy sites.
Bug: chromium:1484512
Change-Id: Ia9f505e3df871a401d40682d737019bd5d3f443f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4899369
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Kyle Piddington <kpiddington@apple.com>
|
|
621bee25
|
2023-09-27T22:07:24
|
|
Manual roll vulkan-deps from b8fa58ef74a9 to 89aea904c65f (61 revisions)
Manual roll requested by abdolrashidi@google.com
* Updated the skipped VVL messages in accordance with the following
vulkan-deps roll: Vulkan-ValidationLayers to 9fe2f727
https://chromium.googlesource.com/vulkan-deps.git/+log/b8fa58ef74a9..89aea904c65f
Changed dependencies:
* glslang: https://chromium.googlesource.com/external/github.com/KhronosGroup/glslang.git/+log/4c57db1595..2bfacdac91
* spirv-cross: https://chromium.googlesource.com/external/github.com/KhronosGroup/SPIRV-Cross.git/+log/5e963d62fa..6e1fb9b09e
* spirv-headers: https://chromium.googlesource.com/external/github.com/KhronosGroup/SPIRV-Headers.git/+log/fc7d246276..79743b899f
* spirv-tools: https://chromium.googlesource.com/external/github.com/KhronosGroup/SPIRV-Tools.git/+log/a40483d313..48c97c1311
* vulkan-headers: https://chromium.googlesource.com/external/github.com/KhronosGroup/Vulkan-Headers.git/+log/4f51aac14f..df60f03168
* vulkan-loader: https://chromium.googlesource.com/external/github.com/KhronosGroup/Vulkan-Loader.git/+log/9dc0e31574..f352069ad3
* vulkan-tools: https://chromium.googlesource.com/external/github.com/KhronosGroup/Vulkan-Tools.git/+log/1ecbed6db3..576f3286e1
* vulkan-utility-libraries: https://chromium.googlesource.com/external/github.com/KhronosGroup/Vulkan-Utility-Libraries.git/+log/6774c9b24b..8486ee700e
* vulkan-validation-layers: https://chromium.googlesource.com/external/github.com/KhronosGroup/Vulkan-ValidationLayers.git/+log/c26ff51102..1b8b09b3ab
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 abdolrashidi@google.com,angle-team@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:8358
Tbr: abdolrashidi@google.com
Change-Id: I7927abe872fbb1d25523b06cc205b13ef2a887f3
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4898000
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
|
|
25bfe035
|
2023-09-07T00:00:00
|
|
GL: Adjust disableTextureMirrorClampToEdge condition
The extension support has
been fixed in Mesa 23.1.7.
Fixed: angleproject:8319
Change-Id: Ie83dee83773823dad90826267040e40b6f296c53
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4901182
Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
66d3db3b
|
2023-09-27T09:15:19
|
|
d3d: Shorten warning about complex uniform blocks
The warning was excessively large, while ANGLE_PERF_WARNING might use a
smaller buffer to format the message.
Bug: b/302112423
Change-Id: Ie8c2fe472c90a39f678fa685e852bbd49b5c8442
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4894632
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Roman Lavrov <romanl@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
929ace8d
|
2023-09-22T09:59:43
|
|
Vulkan: Get queueFamilyIndex from renderer
In WindowSurfaceVkWayland::createSurfaceVk, use
context->getRenderer()->getQueueFamilyIndex() to get index
Bug: angleproject:8353
Change-Id: Ia209c1c8a16ef12e260b0a9d584b50b1a4c95181
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4885341
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jeff Vigil <j.vigil@samsung.com>
Reviewed-by: mohan maiya <m.maiya@samsung.com>
Commit-Queue: mohan maiya <m.maiya@samsung.com>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|