|
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>
|
|
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>
|
|
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>
|
|
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>
|