|
ee019f58
|
2023-08-01T17:03:24
|
|
Group fixed sized data of LinkedUniform into a struct
Most of gl::LinkedUniform struct is a basic types and can be simply
initialized with memcpy. This CL groups these together and encapsulate
them with get APIs. The load/save is now a single memcpy for the entire
fixed size data structure of basic types.
Bug: b/275102061
Change-Id: I49120c06ec941c783790ac0ecb0ee314a4234b26
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4740298
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Roman Lavrov <romanl@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
79973750
|
2023-07-27T17:53:24
|
|
Let UniformLinker uses its own struct instead of LinkedUniform
UniformLinker itself needs more detailed information than the final
linked uniforms. Right now they are using the same data structure. This
CL adds a new structure for linker to use. Since the linker data
structure is temporary, we never needs to load/save from cache, we have
more freedom here to use complex data types. The benefit of separate out
intermediate structure from LinkedUniform is that it allows us to
further simplify LinkedUniform structure without change much of
ProgramLinkedResource implementation. As result of this, this CL removes
field and outerArraySizes (both are std::vector type) from
LinkedUniform.
Bug: b/275102061
Change-Id: Ic1291b51b8906ac586a2f25eb1dbbe74eae8fdc5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4727742
Reviewed-by: Roman Lavrov <romanl@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: 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>
|
|
cafbf6e2
|
2023-06-22T22:50:32
|
|
Vulkan: Simplify active uniform check
Bug: angleproject:7220
Change-Id: Ic0f26f3d09bac570d4ed3f791c456d569208424a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4636869
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
ec1f18db
|
2023-06-21T10:16:51
|
|
Vulkan: Remove ShaderVariableType and flatten info map
With the conversion of the interface variable info map keys to SPIR-V
ids, there is no longer a benefit to bucket resources by their type.
This change removes this bucketing and flattens the map.
Bug: angleproject:7220
Change-Id: If83cb02ca9e91f72dddb2deb7313fee40f9f06c3
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4632577
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: 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>
|
|
16d65289
|
2023-06-20T17:27:01
|
|
Vulkan: Remove hashing of the SPIR-V id in variable map
The interface variable ids are already mostly packed, so a flat array
will do with the id as key.
Bug: angleproject:7220
Change-Id: I17cded0378b1b67379b979b00d69bbe04088a840
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4628975
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
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>
|
|
b37df0c7
|
2023-06-16T12:05:03
|
|
Vulkan: Don't output SPIR-V debug info in release
Now that the SPIR-V transformer no longer relies on names, we can avoid
generating them in the compiler in the first place.
This both removes the need for stripping them out and makes the shaders
(which are cached) a bit smaller.
Bug: angleproject:7220
Change-Id: Ie636ac0ee62cf2730a409872041d22c066fc22ff
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4615238
Reviewed-by: Roman Lavrov <romanl@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
|
|
24f4007b
|
2023-06-08T00:41:55
|
|
Vulkan: Use SPIR-V ids instead of names in the transformer
This change removes the SPIR-V transformer's reliance on type and
variable names. As a result:
- String hashing is removed from the info map data structure and the
SPIR-V transformer
- The ID discovery class is entirely removed
- Internal variable names have become a detail of the compiler alone
(and are no longer exposed as part of the compiler interface)
- Some front-end name tracking is removed ("parentStructMappedName",
etc)
This change also properly cleans up xfb emulation types that were
previously left over.
This change allows the SPIR-V compiler to emit user strings as-is
instead of prefixing them with `u_` leading to more readable debug
shaders. Additionally, it will make it possible not to emit debug info
at all. Both of these changes will be done in follow ups.
Bug: angleproject:7220
Change-Id: Iaa127496209a27aaae2e0d14c41b22fffb0b72a2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4600610
Reviewed-by: Roman Lavrov <romanl@google.com>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
e394cb46
|
2023-06-10T23:12:35
|
|
Vulkan: Refactor framebuffer fetch shader emulation
This change fixes simultaneous usage of EXT_shader_framebuffer_fetch and
ARM_shader_framebuffer_fetch, which previously declared two identical
input attachment variables.
The code is additionally greatly simplified.
Bug: angleproject:8196
Bug: angleproject:8197
Bug: angleproject:8198
Change-Id: Iaaa2a5539a95727e67001a4da1d45092c9db4f2c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4615187
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: mohan maiya <m.maiya@samsung.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
acdf8722
|
2023-06-07T11:26:37
|
|
Vulkan: Remove reliance on names for gl_PerVertex-trimmer
Instead of passing in gl_Position etc built-in names and then find their
index by looking at OpMemberName instructions, this change has the
front-end create a bitset of active gl_PerVertex members. The SPIR-V
transformer then directly uses this information to trim gl_PerVertex.
Bug: angleproject:7220
Change-Id: I5c3d56784801abb310d09d98d9c82c9e6e019de8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4600608
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Roman Lavrov <romanl@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
76b0e7f3
|
2023-06-01T11:25:54
|
|
Vulkan: Use reserved SPIR-V ids for internal variables
With this change, the SPIR-V transformer does not need to discover these
ids through name matching. Ultimately, user variables would also be
identified by their SPIR-V ids (instead of name), removing the Vulkan
backend's reliance on strings.
Bug: angleproject:7220
Change-Id: I241c3247b89a28f9eed28f23c06b7c8b7fbbeaa0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4583133
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
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>
|
|
868b63ab
|
2023-03-06T15:21:25
|
|
Vulkan: Remove reserved UBO for driver uniforms from limits
ANGLE no longer uses UBO for driver uniforms, but uses push constants
instead.
Bug: angleproject:6858
Change-Id: I3e01c75a19bb333428f2dd1cd732022f1e740c4c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4306885
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
|
|
69eab34b
|
2023-01-17T16:16:28
|
|
Vulkan: Fixed UB creating VkPipeline in warmUpPipelineCache().
Regression:
f0e3d8f934f5594b321ac5aaa43593b1c22dd932
Vulkan: Shader component type in GraphicsPipelineDesc
Revealed by CTS opengl-es-cts-3.2.8:
https://github.com/KhronosGroup/VK-GL-CTS/commit/a6cd9c75d7c667437266592b47e629d2b6fc711c
Hangs in:
dEQP-GLES3.functional.shaders.texture_functions.texture.sampler2dshadow_vertex
dEQP-GLES31.functional.shaders.opaque_type_indexing.sampler.const_literal.vertex.sampler2dshadow
VALIDATION: UNASSIGNED-CoreValidation-Shader-InputNotProduced(ERROR / SPEC): msgNum: 602160055 - Validation Error: [ UNASSIGNED-CoreValidation-Shader-InputNotProduced ] Object 0: handle = 0x2e2cd000000002b, type = VK_OBJECT_TYPE_SHADER_MODULE; | MessageID = 0x23e43bb7 | Vertex shader consumes input at location 0 but not provided
VALIDATION: Objects: 1
VALIDATION: [0] 0x2e2cd000000002b, type: 15, name: NULL
VALIDATION: UNASSIGNED-CoreValidation-Shader-InputNotProduced(ERROR / SPEC): msgNum: 602160055 - Validation Error: [ UNASSIGNED-CoreValidation-Shader-InputNotProduced ] Object 0: handle = 0x2e2cd000000002b, type = VK_OBJECT_TYPE_SHADER_MODULE; | MessageID = 0x23e43bb7 | Vertex shader consumes input at location 1 but not provided
VALIDATION: Objects: 1
VALIDATION: [0] 0x2e2cd000000002b, type: 15, name: NULL
Bug: None
Change-Id: Ie7262c608c472e05c2e3237334c6b67271157166
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4194178
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
301ed545
|
2022-12-20T20:16:22
|
|
Vulkan: Pass context to layout getters
In preparation for a change that optionally uses read/write
depth/stencil layouts. Context is used to test for the
supportsMixedReadWriteDepthStencilLayouts feature to know whether those
layouts are supported or that a fallback must be chosen.
Bug: angleproject:7899
Bug: b/192477489
Change-Id: I1453dc9d060453a3806ad0f261b94368fe01fb29
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4116735
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
c3209b13
|
2022-12-13T16:05:51
|
|
Vulkan: Remove GlslangWrapperVk
This class was just forwarding functions, and had over time become too
thin.
Bug: angleproject:7220
Change-Id: I7ae84ba017478d5c36b1e6d5f98a52d6b1cffb66
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4103744
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@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>
|
|
77c95de4
|
2022-11-16T21:12:28
|
|
Vulkan: Threaded monolithic pipeline creation
With this change, once a pipeline is created out of libraries, a task is
scheduled (if necessary) to asynchronously create a corresponding
monolithic pipeline. Once the task is complete, the linked pipeline
handle is replaced by the monolithic one, gaining back any performance
that might have been lost due to the use of libraries.
Bug: angleproject:7369
Change-Id: I525fb1e09f8bedc61b9dbef19f9cce7026ff9c53
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4031151
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: 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>
|
|
1434697f
|
2022-11-23T14:47:38
|
|
Add a vk feature flag to only enable precision match fixer on IMG
According to
https://gitlab.khronos.org/vulkan/vulkan/-/merge_requests/5273,
RelaxedPrecision does not need to match in the interface matching
rules. However, removing the precision match is causing triangle
clipping issues on IMG hardware. This change adds a feature
flag to only run the code path that applies precision match in
SpirV if the hardware is IMG.
This is a follow-up change to https://crrev.com/c/4049421.
Instead of adding back the code path that handles varying
precision mismatch for every hardware, only enabling the code
path if the vendor is IMG.
Test:
On Pixel6:
$ adb shell setprop debug.angle.feature_overrides_enabled
varyingsRequireMatchingPrecisionInSpirv
$ out/AndroidDebug/angle_end2end_tests
--gtest_filter="GLSLTest_ES3.MismatchPrecision*" --verbose
Bug: angleproject:7488
Change-Id: Ia0155f14d523195df2f47b852ed6642918270e2a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4054100
Commit-Queue: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
|
|
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>
|
|
2dde7357
|
2022-11-16T10:39:32
|
|
Vulkan: `const` render passes
Bug: angleproject:7369
Change-Id: I1ee1449bd8ea8c6a3e26e50a7f3734fad91dc911
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4031488
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.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>
|
|
f0e3d8f9
|
2022-10-18T13:51:31
|
|
Vulkan: Shader component type 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 vertex input in
GraphicsPipelineDesc. A follow up change will do the same for state
affecting fragment output.
Bug: angleproject:7369
Change-Id: Iccf691a1597d786efa1625f7b1c22f906201f2e5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3964751
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
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>
|
|
19fb11b6
|
2022-10-14T11:12:20
|
|
Vulkan: Merge warmed up compute cache into renderer
It was done for graphics, but was accidentally missing for compute.
Bug: angleproject:5881
Bug: angleproject:7629
Change-Id: I28a4c2e38b07b08e1636b443f2c0963130965ebb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3956496
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
|
|
8e644365
|
2022-10-11T11:47:55
|
|
Vulkan: Rearrange state specification for pipeline libraries
This change splits pipeline state setup based on whether the complete
pipeline is being created or only a subset of it. However, no partial
pipelines are yet created, that will be done in a following CL.
Bug: angleproject:7369
Change-Id: Ife34c4bc39641ab8f06e7c78502f95a6bc16d15d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3949917
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
|
|
135022e4
|
2022-10-11T00:03:11
|
|
Vulkan: Create robust pipelines based on context state
Previously, pipelines were made robust based on whether any context in
the share group has so far been made robust. This means that pipelines
created on non-robust contexts would still be compiled as robust.
Inefficiency aside, this was buggy because robustness was not part of
the pipeline cache key, so if a pipeline was created as non-robust
first, then recreated in a robust context, it would reuse the non-robust
variant.
With VK_EXT_pipeline_protected_access, a similar situation arises for
context protected-ness. However, it is incorrect in that case to create
pipelines as protected unnecessarily.
This change makes pipeline robustness a part of the pipeline cache key,
in preparation for protectedness to be added similarly. Compute
programs may now generate multiple pipelines as a result too.
Bug: angleproject:7629
Change-Id: Ie95f10eff878f8c8b221c1018da44385c7aad15e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3943534
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
|
|
d524157f
|
2022-09-28T23:16:02
|
|
GLES1/Vulkan: Don't validate SPIR-V as VVL does the same
Improves TexCombine runtime by ~15%.
Bug: angleproject:6644
Change-Id: I01f580fef0caa91ebf600cfc0bbbeca1aa20eb06
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3926037
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
|
|
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>
|
|
cb618b3d
|
2022-08-25T13:30:26
|
|
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>
|
|
7fe0694c
|
2022-07-14T16:42:30
|
|
Vulkan: Use push constants for driver uniforms
* Updated the driver uniforms so they would be defined as push
constants in SPIR-V. Their data would be updated via
pushConstants() when handling the driver uniform dirty bits.
* Updated TOutputVulkanGLSL to be able to generate the push
constants as required.
* When handling the driver uniform dirty bits, we no longer
allocate a buffer.
* Removed the driver uniform descriptor set from the pipeline
layout.
* Removed the binding-related functions and flags for the driver
uniforms.
* In invalidateGraphicsDescriptorSet(), DIRTY_BIT_DESCRIPTOR_SETS
is used instead of DIRTY_BIT_DRIVER_UNIFORMS_BINDING. (Same for
invalidateComputeDescriptorSet())
* DIRTY_BIT_DRIVER_UNIFORMS_BINDING is replaced with
DIRTY_BIT_DRIVER_UNIFORMS in other places.
* Removed mDriverUniform and DriverUniformsDescriptorSet from
ContextVk.
* Added mSupportedVulkanShaderStageMask to RendererVk, which is used
in creating the pipeline layout and updating the push constants.
* Added a TODO note for driverUniformsDescriptorSetIndex.
Bug: angleproject:6858
Change-Id: I91037d378528962a816b12ff3f21249ee17b7652
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3782570
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
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>
|
|
b23ea680
|
2022-07-22T12:06:42
|
|
Vulkan: Re-enable multisample framebuffer fetch
Bug: angleproject:7351
Bug: angleproject:3586
Bug: angleproject:6195
Bug: angleproject:7512
Bug: b/234173199
Change-Id: Ib70732f8c075de777e534f950a7e421e75969f59
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3781613
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Yuxin Hu <yuxinhu@google.com>
|
|
d0fe12db
|
2022-07-20T10:16:38
|
|
Vulkan: Disable Multisample Framebuffer Fetch
Disable the multisample framebuffer fetch temporarily
to unblock the angle to chromium roller. Will re-enable after
https://ci.chromium.org/ui/p/chromium/builders/try/win10_chromium_x64_rel_ng/1240846/overview
is resolved.
Bug: angleproject:7351
Bug: angleproject:3586
Bug: angleproject:6195
Bug: angleproject:7512
Bug: b/234173199
Change-Id: I435b257dd07d973d06d5cacd779e943eed32097b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3777059
Reviewed-by: Roman Lavrov <romanl@google.com>
|
|
bd82a5e4
|
2022-07-07T17:03:27
|
|
Vulkan: __samplerExternal2DY2YEXT-aware ProgramExecutableVk
This CL incorporates __samplerExternal2DY2YEXT into the Vulkan objects
involved in ProgramExecutableVk. Specifically, we need:
1. TextureVk to create and return a VkSampler imbued with identity
conversion model, so we can create an immutable sampler from it.
2. Access to the identity conversion desc so that it can be traced in
mImmutableSamplerIndexMap.
Bug: b/223456677
Change-Id: Ia302226a8aa4a97d4a42f79c79ce47af3abec37c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3753294
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Lingfeng Yang <lfy@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>
|
|
e25137c0
|
2022-06-29T09:57:50
|
|
Vulkan: Move DescriptorSet cache to DynamicDescriptorPool
DynamicDescriptorPool has an array of DescriptorPoolHelper. Right now
mDescriptorSetCache is stored in DescriptorPoolHelper. This means when
you search cache for the match, you have to iterate over the array of
DescriptorPoolHelper to decide to make conclusion if there is a match or
not. Each hash map search means compute hash and do key comparison. I
think this was done this way because of we used to not able to evict
cache when we decide to reuse DescriptorSetPoolHelper object (when we
call pool->init). But with recent changes of
SharedDescriptorSetCacheKey, we are able to evict specific cache
entries. This CL moves mDescriptorSetCache to DynamicDescriptorPool so
that cache look up can be cheaper. This also made CacheStats simpler as
well.
With Gfxbench gl_driver2_off and cpu clock locked, this CL improves
score by 2.16% (from 4019 before CL to 4105 after CL). See bug for
detailed data.
Bug: b/237686097
Change-Id: Ia6fa7a6b725974e0150bc21cdf0140d9198c8332
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3735736
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
|
|
6cbf0c01
|
2022-07-14T11:35:46
|
|
Vulkan: Only apply MSAA FF fix up if executable has FF
Due to the permanentlySwitchToFramebufferFetchMode feature, framebuffer
fetch is permanently enabled on first use. Checking
GraphicsPipelineDesc as previously done would thus always return true,
even if the executable does not use framebuffer fetch. As a side
effect, every multisampled draw turned into a per-sample shading draw.
Bug: angleproject:6195
Change-Id: I748abddd2003297d6ff37a98e69cce4621697ad7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3763064
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@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>
|
|
a1f8049a
|
2022-07-06T13:12:20
|
|
Vulkan: Remove VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT
Some virtual machine drivers have performance cost with
VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT. This CL keeps the
individually freed descriptorSet in the pool and try to reuse rather
than free it.
This CL also removes descriptorSetCount from some API since it always
allocate one at a time.
Bug: b/237848471
Change-Id: I029d651101fa1050770eba9e733a166e56a69684
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3749797
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Ian Elliott <ianelliott@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
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>
|
|
f8690429
|
2022-06-27T13:50:44
|
|
Revert "Vulkan: Destroy DescriptorSet cache when it becomes invalid"
This reverts commit 0779ccbcd427dcb00e53afa6385fb4e8e2377993.
Reason for revert: crashes in blink_web_tests on linux-rel
https://ci.chromium.org/ui/p/chromium/builders/try/linux-rel/1051045/overview
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, angleproject:7466
Change-Id: I7e5067de2f2add08af1f9804cc2e952238b2e942
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3726097
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
|
|
e50351cb
|
2022-06-10T22:28:58
|
|
Vulkan: Don't close render pass on framebuffer fetch
For applications that use framebuffer fetch in the same RP as
non-fetch programs, we can save some extra RenderPasses by always
creating our RP objects with input attachments enabled. This works
almost identically except for needing to use the images in a
"GENERAL" layout instead of "COLOR_ATTACHMENT_OPTIMAL". According
to partners it is possible to achieve performance parity even with
GENERAL layout.
To remove any potential negative impacts of using the GENERAL layout,
the context enters this always-framebuffer-fetch mode only and as soon
as a framebuffer fetch program is created. Applications that don't use
framebuffer fetch are thus unaffected.
This eliminates 20 render passes in the Genshin Impact trace (out of
about 58). On a Pixel 6 the resulting benchmark score speeds up by
~25%. For Real Racing 3, the speed up is ~30%.
Based on change by jmadill@chromium.org
Bug: angleproject:7375
Change-Id: Ib6c73e95d06229f8545d502b388ee2a55a582323
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3697308
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
0779ccbc
|
2022-06-10T17:55:54
|
|
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>
|
|
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>
|
|
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>
|
|
23f213d1
|
2022-05-26T23:43:44
|
|
Vulkan: Make drawable size uniform
As a specialization constant, it's impossible to predict the value the
drawable size may take, which in turn makes it impossible to warm up the
Vulkan pipeline cache at link time.
Bug: angleproject:7366
Change-Id: Ia3d1860a4fcb8e3078fdcb8d02a2e0cd173ea028
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3671976
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@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>
|
|
37c53684
|
2022-04-05T15:03:14
|
|
Split Context ResourceUseList to RP Commandbuffers
* Split the resource use lists retained in context between the
render pass command buffer and the outside render pass command
buffer, mostly in vk_helper.cpp and ContextVk.cpp.
Bug: angleproject:7103
Change-Id: Ib696bdec2c545cd7df9ae4ab86c54a294041d908
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3573581
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: 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>
|
|
fcec6904
|
2022-04-13T14:18:06
|
|
Generate feature variable names from display names
The json file now only contains the feature display name. The variable
name is automaticaly derived.
For consistence with Chromium and other Chromium-based projects, the
display name is now always snake_case, and that's what's specified in
the json files. This also makes camelCase variable name generation
trivial (as opposed to the other way around).
Feature overrides now accept both snake_case and camelCase names to
ensure compatibility with existing scripts. This is done by removing _
and comparing override names with feature names in lower case.
Bug: angleproject:6435
Change-Id: I0b6ed2bbf5c312bc4f4be7b3c7d55dbaca2a9886
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3584630
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@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>
|
|
671fcf73
|
2022-02-16T14:22:38
|
|
Vulkan: Add a feature to retain SPIR-V debug info
Add a feature to retain debug info in SPIR-V blob. It is enabled
when validation layers are enabled.
Bug: angleproject:5901
Change-Id: Iccdff31ae0f12fc95d59d20e43e94b6f3d1ae00e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2850388
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: mohan maiya <m.maiya@samsung.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>
|
|
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>
|
|
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>
|
|
6207fe88
|
2022-02-03T14:11:30
|
|
Vulkan: Minor cleanup to DynamicDescriptorPool.
In preparation for future changes.
Bug: angleproject:6776
Change-Id: I0a2ab004883ad482f4ed19075c5f5f4e9c451ae0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3437413
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>
|
|
1608a956
|
2022-02-02T13:54:53
|
|
Vulkan: Revert client vertex data streaming to use DynamicBuffer
In early CL crrev.com/c/3352489, I switched client vertex data streaming
from using DynamicBuffer to sub-allocating from the buffer pool. That
caused CPU overhead regression due to extra cost of handling the
suballocation object creating and garbage collection etc. Even after all
other optimizations I did since then that significantly improved garbage
collection performance, there is still 6% CPU time regression as
measured with gardenscape. This CL moves StreamVertexData() back to use
DynamicBuffer. In order to do that, I have cleaned up DynamicBuffer
interface to be consistent with suballocation interface by storing the
current allocated offset/size in the suballocation object. With that,
the BufferHelper object that returned from DynamicBuffer will be able to
pass around and referenced exactly like it comes from suballocation code
path, and you can retrieve offset/size from that BufferHelper object
instead of having to pass offset around between various function calls.
Given that streaming vertex data from client memory is only possible for
default vertex array and there is only one default vertex array for each
context, this stream vertex data dynamic buffer is essentially a per
context object. So the other change I made here is that I have merged
mDynamicVertexData with default attribute (which uses per context
dynamic buffers) code to use the same sets of dynamic buffers, since you
will only use one or the other but not both.
Bug: b/205337962
Change-Id: I0ceca5b854069f00afdb9544ee86953b9b773821
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3434645
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
be2da234
|
2022-01-30T13:59:21
|
|
Vulkan: Initialize exectuable with invalid uniform serial.
Instead of reserving valid serials from the range of device
serials, we can instead use an invalid serial. We can remove the
extra check for valid this adds if it becomes a hotspot later.
Bug: angleproject:6776
Change-Id: I81a36be503d6464ddc5dbb0e9df907f09dda9182
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3426883
Reviewed-by: Charlie Lao <cclao@google.com>
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>
|
|
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>
|