Don't expose individual descriptor set layouts to SPIR-V compilation
Shader compilation requires access to the pipeline layout, but not to
each of its descriptor set layout interfaces. This change ensures that
all information is queried only through the pipeline layout interface.
This facilitates refactoring the pipeline layout object to contain all
this information, instead of depending on the descriptor set layout
objects to remain alive after pipeline layout creation.
The Vulkan spec states that "a VkDescriptorSetLayout object passed as
a parameter to create another object is not further accessed by that
object after the duration of the command it is passed into."
Also consistently use "index" for values that index into an array, and
"offset" for byte offsets. "descriptor" signifies an individual resource
descriptor, while "binding" refers to the descriptor set binding which
is an array (often of just one descriptor). Use "setNumber" and
"bindingNumber" for the 32-bit identifiers used by SPIR-V, to
distinguish them from the actual objects.
Bug: b/154522740
Change-Id: If3f6e56b6769aae6ebbd49109e7dc1e78cf6558c
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/44188
Presubmit-Ready: Nicolas Capens <nicolascapens@google.com>
Tested-by:
Nicolas Capens <nicolascapens@google.com>
Reviewed-by:
Ben Clayton <bclayton@google.com>
Kokoro-Result: kokoro <noreply+kokoro@google.com>
Showing
Please
register
or
sign in
to comment