Repository navigation
layersvt: Key DebugMarker object names by device - #46
Merged
olehkuznetsov merged 1 commit intoOct 26, 2026
Conversation
olehkuznetsov
force-pushed
the
pr-debugmarker-device-key
branch
from
October 19, 2026 09:12
fd5e79b to
317d9f9
Compare
Non-dispatchable handles are only unique within their VkDevice, so two devices in one process can return the same handle value. Naming an object on one device overwrote the name of an unrelated object on another, and the lost name was missing from later session replays. Key stored names by device as well as object type and handle. Bug: Test: new tests - DebugMarkerTests#SameHandleOnDifferentDevicesTest Change-Id: I8c0edd4d958451aebf1fbd17df1cb0cb6a6a6964
olehkuznetsov
force-pushed
the
pr-debugmarker-clock-pid
branch
from
October 19, 2026 09:18
6b4218f to
31f5e38
Compare
olehkuznetsov
force-pushed
the
pr-debugmarker-device-key
branch
from
October 19, 2026 09:18
317d9f9 to
ce7f840
Compare
jimblacklercorp
approved these changes
Oct 26, 2026
olehkuznetsov
merged commit Oct 26, 2026
f507037
into
android-graphics:pr-debugmarker-clock-pid
9 checks passed
olehkuznetsov
added a commit
to olehkuznetsov/VulkanTools
that referenced
this pull request
Oct 26, 2026
Non-dispatchable handles are only unique within their VkDevice, so two devices in one process can return the same handle value. Naming an object on one device overwrote the name of an unrelated object on another, and the lost name was missing from later session replays. Key stored names by device as well as object type and handle. Bug: Test: new tests - DebugMarkerTests#SameHandleOnDifferentDevicesTest Change-Id: I8c0edd4d958451aebf1fbd17df1cb0cb6a6a6964
olehkuznetsov
added a commit
to olehkuznetsov/VulkanTools
that referenced
this pull request
Oct 26, 2026
Non-dispatchable handles are only unique within their VkDevice, so two devices in one process can return the same handle value. Naming an object on one device overwrote the name of an unrelated object on another, and the lost name was missing from later session replays. Key stored names by device as well as object type and handle. Bug: Test: new tests - DebugMarkerTests#SameHandleOnDifferentDevicesTest Change-Id: I8c0edd4d958451aebf1fbd17df1cb0cb6a6a6964
olehkuznetsov
added a commit
to olehkuznetsov/VulkanTools
that referenced
this pull request
Oct 28, 2026
Non-dispatchable handles are only unique within their VkDevice, so two devices in one process can return the same handle value. Naming an object on one device overwrote the name of an unrelated object on another, and the lost name was missing from later session replays. Key stored names by device as well as object type and handle. Bug: Test: new tests - DebugMarkerTests#SameHandleOnDifferentDevicesTest Change-Id: I8c0edd4d958451aebf1fbd17df1cb0cb6a6a6964
olehkuznetsov
added a commit
to olehkuznetsov/VulkanTools
that referenced
this pull request
Oct 28, 2026
Non-dispatchable handles are only unique within their VkDevice, so two devices in one process can return the same handle value. Naming an object on one device overwrote the name of an unrelated object on another, and the lost name was missing from later session replays. Key stored names by device as well as object type and handle. Bug: Test: new tests - DebugMarkerTests#SameHandleOnDifferentDevicesTest Change-Id: I8c0edd4d958451aebf1fbd17df1cb0cb6a6a6964
olehkuznetsov
added a commit
that referenced
this pull request
Oct 28, 2026
…estroy (#50) * layersvt: Key DebugMarker object names by device (#46) Non-dispatchable handles are only unique within their VkDevice, so two devices in one process can return the same handle value. Naming an object on one device overwrote the name of an unrelated object on another, and the lost name was missing from later session replays. Key stored names by device as well as object type and handle. Bug: Test: new tests - DebugMarkerTests#SameHandleOnDifferentDevicesTest Change-Id: I8c0edd4d958451aebf1fbd17df1cb0cb6a6a6964 * layersvt: Remove DebugMarker object names on null or empty name (#47) VK_EXT_debug_utils defines a null or empty pObjectName as removing the object's name. DebugMarker stored and emitted the literal "NULL" instead, so cleared objects appeared as "NULL" in traces and were replayed under that name on every later session start. Erase the stored name instead and emit an empty name, so trace consumers treat the object as unnamed from that point on. The removal is a separate method so object destruction can reuse it. Bug: Test: new tests - DebugMarkerTests#NullOrEmptyNameRemovesNameTest Change-Id: Ia6d7df2386b911a0b50911ebc7c5e9176a6a6964 * layersvt: Remove DebugMarker object names on destruction (#48) DebugMarker kept object names until the device was destroyed. Drivers can reuse handle values for new objects, so a new resource inherited the stale name and trace consumers misattributed it. Erase an object's name when its destroy or free command is called, before dispatching downstream, so a handle reused by another thread cannot pick up the old name. Extension destroy commands are intercepted only when the device exposes them. Bug: Test: new tests - DebugMarkerTests#DestroyedObjectNamesRemovedTest, DebugMarkerTests#DestroyedObjectNamesOfOtherTypesRemovedTest, DebugMarkerTests#ExtensionDestroyCommandRequiresDownstreamTest Change-Id: Iad9147fca27b76c329450f0b9f01802a6a6a6964 * layersvt: Emit empty DebugMarker names on device destruction Destroying a device erased the names of its objects without telling trace consumers. Object names are now removed one by one with an empty name packet, so after device destruction the trace processor still showed the old names. Its lookup has no device key, so an object with the same handle value on a later device could resolve a stale name. Emit an empty name packet for each object name that the device owned, using the same packet as per-object removal. The packets are emitted after the lock is released, because the tracing session start observer takes the same lock to replay all names. Bug: Test: new tests - DebugMarkerTests#DestroyDeviceEmitsEmptyNamePacketsTest Change-Id: I5676ac7a0fe723f32b22c19a05cfe3ef6a6a6964
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Non-dispatchable handles are only unique within their VkDevice, so
two devices in one process can return the same handle value. Naming
an object on one device overwrote the name of an unrelated object on
another, and the lost name was missing from later session replays.
Key stored names by device as well as object type and handle.
Bug:
Test: new tests - DebugMarkerTests#SameHandleOnDifferentDevicesTest
Change-Id: I8c0edd4d958451aebf1fbd17df1cb0cb6a6a6964