This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM67A: Optimized Mode for GPU-Buffer transfer available using Vulkan API and GLSL?

Part Number: AM67A


Tool/software:

Hello,

we intend to use GPU shader programs to offload image processing routines from the processor.
However, we observe relatively high transfer times when providing GPU input data and retrieving GPU calculation results.
Here are Vulkan API code instructions I used in the first attempt to populate the render pipeline with work packages.
This is the standard procedure for making host-side memory available on the GPU, which can then be processed there
with a shader program:

vulkan_device_memory< uint32_t >* interleaved_rgb_input_image;

vulkan_device_memory< uint32_t >* interleaved_rgb_internal_image;

vk::CommandBuffer command_buffer;

vk::BufferCopy region(

  0,

  0,

  interleaved_rgb_input_image->get_number_of_elements() * sizeof( uint32_t ) );

// Issue a command to transfer host-side memory to GPU-accessible memory area

command_buffer.copyBuffer(

 interleaved_rgb_input_image->get_buffer(),

 interleaved_rgb_internal_image->get_buffer(),

 1,

 &region );

 

// … Issue further commands, call the shader program, etc.

// Trigger programmed command sequence on GPU

command_buffer.dispatch( group_count_x, group_count_y, 1 );


I don't expect the general API calls to result in the use of DMA mechanisms.
Could you please provide an example showing which commands would need to be
issued via the Vulkan API to use memory areas that work with DMA?


Thanks in advance and greetings
Richard Arndt