|
4ba4af61
|
2023-08-17T11:28:18
|
|
Revert recompile blocking on link
Causing timeouts on some platforms. An alternative implementation will
follow.
This change also reverts two changes that depend on it:
Vulkan: Move SPIR-V set up to link job
10f54902e816fa7e4cf314384e00590e2b9bfa1d.
Vulkan: Move default uniform init to link job
d8cd4dcdc9c55c88f030f7fca41357e99e600ed2.
Bug: angleproject:8297
Change-Id: I9a258460e7bcaeac214be5e63c16c20681e0bcde
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4789843
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
|
|
10f54902
|
2023-08-09T17:21:20
|
|
Vulkan: Move SPIR-V set up to link job
Bug: angleproject:8297
Change-Id: I2c7eb0281d181560c8fa3ace007b1e547b6cf18e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4764619
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
|
|
d8cd4dcd
|
2023-08-09T16:51:13
|
|
Vulkan: Move default uniform init to link job
Bug: angleproject:8297
Change-Id: I5bab916f452439d92afa65b9172574000ee0b587
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4762838
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
|
|
16cfa28e
|
2023-08-08T22:08:24
|
|
Vulkan: Basic infra for parallel link
This change moves pipeline warm up to a parallelizable task, mostly as
an exercise to put in the infrastructure for parallel link in the Vulkan
backend. Follow up changes will move more of the link step to this
task.
The end goal is to be able to make the link task independent of
ContextVk, which would allow it to be run as an UnlockedTailCall, even
if not using a worker thread.
Bug: angleproject:8297
Change-Id: I17047162b2a41f0d681d9e3ee33f2e0239b4280d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4764231
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
02292814
|
2023-06-01T14:46:05
|
|
Vulkan: Optimize the usage of FastMap in DescriptorSetDescBuilder
While looking at disassemble of
DescriptorSetDescBuilder::updateOneShaderBuffer() function, I noticed
that there are a lot of CPU cycles spent in FastMap::operator[]. What
happend here is that we are increasing size one by one as we build
descriptorSet, and that hit `if (mData.size() <= key)` case and we end
up resize the underline FastVector, and that resize also initialize the
element with zeros, which immediately overwrite by actual data. Since we
actually know the eventual size of
DescriptorSetDescBuilder::mDesc/mHandles/mDynamicOffsets, we could just
switch to angle::FastVector which will avoid this check size and grow
every time we write to it. This CL switches the use of FastMap in
DescriptorSetDescBuilder to FastVector. The only trick we need to watch
out is that previously the new elements are always zero filled and now
it does not. So we need to make sure we write every field of structure.
This CL also renames WriteDescriptorDescBuilder to WriteDescriptorDescs
since when it is read only we are passing it as const reference already,
there is no added advantage to have two classes.
Bug: b/282194402
Change-Id: I06a063cc51585fc17fbf0d5aa916b9aa0ab88dd4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4581881
Reviewed-by: Roman Lavrov <romanl@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
b5f87c04
|
2023-06-20T20:22:15
|
|
Vulkan: Simplify shader interface variable map
The shader interface variable map had a "resource index" -> info map to
optimize descriptor set building. That avoided hashing the resource
name when the rest of the map was name-based.
With the map using SPIR-V ids now, there is no reason to maintain this
map; SPIR-V ids can be used to look up the info just as efficiently.
Bug: angleproject:7220
Change-Id: I619783dce558a59184955cc314c1f41e6733f1b7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4630728
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
|
|
c1ba8e6f
|
2023-06-20T16:03:20
|
|
Vulkan: Flatten shader interface variable maps
This change removes duplicate entries added in the shader shader
interface variable maps. One level of arrayness (indexed by shader
type) is removed from these maps as now there is only a single entry
per linked resource/etc.
Bug: angleproject:7220
Change-Id: Ibf2d06a0e1f68e68797c2066f36e14cb9e667f77
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4628677
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
bbcf54bc
|
2023-06-16T16:02:08
|
|
Vulkan: Refactor uniform/block binding duplication code
Previously, resource binding assignment was done as such:
```
for each shader stage
assign bindings to textures
assign bindings to blocks
assign bindings to images
etc
```
To deduplicate bindings when the same resource was used in multiple
stages, a map was used, keyed by the resource's name, to detect when an
already visited resource is encountered in a future stage. This was
both inefficient and unnecessarily complicated.
With this change, resource binding assignment is done as such:
```
for each texture
assign one binding to all shader stages
for each block
assign one binding to all shader stages
for each image
assign one binding to all shader stages
etc
```
The aforementioned map is removed.
Because the resource bindings are now changed, the rest of the code
(which sets up the pipeline layout, updates descriptor sets, sets
dynamic buffer offsets, etc) are all updated to follow the above
pattern. As a result, nested loops are avoided and duplicate entries in
the variable map are never visited.
Bug: angleproject:7220
Change-Id: Iaff7b5f8b2bada8ac5078d21e5c790bf0d27aca7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4622011
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
|
|
e21ecd1b
|
2023-05-26T14:06:46
|
|
Vulkan: Add dirty bit processing for uniform buffer change
When app calls glBufferData for the uniform buffer, we may end up
reallocate the storage. This will set DIRTY_BIT_UNIFORM_BUFFER_BINDINGS
on the context, but the exact uniform block index gets lost along the
way. This CL sets mDirtyBits on the program for the corresponding block
index and then changed vulkan backend to utilize the program's
mDirtyBits and only update the buffer if it is dirty, instead of always
update all uniform buffers even if only one of the buffer is dirty. In
order to make this work, this CL also adds the reverse tracking from
buffer binding to uniform blocks. Previously we already have the
tracking of which buffer binding index is used for which buffer block
index. This CL adds mUniformBlockBindingMasks which is an array of
BitSets. Each array element tracks all the uniform block index that is
using this buffer binding index (you can have the same buffer bound to
multiple uniform block index). Then when a buffer binding index is
dirty, that BitSet gets added into program's uniform block dirty bits.
This CL and previous CL improves GfxBench gl_driver2_off score 1.8%
(from average 6797 to average 6919) on pixel 7 pro.
Bug: b/282194402
Change-Id: Ic5002643a5297907276fc9b20ca7d21af9bdc4fe
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4553136
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Roman Lavrov <romanl@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
93eee5d2
|
2023-05-18T16:33:25
|
|
Vulkan: Add the Sample decoration when sample shading
The Vulkan spec was clarified that per-sample interpolation is not
necessarily done when sample shading is enabled in the API. In this
change, a SPIR-V transformation is added to add the Sample decoration to
whatever varying is missing it when sample shading is enabled in the
API.
Bug: b/283017896
Change-Id: I121c740add6fc015c9140e6a04d37ea5300c8e57
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4544591
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
|
|
297687c6
|
2023-05-18T17:27:54
|
|
Vulkan: Reduce CPU overhead for uniform buffer change
One of the common usage pattern is change uniform buffers and draw.
Right now every uniform buffer change goes into ShaderResource dirty
code path that rebuilds entire ShaderResource cache key and descriptor
set etc. This CL keeps SHaderResource dirty code path, and will be used
when program changes or framebuffer changes. But uniform buffer change
will go down its own code path that only update uniform buffer related
state.
This CL along with prior two CLs reduced asphalt_9 average frame time
(with multi context hacked away) from 5.375 ms to 5.2594 ms (reduced
2.15%).
Bug: b/282194402
Change-Id: Ibae2895663918ddc10bf13bc559f1483f94d2e11
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4528314
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Roman Lavrov <romanl@google.com>
|
|
9445fbbe
|
2023-05-16T10:43:55
|
|
Vulkan: Move mWriteDescriptors out of DescriptorSetDescBuilder
DescriptorSetDescBuilder has two data structures: mWriteDescriptors,
which keeps track of "layout" of descriptorSet, and mDescriptorInfos,
which is the actual cache key for descriptorSet. mDescriptorInfos will
be updated every time buffer or image changes. But mWriteDescriptors is
immutable with buffer/image, it is static per program executable (with
exception of InputAttachment). Right now whenever there is a buffer or
image change, we call into DescriptorSetDescBuilder and update both
mWriteDescriptors and mDescriptorInfos. This CL moves mWriteDescriptors
out of DescriptorSetDescBuilder, and stores it in ProgramExecutableVk.
To deal with InputAttachment variation, ContextVk makes a copy of
mWriteDescriptors when program is bound, and then update inputAttachment
with framebuffer information. This not only removes unnecessary update
of mWriteDescriptors, but also removes the requirement that
mShaderBuffersDescriptorDesc has to reset and rebuild as a whole
(because mWriteDescriptors keeps mCurrentInfoIndex which gets
incremented as we build). This allows us to do further optimization in
future to do piece meal update of mDescriptorInfos with only the changed
data.
Bug: b/282194402
Change-Id: I443c7c3b85b7a2e2e93c68d40ea102533c43f76a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4540280
Reviewed-by: Roman Lavrov <romanl@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
2c836045
|
2023-05-18T12:00:41
|
|
Vulkan: Remove buffer/image tracking from DescriptorSetDescBuilder
Right now DescriptorSetDescBuilder keeps an array of images and buffers
as we build DescriptorSet cache key. Later on if we have a cache miss
and allocated a new cache entry, we walk the array and tag the images
and buffers with newSharedCacheKey. If we have a cache hit, the tracked
images/buffers are unused and then cleared. This means the effort of
keep track of these buffers are wasted when we have cache hit, which we
expect to be most likely. This was initially implemented this way simply
because of convenience, but there is really not a need to add another
tracker for them, as they are readily available from context state
anyway. This CL remove the tracking of images/buffers from
DescriptorSetDescBuilder and replaced with context API to tag images and
buffers with newSharedCacheKeywhen when we have a cache miss.
Bug: b/282194402
Change-Id: I355c2fbabdfc573ce71c0a4281788c942d260271
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4539290
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Roman Lavrov <romanl@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
8b9440b6
|
2023-05-01T15:31:01
|
|
Vulkan: add option to control pipeline cache data compression.
Bug: b/258207403
Change-Id: I487b1cadbacfa2f7ee889a8f58278307a126a391
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4497248
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Hailin Zhang <hailinzhang@google.com>
|
|
40c17b58
|
2022-12-13T15:35:23
|
|
Vulkan: Move SPIR-V transform to vulkan/
No longer used by metal/.
Bug: angleproject:7220
Change-Id: Idb3a6369fefbcf87e7993daa652c8702ec53c20f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4104002
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Yuxin Hu <yuxinhu@google.com>
|
|
a1be7188
|
2022-12-12T16:11:34
|
|
Vulkan: Keep referenced pipeline libraries alive
As required by the spec, it's not enough to keep the linked pipeline
alive. With this change, the serials of the invidual libraries are
updated every time the serial of a linked pipeline is updated.
Bug: angleproject:7369
Change-Id: Iedc98a427d988d00b4e8745964d9827fdf51ea7f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4098744
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
bd79968a
|
2022-12-02T14:17:14
|
|
Vulkan: Make sure program's pipeline cache is created
The condition to create or use the program's pipeline cache has become
quite complicated. This change simplifies things by making sure the
pipeline cache is created if and when it's used, instead of guessing how
it will be used and pre-create it.
Bug: angleproject:7369
Change-Id: I7f3558e55f391da8c701e359d2f88d248c820de4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4076508
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
6384f76b
|
2022-11-16T21:47:04
|
|
Vulkan: Move PipelineCacheAccess to namespace vk
In preparation for a change that uses it in that namespace.
Bug: angleproject:7369
Change-Id: Icc75b8839d702fd3e6d3d00c1d8f81619cdd89cc
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4031150
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
3db679eb
|
2022-11-22T10:37:31
|
|
Revert "Vulkan: Remove useRelaxedPrecision" and "Vulkan: remove SpirvVaryingPrecisionFixer"
This reverts commit cb618b3d42d9013c48b5aa233efc4d80a9c4efa4
and commit 427086a9c7612da7325cb36054859a929c3727d5
Reason for revert: IMG reported that they need to keep the
"precision qualifier matching" feature to make triangle clipping
work properly, because the clipping needs to to know the decoration
in vertex shader output in order to sort the data correctly for
clipping.
Original change's description:
> Vulkan: Remove useRelaxedPrecision
>
> Bug: angleproject:7488
> Change-Id: I30ca3e2740d8810a01615ca778eb072d77ad34d9
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3856658
> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Original change's description:
> Vulkan: remove SpirvVaryingPrecisionFixer
>
> Bug: angleproject:7488
> Change-Id: I957839bd8fbdf1cd849d5ed7e9edd65fd1a5f2cb
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3780874
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> Commit-Queue: Yuxin Hu <yuxinhu@google.com>
Bug: angleproject:7488
Change-Id: I90b584cbc549a663bca734a59d135a1d1d5bcbfc
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4049421
Commit-Queue: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
68b47e58
|
2022-11-16T10:46:59
|
|
Vulkan: Initial support for VK_EXT_graphics_pipeline_library
When available, this change uses VK_EXT_graphics_pipeline_library to
create pipelines. Currently, it is only used when
graphicsPipelineLibraryFastLinking is available. This restricts the use
of this extension to devices where monolithic pipelines are not any more
performant than linked libraries.
A future change adds support for other implementations by providing
async pipeline creation.
Bug: angleproject:7369
Change-Id: I1e3b7ac4aa56e75c7d6f4d0d5ea91cb0b862e581
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4031489
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Reviewed-by: Steven Noonan <steven@valvesoftware.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
71d28a9b
|
2022-11-02T13:19:20
|
|
Vulkan: Remove unused ShaderAndSerial
The serial in the ShaderAndSerial is unused. This CL removed
ShaderAndSerial and replaced with ShaderModule directly.
Bug: b/257116399
Change-Id: I50d42af7818a12888309a80423531d75135e0bfd
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3998747
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
adde4265
|
2022-10-19T23:33:48
|
|
Vulkan: Separate pipeline cache query and insertion
In preparation for VK_EXT_graphics_pipeline_library usage, the query and
insertion functions of the graphics pipeline cache are separated. This
will allow the implementation using VK_EXT_graphics_pipeline_library to
query the monolithic pipeline cache, and if a pipeline is not found,
create it through the pipeline library caches.
Bug: angleproject:7369
Change-Id: Iebf7669ae3ea95e180646198c4861cc59d67e580
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3963854
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
|
|
7b4b56f0
|
2022-10-19T00:05:22
|
|
Vulkan: Missing output mask in GraphicsPipelineDesc
Currently, there's some program state used in creating pipelines
alongside what's in GraphicsPipelineDesc. This works because the
pipeline cache lives in the program executable.
With VK_EXT_graphics_pipeline_library however, we could create vertex
input and fragment output partial pipelines that are independent from
and are shared between multiple programs. To support this, any program
state that's necessary for pipeline creation should be part of the
GraphicsPipelineDesc structure.
This change places the state affecting fragment output in
GraphicsPipelineDesc.
Bug: angleproject:7369
Change-Id: I2e48fc9da220475e1b2ed376fc947ce13489610e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3963652
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
|
|
b521be4c
|
2022-10-14T23:09:26
|
|
Vulkan: Decouple shader-set from pipeline caches
In preparation for VK_EXT_graphics_pipeline_library, where different
pipeline caches (for the complete pipelines and the shaders subset
partial pipelines) may create pipelines from the same shader set, the
pipeline caches are pulled out of ShaderProgramHelper. In an upcoming
change, ProgramExecutableVk will have more than one
GraphicsPipelineCache instance, both creating pipelines through the same
ShaderProgramHelper.
The pipeline creation methods in ShaderProgramHelper are now const.
This means a thread would be able to create pipelines using an object of
this class while the main thread creates other pipelines using the same
object, but in a different pipeline cache.
Bug: angleproject:7369
Change-Id: Ib8a76dedf1105ba9dfcad9e972157c92ba18e349
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3956944
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
1abeeaae
|
2022-09-28T12:22:58
|
|
GLES1/Vulkan: Remove double SPIR-V validation assertion
The SPIR-V transformation is validated on program link because many
tests link programs but don't draw with them. This helps catch bugs.
However, GLES1 programs are always created right before draw, so the
SPIR-V transformer will definitely be run on them. The link-time
validation is thus unnecessary.
This change disables the latter on GLES1, which cuts down the TexCombine
test run time by about 10%.
Bug: angleproject:6644
Change-Id: Idb9d229fc08bf746f933fa8924fa67e5426f87a7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3926036
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
|
|
427086a9
|
2022-07-22T10:45:24
|
|
Vulkan: remove SpirvVaryingPrecisionFixer
Bug: angleproject:7488
Change-Id: I957839bd8fbdf1cd849d5ed7e9edd65fd1a5f2cb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3780874
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Yuxin Hu <yuxinhu@google.com>
|
|
be708446
|
2022-07-25T15:24:52
|
|
Vulkan: Remove the bindEmptyForUnusedDescriptorSets workaround
Only applied to older Qualcomm-based phones.
Bug: angleproject:2727
Change-Id: I37a611e2ff79d898eff9401467407543f3c690b8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3785290
Reviewed-by: Charlie Lao <cclao@google.com>
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Yuxin Hu <yuxinhu@google.com>
|
|
c7459a46
|
2022-07-15T09:55:03
|
|
Vulkan: Destroy descriptorSet cache when BufferBlock destroyed
When a new cache entry has been created, we record the cache entry in
the BufferBlock. When BufferBlock is destroyed, we also immediately
destroy the cache entry since the cache will no longer reused.
This CL also removes DescriptorCacheResult from various APIs since it is
now redundant with newSharedCacheKey argument.
Bug: b/237686097
Change-Id: I14fa8906fdbe7d9226c8e8ecddef2beb05fbaa5c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3756694
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
Auto-Submit: Charlie Lao <cclao@google.com>
|
|
01092c48
|
2022-07-12T10:11:22
|
|
Vulkan: Destroy descriptorSet cache when shader image is destroyed
Similar to texture descriptor set, this applies to images used as shader
resource. When a texture is used in a shader resource descriptorSet, we
record it. When texture is destroyed, we also destroy that shader
resource descriptorSet cache.
Bug: b/237686097
Change-Id: I475982fcec45535cc285a4aebca922d01efc7ed2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3758884
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Auto-Submit: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
0d3ecf46
|
2022-06-24T16:37:17
|
|
Vulkan: Multisample Framebuffer Fetch
Implement Multisample Framebuffer Fetch.
This should fix the deqp failure
dEQP.GLES31/functional_blend_equation_advanced_msaa_colorburn
Bug: angleproject:7351
Bug: angleproject:3586
Bug: angleproject:6195
Bug: b/234173199
Change-Id: Idd7559dcba3d91e36d8f253f1554fb931a7a6775
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3724165
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
|
|
723cc880
|
2022-06-10T17:55:54
|
|
Reland "Reland "Vulkan: Destroy DescriptorSet cache when it becomes invalid""
This is a reland of commit 551a26aeedbfd971d6199c8eddb433a4f4ff871c
Original change's description:
> Reland "Vulkan: Destroy DescriptorSet cache when it becomes invalid"
>
> This is a reland of commit 0779ccbcd427dcb00e53afa6385fb4e8e2377993 with
> the fix for angleproject:7466. When DescriptorPoolhelper gets
> release/destroyed, we ensure all sharedCacheKeys are destroyed.
>
> Original change's description:
> > Vulkan: Destroy DescriptorSet cache when it becomes invalid
> >
> > When a new texture descriptorSet is allocated, we store one reference of
> > the cache key in ProgramExecutableVk and all TextureVks that it
> > associated with. When any of the TextureVk is destroyed or its view
> > destroyed, we immediately erase the descriptorSet from the cache and
> > track GPU progress and free the descriptorSet when it's GPU completed.
> > That way we delete the dead descriptorSet that will for sure never been
> > reused ASAP so that its space is avialable for reuse.
> >
> > Bug: b/235523746
> > Change-Id: Ib1b9662a254eea5a3f410dc6d5d89fca6727a647
> > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3700226
> > Reviewed-by: Lingfeng Yang <lfy@google.com>
> > Commit-Queue: Charlie Lao <cclao@google.com>
> > Reviewed-by: Ian Elliott <ianelliott@google.com>
> > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
>
> Bug: b/235523746
> Bug: angleproject:7466
> Change-Id: I4413bec27ea0ca830010e2ca15036c2e667141c0
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3726964
> Reviewed-by: Ian Elliott <ianelliott@google.com>
> Commit-Queue: Charlie Lao <cclao@google.com>
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Bug: b/235523746
Bug: angleproject:7466
Change-Id: I6b88b884841c5dbc625ee7e0c52c45af09dec199
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3741027
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Ian Elliott <ianelliott@google.com>
|
|
4b745c2b
|
2022-07-01T01:25:36
|
|
Revert "Reland "Vulkan: Destroy DescriptorSet cache when it becomes invalid""
This reverts commit 551a26aeedbfd971d6199c8eddb433a4f4ff871c.
Reason for revert: Blink test failures at: https://ci.chromium.org/ui/p/chromium/builders/ci/WebKit%20Linux%20MSAN/15546/overview
Original change's description:
> Reland "Vulkan: Destroy DescriptorSet cache when it becomes invalid"
>
> This is a reland of commit 0779ccbcd427dcb00e53afa6385fb4e8e2377993 with
> the fix for angleproject:7466. When DescriptorPoolhelper gets
> release/destroyed, we ensure all sharedCacheKeys are destroyed.
>
> Original change's description:
> > Vulkan: Destroy DescriptorSet cache when it becomes invalid
> >
> > When a new texture descriptorSet is allocated, we store one reference of
> > the cache key in ProgramExecutableVk and all TextureVks that it
> > associated with. When any of the TextureVk is destroyed or its view
> > destroyed, we immediately erase the descriptorSet from the cache and
> > track GPU progress and free the descriptorSet when it's GPU completed.
> > That way we delete the dead descriptorSet that will for sure never been
> > reused ASAP so that its space is avialable for reuse.
> >
> > Bug: b/235523746
> > Change-Id: Ib1b9662a254eea5a3f410dc6d5d89fca6727a647
> > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3700226
> > Reviewed-by: Lingfeng Yang <lfy@google.com>
> > Commit-Queue: Charlie Lao <cclao@google.com>
> > Reviewed-by: Ian Elliott <ianelliott@google.com>
> > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
>
> Bug: b/235523746
> Bug: angleproject:7466
> Change-Id: I4413bec27ea0ca830010e2ca15036c2e667141c0
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3726964
> Reviewed-by: Ian Elliott <ianelliott@google.com>
> Commit-Queue: Charlie Lao <cclao@google.com>
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Bug: b/235523746
Bug: angleproject:7466
Change-Id: Icdde2752c462b7ebbb51d46fd35ce749b5caf377
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3739585
Reviewed-by: Ian Elliott <ianelliott@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Ian Elliott <ianelliott@google.com>
Commit-Queue: Ian Elliott <ianelliott@google.com>
|
|
551a26ae
|
2022-06-10T17:55:54
|
|
Reland "Vulkan: Destroy DescriptorSet cache when it becomes invalid"
This is a reland of commit 0779ccbcd427dcb00e53afa6385fb4e8e2377993 with
the fix for angleproject:7466. When DescriptorPoolhelper gets
release/destroyed, we ensure all sharedCacheKeys are destroyed.
Original change's description:
> Vulkan: Destroy DescriptorSet cache when it becomes invalid
>
> When a new texture descriptorSet is allocated, we store one reference of
> the cache key in ProgramExecutableVk and all TextureVks that it
> associated with. When any of the TextureVk is destroyed or its view
> destroyed, we immediately erase the descriptorSet from the cache and
> track GPU progress and free the descriptorSet when it's GPU completed.
> That way we delete the dead descriptorSet that will for sure never been
> reused ASAP so that its space is avialable for reuse.
>
> Bug: b/235523746
> Change-Id: Ib1b9662a254eea5a3f410dc6d5d89fca6727a647
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3700226
> Reviewed-by: Lingfeng Yang <lfy@google.com>
> Commit-Queue: Charlie Lao <cclao@google.com>
> Reviewed-by: Ian Elliott <ianelliott@google.com>
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Bug: b/235523746
Bug: angleproject:7466
Change-Id: I4413bec27ea0ca830010e2ca15036c2e667141c0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3726964
Reviewed-by: Ian Elliott <ianelliott@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
97a6e581
|
2022-05-30T16:50:26
|
|
Vulkan: Useful implementation of program binaries
ANGLE already serializes the pipeline state for the sake of
OES_get_program_binary. This serialization had limited usefulness
however, since the Vulkan driver hasn't actually created any pipelines
yet (which is a costly part of program creation).
Simultaneously, ANGLE deferred Vulkan pipeline creation to draw time,
which causes hitching.
In this change, a handful of Vulkan pipelines are precreated at
link time; those at least that are sure to create different blobs in the
pipeline cache (different spec consts or SPIR-V generation). These
pipelines are created in the program executable's cache. The cache is
then merged into the shared renderer cache (for potential blob reuse by
other programs).
With this, two goals are achieved:
- Most pipelines created at draw time hit the pipeline cache, avoiding
costly compilation.
- When the program binary is retrieved, the contents of the program
executable's pipeline cache is also returned. On reload, the cache is
recovered, resulting in faster startup.
Bug: angleproject:5881
Change-Id: I46c5451a7d0b16dffd40e44015e094640886880b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3671977
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
9e47438f
|
2022-06-07T16:34:18
|
|
Vulkan: Fix program creation crash
Due to two CLs going in at the same time.
Bug: angleproject:7366
Change-Id: I8638b95eefd379abbc64f3b52e87b67f25e1ad52
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3693829
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
|
|
3b988fef
|
2022-06-01T10:54:03
|
|
Vulkan: Remove enableLineRasterEmulation
* Removed the Bresenham line raster emulation specialization
constant, along with related variables and functions.
Bug: angleproject:7366
Change-Id: If17c8ce9b459ad801bae8e887e5674bd9a3ff2bf
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3680860
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
|
|
ce3c0fe9
|
2022-06-06T12:09:45
|
|
Vulkan: Make depth-correction uniform controlled
This change makes sure SPIR-V transformations are not required for depth
correction, having the number of potential pipelines.
Bug: angleproject:5881
Change-Id: If3f66b34bdd1127ae588cbc822ea7cf01fa8621f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3691801
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
|
|
a9516865
|
2022-06-01T22:48:04
|
|
Vulkan: Output cache look up feedback in pipeline graph
Bug: angleproject:6565
Change-Id: I12bb9ab5756860de9ba26d6b4a9429a78b65df39
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3686029
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
53ec886e
|
2022-05-30T16:49:11
|
|
Vulkan: Externally synchronize the pipeline cache
In preparation for a future change that requires this as it may perform
pipeline cache merges during creation of pipelines.
Bug: angleproject:5881
Change-Id: Ic7921b781aa773ae23b60a0bb6fa2111b1fc401e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3679479
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
9f4b9c65
|
2022-05-18T14:39:18
|
|
Vulkan: Refactor command buffer retain calls.
This removes "getResourceUseList" from the command buffers, and
instead we pass around the command buffer helpers. Since future CLs
will change the way we track resources, this provides for a more
stable interface for tracking.
Bug: angleproject:5664
Change-Id: I7118788570eaa3c0ddb6d5ef523e050ad7be00ad
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3645814
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
98c2e169
|
2022-05-20T16:17:49
|
|
Vulkan: Reduce pre-rotation spec const to bool
The specialization constant now only dictates whether x and y should be
swapped. The complete 8 possible states of rotation and y-flip are
achieved by using this swap in combination with a driver uniform for x
and y flip.
Swapping is still a specialization constant to avoid degrading
performance of dFdx/dFdy which otherwise would need both to be evaluated
instead of one. On platforms which don't support pre-rotation, the
specialization constant will never change and driver uniforms entirely
govern y-flip. On platforms that do support pre-rotation, only two
variations of the pipeline are needed.
Bug: angleproject:7366
Change-Id: I73f84e89fa9349d2098fa5b21573aee57d93a30c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3663151
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Lingfeng Yang <lfy@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
|
|
fea19567
|
2022-05-17T17:44:06
|
|
Vulkan: Remove removeEarlyFragmentTestsOpt flag
* Removed removeEarlyFragmentTestsOptimization and the related
SPIRV transformation and variables.
* Removed mUsesEarlyFragmentTestsOptimization.
* Removed SH_EARLY_FRAGMENT_TESTS_OPTIMIZATION.
* Merged updateUsesEarlyFragmentTestsOptimization() into
updateFragmentInoutRange().
Bug: angleproject:7347
Change-Id: I7299bd4e8ab5363e5cf06eb48419d4f469106e12
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3648217
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
|
|
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>
|
|
ff8a9f6a
|
2022-04-14T15:15:16
|
|
Vulkan: Renaming "ShaderBuffers" to "ShaderResources".
This will match the functionality as we expand the descriptor set
cache to non-buffer resources.
Bug: angleproject:6776
Change-Id: I5597d074beea7d3b464802a2db9bcc2fcf84ca6b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3583359
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
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>
|
|
55c21842
|
2022-04-14T05:04:15
|
|
Vulkan: Use flat array lookups for shader variables.
The array lookups we use after link now are simple array
lookups and no longer use string hashing queries. This
will make the descriptor cache indexing much faster after
the cache key redesign.
Bug: angleproject:4524
Change-Id: If19e3a4aa57c415f33c69172dd76c10a207e3264
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3580979
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
bddb944b
|
2022-04-14T05:04:09
|
|
Vulkan: Prep variable info map to remove hashing.
The removes all the string-based query APIs from the
program executable descriptor set init. The new APIs
still use string-keyed maps but will be switched out
with non-hashed maps in a future CL.
Bug: angleproject:4524
Change-Id: I427efb3ebcf22d5fbdf6d20679bbdaa23cd2dc94
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3573077
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>
|
|
e8ee847d
|
2022-02-23T12:25:39
|
|
Vulkan: Add UpdateDescriptorSetsBuilder.
This helper class encapsulates the vkUpdateDescriptorSets caching.
As part of the refactor, we switch passing a ContextVk to passing
a vk::Context with some mutable variables. This helps encapsulate
ContextVk. Since we use the perf counters in many places, this CL
moves the perf counters to vk::Context, so we can access them
everywhere.
Refactoring change only.
Bug: angleproject:6776
Change-Id: Id529962b2f425bece6f9b3bd0cd1698c692e58cb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3484980
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Jamie Madill <jmadill@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>
|
|
ee96a461
|
2022-02-22T12:23:06
|
|
Vulkan: Fix missing empty buffer descriptor.
This could happen for SSBOs and UBOs when the shader renders
without a bound buffer, and robustness enabled.
Bug: angleproject:6707
Change-Id: I993f2489aca47f07068908858c83afa78c9e0402
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3484979
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Auto-Submit: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Roman Lavrov <romanl@google.com>
Commit-Queue: Roman Lavrov <romanl@google.com>
|
|
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>
|
|
a3961843
|
2022-02-04T08:45:34
|
|
Vulkan: Bind aligned default uniform buffer size.
This makes us let reuse caches more often when uniforms change
size slightly. It also simplifies the cache key management.
Bug: angleproject:6776
Change-Id: I68ab48ab7761237bb9d28c4a4a88f4fc6e2c5af6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3439068
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Jamie Madill <jmadill@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>
|
|
7820ca23
|
2022-02-02T09:34:07
|
|
Vulkan: Binding available buffer range to descriptor.
This is fully conformant with GLES including robustness, where
robustness specifically allows returning any values in the buffer.
The goal is to eventually remove all shader-variable-specific info
out of the descriptor set update. This will let us fix cache bugs
that pop up when we move the descriptor set cache to the share
group.
Bug: angleproject:6776
Change-Id: Iccef33ca6174a68e359a07dc957a276b2484f97f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3431725
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Jamie Madill <jmadill@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>
|
|
c4a9d416
|
2022-01-05T15:28:11
|
|
Metal: Refactor to build without SPIR-V
Refactor ShaderInterfaceInfoMap and constant names to thier
own files, allowing Webkit to build without needing to compile
SPIRV code via mtl_glslang_utils.cpp.
Bug: angleproject:6782
Change-Id: I7a9c7e387145c95807f780e24bd2764e0efb5709
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3364970
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Kyle Piddington <kpiddington@apple.com>
|
|
4e644b33
|
2022-01-22T16:17:46
|
|
Vulkan: Remove ProgramExecutableVk back-pointers.
This removes the mProgram and mProgramPipeline back-pointers from
ProgramExecutableVk. In order to fix this, we needed to refactor
the VkPipeline init functions to call through ProgramExecutableVk
only instead of passing through ProgramVk. We also needed to move
the early fragment shader optimization boolean out from Program.
This CL also fixes a few places where the early fragment test
optimization boolean wasn't properly updated.
Bug: angleproject:3570
Change-Id: Ie4c48087f6eb022e6f0a4dacc2710085165d49e1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3408267
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
7c1346bd
|
2022-01-21T11:35:45
|
|
Vulkan: Consolidate uniforms code in ProgramExecutableVk.
De-duplicates several methods. Refactoring change only.
Bug: angleproject:3570
Change-Id: Ib68bc30b3e9b1087871bb268ea292677e0c9fe2e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3408061
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
0dc0dc2a
|
2021-12-30T11:35:40
|
|
Re-land: "Vulkan: Remove "fillProgramStateMap"."
This copies additional shader info like uniforms from the Program
to the Program Piplines. There is now a duplication between PPOs
and Programs. There is no additional storage required for non-PPO
Programs.
Re-land fixes fragment in/out uniform updating with PPOs.
Bug: angleproject:3570
Change-Id: I64b2db6fbc3a610f3b5e617301f94eb30d915939
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3412999
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
6a14e328
|
2022-01-25T00:49:45
|
|
Revert "Vulkan: Remove "fillProgramStateMap"."
This reverts commit 38deffe40db83836588e0cd50864945a9ddba36b.
Reason for revert: angle_end2end_tests failures on Pixel 6.
Original change's description:
> Vulkan: Remove "fillProgramStateMap".
>
> This copies additional shader info like uniforms from the Program
> to the Program Piplines. There is now a duplication between PPOs
> and Programs. There is no additional storage required for non-PPO
> Programs.
>
> Bug: angleproject:3570
> Change-Id: I5ed6c946df945aaf2f65752f797b16e7649d5584
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3362297
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> Reviewed-by: Tim Van Patten <timvp@google.com>
> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Bug: angleproject:3570
Change-Id: I3a4822c8a65d024070a9fe5df103b88a3c8333d3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3414024
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
|
|
38deffe4
|
2021-12-30T11:35:40
|
|
Vulkan: Remove "fillProgramStateMap".
This copies additional shader info like uniforms from the Program
to the Program Piplines. There is now a duplication between PPOs
and Programs. There is no additional storage required for non-PPO
Programs.
Bug: angleproject:3570
Change-Id: I5ed6c946df945aaf2f65752f797b16e7649d5584
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3362297
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
158ecba6
|
2022-01-07T16:40:26
|
|
Vulkan: Remove cached Impl pointers from ContextVk.
These pointers were a common source of programming error, where
sometimes they wouldn't be updated when they were needed. Instead
we can pull the objects directly from the GLES state. We added
them initially to attempt a performance improvement, but it's
likely they didn't significantly decrease memory accesses or the
number of instructions we process for GLES calls. Hence removing
them should be an improvement in safety without a perf loss.
Bug: angleproject:6864
Change-Id: I54107686992065a514077c71d173b804e295515e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3378904
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
acd8fc76
|
2021-12-16T01:05:02
|
|
Vulkan: Distinguish RP and outside-RP command buffer types
What goes inside and outside a render pass command buffer is largely
mutually exclusive. Moreover, the size and frequency of allocations is
different between the two.
This change distinguishes the C++ types used for inside and outside
render pass command buffers:
- The type now documents which command buffer a function is able to
receive.
- `isRenderPass` flag passing, checking and asserting is largely
removed.
- A follow up change experiments with using different (Vulkan vs ANGLE)
secondary command buffers for inside and outside RP command buffers.
- A future change could specialize the pool behaviors per command buffer
type.
Bug: angleproject:6811
Change-Id: Ia4bc669d26ac7e94e8a0dfb9b361666c82f42cc3
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3344373
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
83a670ab
|
2021-10-29T09:12:26
|
|
Vulkan: Implement BufferPool using VMA's virtual allocator
VMA's allocation calls used to be sub-allocating a pool of memory. What
we really want is sub-allocate a VkBuffer object. VMA recently added
support to expose the underlying range allocation algorithm via APIs,
which user can use it to sub-allocate any object. This CL uses that new
virtual allocation API to sub-allocate from a pool of VkBuffers.
In this CL we only switched BufferVk::mBuffer to sub-allocate from the
BufferPool object.
Bug: b/205337962
Change-Id: Ia6ef00c22e58687e375b31bc12ac515fd89f3488
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3266146
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.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>
|
|
9de37b58
|
2021-11-20T21:45:02
|
|
Vulkan: Fix draw with emulated xfb without xfb active
When transform feedback is not active, make sure the code that captures
xfb is not generated, even though it's guarded against with an if. This
is because no buffer is bound to the capture buffer, and by avoiding
generation of code that references that buffer, SwiftShader will not
attempt to access the missing descriptor set.
Currently, the actual declaration of the buffer is left in the SPIR-V,
which seems to be benign. If that causes issues in the future, the
SPIR-V transformer can be modified to remove that variable as well.
Bug: chromium:1209285
Change-Id: I83da8d1dea5390ecacc681f8ada9f586932deaa4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3294661
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
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>
|
|
3a9f18f1
|
2021-10-18T10:44:38
|
|
Refactor program pipeline handling.
In preparation for moving more code from gl::Program to
gl::ProgramExecutable so it can be shared with ProgramPipeline.
Bug: angleproject:6566
Change-Id: Icb7ecccb37ae8e0d7d5fef8968f0dd7ef6fe6150
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3226305
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
aac5d678
|
2021-10-20T11:48:57
|
|
Make "isCompute" private to ProgramExecutable.
This eliminates uses of "isCompute" is the Vulkan back-end. Instead
of checking the state flag, we can use the context of the current
command to determine if we're running a compute or a graphics
command. This will eventually lead to us being able to compile the
program pipeline objects before we run a draw or dispatch command.
Changes the driver uniforms descriptor desc to bind to both graphics
and compute shader stages to simplify the code. This could have
theoretical but low-risk performance implications.
Bug: angleproject:6595
Change-Id: Ie30d419b6ece5b33f5066a034d3805fe96519b36
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3233903
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
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>
|
|
715a49c7
|
2021-07-03T08:48:07
|
|
Vulkan: Handle incompatible immutable sampler formats
If the immutable sampler format of an active texture is not
compatible with those supported by the pipeline layout, recreate
the pipeline layout.
Bug: b/155487768
Bug: angleproject:5033
Bug: angleproject:5773
Test: ImageTest.SourceAHBTarget2DExternalCycleThroughYuvTargetsNoData*Vulkan
Change-Id: Iea78e1738ea2fb133a24dc88f5b68daf4cc1bdfe
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2997289
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
31b06f5f
|
2021-07-12T10:06:04
|
|
Vulkan: Account for immutable samplers that need multiple descriptors
It is valid for immutable samplers to need more than 1 descriptor count.
Account for this possiblity while calculating descriptor pool size.
Bug: b/155487768
Bug: angleproject:5033
Bug: angleproject:5773
Bug: angleproject:6141
Change-Id: Ifb0ed3e4b3c01c61d81dd0c628101f31d4c8bd05
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3005329
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
|
|
e2881e25
|
2021-06-27T10:45:41
|
|
Vulkan: Handle incompatible pipeline layouts
It is necessary that a pipeline layout be compatible with active
textures. Make sure to recreate the pipeline layout otherwise.
Bug: b/155487768
Bug: angleproject:5033
Bug: angleproject:5773
Test: ImageTest.SourceAHBTarget2DExternalCycleThroughRgbAndYuvTargets*Vulkan
Change-Id: Iab371a9035b6cd143585e5000e2e68c7302ef447
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2992056
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: 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>
|
|
776c6015
|
2021-02-26T00:00:57
|
|
Vulkan: Call glslang at compile time
With this change, the ANGLE translator immediately compiles the
generated GLSL into SPIR-V with glslang and discards the source. This
is in preparation for generating SPIR-V directly, by making the frontend
and backend already able to digest it.
This change also allows the expensive glslang calls to be parallelized,
improving the following perf test by about 20%:
LinkProgramBenchmark.Run/vulkan_compile_and_link_multi_thread
Previously, the test was run as such in the Vulkan backend:
Main Thread 1 Thread 2
Compile1 --->
Compile2 --------------------->
Translator Translator
<---
<---------------------
Link
glslang
for
shader1
glslang
for
shader2
Done
With this change, it is run as such:
Main Thread 1 Thread 2
Compile1 --->
Compile2 --------------------->
Translator Translator
glslang glslang
<---
<---------------------
Link
Done
glslang_wrapper_utils no longer interacts with glslang! A rename will
follow.
Bug: angleproject:4889
Change-Id: If4303e8ba0ba43b1a2f47f8c0a9133d0bee1a19a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2721195
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@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>
|
|
02acc5ee
|
2021-03-18T16:08:59
|
|
Vulkan: More cleanups to perf counters.
This refactors the pipeline type in the ContextVk class to also use
a packed enum map. It also expands the object perf counters to store
both a specific and cumulative version for use in different cases.
Bug: angleproject:5736
Change-Id: I6ff78e38065eb577f2b95b1d9c4f9cc31d7f325f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2774184
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>
|
|
1b08cfcb
|
2021-03-18T10:01:54
|
|
Vulkan: Clean up shader buffer DS allocation.
We were using repeated code patterns in several places.
Bug: angleproject:5736
Change-Id: I206783dd792c3b0f9d38027235445ec600a60d88
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2773320
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
89d2a96a
|
2021-03-09T18:37:57
|
|
Vulkan: Add test for UBO descriptor allocations.
This performance counter test verifies that re-binding the same
two buffers repeatedly doesn't allocate new descriptor sets. Currently
the test fails because we don't cache descriptor sets for UBOs.
Covers equivalent code patterns in Asphalt 9.
Reorganizes the perf counters collected for the program objects. Now
they are per-frame reset instead of cumulative. This tracking is now
consistent for the different counter types. In the future we can add
cumulative tracking for all per-object and global perf counters.
Bug: angleproject:5736
Change-Id: I23d04b6453e38af1cf4af7274d24382d136efad3
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2746176
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
c7c38731
|
2021-03-04T15:04:07
|
|
Vulkan: Move SpirvBlob definition to common/
For use by the translator.
Bug: angleproject:4889
Change-Id: Ie95cafd3cfcdde50acc5d26d3c00e6574186a805
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2737276
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
77637f2d
|
2021-02-19T15:18:52
|
|
Vulkan: Generate xfb support code in SPIR-V for emulation path
This change moves the code generation at link time from source code to
SPIR-V. As a result, transform feedback extension and emulation paths
are more similarly handled before SPIR-V transformation (they both store
information identically in the ShaderInterfaceVariableInfoMap).
This change gets rid of the @@ XFB-OUT @@ marker. With no source code
generation at link time, shader compilation can be moved to
glCompileShader time.
Bug: angleproject:4888
Change-Id: I8cdb89c22b57ce48cf5d226b8e41622d9d550d46
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2713269
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
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>
|
|
79ae52dd
|
2021-02-11T14:18:41
|
|
Vulkan: Fix missing visibility barrier for host-visible buffer writes
See https://chromium-review.googlesource.com/c/angle/angle/+/1661252 for
context. This was accidentally broken during the command graph rework.
This will eventually be validated by syncval. See
https://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/2329.
Bug: angleproject:5070
Change-Id: Ic16fa900e554d46e54b42fc3fbe0f96d5327fa0f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2689379
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
37a0dced
|
2021-01-28T17:52:05
|
|
Vulkan: Disable clip space transform based on EXT_clip_control
When depth is set to "ZERO_TO_ONE_EXT" using EXT_clip_control
API, don't transform the z position in shader since it now matches
Vulkan's depth range. Toggle transformPositionToVulkanClipSpace
accordingly.
Bug: angleproject:5471
Tests: dEQP-GLES2.functional.clip_control.depth_mode_zero_to_one
Change-Id: I7e715cb3c98cecf5aaa5cdc3822a3a83bae9c720
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2615864
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
dfd9bdfd
|
2021-01-16T11:32:30
|
|
Reland "Vulkan: Generate gl_Position pre-rotation in SPIR-V"
This reverts commit 3d39b7c5eab88c420d982155ffbb6181c678ceea.
Reason for revert: Fixed interaction with the
`forceDriverUniformOverSpecConst` workaround.
Original change's description:
> Revert "Vulkan: Generate gl_Position pre-rotation in SPIR-V"
>
> This reverts commit 0f86b196ffaffeeee3460e3188f20a7ac120796d.
>
> Reason for revert:
> Breaks pre-rotation for all apps, so they are displayed in portrait instead of landscape.
>
> Original change's description:
> > Vulkan: Generate gl_Position pre-rotation in SPIR-V
> >
> > Instead of having the translator output pre-rotation code in the vertex
> > stage based on a specialization constant, this change makes the SPIR-V
> > transformer perform pre-rotation of gl_Position on the last geometry
> > stage.
> >
> > An alternative solution would be to generate pre-rotation code in the
> > translator in every geometry stage, each controlled by a separate
> > specialization constant. This change avoids unnecessary modifications
> > to earlier stages. The generated shaders are also smaller, as they
> > don't contain a mat2[8] pre-rotation constant matrix. The SPIR-V
> > transformer knows the pre-rotation at transformation time, so it can
> > simply use swizzles to achieve the same results.
> >
> > This also ties in with upcoming changes which move gl_Position.z
> > correction to the last geometry shader stage, which is trivially done
> > piggy-backing on the infrastructure in this change.
> >
> > Bug: angleproject:5478
> > Change-Id: I9d5d9d19f3ccda665f5504368ce5ddfa5f383faf
> > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2598584
> > Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
> > Reviewed-by: Charlie Lao <cclao@google.com>
> > Reviewed-by: Jamie Madill <jmadill@chromium.org>
>
> TBR=syoussefi@chromium.org,jmadill@chromium.org,cclao@google.com
>
> Change-Id: I81f237fa6b10c7d59831363bee8999e7ad2f09be
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: angleproject:5478
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2633694
> 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
Bug: angleproject:5478
Change-Id: I7c5eaeef03d9520abd36a1c4a766b6abbf4fdb45
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2633709
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
60015ff6
|
2021-01-14T02:03:07
|
|
Vulkan: Redo RewriteStructSamplers
This transformation is split into two. The first transformation solely
takes out the samplers out of structs, and potentially generates array
of array of samplers. A second transformation is added that takes any
array of array of opaque uniforms and flattens it.
A follow up change will simplify RewriteAtomicCounters which also
handles array of arrays (which is no longer possible), and removes
dependency on shaderStorageBufferArrayDynamicIndexing.
Bug: angleproject:2703
Bug: angleproject:3881
Bug: angleproject:4071
Bug: angleproject:4211
Change-Id: I352bb2bbe65ac49f4d7d753c0ba3160fa3cc925a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2628138
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
3d39b7c5
|
2021-01-16T00:15:14
|
|
Revert "Vulkan: Generate gl_Position pre-rotation in SPIR-V"
This reverts commit 0f86b196ffaffeeee3460e3188f20a7ac120796d.
Reason for revert:
Breaks pre-rotation for all apps, so they are displayed in portrait instead of landscape.
Original change's description:
> Vulkan: Generate gl_Position pre-rotation in SPIR-V
>
> Instead of having the translator output pre-rotation code in the vertex
> stage based on a specialization constant, this change makes the SPIR-V
> transformer perform pre-rotation of gl_Position on the last geometry
> stage.
>
> An alternative solution would be to generate pre-rotation code in the
> translator in every geometry stage, each controlled by a separate
> specialization constant. This change avoids unnecessary modifications
> to earlier stages. The generated shaders are also smaller, as they
> don't contain a mat2[8] pre-rotation constant matrix. The SPIR-V
> transformer knows the pre-rotation at transformation time, so it can
> simply use swizzles to achieve the same results.
>
> This also ties in with upcoming changes which move gl_Position.z
> correction to the last geometry shader stage, which is trivially done
> piggy-backing on the infrastructure in this change.
>
> Bug: angleproject:5478
> Change-Id: I9d5d9d19f3ccda665f5504368ce5ddfa5f383faf
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2598584
> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
> Reviewed-by: Charlie Lao <cclao@google.com>
> Reviewed-by: Jamie Madill <jmadill@chromium.org>
TBR=syoussefi@chromium.org,jmadill@chromium.org,cclao@google.com
Change-Id: I81f237fa6b10c7d59831363bee8999e7ad2f09be
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: angleproject:5478
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2633694
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Tim Van Patten <timvp@google.com>
|
|
0f86b196
|
2020-12-21T22:54:05
|
|
Vulkan: Generate gl_Position pre-rotation in SPIR-V
Instead of having the translator output pre-rotation code in the vertex
stage based on a specialization constant, this change makes the SPIR-V
transformer perform pre-rotation of gl_Position on the last geometry
stage.
An alternative solution would be to generate pre-rotation code in the
translator in every geometry stage, each controlled by a separate
specialization constant. This change avoids unnecessary modifications
to earlier stages. The generated shaders are also smaller, as they
don't contain a mat2[8] pre-rotation constant matrix. The SPIR-V
transformer knows the pre-rotation at transformation time, so it can
simply use swizzles to achieve the same results.
This also ties in with upcoming changes which move gl_Position.z
correction to the last geometry shader stage, which is trivially done
piggy-backing on the infrastructure in this change.
Bug: angleproject:5478
Change-Id: I9d5d9d19f3ccda665f5504368ce5ddfa5f383faf
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2598584
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
093250e0
|
2020-12-23T12:07:46
|
|
Vulkan: Make shader variable info maps a class.
Instead of using a map type directly we abstract the info maps into an
encapsulated class. We can enforce a specific API set instead of using
the same API as the map class. This also cleans up a few of the APIs
related to these maps.
This change will allow future changes to the way the variables are
stored in the class without drastically changing the interface.
Bug: angleproject:3572
Bug: angleproject:4524
Change-Id: Ic1a63e1776c39f49b895a1274bae8282d7a6b9b5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2600080
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
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>
|
|
aa8b10ae
|
2020-11-19T11:06:50
|
|
Vulkan: Avoid driver call when yflip changed but shader not using it
If shader is not using yflip, don't get into driver to ask for a new
pipeline program just because yflip has changed. Instead try to use
the non-yflipped program.
Bug: b/173461931
Change-Id: If938f5dc0632529c4f5e477fcb0c67bf58a1f3d0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2549538
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
|