SpirvShader: Decouple SPIR-V type attributes from object representation
StorageClass, sizeInComponents, isBuiltInBlock are all attributes of the Type, not the Object.
Add 'type' field to Object so type information can easily be looked up regardless of definition opcode.
Add 'element' field to Type, simplifying the likes of WalkAccessChain.
Fixes the weird edge case of OpVariable's sizeInComponents being the size of the pointee, not its type (the pointer).
Bug: b/126126820
Change-Id: I2d1d93e03ee0253a87f831031c3b2806b1d80de0
Reviewed-on: https://swiftshader-review.googlesource.com/c/25408
Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
Tested-by:
Ben Clayton <bclayton@google.com>
Showing
This diff is collapsed.
Click to expand it.
Please
register
or
sign in
to comment