Skip to content

layersvt: Deduplicate DebugMarker object key fields - #52

Open
olehkuznetsov wants to merge 1 commit into
android-graphics:mainfrom
olehkuznetsov:pr-debugmarker-dedup-key
Open

olehkuznetsov wants to merge 1 commit into
android-graphics:mainfrom
olehkuznetsov:pr-debugmarker-dedup-key

Conversation

@olehkuznetsov

Copy link
Copy Markdown

Stacked on #50 (addresses review feedback from #46):

  • Replace DebugObjectName with DebugObjectKey (vk_device, object_type, handle) and DebugObjectKey::Hash, storing object names in std::unordered_map<DebugObjectKey, std::string, DebugObjectKey::Hash> instead of duplicating the three key fields in both the map key and value struct.
  • Use a colliding buffer handle (0x1111) across dev1 and dev2 in DebugMarkerTests.PreDestroyDeviceCleanupTest to verify per-device cleanup when handles collide across devices.

DebugObjectName stored vk_device, object_type, and handle alongside
the object name even though the map key already held the same three
fields. Move those fields into a hashed DebugObjectKey struct and store
names in std::unordered_map<DebugObjectKey, std::string>, and use a
colliding handle across devices in PreDestroyDeviceCleanupTest to cover
per-device cleanup on collision.

Bug:
Test: DebugMarkerTests#PreDestroyDeviceCleanupTest
Change-Id: Iec04eb396077047c0be7df0e908041846a6a6964
@olehkuznetsov
olehkuznetsov force-pushed the pr-debugmarker-dedup-key branch from a179c60 to ad5e123 Compare October 28, 2026 17:23
@olehkuznetsov
olehkuznetsov changed the base branch from pr-debugmarker-remove-on-destroy to main October 28, 2026 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant