Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions layers/state_tracker/cmd_buffer_state.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* Copyright (c) 2015-2025 The Khronos Group Inc.
* Copyright (c) 2015-2025 Valve Corporation
* Copyright (c) 2015-2025 LunarG, Inc.
* Copyright (C) 2015-2025 Google Inc.
/* Copyright (c) 2015-2026 The Khronos Group Inc.
* Copyright (c) 2015-2026 Valve Corporation
* Copyright (c) 2015-2026 LunarG, Inc.
* Copyright (C) 2015-2026 Google Inc.
* Copyright (c) 2025 Arm Limited.
* Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights reserved.
* Modifications Copyright (C) 2022 RasterGrid Kft.
Expand Down Expand Up @@ -344,7 +344,6 @@ void CommandBuffer::Destroy() {
for (auto &item : sub_states_) {
item.second->Destroy();
}
sub_states_.clear();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about in Pipeline::Destroy()?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please clarify

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So currently we have use case with command buffers, it depends on the logic probably if other state object might need this (command buffers we referenced via shares ptr and used after deletion). This results in hard crash so if other objects have such scenarios it will be hard to miss

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we now not clear here, but only for pipeline?

I can't tell if this is an issue due to just how Command Buffers (and queues) are the only state we have that we don't derive from CoreChecks

Is it because these are dispatchable handles

I guess if we are clearing it in Pipelines, but not here, curious what is the "rule" to follow

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe ideally to have logic that doesn’t need this but syncval relied on this before, so this just gets old behavior (that’s regression after substates)

Copy link
Copy Markdown
Contributor Author

@artem-lunarg artem-lunarg Jan 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we now not clear here, but only for pipeline?

Ah, I see, indeed. Not sure why we cleared only for command buffers and pipelines and not for others.

StateObject::Destroy();
}

Expand Down