Commit
41a476ed
authored
by
Committed by
swiftshader-scoped@luci-project-accounts.iam.gserviceaccount.com
Obtain ImageView state uniquely from its identifier
VkImageView state for sampling routine generation was previously
obtained from the SampledImageDescriptor structure, which assumes that
the mapping from the identifier to this state is unique. This assumption
easily breaks as new members field can be added to the descriptor
structure, without taking into account that the identifier values should
be unique for each unique field value.
This change removes the ImageView state members from the descriptor
structure, and instead we obtain them through the identifier,
guaranteeing a unique mapping.
Note that currently this state is compacted into the identifier's
32-bit integer value itself. Should more state be required than what
fits in 32-bit (like is the case for VkSampler objects), the mapping
between identifiers and their state should be handled through an actual
map container.
Bug: b/180511322
Bug: b/152227757
Change-Id: I1568eb67df29eb29ddcbbe906a90d236078e3080
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/52888Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
Kokoro-Result: kokoro <noreply+kokoro@google.com>
Tested-by:
Nicolas Capens <nicolascapens@google.com>
Commit-Queue: Alexis Hétu <sugoi@google.com>
Showing
Please
register
or
sign in
to comment