KhronosGroup / KhronosGroup/Vulkan-ValidationLayers

Reduce calls to vkGetPhysicalDeviceFormatProperties

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

Description

We call `DispatchGetPhysicalDeviceFormatProperties` a LOT and might be better to have some caching mechanism. We have helpers like `GetPDFormatProperties` but still makes the driver call each time. Some calls are in things like `vkCmdSetVertexInputEXT` which is likely being called a lot for things using shader object workloads

The one issue is around the fact there now 4 format properties structs (details
https://github.com/KhronosGroup/Vulkan-Guide/blob/main/chapters/extensions/VK_KHR_extended_flags.adoc#when-64-bits-is-not-enough)

I also don't know if the best solution is a hashmap or not

Regardless would be something good to look into

Contributor guide

Open the contributing guide

Research direction

Start by tracing DispatchGetPhysicalDeviceFormatProperties through the existing GetPDFormatProperties helpers and the vkCmdSetVertexInputEXT call sites mentioned in the issue. Determine how caching can account for the four format-property structs, then verify that repeated queries avoid driver calls without changing returned properties.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
computer-graphics, performance
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.