spirv-reader: Add method to be used in tests later

Bug: tint:508
Change-Id: Ifd83bcfe168a2be0a11e8a81e392ba20101fc586
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/48865
Auto-Submit: David Neto <dneto@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
This commit is contained in:
David Neto 2021-04-26 09:56:05 +00:00 committed by Commit Bot service account
parent 12353bc5fd
commit 8f9de8a509
1 changed files with 6 additions and 0 deletions

View File

@ -507,6 +507,12 @@ class ParserImpl : Reader {
return 0;
}
/// @param entry_point the SPIR-V ID of an entry point.
/// @returns the entry point info for the given ID
const std::vector<EntryPointInfo>& GetEntryPointInfo(uint32_t entry_point) {
return function_to_ep_info_[entry_point];
}
private:
/// Converts a specific SPIR-V type to a Tint type. Integer case
sem::Type* ConvertType(const spvtools::opt::analysis::Integer* int_ty);