Results 1 to 4 of 4

Thread: Descriptor Tracking Validation

  1. #1
    Junior Member Newbie
    Join Date
    Jul 2018

    Descriptor Tracking Validation

    Hey all,

    I've set up some code to track what resources are set on any given VkDescriptorSet.
    For the project that I'm working on right now, knowing at any given time what resources are set on VkDescriptorSets is pretty critical.
    I'm fairly certain that I've got the code correct...but there's a fair amount of logic to handle immutable samplers from VkDescriptorSetLayouts, binding arrays, binding rollover, etc. so I'm trying to think of ways to get this piece of code under test.

    At the moment I'm updating the VkDescriptorSets then destroying the resources referenced so the validation layer will spit out a message that I can parse to confirm that the bindings would have been correct had the resource not been destroyed.
    I'm not done setting this up yet.

    Does anyone have any great ideas for validating the contents of VkDescriptorSets? Performance doesn't matter.


  2. #2
    Junior Member Newbie
    Join Date
    Jul 2018
    Well, I got it working...

    I'm calling vkUpdateDescriptorSets() then destroying resources and calling vkUpdateDescriptorSets() again with copies to an empty VkDescriptorSet, then parsing the error message from the validation layer.

    Now I've got a follow up question...short of creating a custom version of the validation layer, does anyone know of any way to query its state without triggering an error?


  3. #3
    Senior Member OpenGL Lord
    Join Date
    Mar 2015
    Vulkan is a system where information generally travels in one direction: from the application to the device. If you set some state into the device, the expectation is that you know what that state is.

    Vulkan devices do not store the contents of a descriptor set in a way that would make it convenient (or perhaps even possible) to introspect their contents. This is largely true of all device objects: the number of memory objects you've allocated, the state set into a pipeline, etc. None of that is cached by the device.

    If you need to introspect a device object like this, the proper way to handle it is to write a wrapper interface that stores which objects are being used by which descriptor sets. So instead of calling `vkUpdateDescriptorSet`, you would call your wrapper function, which would walk the descriptor set changes and store any object relationships being set or broken.

  4. #4
    Junior Member Newbie
    Join Date
    Jul 2018
    For sure...that is in fact what I'm doing...I don't expect the core Vulkan API to provide me with VkDescriptorSet state.
    I'm trying to validate that I got all the logic correct to track descriptor changes.
    This validation runs with other unit and integration tests, so I'm not overly concerned with performance...running the validation layer is fine in that regard.
    The validation layer has to keep track of descriptor changes to do its validation...what I'd really like is to have a way to query the validation layer for the state of a VkDescriptorSet without having to trigger errors and parse the resulting message.
    Fwiw, I'll probably fork the validation layer and expose some functionality to let me do just that...I was just wondering if anyone was aware of a preexisting way of getting this info from the validation layer (or any other layer).


Similar Threads

  1. Descriptor pool, Descriptor set, texture?
    By qnoper in forum Vulkan
    Replies: 6
    Last Post: 10-13-2016, 04:43 PM
  2. Replies: 8
    Last Post: 09-05-2011, 04:53 AM
  3. SetPixelFormat -- what is the descriptor for?
    By daniel_oberlin in forum OpenGL: Advanced Coding
    Replies: 1
    Last Post: 12-12-2002, 03:13 PM
  4. Pixelformat Descriptor ...
    By mortennielsen in forum OpenGL: Advanced Coding
    Replies: 3
    Last Post: 12-11-2002, 06:31 AM
  5. Tracking Projectiles?
    By escozooz in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 06-06-2002, 06:41 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Proudly hosted by Digital Ocean