|
7fb1ac40
|
2025-03-10T20:28:56
|
|
Support EGLImageTargetTexture2DOES + GenerateMipmap
According to the spec, If an application adds mipmap levels
to a texture originally created with EGLImageTargetTexture2D,
OpenGL will allocate new memory for the updated texture,
copying existing data, including from the EGLImage source.
So, relevant support is added.
Bug: angleproject:405840226
Change-Id: I4495df2d8ee1e18b4482808a290dcd861ef85b77
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6335305
Auto-Submit: Robic Sun <Robic.Sun@arm.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
65343c4c
|
2025-02-27T11:23:04
|
|
Vulkan: Improve ConvertImageLayoutToVkImageLayout()
This CL removes supportsMixedReadWriteDepthStencilLayouts feature flag.
This feature flag was introduced when ANGLE only requires vulkan 1.0.
But now we require vulkan 1.1 and this is part of vulkan 1.1 core spec.
So it is no longer needed and wasting CPU cycles to check this every
time ConvertImageLayoutToVkImageLayout() is called.
With supportsMixedReadWriteDepthStencilLayouts removed, convert from
ImageLayout to VkImageLayout no longer needs renderer parameter. The
layout information in kImageMemoryBarrierData is never modified by
renderer at run time. So the renerer arguments has been removed in a lot
of places, avoids another pointer de-reference.
Bug: b/384839847
Change-Id: I5a89a890c0c0a1f99d2fdc1b2a85baf7de5c28bf
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6310839
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
9202e05a
|
2025-02-21T18:42:42
|
|
Vulkan: Invalidate the SharedCacheKey when cache gets evicted
When descriptorSet cache gets evicted, right now we have a bug that the
sharedCacheKey does not gets invalidated. This caused
SharedCacheKeyManager always think the sharedCacheKey is valid and the
mEmptySlotBits never gets cleared, which leads to mEmptySlotBits growth
over time, and increases CPU overhead when walking mEmptySlotBits
vector. This CL adds an assertion to ensure that all valid
sharedCacheKeys has a corresponding entry in the cache, which means
without this CL, some traces and dEQP tests are hitting the assertion.
This CL also fixes the bug.
Bug: b/384839847
Change-Id: If013443144aceb5d62f67f619074ef831e73653b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6292988
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
d252425d
|
2025-02-06T14:51:36
|
|
Vulkan: Check source image usage flags in copy paths
... instead of the format feature flags. If the source of the copy is
has external format (allowed with glCopy[Sub]TextureCHROMIUM), the
format feature checks are unable to query the format features. However,
the image usage flags already have the required information (whether the
image can be copied from, sampled from, etc).
Bug: chromium:383056998
Change-Id: I2ba8820751eb526ef497a8be724193276fd46160
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6238265
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
|
|
3dcd143c
|
2025-02-06T15:06:02
|
|
Vulkan: Reduce GL_EXT_texture_storage_compression related overhead
Most of apps not using fixed rate compression extension, but we are
getting into all these logic that checking for vulkan driver's support
of compression rate. This CL adds a check in TextureVk::initImage(), so
that it only goes down that logic if
mState.getSurfaceCompressionFixedRate() is not
GL_SURFACE_COMPRESSION_FIXED_RATE_NONE_EXT. This means for all existing
app traces we have, we should not go down these logic any more.
This CL also made TextureVk::getFormatSupportedCompressionRatesImpl()
and ImageHelper::getCompressionFixedRate() out of TextureVk and
ImageHelper class given they are not accessing the data member at all.
Bug: b/293297177
Bug: angleproject:352364583
Change-Id: Ib5eebf54172f194d7c65c2d2d751326b7923403f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6239523
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
0f75fc3d
|
2025-01-20T14:10:41
|
|
Vulkan: Transition foreign images to the FOREIGN queue on submit
Vulkan's interaction with AHB and dmabuf images is through the FOREIGN
queue family. When ANGLE uses these images, it must take ownership of
the images by doing a queue family ownership transfer (QFOT) away from
the FOREIGN queue family and into the graphics queue family used by the
Vulkan backend.
Prior to this change, ANGLE would do the QFOT away from FOREIGN once
such a foreign image is imported into an EGL image. Afterwards, usage
in ANGLE works correctly. What ANGLE did not handle is when a foreign
entity wants to use these images _after_ ANGLE has used them.
For the above to work correctly, ANGLE must do a QFOT back into FOREIGN
before the image can be used by the foreign entity. Unfortunately,
EGL does not provide a clear point for this hand-off to happen. ANGLE
has no choice then to proactively transition the images back into
FOREIGN at some point "just in case".
For some native drivers, this hand-off to FOREIGN can be quite frequent.
For example, on Android for most vendors there is no actual layout
transition between graphics and FOREIGN queue families (the actual data
layout is the same), so a cache flush/invalidate at strategic points
(such as the end of the command buffer) is sufficient as equivalent to
transition to FOREIGN (and another at the beginning of the command
buffer as equivalent to transition from FOREIGN).
As a layer over Vulkan's formalism, ANGLE is less lucky; it has to
enumerate exactly which image is being transitioned to and away from
FOREIGN. Transitions away from FOREIGN are in principle easy. As long
as the image is marked as being in the FOREIGN queue family, it will
automatically transition to the graphics queue family on first use.
In this change, when a foreign image is transitioned out of the FOREIGN
queue, it's added to a list of images to be transitioned back to FOREIGN
at submit time. Once submission is done, the image may or may not
actually be used by a foreign entity, but ANGLE cannot know that. The
next time the image is used in ANGLE, it is transitioned out of FOREIGN.
Verifying correctness with multi-threading is tricky, and relies on GL's
requirement that access in one context is followed by a synchronization
and rebind in another context before it can be used there. This means
that the image's transition to FOREIGN (at the end of one submission)
naturally happens before the transition back from FOREIGN (at the
beginning of the next submission). Because the set of images to
transition is tracked in the context, submissions in other contexts
don't interfere with the above logic.
The situation can be more complicated with one-off submissions, but
fortunately, no such usage of foreign images is present.
Another wrinkle is simultaneous usage of the image as read-only in two
contexts. According to GL, this is not a hazard and requires no
synchronization. However this is broken in ANGLE even for non-foreign
images (see http://anglebug.com/42266349), because as what _seems_ like
read-only usage of the image from GL's point of view (like sampling from
the image), there are associated write operations from Vulkan's point of
view (image layout transitions and QFOT). This change does not attempt
to address this corner case.
Bug: angleproject:42263241
Bug: angleproject:42262454
Bug: angleproject:390443243
Bug: chromium:382527242
Change-Id: Idd4ef1fecfa3fccf1a4063f1bddb08d28b85386b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6184604
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
c1214ec2
|
2025-01-22T14:22:56
|
|
Vulkan: Rename Context to ErrorContext
In preparation for adding another Context (derived by GL and CL
contexts), which includes logic that pertains to command recording (such
as barrier tracking).
Bug: angleproject:390443243
Change-Id: Idf495b62e63fb9aa901a2f16447fdaf3c2acd90b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6191248
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
a0e36ad5
|
2025-01-20T00:00:00
|
|
Vulkan: Fix image bindings for non-layered textures
Layer index must be ignored if the texture
does not have multiple layers or faces.
Fixed: angleproject:344950165
Change-Id: I4b402ee28d365f0459f980e01488828c80c93527
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6185849
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
|
|
fe76d70b
|
2025-01-10T14:41:06
|
|
Vulkan: Enable 16-bit norm support for tex buffers
According to the spec for EXT_texture_norm16, it enables texture
buffers to support the following additional formats:
* GL_R16_EXT
* GL_RG16_EXT
* GL_RGBA16_EXT
All of the above are unsigned short normalized values.
* Updated validation to support the aforementioned formats in texture
buffers in case of support for the norm16 extension.
* Updated AdjustViewFormatForSampler() to also support norm16 values.
* Added the condition for advertising textureNorm16EXT that the 16-bit
UNORM formats above should have the buffer feature bit for texture
buffer support: VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT
* Added support check for renderSnormEXT after textureNorm16EXT,
since the check for former currently uses the support for latter
as a parameter.
* Added unit tests to draw using a texture buffer with norm16 formats.
* Added TextureBufferTestBase in order to test the API calls in the
extensions and the core ES 3.2 version, which the following suites
are derived from:
* TextureBufferTestES31 (existing)
* TextureBufferTestES32 (new)
* Extended the tests to similar 8-bit formats.
Bug: angleproject:381313704
Change-Id: I49157e8c2c9b5438eaf8d56c1932d12e56489318
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6169006
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
|
|
28270609
|
2025-01-09T18:08:40
|
|
Vulkan: Fix clear texture for unrenderable internalformat
Checking whether the texture is renderable or not depends on the output
texture's format. If the output format is unrenderable, while format and
type indicate the input format as renderable, the clear texture should
still go into the unrenderable path.
Bug: angleproject:385190304
Change-Id: I2963caad4996547a0aa27fcc37033ca95e2fa21e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6134267
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
|
|
bb640019
|
2024-12-18T12:36:13
|
|
Vulkan: Fix partial clear texture for RGB8 snorm
When clearing an RGB8 snorm texture, due to this format not being
renderable, a temporary buffer is filled with the clear value and
applied to the image as a buffer update. However, this buffer's unpack
state has nothing to do with the context's unpacking state. This should
be reflected on the pixel unpack state that is used to calculate the
required buffer size for the update. Otherwise, it can result in wrong
colors for parts of the image.
* Updated the pixel unpack state in the unrenderable part of the clear
function for textures (TextureVk::clearSubImageImpl()).
* It will now use "1" as the alignment since it is tightly packed.
* Added unit test to clear one corner of an RGB8 snorm texture and
use it for drawing.
* Clear2DRGB8SnormCorner
Bug: angleproject:384765600
Change-Id: Id302a9f4049626aae1a68798e86d7183d5c264e0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6108140
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
|
|
a1be7e61
|
2024-11-26T14:39:18
|
|
Implement EGL_EXT_surface_compression
This patch adds implementation of EGL_EXT_surface_compression to
ANGLE, including new API eglQuerySupportedCompressionRatesEXT and
adding EGL_SURFACE_COMPRESSION_EXT in EGLQuerySurface and
EGLCreateWindowSurface/EGLCreatePlatformWindowSurface.
Angle end2end test is added to verify the extension.
Bug: angleproject:375496226
Change-Id: I06926930d94485a378fc831d552cf55fe7938a57
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6073355
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
f51170b3
|
2024-11-21T16:30:40
|
|
Enable GL_KHR_texture_compression_astc_hdr
Vulkan supports GL_KHR_texture_compression_astc_hdr,
so this extension can be enabled in Angle.
Bug: angleproject:379186304
Change-Id: I438a120c3f884a7eefcd883ad71abf68f81cb473
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6038457
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
01dee1cb
|
2024-10-14T15:04:28
|
|
Add implementation for GL_EXT_texture_storage_compression
Bug: angleproject:352364583
Change-Id: I3dab4c68d5d0206d681e165e991217bd3de8eeb6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6011055
Auto-Submit: Neil Zhang <Neil.Zhang@arm.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
8e0178fb
|
2024-11-19T13:31:45
|
|
Vulkan: Switch SamplerBinding to Use SharedPtr
Another step to remove vk::BindingPointer. SharedPtr is used and
SamplerBinding is renamed to SharedSamplerPtr. This also removed
RefCountedSampler to avoid direct expose of RefCounted<SamplerHelper>
which is risky due to ability of change reference count directly.
Bug: angleproject:372268711
Change-Id: Ia6f352186a4f75ab9ce3396f298e33f70cd61a1b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6036294
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
17a01469
|
2024-10-26T06:07:31
|
|
Vulkan: Bugfix TextureVk::generateMipmap
Add support for generating mipmaps of textures that are EGLImage
texture targets with colorspace overrides
Bug: angleproject:40644776
Tests: ImageTestES3.SourceAHBTarget2DGenerateMipmap*
Change-Id: I9b4ff802f4118a42d54dc8d80ab30e2f9958bfee
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5966623
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: mohan maiya <m.maiya@samsung.com>
|
|
fbe34df7
|
2024-10-29T16:19:29
|
|
Vulkan: More texture descriptorSet code cleanup
Removed unused argument `pipelineType` from
updateActiveTexturesForCacheMiss().
Removed unused argument `context` from getReadImageView()
Rename getBufferViewAndRecordUse() to getBufferView() since there is no
"record use" happening.
Moved UpdateFullActiveTexturesDescriptorSet() function from
vk_cache_utils.cpp to ProgramExecutableVk.cpp anonymous name space,
since it is only used in this file.
Bug: angleproject:372268711
Change-Id: Ib7240c1063f727fb52588234e79fba349f9aff9e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5977481
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
6b9d3762
|
2024-08-22T15:29:00
|
|
Vulkan: Optimize full texture clears
Currently, a full texture clear (glClearTexImageEXT()) is treated as
a special case of a partial clear (glClearTexSubImageEXT() with image
dims as the input). However, it can be further optimized by treating
it as a clear update.
* For full clears from EXT_clear_texture, the clear update path is
taken.
* It leads to a more optimized path, including the usage of the
following APIs:
* vkCmdClearColorImage()
* vkCmdClearDepthStencilImage()
* It uses the following enum: ClearTextureMode
* If a partial clear uses the extents for the entire image, it is
treated as a full clear.
* Updated the method to determine if a texture is renderable in
clearSubImageImpl().
* Added perf counter: fullImageClears
* Added new unit tests
* Single 3D texture full clear (Clear3DSingleFull)
* 2D RGB SNORM clear (Clear2DRGB8Snorm)
* Added Vulkan perf counter test for 2D and 3D color image clear.
* Updated the related skipped tests on Pineapple.
Bug: angleproject:42266869
Bug: angleproject:375425839
Change-Id: I12ef3002dee190d7f8f43204f7d3f76e05d0b54f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5806207
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
08c1724f
|
2024-10-11T14:29:00
|
|
Vulkan: Support GL_ARM_shader_framebuffer_fetch_depth_stencil
Bug: angleproject:352364582
Change-Id: I63fd78314fa7ebccbf366c252e309a9c0f09c8c1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5938150
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
68de0042
|
2024-10-08T05:41:37
|
|
Vulkan: Support glCopyTexImage2D from MSAA default framebuffer
Add support for glCopyTexImage2D when the source is an MSAA
default framebuffer by enhancing UtilsVk::copyImage(...) to
support multisampled source images.
Bug: angleproject:372059358
Tests: MultisampleTestES3.CopyTexImage2DFromMsaaDefaultFbo*
Change-Id: I9b5d39f6f75ca8056f8be18b1e68eb0161c99903
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5914629
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: mohan maiya <m.maiya@samsung.com>
|
|
b3d85cce
|
2024-09-30T14:28:35
|
|
Vulkan: Consolidate write colorspace override states
ColorspaceState struct is now used to cache write colorspace related
states to determine the colorspace of Vulkan draw image views.
ImageViewHelper methods are called during initialization and when
colorspace related states are toggled dynamically which in turn process
these states and determine the final write colorspace.
We can now fully support rendering to EGLImages, with colorspace
overrides, via texture or renderbuffer EGLImage targets
Bug: angleproject:40644776
Tests: ImageTest*Colorspace*Vulkan
MultithreadingTestES3.SharedSrgbTextureMultipleContexts*Vulkan
ReadPixelsPBOTest.SrgbUnorm*Vulkan
Change-Id: I2be2cd3b5b2b4ac8ecb803c34cde2b846cbd1cbe
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5901256
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: mohan maiya <m.maiya@samsung.com>
|
|
b38cc7fa
|
2024-09-30T12:43:09
|
|
Vulkan: Consolidate read colorspace override states
ColorspaceState struct is now used to cache read colorspace related
states to determine the colorspace of Vulkan read image views.
ImageViewHelper methods are called during initialization and when
colorspace related states are toggled dynamically which in turn process
these states and determine the final read colorspace.
Bug: angleproject:40644776
Tests: ImageTest*Colorspace*Vulkan
SRGBTextureTest.SRGB*TextureParameter*Vulkan
SRGBTextureTestES3.SRGBDecodeTexelFetch*Vulkan
Change-Id: I16b3666cd80865936b826dc0738fc9210dabeda9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5901255
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: mohan maiya <m.maiya@samsung.com>
|
|
d147a2ca
|
2024-10-04T10:45:55
|
|
Vulkan: release descriptorSets from TextureVk::refreshImageViews
When texture has to refresh its imageViews, the existing descriptorSet
cache will become obsolete (because the cache key contains view's
uniqueSerial). This CL proactively releases all cache so that we don't
keep these invalid cache any more.
Bug: b/368566032
Change-Id: I82a221b8b8fd072ee3a52b11264addba385526d5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5908772
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
eaffa034
|
2024-09-24T20:56:04
|
|
Revert "Vulkan: Consolidate colorspace override states"
This reverts commit bffcd235ba6c031603d798daaa98f1cf9a3f3e46.
Reason for revert: Breaks Android test `org.skia.skqp.SkQPRunner#UnitTest_DMSAA_dst_read`. Details:
https://b.corp.google.com/issues/369388539.
Original change's description:
> Vulkan: Consolidate colorspace override states
>
> ColorspaceState struct is now used to cache colorspace related states
> and used to determine the colorspace of Vulkan image views.
> ImageViewHelper methods are called during initialization and when
> colorspace related states are toggled dynamically which in turn process
> these states and determine the final read and write colorspaces.
>
> We can now fully support rendering to EGLImages, with colorspace
> overrides, via texture or renderbuffer EGLImage targets
>
> Bug: angleproject:40644776
> Tests: ImageTest*Colorspace*Vulkan
> MultithreadingTestES3.SharedSrgbTextureMultipleContexts*Vulkan
> SRGBTextureTest.SRGB*TextureParameter*Vulkan
> SRGBTextureTestES3.SRGBDecodeTexelFetch*Vulkan
> ReadPixelsPBOTest.SrgbUnorm*Vulkan
> Change-Id: I1cc2b5bd834b519b83deab4d80a2fcaabeb271d6
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5841290
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> Reviewed-by: Charlie Lao <cclao@google.com>
> Commit-Queue: mohan maiya <m.maiya@samsung.com>
Bug: angleproject:40644776
Change-Id: I5bf6cf2ed0c8ec22fc02d8c3da92673ee85fe002
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5888506
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Yuxin Hu <yuxinhu@google.com>
|
|
bffcd235
|
2024-09-13T14:58:00
|
|
Vulkan: Consolidate colorspace override states
ColorspaceState struct is now used to cache colorspace related states
and used to determine the colorspace of Vulkan image views.
ImageViewHelper methods are called during initialization and when
colorspace related states are toggled dynamically which in turn process
these states and determine the final read and write colorspaces.
We can now fully support rendering to EGLImages, with colorspace
overrides, via texture or renderbuffer EGLImage targets
Bug: angleproject:40644776
Tests: ImageTest*Colorspace*Vulkan
MultithreadingTestES3.SharedSrgbTextureMultipleContexts*Vulkan
SRGBTextureTest.SRGB*TextureParameter*Vulkan
SRGBTextureTestES3.SRGBDecodeTexelFetch*Vulkan
ReadPixelsPBOTest.SrgbUnorm*Vulkan
Change-Id: I1cc2b5bd834b519b83deab4d80a2fcaabeb271d6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5841290
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: mohan maiya <m.maiya@samsung.com>
|
|
e38d25b1
|
2024-06-21T18:22:32
|
|
Vulkan: Implement EXT_clear_texture
* Added new functions to TextureVk to clear the image.
* clearImage()
* clearSubImage()
* Both implemented via clearSubImageImpl(), with the former a
special case of the latter.
* For multisample or renderable images, stagePartialClear() from
ImageHelper is called to add the update.
* For single-sampled non-renderable images, a buffer is filled with
the pixel data and applied to the image as a buffer update.
* Added new update type: ClearPartial
* Used for renderable textures. This includes multisample textures.
* LOAD_OP_CLEAR is used in a render pass to perform the clear.
* UtilsVk::clearTexture()
* (Uses ClearTextureParameters)
* Uses the following functions to get the VkClearValue from the
input data and format:
* GetVkClearColorValueFromBytes()
* GetVkClearDepthStencilValueFromBytes()
* ClearPartial updates can also be superseded and removed similar to
Buffer updates.
* Updated UtilsVk::startRenderPass() to accept a VkClearValue* as an
input arg. If used, the render pass will use LOAD_OP_CLEAR.
* Enabled the feature "clearTextureEXT" on Vulkan.
* Added new unit tests in ClearTextureEXTTest for various formats and
pixel sizes.
* Added related multisample tests in FramebufferTest.cpp.
* FramebufferTest_ES31.ClearTextureEXT*
* Disabled some of the new tests failing using OpenGL.
* Disabled stencil-only-related tests on Pineapple.
Bug: angleproject:42266869
Change-Id: I89c631d68a4ed63d9991abe1783333255ade20dd
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5778348
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
|
|
1b4d6185
|
2024-09-12T09:18:46
|
|
Vulkan: Cleanup sRGB related code
Image and image view code is littered with sRGB related enums, even
in places that don't deal with sRGB. Remove sRGB related parameters
from initLayerImageView and getLevelLayerDrawImageView methods, which
now assume default values. Add dedicated methods that allow overriding
sRGB state values.
Also introduce ColorspaceState struct that consolidates all sRGB
related states, this will be used in follow up changes to track
and infer colorspace of image views
Bug: angleproject:40644776
Change-Id: Ifb366db48043e376f9ff6c30c852c44dd96562a1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5860808
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: mohan maiya <m.maiya@samsung.com>
|
|
74816e9e
|
2024-08-29T15:58:22
|
|
Vulkan: Cleanup RenderTargetVk release/destroy methods
Current implementation of `release()` and `destroy()` methods does not
actually invalidate state of the object. All they do is manage the
Framebuffer cache.
The `release()` method renamed to `releaseFramebuffers()` to match its
behavior.
Added new `releaseImageAndViews()` method that calls
`releaseFramebuffers()` and also null the pointers in order to catch
invalid usage in ASSSERTs (for example: usage of
`SurfaceVk::mColorRenderTarget` after swapchain recreation but before
ANI processing).
`destroy()` is updated to also call `reset()`.
`releaseFramebuffers()` is only used in `TextureVk` class. In case of
`releaseImageViews()`, arrays are cleared, so there is no point calling
`releaseImageAndViews()`. In case of `refreshImageViews()`, render
targets may be reused, since all pointers remain valid.
`RenderbufferVk` and `WindowSurfaceVk` are using new
`releaseImageAndViews()` and updated `destroy()` methods.
Other changes:
- Replace clearing of RT arrays in `TextureVk::setImageHelper()` with
ASSERTs.
- Fix ASSERT in `TextureVk::releaseImageViews()`, but it seems that this
code path is impossible.
Bug: b/234769934
Change-Id: I431d25b81dd4dd343149c12e680e5c997aa18436
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5822575
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Igor Nazarov <i.nazarov@samsung.com>
|
|
e4aab5cc
|
2024-08-13T14:54:19
|
|
Vulkan: Reuse the same conversion buffer by adjusting offset
In some usage case where app calls bufferSubData and then calls
glVertexAttribPointer to source vertex from different offset, we could
still just reuse the existing VertexConversionBuffer instead of create a
new one. The benefit with this is that all previous converted data are
still valid, thus reduce the overall conversion, and reduce the number
of conversion buffers and saves memory.
Bug: b/357622380
Change-Id: Ifcf626427e2ed500d6ab617541b78a60839d9acd
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5785670
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
|
|
86508e20
|
2024-08-16T14:56:37
|
|
Vulkan: Make VertexConversionBuffer a class
And wrap the cache key (i.e, formatID/stride/offset) into a CacheKey
struct so that we can easily add more data members. This CL also changes
ConversionBuffer from struct to class to have better encapsulation. No
functional changes is expected here.
Bug: b/357622380
Change-Id: Ieecf5c922b95a940137c8e54657ef3f458c55fc9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5793921
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
|
|
087afc91
|
2024-08-10T20:40:53
|
|
Vulkan: Prefer fallback to renderable texture than CPU copy
When a texture copy is done, the transfer path is preferred. If
transfer is not possible, ANGLE falls back to a draw-based copy.
However, if the format is not renderable, ANGLE falls back to CPU copy.
Instead, this change makes ANGLE try to fall back to a renderable format
before giving up on the draw-based copy.
Bug: b/351872449
Change-Id: I3d09dd88cc0b7feb5e92e58c4f19380973eb5e94
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5775592
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
1bfe5c57
|
2024-07-30T15:58:47
|
|
Metal: partially implement EXT_multisampled_render_to_texture.
Implement by implicitly attaching a multisampled texture to the render
pass. The content will be preserved across render passes by
loading/storing to the implicit multisampled texture.
However this won't work if the single sampled texture is used in
multiple render passes with different
glFramebufferTexture2DMultisampleEXT's sample counts. For that to work
we need to implement unresolve step to load the resolve texture's texels
into the implicit multisampled texture. That will be implemented in a
separate CL.
Bug: angleproject:42261786
Change-Id: I12be75af17ce5b98266946846417d0a43fcba455
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5746180
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Quyen Le <lehoangquyen@chromium.org>
|
|
7691cea7
|
2024-07-22T13:46:14
|
|
Vulkan: Remove seamful cubemap emulation
Practically, the Vulkan backend is never expected to run on ES2
hardware. It _may_ for WebGL, but seamful cubemap emulation was
disabled for webgl anyway.
Bug: angleproject:354729454
Change-Id: Iafa20fbdbe232c4df4c777b12e7698ef7a87cf24
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5730143
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
|
|
8c546d35
|
2024-06-25T12:49:40
|
|
Vulkan: Limit VkEvent for usage matters for Manhattan31 only
If we use VkEvent to track all image operations causes performance
regression on some app traces, including manhattan10 trace. This mainly
because of CPU overhead comes with VkCmdSetEvent, mostly inside vulkan
driver. These app traces likely not benefit from VkEvent because the
specific bubble (false dependency) does not manifest on these app
traces, but the CPU overhead takes a performance toll on it. In order to
strike a balance between benefit and overhead, this CL removes most of
VkEvent usage and only leaves the ones that matters for manhattan31. The
only we still keeps are generateMipmap, dispatchCompute, texture
sampling. We can always add more if more beneficial usage cases comes up
and no regression in other traces.
Bug: b/336844257
Change-Id: I346fe70bc33e57edf04e933a2db0f79738c4481d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5654737
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
8b1daa18
|
2024-06-24T14:22:22
|
|
Vulkan: Fix MSRTT failure from undef addnl format
In TextureVk::initImage(), for formats that do not have an SRGB
equivalent, such as some D/S formats, additionalViewFormat becomes
VK_FORMAT_UNDEFINED. For those textures, FormatSupportsUsage()
returns false for MSRTSS, which leads to an error in some test cases.
* Added the condition that, to determine MSRTSS support, additional
format is ignored if it is undefined.
* Unsuppressed affected tests that should now be fixed.
Bug: angleproject:348181798
Change-Id: I739b630ac7d0230e2506f6f13b8cb9b3b50d175f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5651860
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
|
|
3c472b45
|
2024-06-20T13:17:32
|
|
Vulkan: Fail if texture bound to MSRTT w/o support
* If a texture is already bound to an MSRTT framebuffer, but MSRTSS
is not supported by the driver for that format, it leads to failure.
Bug: angleproject:348181798
Change-Id: I685ca552b9c53b06f33065ba594d81cfa7b25b4d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5644215
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
|
|
d193d51b
|
2024-06-17T22:46:08
|
|
Replace issue ids post migration to new issue tracker
This change replaces anglebug.com/NNNN links.
Bug: None
Change-Id: I8ac3aec8d2a8a844b3d7b99fc0a6b2be8da31761
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5637912
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
06f1b72f
|
2024-06-03T08:59:46
|
|
Vulkan: Bugfix in MSRTT emulation
Transient multisampled images should have no mips. Enforce this
requirement when MSRTT is being emulated
Bug: angleproject:4836
Tests: MultisampledRenderToTexture*MultipleLevelsMultisample*
Change-Id: I6df21bbb49a4c45aa3ee321f7d49b81f55352562
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5601347
Commit-Queue: mohan maiya <m.maiya@samsung.com>
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
65f8dc8e
|
2024-06-12T17:01:54
|
|
Vulkan: Remove traces of VK_MSRTSS_GOOGLEX
Devices that shipped this unreleased extension should have long been
updated to VK_MSRTSS_EXT
Bug: angleproject:4836
Change-Id: I23736ebf28afd4a6f3b5b0d5a6417b3e7564c293
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5627575
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
|
|
b4f3824e
|
2024-05-31T11:36:32
|
|
Reland "Vulkan: Defer texture data flush until data provided for all levels"
This is a reland of commit 490c056a88a33870cb4ba2a7906b0a9688d96262
Original change's description:
> Vulkan: Defer texture data flush until data provided for all levels
>
> One of the major overhead with VkEvent is seeing with first frame where
> all textures are being specified. The immutable textures, we always
> immediately flush out the update as data provided for each level. This
> means one VkEvent is created and SetEvent is called per level. This CL
> delays the flush until data for all levels are provided, thus there is
> only one flush per texture instead of per level. With this CL asphalt_9
> is no longer timeout on bots when VkEvent is enabled.
>
> There is also another benefit comes with this CL. On all desktop GPUs,
> ASTC format texture are falling back to RGBA8. We always stage a clear
> for the emulated format. That staged clear are able to be removed if
> data is provided later. Because of we flush out staged update when first
> level data is provided, all staged clear for the subsequent levels are
> also gets flushed out, losing the chance to be removed. This CL will
> allow all staged clears being removed.
>
> Bug: b/343976993
> Bug: b/336844257
> Change-Id: Ica731ea57db771b16966f4da92ccdc551ae93d81
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5588816
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
> Commit-Queue: Charlie Lao <cclao@google.com>
Bug: b/343976993
Bug: b/336844257
Change-Id: Iabcc1b4ebca7d6f34a0e7f109795392fc00e7eda
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5606146
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
57524dc9
|
2024-06-06T00:00:00
|
|
Fix shader image level rebinding
Added a test that interleaves two draw
calls with rebinding the texture level
of a shader image; fixed surface init.
Vulkan:
Fixed subresource serial generation.
D3D11:
Fixed dirty bit setting.
Fixed: angleproject:7647
Bug: angleproject:8124
Change-Id: I4b5d095a1714f31a4f7b63f96dedb366faa17a03
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5611298
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
|
|
295ff607
|
2024-06-05T14:49:33
|
|
Vulkan: Precompute stageMask of kImageMemoryBarrierData
Right now every time we need a pipelineStage in kImageMemoryBarrierData,
we are doing a bitwise AND with
mSupportedVulkanPipelineStageMask. This get called multiple
times from barrier call. This CL adds
mImageLayoutAndMemoryBarrierDataMap that has already precomputed all
stageMask, thus avoid run time bitwise OR.
This CL also precomputes the bufferWritePipelineStageMask so that
flushImpl can be use it without construct every time.
Bug: b/345279810
Change-Id: I878bd31c967cd217477061976f07df13b043fa7f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5601073
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
|
|
92f198f6
|
2024-06-06T21:42:35
|
|
Revert "Reland "Vulkan: Defer texture data flush until data provided for all levels""
This reverts commit b93af07ac1ddb9f2e262d611d155f4b63f18999f.
Reason for revert: b/345532371
Original change's description:
> Reland "Vulkan: Defer texture data flush until data provided for all levels"
>
> This is a reland of commit 490c056a88a33870cb4ba2a7906b0a9688d96262
>
> Original change's description:
> > Vulkan: Defer texture data flush until data provided for all levels
> >
> > One of the major overhead with VkEvent is seeing with first frame where
> > all textures are being specified. The immutable textures, we always
> > immediately flush out the update as data provided for each level. This
> > means one VkEvent is created and SetEvent is called per level. This CL
> > delays the flush until data for all levels are provided, thus there is
> > only one flush per texture instead of per level. With this CL asphalt_9
> > is no longer timeout on bots when VkEvent is enabled.
> >
> > There is also another benefit comes with this CL. On all desktop GPUs,
> > ASTC format texture are falling back to RGBA8. We always stage a clear
> > for the emulated format. That staged clear are able to be removed if
> > data is provided later. Because of we flush out staged update when first
> > level data is provided, all staged clear for the subsequent levels are
> > also gets flushed out, losing the chance to be removed. This CL will
> > allow all staged clears being removed.
> >
> > Bug: b/343976993
> > Bug: b/336844257
> > Change-Id: Ica731ea57db771b16966f4da92ccdc551ae93d81
> > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5588816
> > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> > Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
> > Commit-Queue: Charlie Lao <cclao@google.com>
>
> Bug: b/343976993
> Bug: b/336844257
> Change-Id: Ie987582a44e0d73abd38ce8f6813ff8995e907e2
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5597810
> Reviewed-by: Cody Northrop <cnorthrop@google.com>
> Commit-Queue: Charlie Lao <cclao@google.com>
Bug: b/343976993
Bug: b/336844257
Change-Id: I9356da6b4cdb21dba47758d6e937d1ae02f0ae34
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5606144
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
|
|
b93af07a
|
2024-05-31T11:36:32
|
|
Reland "Vulkan: Defer texture data flush until data provided for all levels"
This is a reland of commit 490c056a88a33870cb4ba2a7906b0a9688d96262
Original change's description:
> Vulkan: Defer texture data flush until data provided for all levels
>
> One of the major overhead with VkEvent is seeing with first frame where
> all textures are being specified. The immutable textures, we always
> immediately flush out the update as data provided for each level. This
> means one VkEvent is created and SetEvent is called per level. This CL
> delays the flush until data for all levels are provided, thus there is
> only one flush per texture instead of per level. With this CL asphalt_9
> is no longer timeout on bots when VkEvent is enabled.
>
> There is also another benefit comes with this CL. On all desktop GPUs,
> ASTC format texture are falling back to RGBA8. We always stage a clear
> for the emulated format. That staged clear are able to be removed if
> data is provided later. Because of we flush out staged update when first
> level data is provided, all staged clear for the subsequent levels are
> also gets flushed out, losing the chance to be removed. This CL will
> allow all staged clears being removed.
>
> Bug: b/343976993
> Bug: b/336844257
> Change-Id: Ica731ea57db771b16966f4da92ccdc551ae93d81
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5588816
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
> Commit-Queue: Charlie Lao <cclao@google.com>
Bug: b/343976993
Bug: b/336844257
Change-Id: Ie987582a44e0d73abd38ce8f6813ff8995e907e2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5597810
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
170851ff
|
2024-06-04T09:01:11
|
|
Revert "Vulkan: Defer texture data flush until data provided for all levels"
This reverts commit 490c056a88a33870cb4ba2a7906b0a9688d96262.
Reason for revert: breaks win-trace
https://ci.chromium.org/ui/p/angle/builders/ci/win-trace/6014/overview
Original change's description:
> Vulkan: Defer texture data flush until data provided for all levels
>
> One of the major overhead with VkEvent is seeing with first frame where
> all textures are being specified. The immutable textures, we always
> immediately flush out the update as data provided for each level. This
> means one VkEvent is created and SetEvent is called per level. This CL
> delays the flush until data for all levels are provided, thus there is
> only one flush per texture instead of per level. With this CL asphalt_9
> is no longer timeout on bots when VkEvent is enabled.
>
> There is also another benefit comes with this CL. On all desktop GPUs,
> ASTC format texture are falling back to RGBA8. We always stage a clear
> for the emulated format. That staged clear are able to be removed if
> data is provided later. Because of we flush out staged update when first
> level data is provided, all staged clear for the subsequent levels are
> also gets flushed out, losing the chance to be removed. This CL will
> allow all staged clears being removed.
>
> Bug: b/343976993
> Bug: b/336844257
> Change-Id: Ica731ea57db771b16966f4da92ccdc551ae93d81
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5588816
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
> Commit-Queue: Charlie Lao <cclao@google.com>
Bug: b/343976993
Bug: b/336844257
Change-Id: I25854b855334c4cac1c2b40467d8e2ecb7661b8f
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5593935
Auto-Submit: Yuly Novikov <ynovikov@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
|
|
490c056a
|
2024-05-31T11:36:32
|
|
Vulkan: Defer texture data flush until data provided for all levels
One of the major overhead with VkEvent is seeing with first frame where
all textures are being specified. The immutable textures, we always
immediately flush out the update as data provided for each level. This
means one VkEvent is created and SetEvent is called per level. This CL
delays the flush until data for all levels are provided, thus there is
only one flush per texture instead of per level. With this CL asphalt_9
is no longer timeout on bots when VkEvent is enabled.
There is also another benefit comes with this CL. On all desktop GPUs,
ASTC format texture are falling back to RGBA8. We always stage a clear
for the emulated format. That staged clear are able to be removed if
data is provided later. Because of we flush out staged update when first
level data is provided, all staged clear for the subsequent levels are
also gets flushed out, losing the chance to be removed. This CL will
allow all staged clears being removed.
Bug: b/343976993
Bug: b/336844257
Change-Id: Ica731ea57db771b16966f4da92ccdc551ae93d81
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5588816
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
a87ca02c
|
2024-05-31T11:18:52
|
|
Vulkan: change shouldUpdateBeStaged to shouldUpdateBeFlushed
All usage of shouldUpdateBeStaged() is actually a negate
if(!shouldUpdateBeStaged(...)) {doFlush();}. This CL changes
shouldUpdateBeStaged to shouldUpdateBeFlushed to make it easier to read.
The other change is that there is a distinction of a texture update must
be flushed and update prefer to be flushed. So shouldUpdateBeStaged()
logic has been split into two functions updateMustBeStaged and
updateMustBeFlushed. shouldUpdateBeFlushed simply because it is either
must be flushed or not mustBeStaged (proactively flush for performance
reason).
This CL is also a preparation for next CL. No actual behavior change is
expected here.
Bug: b/343976993
Change-Id: Icd9f57f43b6fb5761e9845cc6f27f9458073f905
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5588815
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
1a9a703b
|
2024-05-21T11:14:40
|
|
Vulkan: Add DeviceQueueIndex to Context/BufferHelper/ImageHelper
This CL adds a utility class DeviceQueueIndex, which encapsulates
queueFamilyIndex and the queueIndex into one integer value so that we
can pass around to barrier function. vk::Context and BufferHelper and
ImageHelper class now keeps mCurrentDeviceQueueIndex instead of
mCurrentQueueFamilyIndex. For All contexts by default it gets the
default queue from renderer (which is always the one corresponding to
Medium priority). For ContextVk, when priority changes it update
mCurrentDeviceQueueIndex to match new context priority.
Bug: b/337135577
Change-Id: I62cc483cfdb3e974d38db074e671c57299300074
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5555903
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
b22cce5f
|
2024-05-21T10:55:27
|
|
Vulkan: Remove Renderer::getDeviceQueueIndex
Renderer::getDeviceQueueIndex() returns queueFamilyIndex. There is a
function that already returns mCurrentQueueFamilyIndex, so this function
is now removed.
This CL also renames ImageHelper::isQueueChangeNeccesary to
isQueueFamilyChangeNeccesary
Bug: b/337135577
Change-Id: I3cd9ded1414d1389e162aaa5399c231a987f871e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5553067
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
ead98ed9
|
2024-05-02T14:04:14
|
|
Implement basic texture upload.
This change modifies ImageHelper's methods to upload textures to
fix webgpu API calls, as well as fully implements uploading texture
data via TextureWgpu::setImage for RGBA8 formats.
Bug: angleproject:8457
Change-Id: I1c5be3d79ad996a709086ca7157cca6229a336ce
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5398002
Reviewed-by: Matthew Denton <mpdenton@chromium.org>
Commit-Queue: Liza Burakova <liza@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
a96e9197
|
2024-04-25T10:35:02
|
|
Vulkan: Add RefCountedEvent class and VkCmdSetEvent call
This CL defines RefCountedEvent class that adds reference counting to
VkEvent. CommandBufferHelper and ImageHelper each holds one reference
count to the event. Every time an event is added to the command buffer,
the corresponding RefCountedEvent will be added to the garbage list
which tracks the GPU completion using ResourceUse. That event garbage's
reference count will not decremented until GPU is finished, thus ensures
we never destroy a VkEvent until GPU is completed.
For images used by RenderPassCommands, As
RenderPassCommandBufferHelper::imageRead and imageWrite get called, an
event with that layout gets created and added to the image. That event
is saved in RenderPassCommandBufferHelper::mRefCountedEvents and that
VkCmdSetEvents calls are issued from
RenderPassCommandBufferHelper::flushToPrimary(). For renderPass
attachments, the events are created and added to image when attachment
image gets finalized.
For images used in OutsideRenderPassCommands, The events are inserted as
needed as we generates commands that uses image. We do not wait until
commands gets flushed to issue VkCmdSetEvent calls. A convenient
function trackImageWithEvent() is added to create and setEvent and add
event to image all in one call. You can add this call after the image
operation whenever we think it benefits, which gives us better control.
(Note: Even if forgot to insert the trackImageWithEvent call, it is
still okay since every time barrier is inserted, the event gets
released. Next time when we inserts barrier again we will fallback to
pipelineBarrier since there is no event associated with it. But that is
next CL's content).
This CL only adds the VkCmdSetEvent call when feature flag is enabled.
The feature flag is still disabled and no VkCmdWaitEvent is used in this
CL (will be added in later CL).
Bug: b/336844257
Change-Id: Iae5c4d2553a80f0f74cd6065d72a9c592c79f075
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5490203
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
2905a6a6
|
2024-04-19T15:09:41
|
|
Vulkan: Fix read pixel to cached non-coherent memory
The bug here is that when we use cached non-coherent memory for image
read, we must wait until DMA to finish before calling invalidate().
Otherwise CPU pre-fetching might end up populate the cache line again
with old data between invalidate and DMA and causes CPU reads get the
stale data from cache. This CL moves invalidate() call after we wait for
copy to finish and removes requireCachedBitForStagingBuffer feature
flag.
Bug: b/335937565
Bug: b/315836169
Bug: b/324953979
Change-Id: Ie8a1854e17a5fe9c534c5102b2e0d51bd35c131a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5468597
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
|
|
4d317b52
|
2024-03-22T15:48:51
|
|
Vulkan: Add MSRTSS preferred usage for tex init
The image create flag related to multisampled render to single-
sampled was used when this feature flag was enabled. However, this
could lead to some platforms allocating extra memory for the image,
even if the image did not use this feature.
In this change, a new feature is added regarding whether to prefer this
flag from the start. If disabled, ANGLE will only use this bit for the
texture if it is actually bound to an MSRTT framebuffer object (through
FramebufferTexture2DMultisampleEXT()).
* Added a new feature: preferMSRTSSFlagByDefault
* If enabled, the MSRTSS is used for all image inits.
* (TextureVk::initImage())
* Otherwise, it will create the image without the flag at first.
* Added member to texture frontend to track if the texture has been
bound to an MSRTT framebuffer.
* mHasBeenBoundToMSRTTFramebuffer
* During TextureVk::syncState(), if the image without the MSRTSS bit
is bound to an MSRTT framebuffer, it is recreated using the
MSRTSS flag.
* Checked in respecifyImageStorageIfNecessary().
Bug: b/329911999
Bug: angleproject:8622
Change-Id: I5e7d43e3828ae272441d65b2be35d09b23b68f84
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5402978
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
|
|
914fe61b
|
2024-03-15T13:20:49
|
|
Vulkan: Rename RendererVk.* to vk_renderer.*
Done in a separate CL from the move to namespace vk to avoid possible
rebase-time confusion with the file name change.
Bug: angleproject:8564
Change-Id: Ibab79029834b88514d4466a7a4c076b1352bc450
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5370107
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
|
|
60aaf4a0
|
2024-03-14T12:58:56
|
|
Vulkan: Move renderer to namespace vk
This class is agnostic of EGL. This change moves it to namespace vk for
use with the OpenCL implementation
Bug: angleproject:8564
Change-Id: I57f7807d6af8b3d5d7f8efbaf8b5d537a930f881
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5371324
Reviewed-by: Austin Annestrand <a.annestrand@samsung.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
d4d34781
|
2024-03-14T13:03:55
|
|
Multisampling support check: sampleCounts > 1 and createFlags
At least two drivers are returning VK_SUCCESS from
vkGetPhysicalDeviceImageFormatProperties2
but also set sampleCounts to 1 which supposedly means no MSRTT
Qualcomm reference device driver fails vkCreateImageView
when enabling the multisampling bit one cubemaps which have
sampleCounts == 1
Additionally,
* include vk::GetMinimalImageCreateFlags() in createFlags - we don't get
the cubemap bit without that
* check both the image format and the additional view format
(linear+srgb) as we set both of these when creating the image
This fixes a bunch of cubemap and 3D tests on Qualcomm reference device
Bug: b/329286011
Change-Id: I6d3ddea0cd997cf37b503050063f42d69723bd50
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5372826
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Roman Lavrov <romanl@google.com>
|
|
2ee295b4
|
2024-02-15T11:27:39
|
|
Vulkan: Add per-level image update tracker
* Add a per-level image write tracker to ImageHelper.
* It tracks the updates scheduled for different parts of the image.
Within each level, it also tracks different layers, currently up
to 64.
* kMaxParallelSubresourceUpload renamed to kMaxParallelLayerWrites;
moved to vk_helper header.
* It is reset when a barrier is issued for the image.
* Modified ImageHelper::recordWriteBarrier().
* Added isWriteBarrierNecessary().
* Now it checks the added writes for the image. It will no longer
issue a barrier if the image is in the same layout and there is
no write to a part of the image to which was previously written.
* Added ReadImageSubresources to CommandBufferAccess.
* It is used for layouts that allow both reading and writing to the
image (including self-copy):
* TransferSrcDst (used in CopyImageSubData)
* ComputeShaderWrite (used in compute-based mipmap generation)
* CommandBufferImageWrite -> CommandBufferImageSubresourceAccess
* Updated onImageSelfCopy() args to include read subresource data.
* Improves gpu_time for TextureUploadETC2TranscodingBenchmark perf test
* Windows/NVIDIA: ~180609 ns -> ~62669 ns (~2.88x)
* Linux/NVIDIA: ~157283 ns -> ~93360 ns (~1.68x)
* Windows/Intel: ~72297 ns -> ~57153 ns (~1.27x)
* Added a test to show that self-copy for a write-after-read works.
* ArraySelfCopyImageSubDataWithWriteAfterRead
* (ArraySelfCopyImageSubData covers RAW hazards; renamed)
Bug: b/308455694
Change-Id: I5cef296d991ce6ec02792edc3ffc5cc4994831e1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5301855
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
|
|
6367f541
|
2024-01-25T10:16:04
|
|
Vulkan: supply YcbcrConversionDesc earlier
Previously, the AHB import path would allow ImageHelper to build a bogus
YcbcrConversionDesc (in initExternal) and then later overwrite it with
what it wanted. The intermediate state was not necessarily valid, and
could cause assertion failures and VVL errors.
Instead, have ImageHelper clients provide the conversion they want
upfront. In the non-external case, build an appropriate conversion
for formats which need them, before delegating to initExternal.
Bug: b/315387961
Change-Id: Icc8f561bb2de0289ceec56d41978b8c4651a47a2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5232769
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Chris Forbes <chrisforbes@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
fad2adb2
|
2024-01-12T14:43:33
|
|
Vulkan: Fix importing external object and using as storage image
The create flags used to create the imported object was 0. Later, when
the texture was used as a storage image, TextureVk::syncState would
recreate the image (losing connection to external object).
This change makes sure the create flags include all the necessary create
flags such that the texture can be correctly used as storage image.
Bug: angleproject:8464
Change-Id: I6587b53b1c2819a11dec8f2d5a3a30c889a4c63f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5194064
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
a950f005
|
2023-12-06T18:58:35
|
|
Move compressed format validation to Vk backend.
Add test to call glCompressedTexSubImage3D() from a pixel unpack buffer.
This currently fails on OpenGL.
Bug: angleproject:8449
Change-Id: I863b602e39a14878af8745ff62b408bdd879bc98
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5100348
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
|
|
b8ca8de4
|
2023-12-05T13:36:53
|
|
Vulkan: Don't crash when glCopyTexImage2D redefines itself
The Vulkan backend marks a level being redefined as such before doing
the copy. If a single-level texture was being redefined, it releases it
so it can be immediately reallocated. If the source of the copy is the
same texture, this causes a crash.
This can be properly supported by using a temp image to do the copy, but
that is not implemented in this change.
Bug: chromium:1501798
Change-Id: I9dde99aa0b88bc7d5f582ff15772f70b36f424e0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5089150
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
b746dc3b
|
2023-11-29T17:40:53
|
|
Vulkan: Fix assertion when texture's min/mag filter disagree
Camera CTS test testCameraGpuEncoderPath[1] is hitting assertion due to
minFilter is NEAREST but magFilter is LINEAR. This CL use sampler's
filter if min/mag agrees. Otherwise it uses default YCbCr chroma filter.
The min/mag filter will still apply separately if
VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT
is set. If this bit is not set, we will force all of three filter to be
the same anyway.
Bug: b/302196568
Bug: b/308208067
Change-Id: I19007a107cfcea0f839cb66c236a70c003c43653
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5074826
Reviewed-by: Chris Forbes <chrisforbes@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
8ae36a93
|
2023-11-14T10:11:51
|
|
Vulkan: Bugfix in isFastUnpackPossible
Disallow fast unpack when there is a mismatch between the
actual texture format and intended buffer (PBO or client buffer)
format.
Bug: angleproject:3777
Test: Texture2DTestES3.UnpackCompatibleFormatButDifferentType*
Change-Id: I9ea9d9cdd5e1391acebb3d75d69437e27cfa90df
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5029504
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: mohan maiya <m.maiya@samsung.com>
|
|
9a5d75de
|
2023-10-30T11:59:19
|
|
Vulkan: Fix incompatible redefinition of cube faces
The TextureVk::mRedefinedLevels bitmask tracked which levels are
incompatibly redefined, greatly reducing the complexity of dealing with
GL's mutable textures.
It did not however take into account the fact that GL allows each
cubemap face to be separately redefined (unlike 2D arrays, where all
layers are defined together). This change turns the bitmask into an
array of bitmasks. Previously, a single bit represented whether the
level is incompatibly redefined. Now, elements of the array track the
same information for each cube face. For non-cube-map textures, only
element 0 is used.
Bug: chromium:1494664
Change-Id: I69568d3da2391796bf5f01505861fee42c6c8924
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4986289
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: 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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
e7418836
|
2023-08-16T14:25:52
|
|
Vulkan: Add context flushing as OOM fallback
* As a new fallback for out-of-memory errors, if an allocation results
in device OOM, the context is flushed and the allocation is retried.
* Functions related to buffer/image allocations now return a VkResult
value instead of angle::Result, which will be bubbled up to a higher
level for safer handling.
* The OOM is no longer handled at the level where the allocation
happens, but is moved up to the context.
* Added two functions to ContextVk for allocating memory for images and
buffer suballocations, which also include the fallback options.
* initBufferAllocation(): Uses BufferHelper::initSuballocation()
* initImageAllocation(): Uses ImageHelper::initMemory()
* Moved initNonZeroMemory() out of the following functions:
* BufferHelper::initSuballocation()
* Moved to ContextVk::initBufferAllocation().
* ImageHelper::initMemory()
* Moved to ContextVk::initImageAllocation().
* Also moved to new function:
ImageHelper::initMemoryAndNonZeroFillIfNeeded().
This function replaced the rest of initMemory() usages outside
initImageAllocation().
* New macros for memory allocation
* VK_RESULT_TRY()
* If the output of the command inside it is not VK_SUCCESS, it will
return with the error result from the command.
* VK_RESULT_CHECK()
* If the output of the command inside it is not VK_SUCCESS, it will
return with the input error.
* Added a test in which allocation would fail due to too much pending
garbage without the fix on some platforms. The test ends once there
has been a submission.
* New suite: UniformBufferMemoryTest
* Added a similar test for flushing texture-related pending garbage.
* New suite: Texture2DMemoryTestES3
Bug: b/280304441
Change-Id: I60248ce39eae80b5a8ffe4723d8a1c5641087f23
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4787949
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
b185c3ea
|
2023-09-11T12:28:43
|
|
Vulkan: Add host-image-copy usage to images when optimal
The change currently doesn't actually copy on host, but prepares the
image for it.
Bug: angleproject:8341
Change-Id: I4458712dca46ef9872020e158a3f902e94f5eb93
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4856146
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
|
|
6553225d
|
2023-09-11T11:33:19
|
|
Vulkan: Refactor image usage/flags support check logic
The function that checks whether a format supports a specific usage is
moved to ImageHelper. For VK_EXT_host_image_copy, Renderbuffer, AHB etc
may also use this function.
Bug: angleproject:8341
Change-Id: I6ebc06f97fd29e66aa8d43fcf045f51717d27864
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4856144
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
0d886b62
|
2023-07-14T11:24:53
|
|
Check that MRTSS bit is supported by format
Bit was added without checking ImageFormatProperties causing
failures in some end2end tests.
Bug: angleproject:8262
Test: Texture2DTestES3.TexStorage2D*/ES3_Vulkan*
Change-Id: I7f9a4ee7c14610ee239ab1f86e4ba2c649ce76b3
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4684549
Reviewed-by: Ian Elliott <ianelliott@google.com>
Commit-Queue: Mark Łobodziński <mark@lunarg.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
86e21fa2
|
2023-06-12T13:36:21
|
|
Vulkan: Refactor angle::Format depth/stencil checks
Bug: b/246008627
Change-Id: If0a2992c5bd66adf27c6866aea04e54ba465a522
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4608489
Reviewed-by: Roman Lavrov <romanl@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
|
|
ec7e0778
|
2023-05-26T22:11:49
|
|
Vulkan: Track the emulated texture buffer in command buffer
... instead of the original texture buffer, because the emulated one is
the one that is actually being used. This removes the necessity to
issue a hacky barrier after the emulation is done.
Bug: angleproject:8128
Change-Id: Ibc812894204cc1b2c6147817674de44e9c7ba2f4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4571701
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Roman Lavrov <romanl@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
|
|
ff110417
|
2023-04-21T15:16:03
|
|
Vulkan: Emulate RGB32 uniform texel buffers when unsupported
Applies to: GL_RGB32F, GL_RGB32I, GL_RGB32UI
When VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT is specified for these
formats by the Vulkan driver, behavior is the same as before.
When it is not speficied: previously ANGLE wouldn't enable
GL_EXT_texture_buffer unless exposeNonConformantExtensionsAndVersions
was enabled; now ANGLE always enables it and does the RGB->RGBA
conversion (GPU) under the hood and tracks buffer content updates using
the paths added for tracking this for Vertex Arrays.
Bug: b/278585075
Bug: angleproject:8128
Change-Id: I4605719bf3f51c5a10c1a35ecae767833dcd45d7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4456498
Commit-Queue: Roman Lavrov <romanl@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
80dd54f9
|
2023-05-17T22:16:59
|
|
Vulkan: Enable VK_EXT_image_2d_view_of_3d and set flag
Based on a change by Yiwei Zhang <zzyiwei@chromium.org>
Enabling the extension was missed from
https://chromium-review.googlesource.com/c/angle/angle/+/3648586, and
some implementations do rely on the feature enablement (e.g. RADV). This
also fixes the VVL violations on satisfied implementations.
Additionally, the VK_IMAGE_CREATE_2D_VIEW_COMPATIBLE_BIT_EXT flag is
always set on 3D images when this extension is supported; it is
needed for both sampled and storage images, not just storage images.
Bug: b/274478146
Change-Id: Ibc210275e2d39ac0c54d1ae4c2451a5402360972
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4544762
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
|
|
ec308b35
|
2023-05-15T15:03:10
|
|
Vulkan: Add feature to limit sample count to 2
This CL adds a feature called `limitSampleCountTo2`. Using it will
have the Vulkan backend limit max samples to 2.
Why 2? That's the minimum required in Vulkan to multisample without
error. Here's an example validation error:
vkCmdResolveImage: srcImage sample count is VK_SAMPLE_COUNT_1_BIT.
The Vulkan spec states: srcImage must have a sample count equal to
any valid sample count value other than VK_SAMPLE_COUNT_1_BIT.
https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkCmdResolveImage-srcImage-00257
Using a limit as opposed to forcing a value allows non-multisampling
(sample count of 1) to continue working.
To see how tests fare when the feature is set, see the following test
results that force the value on:
https://chromium-review.googlesource.com/c/angle/angle/+/4534098/4
Test: adb shell setprop debug.angle.feature_overrides_enabled limitSampleCountTo2
Bug: b/279498079
Bug: angleproject:8162
Change-Id: I1df2822709151e6084c32055b5aff444e0b10db5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4518562
Commit-Queue: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Greg Schlomoff <gregschlom@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
|
|
5ab2fa96
|
2023-05-12T08:38:19
|
|
Vulkan: Move texture QFOTs to syncState()
... (and getAttachmentRenderTarget() which is syncState()-like
for deferred clear) so that QFOTs are not actually scheduled until
first use. SurfaceFlinger optimistically creates EGL images and
textures for AHBs in case it does need them in the future.
However, the images and textures may go unused. Prior to this
change, ANGLE would create pending QFOT barriers while importing
AHBs into EGL images and GL textures. However, SurfaceFlinger may
not be doing any "real work" (other than repeatedly creating and
destroying EGL images and GL textures) which would result in the
command buffers containing the QFOTs being flushed. This can
result in a large build up of unreleased memory (as the
VkDeviceMemory would still be kept alive by the reference from
the unflushed QFOT command buffer) and lead to the low memory
killer nuking processes.
Bug: b/282075554
Test: cts -m CtsOpenGLTestCases
-t android.opengl.cts.GLSurfaceViewTest
Test: adb shell dumpsys SurfaceFlinger
Test: angle_end2end_tests
--gtest_filter=ImageTestES3.AHBImportReleaseStress/ES3_Vulkan
Change-Id: I7776abb2c6f834e96aa3926c26e77c53352ee561
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4527437
Commit-Queue: Jason Macnak <natsu@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
deab374e
|
2023-05-09T10:29:21
|
|
Vulkan: skip releaseStagedUpdates when not owned
this is only a temp quick fix for b/279677207. may introduce
rendering issue there are still other multi-thread race issues.
the stagedupdates come from defer clears or empty entries.
Bug: b/279677207
Change-Id: Idfd21120e5fe916d0d9d205dba2d71695085a5d6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4518740
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Hailin Zhang <hailinzhang@google.com>
|
|
2ce6d8df
|
2023-04-20T17:16:00
|
|
TextureVk calls onStateChange when releasing buffer views
TextureVk::setBuffer releases buffer views and they don't get
initialized unless a dirty bit is set. That works on the first draw call
because Texture::Texture() sets DIRTY_BIT_IMPLEMENTATION in constructor,
but when called twice mBufferViews remains unitialized causing
mBufferViews.getView() misbehavior.
Fix this by calling onStateChange when buffer views are released.
As mBufferViews is only initialized conditionally for texture buffers,
add a bool for tracking whether it is in the initialized state to avoid
marking texture as dirty unnecessarily.
Note that this isn't handled by signalDirtyStorage() inside
Texture::setBufferRange because (in this test case?) there are no
observers on Texture so onStateChange called from Texture is a no-op.
Texture however observes its TextureVk implementation so onStateChange
calls from TextureVk end up setting the dirty bit in
Texture::onSubjectStateChange.
Bug: b/278585075
Change-Id: I2b83160cdd89a086ed81e8412cd64d0aad930911
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4457147
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Roman Lavrov <romanl@google.com>
|
|
f2c5ce4e
|
2023-03-16T17:44:56
|
|
Re-enable mutable texture upload for one context
It was observed that in some apps, mutable textures are uploaded in a
context, but that context's outside RP command buffer is not flushed
at all, resulting in invalid (noise) or incorrect textures.
* Added isEligibleForMutableTextureFlush() to be used to determine
whether onMutableTextureUpload() should be called.
* Restricted the use of mutable texture upload to single-context
share groups.
* When the number of contexts becomes greater than one, the original
context's outside render pass command buffer is flushed.
* Added related tests.
* Added a test to make sure that textures can be uploaded in one
thread, and used for draw calls in another, with the help of a
sync object.
* Added a test to make sure that textures can be uploaded in the
main thread, and used in a new thread.
* Added a test in which a new context is created after mutable
mipmap textures are defined.
Bug: b/264143971
Change-Id: I66c0d8b04d39bb7244e5752aac0e46a0192f012e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4349156
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
233c128b
|
2023-01-17T19:21:58
|
|
Vulkan: Fix UBs when deleted attachment is used in a RenderPass.
Problem:
- "RenderbufferVk"/"TextureVk" with "mOwnsImage == false" used as
RenderPass attachment.
- "RenderbufferVk"/"TextureVk" deleted.
- Owning resource is destroyed ("EGLImage" and all siblings /
"EGLSurface").
- Crash (UB) may happen when ending RenderPass, flushing or executing
commands.
Fix adds tracking of "vk::ImageSourceID" value in
"vk::RenderPassAttachment" - IDs of objects, that originally provide
"vk::ImageHelper" images. This is necessary, because when using
EGLImage, there may be multiple "TextureVk" objects with same
"vk::ImageHelper", and need to call "finalizeImageLayout()" for the
correct attachment.
Bug: angleproject:8032
Test: angle_end2end_tests --gtest_filter=ImageTest*DeletedWhileInUse*
Test: angle_end2end_tests --gtest_filter=PbufferTest.UseAsFramebufferColorThenDestroy*
Change-Id: I50fdd9d6b6a9677adad2262373303b46de1dee4c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4296014
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Igor Nazarov <i.nazarov@samsung.com>
|
|
b194c21a
|
2023-02-24T15:41:00
|
|
Vulkan: Enforce ContextPriority in ShareGroup and with EGLImage
This CL enforces single Context Priority for all Contexts in a Share
Group. This is necessary until Vulkan Semaphores will be used to
automatically synchronize Resource access between Contexts.
Contexts Priority updated when new Contexts is added to the Share Group.
New Priority will be the highest among all ever existed Contexts
(except if Priority is locked).
When Contexts Priority changes, all flushed commands are submitted to
the old VkQueue and semaphore is inserted into the new VkQueue.
Currently opened RenderPasses and commands will not be flushed.
When EGLImage is used in a Context, all Contexts in that Share Group
locked (forever) to the Default Priority (Medium). This is done to
simplify the implementation and because of the current limitations
(lack of mutex protection across Context Share Groups).
Notes:
- the EGL_CONTEXT_PRIORITY_LEVEL_IMG will report initial priority.
- below tests fail on G996B without this CL.
Bug: angleproject:8039
Test: angle_end2end_tests --gtest_filter=MultithreadingTestES3.RenderThenSampleDifferentContextPriority*
Test: angle_end2end_tests --gtest_filter=MultithreadingTestES3.RenderThenSampleInNewContextWithDifferentPriority*
Test: angle_end2end_tests --gtest_filter=MultithreadingTestES3.RenderThenSampleDifferentContextPriorityUsingEGLImage*
Change-Id: Ia6a2f0084d39168a58fd7ec33edc90ece9cead05
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4289750
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Igor Nazarov <i.nazarov@samsung.com>
|
|
ac0a4a7d
|
2023-02-03T15:34:32
|
|
Add finer memory allocation type
... so that when we hit an OOM we have better understanding on why.
Bug: b/266466279
Test: trigger a Vulkan OOM, see detailed allocation logging info
Change-Id: I71c1ebd83e18ddb22e7abfd29a785bf4ad6454dc
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4219365
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
Auto-Submit: Kaiyi Li <kaiyili@google.com>
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
|
|
d859ed39
|
2023-01-19T10:54:54
|
|
Vulkan: Disallow INPUT_ATTACHMENT usage on sampled image views
Input attachments have similar requirements to draw attachments w.r.t
swizzling.
Bug: b/265647457
Change-Id: I7ff007b2b2ae2d8615b4b339bc621835888eebde
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4178023
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
626b10c1
|
2022-12-20T20:22:19
|
|
Vulkan: Add read/write depth/stencil layouts
This CL only adds the layouts in the list, but does not use them. The
layouts are renamed for consistency in this change.
Bug: angleproject:7899
Bug: b/192477489
Change-Id: I47986c7252d32626e9f26c6670c0a4e3496fe0c8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4116736
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
301ed545
|
2022-12-20T20:16:22
|
|
Vulkan: Pass context to layout getters
In preparation for a change that optionally uses read/write
depth/stencil layouts. Context is used to test for the
supportsMixedReadWriteDepthStencilLayouts feature to know whether those
layouts are supported or that a fallback must be chosen.
Bug: angleproject:7899
Bug: b/192477489
Change-Id: I1453dc9d060453a3806ad0f261b94368fe01fb29
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4116735
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
fd75686e
|
2022-12-07T16:40:54
|
|
Vulkan: Fix EGL image queue change vs threads
ANGLE records commands (a queue transfer and layout transition) when an
external image is bound to a texture or a renderbuffer. If another
thread starts using these resources, the recorded commands should have
been flushed. The application is not required to synchronize between
the threads in this case (or at least, there are applications that
don't).
Bug: b/261552549
Change-Id: I9f345316269baf5f10576dbef73b86924efd5c6f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4088903
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
|
|
02cc4cd5
|
2022-12-07T12:03:26
|
|
Vulkan: Remove ImageHelper::mImageAndViewGarbage
This was introduced in crrev.com/c/3449450. At that time this is
necessary, because we can not copy mUse for immediate view garbage
collection. Now with recent work, mUse is copyable, we no longer need to
accumulate the view garbage. They can be released immediately with a
copy of image's mUse.
Bug: b/261737134
Change-Id: Ic4393f8c4ee7c0e3be4669a0a557507c909a77ab
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4087323
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
fbd7d5fa
|
2022-10-17T17:20:09
|
|
Move thread pool classes to common/
In preparation for access by image_util files.
Bug: b/250688943
Change-Id: I24777269a5071eae9a60f939635d01ed7246461f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3961454
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|