Skip to content

Add GPU Readback #25

Description

@PaoloMazzon

Currently, there is no way to poll the swapchain image or other textures after they've been drawn to. There should be some sort of way for a user to get the current state of a texture. This should provide the user a pixel array in the form of RGB888, with an interface such as

void texture_callback(uint8_t *pixels, uint32_t width, uint32_t height, void *data) {...}

void vk2dReadBackTexture(VK_TEXTURE_SWAPCHAIN, texture_callback, NULL);

It would then be VK2D's job to handles all of the heavy lifting which would look like the following:

  1. Create a host-coherent, transfer destination, linear tiling image
  2. Pipeline barrier to transition image layout to transfer source
  3. Copy from swapchain image to other image
  4. Once the submission fence is complete, call the user callback with the host-coherent data

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions