KhronosGroup / KhronosGroup/Vulkan-ValidationLayers

Idea: detect redundant/duplicate pipeline binds?

Open
#10,074 3 comments 0 reactions 0 assignees View on GitHub
BestPractices
Dominant language
C++
Stars
1k
Forks
504
Avg merge
11h 35m
Merged PRs (30d)
224

Description

**Describe the situation in which you encountered the missing validation**
Issue description: Do the performance validation layers detect if I bind a pipeline that is already bound? Would this be interesting to detect for performance analysis? Would a driver maybe ignore redundant/duplicate pipeline binds?

For example, imagine I want to render 1000 objects of the same type which require the same pipeline:

```cpp
for(const auto& object : objects) {
// bind_pipeline(...)
// ...
// bind_vertex_buffer(object)
// bind_index_buffer(object)
// draw_indexed(object)
}
```

It would be better if the bind_pipeline call would be before the loop. Validation layers could detect this I guess.

**Valid Usage IDs requested**
Please include the valid usage IDs for the checks you are requesting: -

**Additional Context**
-

Contributor guide

Open the contributing guide

Research direction

Start with the performance validation layers and the bind_pipeline call shown in the example; determine whether redundant pipeline binds are currently checked. Define the desired validation behavior and valid usage IDs, then verify it against the repeated-bind loop.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
computer-graphics, devtools, performance
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.