MCPcopy Create free account
hub / github.com/KhronosGroup/Vulkan-ValidationLayers / Unwrap

Method Unwrap

layers/chassis/dispatch_object.h:196–201  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

194 // Unwrap a handle.
195 template <typename HandleType>
196 HandleType Unwrap(HandleType wrapped_handle) {
197 if (wrapped_handle == (HandleType)VK_NULL_HANDLE) return wrapped_handle;
198 auto iter = unique_id_mapping.find(CastToUint64(wrapped_handle));
199 if (iter == unique_id_mapping.end()) return (HandleType)0;
200 return (HandleType)iter->second;
201 }
202
203 // Wrap a newly created handle with a new unique ID, and return the new ID.
204 template <typename HandleType>

Calls 3

CastToUint64Function · 0.85
findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected