|
21ad9b3c
|
2022-04-07T09:57:26
|
|
Vulkan: Add generic descriptors for DS cache.
With the new design, the descriptor set cache keys include all
identifying information needed to reconstruct the update descriptor
sets calls except the specific resource handles. The places for the
resource handles are held by serials intead. When we miss the cache,
we no longer need a second step to then construct the update calls,
and can build the update calls directly from the key structures in
combination with a list of resource handles.
Bug: angleproject:6776
Change-Id: If1660a557585a75e9aa2560d6a38c56b62f555c8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3484981
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
d8d396db
|
2022-04-07T09:57:25
|
|
Vulkan: Add shared descriptor set caches.
This allows programs with the same sets of descriptors to
share descriptor sets. Currently there is no cache eviction.
This CL adds a new "Meta" class to manage the descriptor set
caches. Each shared descriptor pool is unique to a descriptor
set layout. The descriptor set cache is moved into the pool
class. Now every instance of a descriptor pool in ANGLE has
easy access to a descriptor set cache as well.
Bug: angleproject:6776
Change-Id: I06982e0349f5a87e4578e769fa356ce8e7ab49f0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3424660
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
4ffab3bf
|
2022-05-10T16:17:54
|
|
Vulkan: Dynamic state for stencil reference
Bug: angleproject:5906
Change-Id: I1aaf54208b173ca58ff1afd2900eca7ee78726cf
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3638990
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
1d8227da
|
2022-05-10T16:00:39
|
|
Vulkan: Dynamic state for stencil write mask
Bug: angleproject:5906
Change-Id: I74adf56ec0b7b251ab3c5204b68b062d5fbc91eb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3638989
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
c3def6fa
|
2022-05-10T14:28:04
|
|
Vulkan: Dynamic state for stencil compare mask
Bug: angleproject:5906
Change-Id: Ie581c6e9fe15c90c7a6d0c7c246dd5b1b30b6507
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3638988
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
|
|
dcaa18b9
|
2022-05-10T12:27:15
|
|
Vulkan: Dynamic state for blend color
Bug: angleproject:5906
Change-Id: If450e0d84410069126027142414586181fd5f0de
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3638986
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
536d6f57
|
2022-05-10T11:44:58
|
|
Vulkan: Dynamic state for depth bias
Bug: angleproject:5906
Change-Id: I8fd7e3262fddf3aec855afdd3e4c1b9801040da1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3638983
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
780f1a41
|
2022-05-10T00:30:35
|
|
Vulkan: Dynamic state for line width
Bug: angleproject:5906
Change-Id: Iacf9c14d9d255c8048c71c725173e4764bcfe166
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3634733
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
|
|
e73121b1
|
2022-05-10T22:47:20
|
|
Vulkan: Fix VulkanPipelineCachePerfTest
Bug: angleproject:5906
Change-Id: Ide86708df10679309cc2aca0df088e8595d2a8c1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3641142
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
e0d00563
|
2022-05-03T17:02:06
|
|
Vulkan: Simplify external format Chroma code.
The prior code used a const_cast and some other twiddling when
we really just needed to add a separate small setting function.
Also encapsulates the YcbcrConversionDesc string into a class with
private data.
The end goal is to refactor image view init and caching. The
const_cast and the SamplerState were getting in the way.
Bug: angleproject:7269
Change-Id: Ie2fb4ba848c46adc63618f313f7a68a1df5cef8f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3625492
Reviewed-by: Trevor Black <vantablack@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
|
|
77cd0b5a
|
2022-04-14T13:32:07
|
|
Re-land: "Vulkan: Cache ImageView serials on texture changes."
Re-land fixes BindTexImage serial caching.
This significantly reduces overhead when changing textures before
draw calls in the Vulkan back-end.
Bug: angleproject:6776
Change-Id: I2cc03cb8a70e8c181f7658ab45df780e412bfc57
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3623860
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Auto-Submit: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
e1fdef90
|
2022-04-22T14:55:11
|
|
Revert "Vulkan: Cache ImageView serials on texture changes."
This reverts commit 7d229d047f742e93ca194272da9b93959e49d75e.
Reason for revert: Crash on Mac blink-web-tests:
https://ci.chromium.org/ui/p/chromium/builders/try/mac-rel/979339/overview
Original change's description:
> Vulkan: Cache ImageView serials on texture changes.
>
> This significantly reduces overhead when changing textures before
> draw calls in the Vulkan back-end.
>
> Bug: angleproject:6776
> Change-Id: I24e2938c0122c3b23db4a90ec85b7d8f459cc063
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3583360
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> Reviewed-by: Yuxin Hu <yuxinhu@google.com>
> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Bug: angleproject:6776
Change-Id: Icdf4f4a3628690fd9e074c6f400614890848be7f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3600910
Auto-Submit: Jamie Madill <jmadill@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
7d229d04
|
2022-04-14T13:32:07
|
|
Vulkan: Cache ImageView serials on texture changes.
This significantly reduces overhead when changing textures before
draw calls in the Vulkan back-end.
Bug: angleproject:6776
Change-Id: I24e2938c0122c3b23db4a90ec85b7d8f459cc063
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3583360
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
b2a1f0d2
|
2022-04-14T07:58:32
|
|
Track total vs per-frame descriptor set counters.
This will give more consistent measurements for descriptor set
caches and descriptor set allocations.
Bug: angleproject:6776
Change-Id: I584b8807ad19f8393ae54cc1d88b319c8f7f9f39
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3584636
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
4b381f41
|
2022-04-08T09:20:45
|
|
Vulkan: Fix descriptorSet perf counter values.
Some counters were getting reset in multiple places, which
could result in queries returning zero counts. Fix this by
consolidating per-frame counter resets.
Also updates how we compute cache hit/miss counters. This
results in correct and consistent counts for cache accesses.
Also includes a fix to not update the overlay when there are
no enabled widgets. Also does away with some of the object-
specific perf counters that were made to track descriptor set
allocations.
Bug: angleproject:6776
Change-Id: I769c715986defc50f0cfd0d997c338d34174e9f0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3573389
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
041c4c6d
|
2022-03-25T16:30:03
|
|
Vulkan: Track color attachment usage like D/S in render pass
That is in preparation for optimizing mid-render-pass clears, which
requires an answer to the following query: "has this color image been
read from / written to so far in the render pass?"
With this change, a future CL will also be able to optimize color
attachment invalidates, which currently break the render pass
unconditionally, the same way depth/stencil is optimized.
Bug: angleproject:5048
Change-Id: I3d3ee40d8444e6861c06340d5d52b17f5ee895b4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3542989
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Lingfeng Yang <lfy@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
f9ade9fb
|
2022-02-18T15:08:54
|
|
Vulkan: Add feature to create pipeline during glLinkProgram
Creating the pipeline will trigger the compilation of shaders to byte
code thus warming up Vulkan shader caches. Typically most apps call into
glLinkPrograms during app loadtime and the goal is to improve cache hit
rate and reduce CPU workload during game play.
Bug: angleproject:7046
Test: ProgramBinary*CreatePipelineDuringLink*
Change-Id: I71351d45a9aa84e220ca38503735e94cff1dcf98
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3478354
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: mohan maiya <m.maiya@samsung.com>
|
|
ef17f38a
|
2022-03-01T10:15:26
|
|
Vulkan: Add overlay widget for cache key size.
Bug: angleproject:6776
Change-Id: I35ab18bc5919129b2decf58d541499f771140e47
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3472754
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
c874943b
|
2022-02-18T15:29:14
|
|
Rename FastUnordered types to FlatUnordered.
These names are consistent with the common parlance. Flat indicates
the values are packed in memory, while fast indicates that lookup
is as fast as possible.
Bug: angleproject:6776
Change-Id: I7b56af26d7fdbf5956872be5033c3aa3f6b1b8c7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3484978
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Auto-Submit: Jamie Madill <jmadill@chromium.org>
|
|
8ade4c2f
|
2022-02-16T13:14:54
|
|
Vulkan: Add overlay and stats for descriptor set caches.
This adds more overlay widgets for different metrics of descriptor
sets, including for uniforms and for all sets.
Bug: angleproject:6776
Change-Id: If1a053bd711454227e7ccbdb01202a712a5f9787
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3469228
Reviewed-by: Charlie Lao <cclao@google.com>
Auto-Submit: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
760253ce
|
2022-01-27T07:24:27
|
|
Vulkan: replace uniforms FastIntegerMap with FastUnorderedMap
This is in preparation for removing FastIntegerSet and FastIntegerMap.
Bug: angleproject:6954
Change-Id: Ifa0a5c5ca39c705a9f774558bb6cad72ed8f0bc1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3420952
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
e5045587
|
2022-02-11T22:29:55
|
|
Debug Overlay Demo
Add a new debug overlay to display texture descriptor set cache size
Bug: angleproject:6976
Change-Id: I8bb2d88d4550947f1c6cbd732f936e3e060b1b04
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3457356
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Yuxin Hu <yuxinhu@google.com>
|
|
d285d6a7
|
2021-11-23T23:12:00
|
|
Vulkan: Use VK_EXT_depth_clip_control
Bug: angleproject:6679
Change-Id: Iea3b7a2d8db630dcea19836732de8f9e0a7a568f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3298356
Reviewed-by: mohan maiya <m.maiya@samsung.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
038adcae
|
2022-02-08T16:46:40
|
|
Vulkan: Render the overlay in the graphics pipeline
Bug: angleproject:6976
Change-Id: I388d429f0726b4d6a1c4ecd446ead93579a14a1b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3448643
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
70c510eb
|
2022-02-03T07:54:29
|
|
Vulkan: Use common storage for descriptor set descs.
This lets us avoid using templates when implementing descriptor set
caches. As an added bonus, the key size now scales with the number
of active items in the cache. In the case of using a smaller set of
active textures, our keys now use sizeof(uint32_t) *
(kFastBufferWordLimit) + sizeof(void *) bytes of storage (132/136)
instead of sizeof(uint32_t) * 3 * 96 bytes (1152) per set. This
reduction should improve cache coherency.
Bug: angleproject:6776
Change-Id: I904fc5527ff033af927e25abe6d13d98142e3f14
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3436767
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
959d4be5
|
2022-02-03T08:03:14
|
|
Vulkan: Remove buffer get method from descriptors desc.
This will make a future refactor to use a common desc class easier
to implement. We have the necessary buffer already in the call
context so we can instead pass this buffer down to where it gets
used.
Bug: angleproject:6776
Change-Id: Ia9782cba9f91c9604b1e937252bb293a346d025c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3436766
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
665ddccd
|
2021-12-09T23:06:39
|
|
Vulkan: Emulate dithering
Dithering in OpenGL is vaguely defined, to the extent that no dithering
is also a valid dithering algorithm. Dithering is enabled by default,
but emulating it has a non-negligible cost. Similarly to some other
GLES drivers, ANGLE enables dithering only on low-bit formats where
visual banding is particularly common; namely RGBA4444, RGBA5551 and
RGB565.
Dithering is emulated in the fragment shader and is controlled by a spec
constant. Every 2 bits of the spec constant correspond to one
attachment, with the value indicating:
- 00: No dithering
- 01: Dither for RGBA4444
- 10: Dither for RGBA5551
- 11: Dither for RGB565
The translator appends code to the shader that, based on the format
specified by the specialization constant, adds dithering to each color
attachment output. A 2x2 Bayer matrix is used for dithering, indexed by
gl_FragCoord.xy % 2.
Bug: angleproject:6755
Change-Id: Ib45da5938e299b6626bff921119d63e7357dd353
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3374261
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
168e0ae5
|
2022-01-27T16:50:00
|
|
Vulkan: Refactor descriptor pool code.
This uses vk::Context to init DynamicDescriptorPool, and removes
some accesses to ProgramExecutableVk member variables so the methods
can more easily be moved into another class.
The changes should have no effective behaviour difference.
Note that the immutable sampler descriptor count is entirely set by
the format of the immutable samplers. However we can't determine this
count by looking at the descriptor set layout desc with the current
implementation.
Bug: angleproject:6776
Change-Id: I0a323d19fa3720b5afd8300401ed9c30b105c0ef
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3424657
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
6f1c39b5
|
2021-12-16T16:10:49
|
|
Vulkan: Restore color attachment mask-related blend states
When we end up resetting blend state such as when changing to a
depth-only FBO and back, we can end up adding attachment states. They
need to be updated with the current GL blend state.
Bug: b/210543392
Bug: angleproject:6828
Change-Id: I3419acb8081eb7d662576a75382bb8684cc0d29f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3346320
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Lingfeng Yang <lfy@google.com>
|
|
36fcf80b
|
2021-12-11T20:55:53
|
|
Vulkan: Consolidate SamplerYcbcrConversionCache
Now that SamplerDesc and ImageHelper have the fully qualified
description of a VkSamplerYcbcrConversion, we can lazy allocate
the conversion handle along with streamlining the interface to the
SamplerYcbcrConversionCache class.
Bug: angleproject:6732
Test: Texture2DTestES3.*Yuv*Vulkan
Change-Id: I7deaa0220031bc4c500d88021459017bf937218c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3333629
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: mohan maiya <m.maiya@samsung.com>
|
|
44d0ef69
|
2021-11-25T14:37:38
|
|
Vulkan: Enhance SamplerDesc for YUV formats
In order to uniquely identify a VkSamplerYcbcrConversion, having just
the format is insufficient. We need to account for conversion model
and color component range. Refactor SamplerDesc by encapsulating YUV
related fields into its own YcbcrConversionDesc.
Bug: angleproject:6732
Test: Texture2DTestES3.*Yuv*Vulkan
Change-Id: I23114c50646232dccde988a52b0649778ad72a90
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3301899
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
|
|
4a2446c6
|
2021-10-19T11:55:17
|
|
Vulkan: Implement robust shader outputs.
In this CL we change ANGLE to pass the mask of missing shader
outputs down to pipeline creation. We then use the color mask
bits to block SwiftShader writing to unused outputs.
This fixes the undefined behaviour present in Genshin Impact.
Note that the other GLES implementations we tested don't seem
to modify outputs even if they're unused.
It was easier to mask out the color attachments in initialize
rather than set up the pipeline desc to mask out the attachments.
This was because we manipulate the color mask in a fairly complex
way before we initialize the pipeline desc.
Bug: angleproject:6566
Change-Id: Ie659fcd511cd286fa573fd25e3e6a0b9e123ebd6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3232435
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
191c236a
|
2021-10-14T17:01:45
|
|
Vulkan: Remove "current queue serial".
Queries, semaphores, and pipelines instead use the normal
vk::Resource design to track their lifetimes. Removes the current
serial APIs from all classes. Current serials are still tracked
internally in the command queue classes.
Bug: b/169788986
Change-Id: Idcd2c2a93bc8225c6f3f7c247eb8fcfb76be1030
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3223644
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
e637e4c9
|
2021-10-18T13:54:00
|
|
Vulkan: Optimize updating blend state in pipeline desc
Updating blend funcs and equations always updated all 8 slots. Now
that's only done for the attachments that are present.
Bug: angleproject:6298
Change-Id: I58fa7e4dfa27d05fef54cc9d56c7b2aa5ef43dd8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3202550
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
1dc2b702
|
2021-10-13T16:02:37
|
|
Vulkan: Pass shader module map to init pipelines.
Instead of pulling out the shader modules from the shader map when
we start the call chain, pull them out right in the init call. This
saves a bunch of boilerplate code.
Refactoring change only.
Bug: angleproject:6566
Change-Id: Ib8d79bd7284d7ddb83522270f3d4df9086ab7300
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3221134
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
b95cdec3
|
2021-10-12T11:26:15
|
|
Vulkan: Switch to `std::unordered_map` to cache renderpass
ANGLE use `flat_hash_map` by default,while it will not retain pointer
stability which causes random null pointer issue when running MH31 with
asynccommandqueue.This change switch to using `std::unordered_map` to
cache renderpass.
Bug: angleproject:6436
Bug: angleproject:6569
Change-Id: Ia2829a41251eea39ce2a79a9a42b6fe9dff6b120
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3219010
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
371542cd
|
2021-08-23T23:10:09
|
|
Vulkan: Use VK_EXT_load_store_op_none
With read-only depth/stencil attachments, ANGLE utilizes storeOp=NONE to
optimize memory bandwidth (by avoiding write back of tile memory at the
end of the render pass). Simultaneoulsy, this avoids a synchronization
hazard with the next write to that depth/stencil image.
If a framebuffer contains a depth/stencil attachment but it's unused,
ANGLE utilizes loadOp=NONE/storeOp=NONE to effectively remove any memory
bandwidth wasted on the attachment.
Bug: angleproject:5371
Change-Id: I76cbadbf1194041532ac4b690ffe087298f2de51
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3114232
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
|
|
8ea87a67
|
2021-08-17T18:46:36
|
|
Vulkan: Avoid texture format fallback when possible
Some texture formats are not renderable on some hardware. For example,
R4G4B4A4 are not renderable on nvidia and not blendable on ARM.
R5G5B5A1 are also not blendable on nvidia. Right now when we generate
format table, we are being most conservative, picking an actual format
that is always renderable and blendable. This means when R4G4B4A4 is
used on one of these GPUs, we are always falling back to R8G8B8A8
regardless if the texture is actually being used as color attachment or
not. This CL adds a actualRenderableImageFormatID field in vk::Format.
Initially we will pick actualImageFormatID which only ensures texture
sample capability. If later on the texture is being attached to FBO,
then we will switch to actualRenderableImageFormatID and do data copy if
necessary. This way we save memory and reduce texture bandwidth for most
usage of these textures. For renderBuffer and surfaces and EGLImages, we
always pick the renderable textures.
Bug: b/196456356
Change-Id: I02eec3365c2a317b0d1bad6dbdc3e741114c5bba
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3104514
Reviewed-by: Ian Elliott <ianelliott@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
5c8bf081
|
2021-06-08T13:12:24
|
|
Vulkan: Add support for YUV internal format extension
1. Add a function to upload YUV image data to textures
2. Modify stageSubresourceUpdate method to account for YUV images
3. Create VkSamplerYcbcrConversion when initializing ImageHelper
4. Update hasImmutableSampler to account for native YUV format support
5. Skip initializeNonZeroMemory for YUV formats
Bug: angleproject:5773
Test: Texture2DTestES3.TexStorage2D*Yuv*Vulkan*
Change-Id: I270f04bbf903cf2bf19f100eb95f32953d491c39
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2947767
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
45965e72
|
2021-06-17T10:21:26
|
|
Vulkan: Translate border color's channel by image view format
ANGLE implementes some formats as other formats,such as ALPHA8 to R8,
this caused some tests failed due to missing border color's channel
translation,this change add a new textureBorderLoadFunction to
translate channels of border color by image view format.
Bug: angleproject:6046
Change-Id: I94ce719b4db3724ffd3dc862b51a412b5d9f3cce
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2972328
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
5b314268
|
2021-06-15T17:37:45
|
|
Vulkan: Support OVR_multiview and OVR_multiview2
Multiview is supported in Vulkan simply by specifying the number of
views in the render pass, and creating the appropriate image views. A
number of changes to the way image views and render targets are stored
are made to support those that don't cover the entire range of layers.
One particular detail that is not implemented in this change is the use
of queries in combination with multiview. Vulkan specifies that N
queries are actually produced (N being the number of views) which must
be summed by the application, but this is not currently done.
Bug: angleproject:6048
Change-Id: I1d4a9894c232d3a93d7a97c9fa0eedc334e57469
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2967625
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
|
|
9bad7a19
|
2021-06-15T23:39:52
|
|
Vulkan: Unpack RenderPassDesc
Upcoming multiview support needs to add 2~3 more bits to this struct,
but this struct is already fully packed. As the combination with
emulated multisampled render to texture is not planned, some bits used
for MSRTT can be aliased with multiview. However, that makes the
packing of this struct even more unwieldy.
Since only tens of render passes are expected per frame, increasing the
size of the render pass cache key should not have a dramatic effect.
Bug: angleproject:6048
Change-Id: I5c9a0d155f23a37e2787b38525d3ce721b54ec1e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2966218
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
851fbedb
|
2021-06-10T21:27:01
|
|
Vulkan: Switch viewport and scissor to dynamic state
Heavily based on http://crrev/c/1316888
Some apps are creating a large number of viewport combinations and
are running out of graphics memory. This CL drops their graphics
pipeline use from tens of thousands to tens.
Performance testing shows little impact to application traces.
Bug: b/190026813
Bug: angleproject:3143
Change-Id: Ib7415be1128f8fedae4a7ca72e067b2815201223
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2954925
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
dd312cc6
|
2021-05-21T08:49:48
|
|
Reland "Vulkan: Add support for EXT_texture_border_clamp"
This is a reland of 4b92e089c01e94730fe26c4c743d76d6c935088d
Initializes mPadding to 0 in SamplerDesc::update
Original change's description:
> Vulkan: Add support for EXT_texture_border_clamp
> Add support for GL_EXT_texture_border_clamp. This is implemented by
> using VK_EXT_custom_border_color.
>
> Bug: angleproject:3577
> Test: dEQP-GLES31.functional.texture.border_clamp*
> Change-Id: Ie9fa1eb5dd03b997b5ae182787641a53080a9e51
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2830192
> Reviewed-by: Jamie Madill <jmadill@chromium.org>
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Bug: angleproject:3577
Change-Id: I8684242c4bce6e1a006dbe926defaa495fcc2282
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2911571
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
|
|
44fabb7b
|
2021-05-21T00:51:06
|
|
Revert "Vulkan: Add support for EXT_texture_border_clamp"
This reverts commit 4b92e089c01e94730fe26c4c743d76d6c935088d.
Reason for revert: breaks "Linux MSan Tests" bot
https://ci.chromium.org/ui/p/chromium/builders/ci/Linux%20MSan%20Tests/28489/overview
Original change's description:
> Vulkan: Add support for EXT_texture_border_clamp
>
> Add support for GL_EXT_texture_border_clamp. This is implemented by
> using VK_EXT_custom_border_color.
>
> Bug: angleproject:3577
> Test: dEQP-GLES31.functional.texture.border_clamp*
> Change-Id: Ie9fa1eb5dd03b997b5ae182787641a53080a9e51
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2830192
> Reviewed-by: Jamie Madill <jmadill@chromium.org>
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Bug: angleproject:3577, angleproject:5996
Change-Id: I6b62f1a4a43fcfe2d0df2c73de24db83606ce430
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2911533
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
|
|
4b92e089
|
2021-05-12T09:20:24
|
|
Vulkan: Add support for EXT_texture_border_clamp
Add support for GL_EXT_texture_border_clamp. This is implemented by
using VK_EXT_custom_border_color.
Bug: angleproject:3577
Test: dEQP-GLES31.functional.texture.border_clamp*
Change-Id: Ie9fa1eb5dd03b997b5ae182787641a53080a9e51
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2830192
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
|
|
9e8fea5b
|
2021-05-13T07:04:05
|
|
Vulkan: Fix desc set cache bug with xfb offset
Prior to this change, the transform feedback buffer offset was not
stored in the descriptor set key, so if the offset changed, stale
descriptor sets could be used.
Bug: angleproject:5963
Change-Id: I3dec4ab9fa82092a65e9a75bdd19c5f2cf49521c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2894513
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
ccc0fbaa
|
2021-03-24T17:56:38
|
|
Vulkan: Related fixes for buffer descriptor set cache.
Includes some stats counter gathering and a few related refactors and
cleanups. Also includes a new overlay widget.
Bug: angleproject:5736
Change-Id: Ida8d2cd815c5b598c6a442dd9bbfdf51e9c05180
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2785431
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
0c77f3ad
|
2021-03-10T15:58:00
|
|
Vulkan: Implement shader buffers descriptor cache.
Implements a descriptor set cache for UBOs, SSBOs, and atomic counter
buffers. Storage Images and framebuffer fetch input attachments are
not yet included. Requires moving the buffer barrier handling into
ContextVk, similarly to how we handle the barriers for Textures.
The packed description key for the descriptors uses a "fast" vector
with a basic minimum size. For most cases of a few buffers this will
fit easily in stack memory, but for larger programs with many buffers
we fit this into heap memory. The key has a large upper bound due to
the high ES 3.2 requirements and the need to index several values such
as the offset and binding size.
We use dynamic offsets for uniform buffers when possible. This ensures
applications like Manhattan 3.1 that use sets of common buffers with
changing offsets hit the cache most of the time.
Because of resource limits we pick at compilation time whether to use
dynamic or static descriptor sets. Mostly this applies to tests that
use a large number of uniform buffers. A future implementation could
be smart and would recompile the program with heuristics to use a
minimal number of dynamic indices.
Reduces the number of descriptor set updates from ~300 -> ~30 per frame
in Manhattan 3.1 and in Asphalt 9 from 900+ to as low as 0 per frame.
Bug: angleproject:5736
Change-Id: I5c2a3881bec90d301dab15cc86c8a70e60674ad7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2757515
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
efc53d0f
|
2021-04-03T21:30:15
|
|
Vulkan: Refactor to descriptor offset array.
This is in preparation for using dynamic offsets for other sets than
the default descriptors.
Bug: angleproject:5736
Change-Id: I546e688ad57a35b380f8d7f303ffc0c62773ac18
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2804813
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
d1462228
|
2021-03-09T11:25:36
|
|
Vulkan: Use VK_EXT_multisampled_render_to_single_sampled
Additionally, makes the emulation path not require
independentResolveNone. This was only used to select the NONE resolve
mode when the attachment format doesn't have either of depth or stencil
aspects, but it's ok to specify the same resolve mode for both aspects
even if one aspect is missing.
Bug: chromium:1088005
Change-Id: Ifc37cbf5331145179c5927853b996a0d62b871ee
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2743666
Reviewed-by: David Reveman <reveman@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
572fd801
|
2021-03-22T16:14:34
|
|
Vulkan: Rename Uniforms/XFB descriptor desc.
The new name is more consistent with the other names.
Refactoring change only.
Bug: angleproject:5736
Change-Id: Idc47fef29040e3a422267795c4536163a6f8eb4e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2779953
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
b717952e
|
2021-03-18T10:39:34
|
|
Vulkan: Use packed enum map for descriptor set index.
This simplifies a lot of the data structure indexing in the program
executable class. Also renames the "DriverUniforms" and
"InternalShader" index into a single "Internal" index.
Bug: angleproject:5736
Change-Id: I2a51d8b14d5b16b438dbe636f77b11bbc045ba9a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2773321
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
81dcf078
|
2021-03-08T11:21:31
|
|
Reland "Vulkan: Support EXT_sRGB_write_control"
This is a reland of 6073af536cf627742696823edc82c9b0a481a8bc
with 2 changes -
1. Don't enable the extension even in nonConformant mode
2. Don't enable VK_KHR_image_format_list for swiftshader
Original change's description:
> Vulkan: Support EXT_sRGB_write_control
>
> Implement support for EXT_sRGB_write_control. This extension
> requires VK_KHR_image_format_list to be supported.
>
> The spec requires this functionality to work with glBlitFramebuffer
> as well but support for that will be added in a follow up change.
> As such, this extension is only exposed in non-conformant mode.
>
> Bug: angleproject:5075
> Tests: SRGBFramebufferTest.*Vulkan*
> Change-Id: I59b38f6cd810a3d0d67ec29f4f19c25f65f70862
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2617243
> Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
> Reviewed-by: Jamie Madill <jmadill@chromium.org>
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Bug: angleproject:5075
Change-Id: I8e149d196a39c3c4769bfa8690792f3c53831299
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2762647
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
|
|
b27740f3
|
2021-03-09T16:15:15
|
|
Revert "Vulkan: Support EXT_sRGB_write_control"
This reverts commit 6073af536cf627742696823edc82c9b0a481a8bc.
Reason for revert: crbug.com/1186140
Original change's description:
> Vulkan: Support EXT_sRGB_write_control
>
> Implement support for EXT_sRGB_write_control. This extension
> requires VK_KHR_image_format_list to be supported.
>
> The spec requires this functionality to work with glBlitFramebuffer
> as well but support for that will be added in a follow up change.
> As such, this extension is only exposed in non-conformant mode.
>
> Bug: angleproject:5075
> Tests: SRGBFramebufferTest.*Vulkan*
> Change-Id: I59b38f6cd810a3d0d67ec29f4f19c25f65f70862
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2617243
> Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
> Reviewed-by: Jamie Madill <jmadill@chromium.org>
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Bug: angleproject:5075,chromium:1186140
Change-Id: Ib0d4d60fe7434fb950f99db2c210aab9af7d2d0e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2743663
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Peng Huang <penghuang@chromium.org>
|
|
6073af53
|
2021-03-08T11:21:31
|
|
Vulkan: Support EXT_sRGB_write_control
Implement support for EXT_sRGB_write_control. This extension
requires VK_KHR_image_format_list to be supported.
The spec requires this functionality to work with glBlitFramebuffer
as well but support for that will be added in a follow up change.
As such, this extension is only exposed in non-conformant mode.
Bug: angleproject:5075
Tests: SRGBFramebufferTest.*Vulkan*
Change-Id: I59b38f6cd810a3d0d67ec29f4f19c25f65f70862
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2617243
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
907a3cee
|
2021-02-17T08:07:45
|
|
Vulkan: Add support for EXT_shader_framebuffer_fetch_non_coherent
EXT_shader_framebuffer_fetch_non_coherent is implemented using subpass
input attachments. The extension will be enabled in a follow up change
that adds required changes to the Vulkan translator.
Bug: angleproject:5454
Test: FramebufferFetchNonCoherentES31.*Vulkan
Change-Id: Ic73c66a476c4a21db5269431166a198841f1dc0c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2598059
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
b912eec5
|
2020-11-27T11:08:41
|
|
Vulkan: Support GL_EXT_tessellation_shader.
Shader translator changes done in http://crrev.com/c/2633936
Adds a new DIRTY_BIT_PATCH_VERTICES state to Context.
Supportes state query and transform feedback.
4 test suppressions remain as follow-up fixes.
Adds a new varying packing mode for a simple Vulkan rule set.
Based on work by Mohan Maiya (m.maiya@samsung.com).
Test: dEQP-GLES31.functional.tessellation.*
Bug: angleproject:3572
Change-Id: I4cad2cca30adb754fd12c83027673906541f566a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2568234
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Mohan Maiya <m.maiya@samsung.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
d21d682d
|
2021-01-11T12:59:53
|
|
libstdc++: fix incomplete type for FramebufferCache
libstdc++ does not allow incomplete type for T2 with std::pair<T1,T2>
and fails with:
.../../src/libANGLE/renderer/vulkan/vk_cache_utils.h:1570:64:
required from here
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/include/g++-v9/bits/stl_pair.h:215:11:
error: std::pair<_T1, _T2>::second has incomplete type
215 | _T2 second; /// @c second is a copy of
the second object
| ^~~~~~
https://chromium-review.googlesource.com/c/angle/angle/+/2580111
added class FramebufferCache with incomplete type in |mPayload| to
vk::FramebufferHelper. Changing include order is not an option.
However, FramebufferCache is only used in FramebufferVk and we
can make it local there.
Bug: chromium:957519
Change-Id: I5fbdca23adbb9f4aecc266988c02fb0d051504cb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2621473
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
98b56e60
|
2020-12-12T16:28:21
|
|
Vulkan: Accumulate internal cache stats in renderer
The CacheStats of all internal caches are accumulated
by the renderer.
In order to see the hit ratios of all caches, the
following GN args must be enabled:
is_debug = true
angle_enable_perf_counter_output = true
Bug: angleproject:5447
Test: Manual verification with angle_end2end_tests
Change-Id: Iaca3249192e9e4e130d8291b7759c459d79b06ee
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2588430
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
46eaba7f
|
2020-12-12T10:31:26
|
|
Vulkan: Add support for internal cache hit and miss counts
Add a CacheStats class that provides cache hit and miss bookkeeping.
All internal caches make use of this class to keep track of its stats.
This provides a means to profile cache hit ratios a.k.a Vulkan object
reuse for any application.
Bug: angleproject:5447
Test: Manual verification with angle_end2end_tests
Change-Id: I44eeb0c2b9b291ec1cdd156fb2be4a5fe80d2848
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2580111
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
56330564
|
2020-12-10T00:46:04
|
|
Vulkan: Support layered framebuffers
This feature is introduced by geometry shaders, where all the layers of
a texture can be attached to a framebuffer. The geometry shader would
use gl_Layer to decide which layer the primitive should be rendered to.
Bug: angleproject:3571
Change-Id: Ib2ae8e227b226295f9e2f62f6b230839070bc95c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2582711
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
067a12f0
|
2020-11-19T16:47:25
|
|
Reland "Vulkan: Use specialization constant for halfRenderAreaWidth"
This is a reland of ff38106d62fca2e36ec2db1cd580b546fd53ae43
Original change's description:
> Vulkan: Use specialization constant for halfRenderAreaWidth
>
> halfRenderArea is used by fragment shader to adjust gl_FragCoord for
> rotation and yflip compensation. This CL bakes halfRenderAreaWidth into
> shader via specialization constant, thus allow compiler to consolidate
> the calculation into one MAD instruction.
>
> Bug: b/173800146
> Change-Id: Id66301278e3389e2582369b695825e632bccecee
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2551541
> Commit-Queue: Charlie Lao <cclao@google.com>
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> Reviewed-by: Tim Van Patten <timvp@google.com>
> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Bug: b/173800146
Change-Id: Ifc36086f4c5d6a44fb5456aa6e31bc8a783bba71
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2579648
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
c859c0ac
|
2020-11-24T17:21:38
|
|
Batch replace std::unordered_map with angle::HashMap in src/
There are a few places that will remain std::unordered_map due to build
or run-time errors, which will need to be evaluated more closely to
determine if they should remain std::unordered_map or if there is
another Abseil data structure that would be more efficient while still
working correctly.
Bug: angleproject:4873
Change-Id: Ib04253e3ad6398e63f4cc2bfe12c0f9e57cb112b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2558873
Commit-Queue: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
|
|
1ad5791d
|
2020-12-03T22:05:51
|
|
Revert "Vulkan: Use specialization constant for halfRenderAreaWidth"
This reverts commit ff38106d62fca2e36ec2db1cd580b546fd53ae43.
Reason for revert: Suspect that this CL may be causing win-angle-rel-32 bot failures
Original change's description:
> Vulkan: Use specialization constant for halfRenderAreaWidth
>
> halfRenderArea is used by fragment shader to adjust gl_FragCoord for
> rotation and yflip compensation. This CL bakes halfRenderAreaWidth into
> shader via specialization constant, thus allow compiler to consolidate
> the calculation into one MAD instruction.
>
> Bug: b/173800146
> Change-Id: Id66301278e3389e2582369b695825e632bccecee
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2551541
> Commit-Queue: Charlie Lao <cclao@google.com>
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> Reviewed-by: Tim Van Patten <timvp@google.com>
> Reviewed-by: Jamie Madill <jmadill@chromium.org>
TBR=timvp@google.com,syoussefi@chromium.org,jmadill@chromium.org,cclao@google.com
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: b/173800146
Change-Id: I7bc9966ebbe949f3999d7927afa629dd2e3a4187
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2572801
Reviewed-by: Ian Elliott <ianelliott@google.com>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Ian Elliott <ianelliott@google.com>
|
|
720b85e6
|
2020-12-01T20:45:29
|
|
Reland "Vulkan: Use specialization constant for halfRenderAreaWidth"
This reverts commit b1917fe1a314709cd9f7f53b2923d6be0e8bbf6c.
Reason for revert: Not the root cause. See bug.
Original change's description:
> Revert "Vulkan: Use specialization constant for halfRenderAreaWidth"
>
> This reverts commit ff38106d62fca2e36ec2db1cd580b546fd53ae43.
>
> Reason for revert: Speculative revert to clear up AMD. See bug.
>
> Bug: chromium:1154356
>
> Original change's description:
> > Vulkan: Use specialization constant for halfRenderAreaWidth
> >
> > halfRenderArea is used by fragment shader to adjust gl_FragCoord for
> > rotation and yflip compensation. This CL bakes halfRenderAreaWidth into
> > shader via specialization constant, thus allow compiler to consolidate
> > the calculation into one MAD instruction.
> >
> > Bug: b/173800146
> > Change-Id: Id66301278e3389e2582369b695825e632bccecee
> > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2551541
> > Commit-Queue: Charlie Lao <cclao@google.com>
> > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> > Reviewed-by: Tim Van Patten <timvp@google.com>
> > Reviewed-by: Jamie Madill <jmadill@chromium.org>
>
> TBR=timvp@google.com,syoussefi@chromium.org,jmadill@chromium.org,cclao@google.com
>
> Change-Id: Idab612bcad4f179857c41ffc4bf8fa2355fae946
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: b/173800146
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2568244
> Reviewed-by: Jamie Madill <jmadill@chromium.org>
> Commit-Queue: Jamie Madill <jmadill@chromium.org>
TBR=timvp@google.com,syoussefi@chromium.org,jmadill@chromium.org,cclao@google.com
# Not skipping CQ checks because this is a reland.
Bug: chromium:1154356
Bug: b/173800146
Change-Id: I5b86bbee8600c6597620f31d8d7b08ca8b3d2d57
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2568246
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
b1917fe1
|
2020-12-01T20:42:36
|
|
Revert "Vulkan: Use specialization constant for halfRenderAreaWidth"
This reverts commit ff38106d62fca2e36ec2db1cd580b546fd53ae43.
Reason for revert: Speculative revert to clear up AMD. See bug.
Bug: chromium:1154356
Original change's description:
> Vulkan: Use specialization constant for halfRenderAreaWidth
>
> halfRenderArea is used by fragment shader to adjust gl_FragCoord for
> rotation and yflip compensation. This CL bakes halfRenderAreaWidth into
> shader via specialization constant, thus allow compiler to consolidate
> the calculation into one MAD instruction.
>
> Bug: b/173800146
> Change-Id: Id66301278e3389e2582369b695825e632bccecee
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2551541
> Commit-Queue: Charlie Lao <cclao@google.com>
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> Reviewed-by: Tim Van Patten <timvp@google.com>
> Reviewed-by: Jamie Madill <jmadill@chromium.org>
TBR=timvp@google.com,syoussefi@chromium.org,jmadill@chromium.org,cclao@google.com
Change-Id: Idab612bcad4f179857c41ffc4bf8fa2355fae946
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: b/173800146
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2568244
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
ff38106d
|
2020-11-19T16:47:25
|
|
Vulkan: Use specialization constant for halfRenderAreaWidth
halfRenderArea is used by fragment shader to adjust gl_FragCoord for
rotation and yflip compensation. This CL bakes halfRenderAreaWidth into
shader via specialization constant, thus allow compiler to consolidate
the calculation into one MAD instruction.
Bug: b/173800146
Change-Id: Id66301278e3389e2582369b695825e632bccecee
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2551541
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
a5da17cd
|
2020-11-26T17:09:37
|
|
Vulkan: Remove vk:: inside namespace vk
Bug: angleproject:5404
Change-Id: I51df1ad69a65b17621a3cbe4e5d55621cc9ae6ec
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2562683
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
4e913d34
|
2020-11-02T10:44:51
|
|
Vulkan: Work around Nvidia depth clamping bug
In GL ES, depth is always clamped to [0,1].
The same is true in Vulkan, but not for implementations affected by
Nvidia bug 3171019. This patch implements a workaround.
The workaround introduced test failures on Linux with Nvidia Quadro P400
and driver version 418.56, so it's only applied conditionally, and as a
result the test failure expectations are not removed completely.
Bug: angleproject:3970
Change-Id: I0d9f855d7f3df72fea4af9f9b134ae3177cf820d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2514377
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
130597e1
|
2020-11-23T18:59:02
|
|
Vulkan: Use PackedScissor struct to reduce GraphicsPipelineDesc size
We are running out of space in GraphicsPipelineDesc. According to
gpuinfo, the max reported viewport size is 32768. This CL changes
scissor's x/y/w/h from uint32_t to uint16_t, which saves two uint32_t
for other usages.
Bug: b/173800146
Change-Id: Icf2d8ba8ea8a8c412ecef2059401a8d831c410e4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2557218
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
2ffff6d0
|
2020-11-12T10:56:06
|
|
Vulkan: Support image buffers
This change does not support reinterpreted formats yet. Additionally,
despite lack of support for RGB32 formats, EXT_texture_buffer is exposed
by this extension. Those formats don't support the STORAGE_TEXEL_BUFFER
feature on any known hardware.
Bug: angleproject:3573
Change-Id: I85f45eb23f6a0aa533488bb98d9f226d59af4d76
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2534395
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
86d7e4d8
|
2020-11-10T15:55:34
|
|
Vulkan: Support texture buffers
Texture buffers are placed in the same descriptor set with the rest of
the textures. However, the different code paths that handle textures
have special cases for texture buffers as they create a different
descriptor type (texel buffer instead of combined image sampler). Image
view serials are used to track the buffer view serials as well so the
texture descriptor cache can handle texture buffers as well.
This CL is missing storage texel buffer support.
Bug: angleproject:3573
Change-Id: Iff80ca22ff9b9957a0c9a3c7aaada1fa54b24ec8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2532653
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
b22f8e8e
|
2020-10-29T15:50:39
|
|
Vulkan: Add specialization constants for surface rotation
This plumbing through the specialization constant for surface rotation
from ContextVk to pipeline program creation. It has not been used yet,
so expecting no real functional change. This CL also converts
lineRasterEmulation to use the same specialization constant path as
surface rotation.
Bug: b/171750979
Change-Id: Ic08c4f8bb576424d1752015e874d0977a58d78bb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2508837
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Ian Elliott <ianelliott@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
55934550
|
2020-11-05T07:13:39
|
|
Vulkan: Don't refresh image views unnecessarily
If the underlying ICD supports VK_KHR_image_format_list
extension we will have created both the linear and sRGB
image views, reuse them instead of refreshing them.
Bug: angleproject:3609
Bug: angleproject:4561
Bug: angleproject:5281
Change-Id: Ie34f08b3554a07f94911bebf925e38d702bc3c36
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2518387
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
|
|
3fcf17e6
|
2020-11-02T12:51:35
|
|
Vulkan: Bug fix in sRGBDecode logic
When a sampler's GL_TEXTURE_SRGB_DECODE_EXT state
was toggled between GL_DECODE_EXT and GL_SKIP_DECODE_EXT
VkImageViews of the TextureVk object were not being updated.
Add sRGB_decode state as part of ImageViewSubresourceSerial
so we retrieve the correct VkImageView from the texture cache.
Bug: angleproject:3609
Tests: angle_end2end_tests
--gtest_filter=SRGBTextureTestES3.SRGBDecodeSamplerParameterToggle*Vulkan
Change-Id: I897e461957d408b5a5b4f03fefc05f2e9684c7b7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2514900
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
16102e8b
|
2020-10-17T01:15:05
|
|
Reland "Vulkan: Fold deferred clears into current clears"
This reverts commit 37c400146e59f718b516eb58e16fa53c8a88bf21.
Reason for revert: Need to clear the package cache when bisecting.
Original change's description:
> Revert "Vulkan: Fold deferred clears into current clears"
>
> This reverts commit e416c92a81c9ef01d633ec5c05e81c2551b6c5d6.
>
> Reason for revert: Reverted parent:
> https://chromium-review.googlesource.com/c/angle/angle/+/2481612
>
> Original change's description:
> > Vulkan: Fold deferred clears into current clears
> >
> > If there are clears prior to a glClear() call, those clears were
> > flushed (starting a new render pass) and then the clear call's clears
> > would be applied (essentially modifying the loadOps of said render
> > pass).
> >
> > The main downside of the above is that the current glClear() clears
> > don't get a chance to be deferred. This was observed in Chrome which
> > clears an attachment with an emulated format, then switches
> > framebuffers.
> >
> > Additionally, if the render pass had already been started, the deferred
> > clears could have become inlined instead of breaking the render pass.
> > Although, it's unlikely for there to be deferred clears when the render
> > pass is already open.
> >
> > This change first identifies which clears need to go through the draw
> > path (scissored, masked or as workaround for driver bug). It merges the
> > rest of the clears (that don't need the draw path) with the deferred
> > clears. It then checks deferred clears and applies them by either:
> >
> > - vkCmdClearAttachments if mid RP
> > - Start a new render pass and use loadOps, if any draw-based clear needs
> > to follow.
> > - Modify current RP loadOps / defer the clear
> >
> > Afterwards, the draw-based clears are applied.
> >
> > Bug: angleproject:4836
> > Change-Id: Id4992c78983b199734508c9d4bb18ed3195c91ec
> > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2455167
> > Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
> > Reviewed-by: Jamie Madill <jmadill@chromium.org>
> > Reviewed-by: Charlie Lao <cclao@google.com>
>
> TBR=syoussefi@chromium.org,jmadill@chromium.org,cclao@google.com
>
> Change-Id: I85733b3594409df9b96e3d5b34933522c97c42cf
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: angleproject:4836
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2481613
> Reviewed-by: Tim Van Patten <timvp@google.com>
> Commit-Queue: Tim Van Patten <timvp@google.com>
TBR=timvp@google.com,syoussefi@chromium.org,jmadill@chromium.org,cclao@google.com
# Not skipping CQ checks because this is a reland.
Bug: angleproject:4836
Change-Id: I702cd510f39ee46feab27d4efbf61ae5da10d4e2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2481856
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Tim Van Patten <timvp@google.com>
|
|
37c40014
|
2020-10-16T22:19:20
|
|
Revert "Vulkan: Fold deferred clears into current clears"
This reverts commit e416c92a81c9ef01d633ec5c05e81c2551b6c5d6.
Reason for revert: Reverted parent:
https://chromium-review.googlesource.com/c/angle/angle/+/2481612
Original change's description:
> Vulkan: Fold deferred clears into current clears
>
> If there are clears prior to a glClear() call, those clears were
> flushed (starting a new render pass) and then the clear call's clears
> would be applied (essentially modifying the loadOps of said render
> pass).
>
> The main downside of the above is that the current glClear() clears
> don't get a chance to be deferred. This was observed in Chrome which
> clears an attachment with an emulated format, then switches
> framebuffers.
>
> Additionally, if the render pass had already been started, the deferred
> clears could have become inlined instead of breaking the render pass.
> Although, it's unlikely for there to be deferred clears when the render
> pass is already open.
>
> This change first identifies which clears need to go through the draw
> path (scissored, masked or as workaround for driver bug). It merges the
> rest of the clears (that don't need the draw path) with the deferred
> clears. It then checks deferred clears and applies them by either:
>
> - vkCmdClearAttachments if mid RP
> - Start a new render pass and use loadOps, if any draw-based clear needs
> to follow.
> - Modify current RP loadOps / defer the clear
>
> Afterwards, the draw-based clears are applied.
>
> Bug: angleproject:4836
> Change-Id: Id4992c78983b199734508c9d4bb18ed3195c91ec
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2455167
> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
> Reviewed-by: Jamie Madill <jmadill@chromium.org>
> Reviewed-by: Charlie Lao <cclao@google.com>
TBR=syoussefi@chromium.org,jmadill@chromium.org,cclao@google.com
Change-Id: I85733b3594409df9b96e3d5b34933522c97c42cf
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: angleproject:4836
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2481613
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Tim Van Patten <timvp@google.com>
|
|
e416c92a
|
2020-10-06T23:29:02
|
|
Vulkan: Fold deferred clears into current clears
If there are clears prior to a glClear() call, those clears were
flushed (starting a new render pass) and then the clear call's clears
would be applied (essentially modifying the loadOps of said render
pass).
The main downside of the above is that the current glClear() clears
don't get a chance to be deferred. This was observed in Chrome which
clears an attachment with an emulated format, then switches
framebuffers.
Additionally, if the render pass had already been started, the deferred
clears could have become inlined instead of breaking the render pass.
Although, it's unlikely for there to be deferred clears when the render
pass is already open.
This change first identifies which clears need to go through the draw
path (scissored, masked or as workaround for driver bug). It merges the
rest of the clears (that don't need the draw path) with the deferred
clears. It then checks deferred clears and applies them by either:
- vkCmdClearAttachments if mid RP
- Start a new render pass and use loadOps, if any draw-based clear needs
to follow.
- Modify current RP loadOps / defer the clear
Afterwards, the draw-based clears are applied.
Bug: angleproject:4836
Change-Id: Id4992c78983b199734508c9d4bb18ed3195c91ec
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2455167
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
|
|
f51e99fb
|
2020-10-13T11:38:28
|
|
Vulkan: Remove serial from RenderPassHelper
We don't delete RenderPass's so no need to keep a serial.
This simplifies things for coming threading code.
Bug: b/169788986
Change-Id: I2577b17bc1f6af163725389589d7cd62d09eea13
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2468538
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
|
|
df8f71d1
|
2020-10-09T15:27:28
|
|
Vulkan: Don't break the render pass on scissored clears
clearImmediatelyWithRenderPassOp is removed and the draw path is used
for the scissor. That path was added to avoid creating a large number
of graphics pipelines due to the scissor state. This is now done by
using dynamic state for scissor in the draw path for clear.
Running the following dEQP tests without and with dynamic state for
scissor:
dEQP-GLES3.functional.fragment_ops.depth_stencil.stencil_ops.*
the number of graphics pipelines is reduced from 95392 to 16.
Bug: angleproject:4617
Bug: angleproject:4836
Change-Id: Ib373d8cd23ca2b67e6fd26aa2a1103f281f7e473
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2463985
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
df6b7298
|
2020-10-12T13:39:09
|
|
Vulkan: Use StoreOp_None_QCOM for read only depth stencil buffer
For read only depth stencil buffers, there is no need to store depth or
stencil value. But we can not use DontCare for storeOp because vulkan
core spec says DontCare indicates data is undefined after this.
VK_QCOM_render_pass_store_ops extension introduces a new store op that
will leave data defined but skip the store. This CL utilize this if the
extension is available.
Bug: angleproject:5055
Change-Id: I104f3d01eb342a2d0cc900f342430e901bde1bff
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2462604
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
4c6903a4
|
2020-10-12T13:39:09
|
|
Vulkan: Expand PackedAttachmentOpsDesc from uint16_t to two uint16_ts
This is preparation for crrev.com/c/2462604. We run out of bits in the
struct PackedAttachmentOpsDesc. This expands it from 16 bits to 32 bits
(two uint16_t), gives us a lot more room for current and future needs.
Bug: angleproject:5055
Change-Id: I492cbd18c3b71b76b5b48652094409e76c5721b1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2465615
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
f8070feb
|
2020-10-09T11:03:29
|
|
Vulkan: Use depthClamp to clear depth where available
This will avoid breaking render pass if clearing depth in clearWithDraw.
Bug: angleproject:4836
Change-Id: I50242d1115efc91059923143f6ae5fd25fb3d36f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2462717
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
5081f89b
|
2020-10-02T01:15:37
|
|
Vulkan: Support invalidate of MSRTT attachments
Invalidate was previously affecting only the storeOp of the color and
depth/stencil attachments. With multisampled-render-to-texture
attachments, the storeOp of the resolve attachments were not being
affected.
This change implements the latter, attempting to remove the attachment
altogether if possible. With MSRTT depth/stencil buffers, this makes
possible the ability to never write depth/stencil data to memory.
Bug: angleproject:4836
Change-Id: I53599e2f4ed6c390dfd03bf226274f6f53f438bb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2437506
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
887b1346
|
2020-10-02T01:12:01
|
|
Vulkan: Add resolve/unresolve counters
With this change, render-pass-related counters are calculated at render
pass creation time and stored alongside the render pass handle (and
serial) in the render pass cache. On every use, the render pass'
counters are accumulated over the global counters.
Additionally, this change adds MSRTT resolve and unresolve counters to
render pass counters.
Bug: angleproject:4836
Change-Id: If15a789e5a7d66c7ea5a2315bc76fe045ce57491
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2444099
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
22ed1e59
|
2020-10-05T17:59:27
|
|
Vulkan: Remove depth stencil access out of RenderPassDesc
Vulkan spec says that image layout is not counted toward render pass
compatibility:
"Two render passes are compatible if their corresponding color, input,
resolve, and depth/stencil attachment references are compatible and if
they are otherwise identical except for: Initial and final image layout
in attachment descriptions Image layout in attachment references"
This CL removes the depth stencil access mode information out of
RenderPassDesc structure. It is essentially partially reverted the
change from crrev.com/c/2354280
Bug: b/170134600
Change-Id: Iada4d89c3249489b47db3046952e7cb10f252891
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2451597
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
d5fa6ea9
|
2020-04-29T04:13:54
|
|
Vulkan: Implement OES_draw_buffers_indexed
Bug: angleproject:4394
Change-Id: I7db9c695c233b2daf740acc654b1b2e546a8b681
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2172739
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
9f5eb0b8
|
2020-10-05T08:18:05
|
|
Vulkan: Add OES_sample_shading extension support
Support OES_sample_shading extension if the underlying
Vulkan ICD supports sampleRateShading.
Bug: angleproject:3587
Tests: dEQP-GLES31.functional.sample_shading.*
Change-Id: I1b324c1ad3ea3b2157d3cbe0abcdf7085aa4231b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2444213
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
c5494728
|
2020-10-02T00:55:28
|
|
Vulkan: Free up 2 bits in PackedAttachmentOpsDesc
These bits will be used to aid in invalidation of
multisampled-render-to-texture attachments.
Bug: angleproject:4836
Change-Id: Ib2b438386f8cd8c057bc0ef16144b9d2ddbc1594
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2444097
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
2f3d18f2
|
2020-10-01T05:58:44
|
|
Vulkan: Fix unresolve disagreement between FB and RP
FramebufferVk::updateRenderPass reset the render pass description, but
not the framebuffer description. This caused a disagreement between the
two regarding which attachments need to be unresolved. Later,
FramebufferVk::startNewRenderPass could miscalculate whether a new
framebuffer needs to be generated based on changes in unresolve
attachments.
For example:
- say in the first render pass color needs to be unresolved. Both RP
and FB desc would remember this (each being keys for their respective
caches).
- A following operation triggers syncState such that FB desc changes
(for example rebind of attachment), which cleared RP desc but not FB
desc's unresolve attachment state.
- If the next render pass does not require an unresolve (for example due
to a clear or invalidate), then the framebuffer is not recreated
because according to RP desc at the start and end of
FramebufferVk::startNewRenderPass there has been no change in
unresolve mask.
* At start there's no unresolve because of syncState clearing it.
* At end there's no unresolve because there's no need for unresolve.
- In the end, the framebuffer used for the first render pass would be
used for the second render pass as well. Note that:
* The first render pass included an unresolve, i.e. two subpasses.
* The second render pass requires one subpass according to its RP
desc.
It's quite easy to accidentally have the framebuffer correctly recreated
(based on the reset RP desc) before FramebufferVk::startNewRenderPass.
Note that since syncState has called updateRenderPass, FB desc has
necessarily changed, and mFramebuffer is nullptr, so any call to
FramebufferVk::getFramebuffer would recreate the framebuffer.
Both clear and invalidate call FramebufferVk::getFramebuffer.
The issue is reproducible in situations where clear/invalidate has been
called before the framebuffer is modified, and then draw is issued after
the modification. An ASSERT is added to catch discrepencies between RP
desc and FB desc to catch bugs even when the issue doesn't manifest
itself as a VVL error.
Bug: angleproject:4836
Change-Id: I8a0d116402a6c298377d03e0908baa942019ccd5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2442379
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
01641c7a
|
2020-09-30T15:25:28
|
|
Vulkan: Fix UtilsVk clear in non-zero subpass
Mid-render-pass clears (through UtilsVk) run on the current subpass,
which in the presence of multisampled-render-to-texture unresolve
would be subpass 1. The graphics pipeline for that draw call should
set the correct subpass index.
Bug: angleproject:4836
Change-Id: Iba4a03ea96a63b0f5d09c27e5283ff8a8b534e05
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2441509
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
43163491
|
2020-09-22T11:45:06
|
|
Vulkan: Unresolve depth/stencil MSRTT attachments
Using the same shader that unresolves color, this change allows
depth/stencil to be unresolved as well.
In turn, this allows the depth and stencil loadOp/storeOp of the
implicit multisampled image associated with a
multisampled-render-to-texture renderbuffer to be set to DONT_CARE.
Stencil unresolve depends on VK_EXT_shader_stencil_export. In the
absence of this extension, the stencil aspect is not unresolved and must
continue to use loadOp=LOAD and storeOp=STORE. This is not ideal, but
the expected use-case of depth/stencil MSRTT renderbuffers is that they
get invalidated, so that load and store wouldn't happen in practice.
Bug: angleproject:4836
Change-Id: I9939d1e15e10fa8ed285acdd6fe6edb42c59054f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2427049
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
ae24f28a
|
2020-09-22T17:33:32
|
|
Vulkan: Move mReadOnlyDepth out of FramebufferDesc
The depth read only or not should not affect VkFramebuffer creation.
RenderPasses with just depthstencil layout differences are considered
compatible. This CL moves this out of FramebufferDesc into
FramebufferVk.
Bug: b/168953278
Change-Id: I5bd05b262b7b3b0dc70f9fb8fc4a3db5e7082916
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2425032
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
d59bccb5
|
2020-09-23T10:20:35
|
|
Vulkan: updateRenderPassDesc may lose color attachment data
FramebufferVk::updateRenderPassDesc() is resetting entire
mRenderPassDesc, which may lose color unresolve attachments. This CL
makes sure that when we toggle depth stencil buffer's read/write access,
we do not reset the whole mRenderPassDesc. Instead we only update the
depth stencil attachment's access.
Bug: b/168953278
Change-Id: Ia9df2d8ac81ebf2da8a360ba1293faf6c14b2738
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2426468
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
a76b6836
|
2020-09-17T22:40:42
|
|
Vulkan: Support MSRTT depth/stencil resolve
VK_KHR_depth_stencil_resolve is used by this change to resolve
depth/stencil multisampled-render-to-texture renderbuffers.
This extension is not widely supported yet. If it's not present, the
depth/stencil resolve operation is silently ignored and the renderbuffer
acts as a normal multisampled one. This is not correct, but our primary
user (Chrome), and most applications don't care for the resolved
depth/stencil data. In fact, it's recommended for the depth/stencil
attachment to be invalidated after rendering.
Exposing EXT_multisampled_render_to_texture even in the absence of
depth/stencil resolve allows the majority of the applications to still
take advantage of MSRTT color attachments.
Bug: angleproject:4836
Change-Id: I6ba4187344a0c9330d2c77bdc5e2c6fc5483c299
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2417645
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
f0b02054
|
2020-08-06T20:55:05
|
|
Add a Vulkan feature to compress float32 vertex formats.
Use the vertex conversion pipeline in VertexArrayVk to detect
static vertex data and convert float32 vertices to float16. This
feature is useful for determining if an allication is vertex
bandwidth bound and seeing what gains could be had by using smaller
attributes.
This feature could be implemented in ANGLE's frontend but new
infrastructure for converting and storing the converted attributes
would need to be added to gl::VertexArray. Our backends already
have the functionality needed to handle unsupported attribute formats
and this can be repurposed for compressing vertex formats.
Bug: b/167404532
Bug: b/161716126
Change-Id: I9a09656a72e8499faa4124adf876d7261c8341c9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2342285
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
49f01a53
|
2020-09-18T11:38:14
|
|
Vulkan: Add features to modify sampling parameters
Add features to optionally increase the LoD offset of all sampling
operations or disable linear filtering. These can be used to compare
performance without recompiling ANGLE.
These features could be potentially implemented in the frontend it is
more difficult because the features are not available at texture
initialization time.
Bug: b/167404532
Change-Id: Ifcf56fbcf130c24c54834737733bbffa5ade3959
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2411475
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
ed899835
|
2020-09-11T21:21:55
|
|
Vulkan: Allocate descriptor pools with layouts
Descriptor set layouts and pools are very tightly coupled, since their
binding types and counts must match to ensure the number of available
descriptor sets within a pool remains accurate. To enforce this, the
descriptor pools will now keep a copy of the VkDescriptorSetLayout that
the pool was created for, which is verified when a descriptor set is
allocated from the pool. If the handles don't match, an ASSERT() will
fire.
Bug: angleproject:5033
Test: CQ
Change-Id: I4faf82c24f31052e57b656c968788bb0c131b619
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2407282
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Tim Van Patten <timvp@google.com>
|
|
f39e0f01
|
2020-09-07T23:07:37
|
|
Vulkan: Use subpass to unresolve render-to-texture attachments
GL_EXT_multisampled_render_to_texture allows singlesampled textures to
be used with multisampled framebuffers in such a way that the final
resolve operation is automatically done. In Vulkan terminology, the
render-to-texture GL attachment is used as a Vulkan subpass resolve
attachment with an implicit (ideally-)lazy-memory multisampled image as
the color attachment.
This extension expects that if the texture is drawn to after the
automatic resolve, the implicit multisampled image would take its
fragment colors from the singlesampled image. In other words, the
opposite of a resolve operation should be automatically performed at the
start of the render pass. This change refers to this operation as
"unresolve".
The goal of this extension is to allow tiling GPUs to always keep
multisampled data on tile memory and only ever load/store singlesampled
data. The latter is achieved by using a subpass resolve attachment and
setting storeOp of the multisampled color attachment to DONT_CARE. This
change achieves the former by using an initial subpass that uses the
resolve attachment as input attachment, draws into the multisampled
color attachment and sets loadOp of said attachment to DONT_CARE.
Bug: angleproject:4881
Change-Id: I99f410530365963567c77a7d62fc9db1500e5e3e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2397206
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|