|
6136620b
|
2021-03-25T15:43:06
|
|
Reland "EGL: GLES: Implement GL_EXT_protected_textures"
This is a reland of 6210a9b34a721df2c84cf69170ad9bf7ba40e4aa
This removes changes in gl backend.
Original change's description:
> EGL: GLES: Implement GL_EXT_protected_textures
>
> Implement EGL_EXT_protected_content Images
> Add protected member to Images and Textures
> Add error when creating objects if not supported or
> does't match native buffer
> When creating siblings pass protected state
> Add extension caps
> Add Validation
> Add GetTexParameter and SetTextparameter
> Add protected to Texture and state
> Expand tests for images and textures
>
> Test: angle_end2end_test --gtest_filter=EGLProtectedContentTest
>
> Bug: angleproject:3965
> Change-Id: I35a89b4e80bba6d9b6831c68e71630eef304dacb
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2802852
> Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
> Reviewed-by: Geoff Lang <geofflang@chromium.org>
> Reviewed-by: Jamie Madill <jmadill@chromium.org>
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Test: angle_end2end_test --gtest_filter=EGLProtectedContentTest
Bug: angleproject:3965
Change-Id: Id36d697c53afc0f0dadf92bda4565f9157f4fc2a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3076825
Commit-Queue: Brandon Schade <b.schade@samsung.com>
Reviewed-by: Ian Elliott <ianelliott@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
c408926f
|
2021-07-22T12:00:59
|
|
Revert "EGL: GLES: Implement GL_EXT_protected_textures"
This reverts commit 6210a9b34a721df2c84cf69170ad9bf7ba40e4aa.
Reason for revert: Suspected for breaking ANGLE->Chrome roller.
Bug: angleproject:6204
Original change's description:
> EGL: GLES: Implement GL_EXT_protected_textures
>
> Implement EGL_EXT_protected_content Images
> Add protected member to Images and Textures
> Add error when creating objects if not supported or
> does't match native buffer
> When creating siblings pass protected state
> Add extension caps
> Add Validation
> Add GetTexParameter and SetTextparameter
> Add protected to Texture and state
> Expand tests for images and textures
>
> Test: angle_end2end_test --gtest_filter=EGLProtectedContentTest
>
> Bug: angleproject:3965
> Change-Id: I35a89b4e80bba6d9b6831c68e71630eef304dacb
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2802852
> Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
> Reviewed-by: Geoff Lang <geofflang@chromium.org>
> Reviewed-by: Jamie Madill <jmadill@chromium.org>
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Bug: angleproject:3965
Change-Id: Ia3ef260a17097b474189ccad5b235a9db99ee00b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3043889
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
|
|
6210a9b3
|
2021-03-25T15:43:06
|
|
EGL: GLES: Implement GL_EXT_protected_textures
Implement EGL_EXT_protected_content Images
Add protected member to Images and Textures
Add error when creating objects if not supported or
does't match native buffer
When creating siblings pass protected state
Add extension caps
Add Validation
Add GetTexParameter and SetTextparameter
Add protected to Texture and state
Expand tests for images and textures
Test: angle_end2end_test --gtest_filter=EGLProtectedContentTest
Bug: angleproject:3965
Change-Id: I35a89b4e80bba6d9b6831c68e71630eef304dacb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2802852
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
d2b659f9
|
2021-03-25T15:40:58
|
|
EGL: implement EGL_EXT_protected_content Context
Add Validation check to Contexts and Surfaces
Add Vulkan protected memory features and properties
Add protected member to Surfaces and Contexts
Implement hasProtectedContent in Vulkan
Add QueueFamily helper, extent DeviceQueueMap
Protected Swapchains always on for Android
Add EGLProtectedContentTest
Test: angle_end2end_test --gtest_filter=EGLProtectedContentTest
Bug: angleproject:3965
Change-Id: I9352b1e594f71bb4e89cee7137a468940d186b1b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2800413
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
92d3912d
|
2021-04-01T10:49:14
|
|
Vulkan: Remove maxLevel and immutable from ImageHelper::initExternal
Now that we have removed mBaseLevel and mMaxLevel from ImageHelper class
in previous two CLs. The initExternal function can be modified to not
pass in base/max level information. This CL also removes immutable from
argument and let caller directly pass in firstLevel to it.
Bug: b/181800403
Change-Id: I595c1faffabc7582af35a9578b2ecdf00c39207f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2800414
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Ian Elliott <ianelliott@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
b5a71140
|
2020-08-20T17:24:21
|
|
Vulkan: Make storage actually immutable for immutable textures
The immutable textures are intended to be "immutable". Right now we are
still re-allocating VkImage object based on base_level and max_level.
This causes a problem for rendering to a level that is beyond
[base_level, max_level], which is totally within OpenGL spec. This CL
makes an immutable texture always allocate from 0 to max levels that are
specified by a glTexStorage call. Changing base_level will not trigger
re-allocation of VkImage object.
Bug: b/181800403
Change-Id: I4b4ddea17b7f6f7bfd8f36bfe8bb3a35b5c180b6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2368038
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Ian Elliott <ianelliott@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
41a2672f
|
2020-09-03T11:05:54
|
|
Vulkan: Use optimal tiling for AHB
When running Android on certain GPUs, there are problems creating Vulkan
image siblings of AHardwareBuffers because it's currently assumed that
the underlying driver can create linear tiling images that have input
attachment usage, which isn't supported on NVIDIA for example, resulting
in failure to create the image siblings. Yet, we don't currently take
advantage of linear elsewhere in ANGLE. To maintain maximum
compatibility on Android for such drivers, use optimal tiling for image
siblings.
Note that while we have switched to optimal unconditionally in this path
versus linear, it's possible that previously compatible linear usages
might become uncompatible after switching to optimal. However, from what
we've seen on NVIDIA/AMD/Intel/Samsung GPUs so far, formats generally
have more possible usages in optimal tiling versus linear tiling:
http://vulkan.gpuinfo.org/displayreport.php?id=10804#formats_linear
http://vulkan.gpuinfo.org/displayreport.php?id=10804#formats_optimal
http://vulkan.gpuinfo.org/displayreport.php?id=10807#formats_linear
http://vulkan.gpuinfo.org/displayreport.php?id=10807#formats_optimal
http://vulkan.gpuinfo.org/displayreport.php?id=10809#formats_linear
http://vulkan.gpuinfo.org/displayreport.php?id=10809#formats_optimal
http://vulkan.gpuinfo.org/displayreport.php?id=10787#formats_linear
http://vulkan.gpuinfo.org/displayreport.php?id=10787#formats_optimal
Also, as an aside, in terms of what's generally expected from the Vulkan
ICD in Android when determining AHB compatibility, if the vendor wants
to declare a particular combinatino of format/tiling/usage/etc as not
supported AHB-wise, it's up to the ICD vendor to zero out bits in
supportedHandleTypes in the vkGetPhysicalDeviceImageFormatProperties2
query:
```
*
[VUID-VkImageCreateInfo-pNext-00990](https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VUID-VkImageCreateInfo-pNext-00990)
If the pNext chain includes a VkExternalMemoryImageCreateInfo structure,
its handleTypes member must only contain bits that are also in
VkExternalImageFormatProperties::externalMemoryProperties.compatibleHandleTypes,
as returned by vkGetPhysicalDeviceImageFormatProperties2 with format,
imageType, tiling, usage, and flags equal to those in this structure,
and with a VkPhysicalDeviceExternalImageFormatInfo structure included in
the pNext chain, with a handleType equal to any one of the handle types
specified in VkExternalMemoryImageCreateInfo::handleTypes
```
Bug: angleproject:5709
Change-Id: I67b65ab830505a9df4665ccea8e2ba1ca409e0b5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2729243
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Lingfeng Yang <lfy@google.com>
|
|
4afd0f27
|
2021-02-17T13:35:57
|
|
Vulkan: Add VK_KHR_image_format_list support to initExternal
The code for initializing a VkImage with VK_KHR_image_format_list
extension support is now internal to initExternal. Also provides a flag
to inform callers when VK_KHR_image_format_list support is enabled.
Bug: angleproject:5520
Change-Id: Ie2ade93d1403ab3f9cbcf7d80684bbca201d5d8d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2702159
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
|
|
2b69462e
|
2021-02-12T15:55:00
|
|
Vulkan: Consolidate image format list initialization code
HardwareBufferImageSiblingVkAndroid, RenderbufferVk, SurfaceVk
and TextureVk all had similar code to initialize VkImage with
VK_KHR_image_format_list extension support. Consolidate all of
them into a helper.
Bug: angleproject:5520
Change-Id: Ib7ac582a35a26c0da15879e688bcaf0c2a92ea87
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2692641
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
|
|
122a1cc5
|
2021-01-26T20:06:24
|
|
Fix several vulkan backend problem on Android.
* Load AHardwarebuffer API dynamically, so vulkan backend can be
built with old NDK, but can work with newer android releases.
* Do not link with libvulkan on android.
* Expose EGL_ANDROID_get_native_client_buffer extension with vulkan
backend.
Bug: chromium:1170339
Change-Id: Idf7f6867a86ae40ba6d57a86e419c610ba404ba8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2653506
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Peng Huang <penghuang@chromium.org>
|
|
2e9706d8
|
2021-01-08T17:29:42
|
|
Vulkan: Use angle::FormatID instead of VkFormat.
This change switches the internal enums we pass around from VkFormat
to FormatID. The end goal of the refactor is to allow the Vulkan
back-end to store packed tables indexed by FormatID. Because VkFormat
has large gaps in its enum space we'd otherwise need to use unordered
data structures like unordered_map.
The change removes the redundant VkFormat storage from vk::Format and
uses a new table query to return the VkFormat that 1:1 matches an
angle::FormatID. We also include a reverse mapping for use with native
Vulkan get functions for Android.
Also moves sRGB conversion functions into renderer_utils. A couple
sRGB formats that don't exist in GL are no longer handled by the sRGB
conversion functions. These formats should be extremely rare.
Bug: angleproject:5438
Change-Id: Id8b49773ca0c556f9f5a6a10fcf0d9762b93bbea
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2618204
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Ian Elliott <ianelliott@google.com>
|
|
e91097bf
|
2020-12-29T14:05:56
|
|
Vulkan: Clean up "actual"/"intended" naming.
Clarifies that the GL internal format is an "intended" format
and the Vulkan formats are "actual" formats. This makes all the format
fields use the same consistent naming pattern.
Bug: angleproject:5438
Change-Id: I935a49895109e9e06eae5ef98d5614dfd1128ff8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2605728
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
bcdd4e58
|
2020-11-03T13:33:44
|
|
Vulkan: Fix validation errors with YUV
Had several validation errors with YUV ImageTests using Vulkan back-end.
This corrects those issues and tests now pass.
Initializing YUV AHardwareBuffers requires Android API 29. The CI bots
are not yet to Android 29 so this must be tested locally by compiling
with the appropriate api level in args.gn:
android32_ndk_api_level = 29
android64_ndk_api_level = 29
Test:
ImageTestES3.SourceYUVAHBTargetExternalRGBSampleInitData
Note: Some tests can run at api 26:
ImageTestES3.ClearYUVAHB
ImageTestES3.YUVValidation
Bug: angleproject:4852
Bug: b/172649538
Bug: b/175021871
Change-Id: I383d24faa9911f77a71bd9b764232ad519b54e9a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2530454
Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
|
|
5b419533
|
2020-11-03T13:33:44
|
|
GL: Implement EXT_YUV_target
Add test coverage of YUV format sampling as RGB or directly as YUV and
rendering as YUV using layout(yuv).
Initializing YUV AHardwareBuffers requires Android API 29 so ANGLE must
be compiled with:
android32_ndk_api_level = 29
android64_ndk_api_level = 29
The following tests can still run with Android API 26 because they don't
need to initialize the buffer:
ImageTestES3.ClearYUVAHB
ImageTestES3.YUVValidation
Bug: angleproject:4852
Bug: b/172649538
Change-Id: I4fe9afb2a68fb827dc5a5732b213b5eb60d585ac
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2517562
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
a5e0a4bc
|
2020-11-08T11:10:12
|
|
Vulkan: Support VK_KHR_image_format_list for AHB backed EGL image
AHB backed EGL images create the VkImage through external sibling
images. Create those images with VK_KHR_image_format_list extension
support enabled.
Bug: angleproject:3756
Bug: angleproject:5281
Test: angle_end2end_tests.exe
--gtest_filter=ImageTest*SourceAHB*Colorspace*Vulkan
Change-Id: I28c22f9d2f2423daa9228e4d42772b380ab7b8b9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2525109
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
|
|
97843bda
|
2020-10-30T17:03:36
|
|
Vulkan: Fix EGL Surface robust init.
The error here was related to using a single cache variable for the
robust init setting for all the surfaces in a DisplayVk. Fix this by
passing down the robust init setting from the SurfaceVk to image init.
Bug: angleproject:5274
Change-Id: I9bc9c20990268d1d5166411fb53f8f2593fd1971
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2510694
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
86ca5d2b
|
2020-10-01T11:56:05
|
|
Vulkan: Add plumbing to render pass when ImageHelper gets deleted
ImageHelper object is not refcounted and garbage collected and
endRenderPass call is deferred until next render pass starts. This
caused a situation that an ImageHelper object gets deleted while still
referenced in the open render pass. This CL make sure that we call into
all shared context's open renderpass when an image goes away so that
they can take appropriate action for this.
Bug: b/169618408
Change-Id: I5075e805980084db82ca3e699462272eee5d2d59
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2443571
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
ed518d15
|
2020-09-11T12:47:52
|
|
EGL: Refcount external AHB when backing an image
When an image is backed by an external source like an AHB
we need to refcount the buffer appropriately to prevent
deletion of the buffer while in use.
Bug: angleproject:5018
Tests: angle_end2end_tests --gtest_filter=ImageTest.SourceAHBTarget2DEarlyDelete*
Change-Id: Ib6318fc3dc442460d1a2bdd6d75a4458895667bb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2406615
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
a0d048a4
|
2020-08-27T12:03:02
|
|
Vulkan: Fool-proof usage of GL and VK level indices
Using boxed types, this change allows the compiler to catch errors when
a level index in one space (e.g. GL) is mistakenly used in another space
(e.g. VK).
This change uncovered a number of bugs due to such mistakes which are
fixed.
Mistakes are still possible when the index is explicitly extracted, for
example to be given to a Vulkan command, or when it's created, for
example when retrieved from gl::ImageIndex::getLevelIndex. Future work
can include using gl::LevelIndex in gl::ImageIndex directly to alleviate
the latter at least.
Bug: angleproject:4880
Change-Id: I6427c68c3bc096f771402f51c8554d8171758aa9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2380232
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
|
|
f61272fb
|
2020-06-17T11:38:37
|
|
Add support for VK_KHR_sampler_ycbcr_conversion
This adds ability for applications to import Android Hardware Buffers
(AHBs) as OpenGL images which in turn can be sampled from and/or
written.
This was specifically tested with the common use case of importing a
buffer created by an media decoder and using that as a texture source to
include that video content on the screen. Tested with:
- Angry Birds 2 video player (for ads) requires YUV conversion.
- Basic Media Decoder example:
https://github.com/android/media-samples/tree/master/BasicMediaDecoder
Bug: b/155487768
Change-Id: I9255450f81aa4daa2aace7205d4f6c3f225abcca
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2175103
Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
1a455f4e
|
2020-06-12T15:49:46
|
|
Vulkan: Set external image's usage flags based on AHB usage flags
For vkImages that are backed by external memory we need to derive
the VkImageUsageFlags based on the usage flags of the AHB.
Bug: angleproject:4739
Change-Id: I92bee943c66f7eadd9b63bb9bf1b59ffe5bc5a37
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2243765
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
|
|
0eae0d6c
|
2020-06-11T08:53:39
|
|
Vulkan: Set external image's tiling mode based on AHB usage flags
For external images which can be accessed by CPU,
the tiling mode should be linear. So, query the usage
of the Android Hardware Buffer and derive the tiling
mode based on AHB usage flags.
Bug: angleproject:4735
Change-Id: I1b91c6800d414d73091032e40d8e4f1e8f6c101b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2241780
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
8f6d1af9
|
2020-03-19T14:35:48
|
|
Vulkan: Implement EXT_texture_format_sRGB_override
Implemented support for EXT_texture_format_sRGB_override
This is done by creating new imageviews for textures with sRGB
overridden that reinterpret the format to its sRGB counterpart.
As preparation for this, textures that use this feature are
reallocated with VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT. This will
have a performance cost for textures that use this feature, but
should have no performance cost for regular textures, since they
will not have this bit set.
Bug: angleproject:4561
Test: angle_end2end_tests --gtest_filter=SRGBTextureTest.*Vulkan*
Change-Id: Iba25f1f2b0a7227959c1cb4ba6e3ca8311c20d06
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2152145
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
beacd8c8
|
2019-10-17T14:34:02
|
|
Vulkan: Rename format fields.
Renames 'angleFormat' to 'intendedFormat'. Also renames 'bufferFormat'
and 'imageFormat' to 'actualImageFormat' and 'actualBufferFormat'. This
renaming should make it clearer to the reader what the meaning of the
different format fields are. Intended format is the front-end format
and the actual formats are the formats we pass to Vulkan. Also updates
the documentation.
Bug: angleproject:4009
Change-Id: If61bf7250e88f7ed3d452718574c963d718e27b2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1866077
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
f10bf6bf
|
2019-09-26T10:27:18
|
|
Vulkan: Implement multi-threaded GL.
The main component of this change is to make vk::BufferHelper,
vk::ImageHelper and vk::SyncHelper use a common path. We introduce a
new "vk::SharedGarbage" helper class that stores small lists of garbage
from individual objects like an ImageHelper or BufferHelper. The
SharedGarbage is stored in the RendererVk with the ResourceUse of the
helper object. The ResourceUse tells RendererVk when it is safe to
destroy the GarbageObjects.
New "onGraphAccess" commands are added in a few places to enable the
common garbage collection path. A couple Context-only resources like
default attributes now are referenced where they were not before.
Also reorganizes some functions so we can add a few helpful ASSERTs
to our graph dependencies. Added "updateCurrentAccessNodes" for this.
Also adds a "RendererScoped" helper to replace many uses of
"ContextScoped".
The multithreading EGL tests mostly pass but have some remaining
flakiness so cannot yet be enabled.
Bug: angleproject:2464
Change-Id: Ia3e3ae8848d731abf3f21ebe04c33e381e130be0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1808444
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
cb16fb5f
|
2019-08-29T16:53:55
|
|
Vulkan: Support texture base and max levels
The Vulkan backend uses a vkImage that matches the number
of effective levels in the GL texture. This is due to the fact
that GL textures can have really strange layouts that only make
sense when base level and max level are applied.
For instance, take the following layout with disjoint mip levels:
Level 0: 4x4 RGBA
Level 1: 2x2 RGBA
Level 2: 10x10 RGB
If base level is set to zero and max level is set to 1, the image is
still considered mip-complete:
Level 0: 4x4 RGBA ==> Base Level 0 ==> Level 0: 4x4 RGBA
Level 1: 2x2 RGBA ==> Max Level 1 ==> Level 1: 2x2 RGBA
Level 2: 10x10 RGB
If base and max level are then both set to 2, the texture is still
considered complete, but of a different size and format:
Level 0: 4x4 RGBA
Level 1: 2x2 RGBA
Level 2: 10x10 RGB ==> Base/Max Level 2 ==> Level 2: 10x10 RGB
When the base or max level is changed, we must recreate the vkImage to
match the new level count.
To support that, we:
- Stage updates from the current image to the new image
- Only stage updates if there aren't already staged updates for a level
- Free the current image and so it can be recreated at the next draw
This CL does the following:
- Refactors TextureVk::copyImageDataToBuffer to support staging updates
without flush
- Adds TextureVk::copyImageDataToBufferAndGetData to support previous
use model
- Adds TextureVk::changeLevels, triggered during syncState, which stages
updates and releases the current image.
- Updates ImageHelper::flushStagedUpdates to understand base/max levels
- Updates TextureVk::ensureImageInitialized and TextureVk::generateMipmap
to account for base/max level
- Tracks base and max levels in ImageHelper
- Adds ImageHelper::stageSubresourceUpdateFromBuffer to support
this use case
- Adds ImageHelper::isUpdateStaged to determine if changeLevels
should propagate data
- Makes gl::TextureTypeToTarget available for use outside of ImageIndex
- Enables several deqp and end2end tests
Bug: angleproject:3148
Test: dEQP-GLES3.functional.texture.mipmap.*base_level*
Test: dEQP-GLES3.functional.texture.mipmap.*max_level*
Change-Id: I14ca071c9c62eb310dfed7ef9290dc65fc3ff696
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1776933
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Commit-Queue: Cody Northrop <cnorthrop@google.com>
|
|
33ffed01
|
2019-09-26T10:19:35
|
|
Vulkan: Clean up garbage APIs.
Instead of dumping resources to a context, we use the release APIs
consistently. Refactoring/cleanup change only. Should have very litte
impact on runtime behaviour.
Bug: angleproject:2464
Change-Id: I2dc7f8316c466f7ccfad50a7b792ba0ee7bc2e49
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1804883
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
c327370e
|
2019-07-23T12:54:12
|
|
Vulkan: Pass VkExtent3D to TextureHelper::init.
Bug: angleproject:3189
Change-Id: I4b95240bb32fbc2b3d0c8f097e0552d0fe23417d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1713094
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
|
|
e755a537
|
2019-04-10T09:58:21
|
|
Vulkan: Add a new garbage type gated by fences.
This allows Vulkan EGL objects such as EGL Syncs and EGL Images to give their
garbage to the renderer before destroying.
BUG=angleproject:2464
Change-Id: I59b8e1080e4292bd0856e59a928750c7e77a372e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1562522
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
0631e19b
|
2019-04-18T16:09:12
|
|
Vulkan: Rename Vulkan "Texture" format to "Image"
Also adds some comments to vk_format_utils.h.
Bug: angleproject:3372
Change-Id: I529b9b189e4cdfd400c3c981a47139727d9954ab
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1565062
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
009696c5
|
2019-01-31T14:47:07
|
|
Vulkan: Support EGL_ANDROID_image_native_buffer on Android.
BUG=angleproject:2668
BUG=angleproject:3121
Change-Id: I0dfb2ec0737ebd963b0fadb78cf720a90874f00b
Reviewed-on: https://chromium-review.googlesource.com/c/1452264
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|