Skip to content

Commit

Permalink
Merge pull request KhronosGroup#2957 from greg-lunarg/p2933
Browse files Browse the repository at this point in the history
Restore legacy interface for remap()
  • Loading branch information
greg-lunarg authored Jun 1, 2022
2 parents 4c3e00b + 9e2b914 commit 2be1561
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
9 changes: 9 additions & 0 deletions SPIRV/SPVRemapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1517,6 +1517,15 @@ namespace spv {
spv.swap(in_spv);
}

// remap from a memory image - legacy interface without white list
void spirvbin_t::remap(std::vector<std::uint32_t>& in_spv, std::uint32_t opts)
{
stripWhiteList.clear();
spv.swap(in_spv);
remap(opts);
spv.swap(in_spv);
}

} // namespace SPV

#endif // defined (use_cpp11)
Expand Down
3 changes: 3 additions & 0 deletions SPIRV/SPVRemapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,9 @@ class spirvbin_t : public spirvbin_base_t
void remap(std::vector<std::uint32_t>& spv, const std::vector<std::string>& whiteListStrings,
std::uint32_t opts = DO_EVERYTHING);

// remap on an existing binary in memory - legacy interface without white list
void remap(std::vector<std::uint32_t>& spv, std::uint32_t opts = DO_EVERYTHING);

// Type for error/log handler functions
typedef std::function<void(const std::string&)> errorfn_t;
typedef std::function<void(const std::string&)> logfn_t;
Expand Down

0 comments on commit 2be1561

Please sign in to comment.