vulkan: use images

The filter can now run shadertoy filters.
This commit is contained in:
Wim Taymans 2022-05-31 18:00:24 +02:00
parent 24fc972164
commit b02ebec954
5 changed files with 102 additions and 63 deletions

View file

@ -20,7 +20,8 @@ struct push_constants {
struct vulkan_buffer {
int fd;
VkBuffer buffer;
VkImage image;
VkImageView view;
VkDeviceMemory memory;
};
@ -32,7 +33,6 @@ struct vulkan_stream {
uint32_t busy_buffer_id;
uint32_t ready_buffer_id;
uint32_t bufferSize;
struct vulkan_buffer buffers[MAX_BUFFERS];
uint32_t n_buffers;
};
@ -49,6 +49,7 @@ struct vulkan_state {
VkPipeline pipeline;
VkPipelineLayout pipelineLayout;
const char *shaderName;
VkShaderModule computeShaderModule;
VkCommandPool commandPool;