2022-02-01 05:40:41 +01:00
|
|
|
#pragma once
|
|
|
|
|
2023-01-18 20:06:35 +01:00
|
|
|
#include "vk_core.h"
|
2022-02-01 05:40:41 +01:00
|
|
|
#include "vk_descriptor.h"
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
VkAccessFlags access_mask;
|
|
|
|
VkImageLayout image_layout;
|
|
|
|
VkPipelineStageFlagBits pipelines;
|
|
|
|
} ray_resource_state_t;
|
|
|
|
|
2023-01-18 20:06:35 +01:00
|
|
|
struct xvk_image_s;
|
2023-01-17 07:57:48 +01:00
|
|
|
typedef struct vk_resource_s {
|
2022-02-01 05:40:41 +01:00
|
|
|
VkDescriptorType type;
|
|
|
|
ray_resource_state_t write, read;
|
2023-01-18 20:06:35 +01:00
|
|
|
vk_descriptor_value_t value;
|
2023-01-17 07:57:48 +01:00
|
|
|
} vk_resource_t;
|
2022-02-01 05:40:41 +01:00
|
|
|
|
2023-01-17 07:57:48 +01:00
|
|
|
typedef struct vk_resource_s *vk_resource_p;
|
2022-02-01 05:40:41 +01:00
|
|
|
|
2023-01-17 07:57:48 +01:00
|
|
|
typedef struct {
|
|
|
|
VkPipelineStageFlagBits pipeline;
|
2023-01-21 22:03:57 +01:00
|
|
|
const vk_resource_p *resources;
|
|
|
|
const int *resources_map;
|
|
|
|
vk_descriptor_value_t* values;
|
|
|
|
int count;
|
|
|
|
int write_begin; // Entries starting at this index are written into by the pass
|
|
|
|
} vk_resources_write_descriptors_args_t;
|
|
|
|
|
|
|
|
void R_VkResourcesPrepareDescriptorsValues(VkCommandBuffer cmdbuf, vk_resources_write_descriptors_args_t args);
|
|
|
|
|
2022-02-01 05:40:41 +01:00
|
|
|
|