tint/reader/spirv: Work around pointers to null store types.
Bug: tint:1838 Change-Id: I84564a1b9888634808af2a1c7bb1e77c80947216 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/119700 Commit-Queue: Ben Clayton <bclayton@google.com> Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: David Neto <dneto@google.com>
This commit is contained in:
parent
151913d29b
commit
a5b9e96b39
|
@ -180,6 +180,12 @@ Pointer::Pointer(const Type* t, type::AddressSpace s, type::Access a)
|
||||||
Pointer::Pointer(const Pointer&) = default;
|
Pointer::Pointer(const Pointer&) = default;
|
||||||
|
|
||||||
const ast::Type* Pointer::Build(ProgramBuilder& b) const {
|
const ast::Type* Pointer::Build(ProgramBuilder& b) const {
|
||||||
|
auto store_type = type->Build(b);
|
||||||
|
if (!store_type) {
|
||||||
|
// TODO(crbug.com/tint/1838): We should not be constructing pointers with 'void' store
|
||||||
|
// types.
|
||||||
|
return b.ty("invalid_spirv_ptr_type");
|
||||||
|
}
|
||||||
return b.ty.pointer(type->Build(b), address_space, access);
|
return b.ty.pointer(type->Build(b), address_space, access);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue