Merge pull request #69709 from RandomShaper/refactor_spirv_reflection

Refactor SPIR-V reflection into a generic RenderingDevice feature
This commit is contained in:
Rémi Verschelde 2022-12-15 09:21:35 +01:00
commit 762c6d4b36
No known key found for this signature in database
GPG key ID: C3336907360768E1
8 changed files with 435 additions and 561 deletions

View file

@ -543,10 +543,6 @@ class RenderingDeviceVulkan : public RenderingDevice {
// As a result, we need to figure out quickly when something is no longer "compatible".
// in order to avoid costly rebinds.
enum {
MAX_UNIFORM_SETS = 16
};
struct UniformInfo {
UniformType type = UniformType::UNIFORM_TYPE_MAX;
bool writable = false;
@ -628,8 +624,8 @@ class RenderingDeviceVulkan : public RenderingDevice {
uint32_t fragment_output_mask = 0;
struct PushConstant {
uint32_t push_constant_size = 0;
uint32_t push_constants_vk_stage = 0;
uint32_t size = 0;
uint32_t vk_stages_mask = 0;
};
PushConstant push_constant;
@ -791,7 +787,7 @@ class RenderingDeviceVulkan : public RenderingDevice {
VkPipelineLayout pipeline_layout = VK_NULL_HANDLE; // Not owned, needed for push constants.
VkPipeline pipeline = VK_NULL_HANDLE;
uint32_t push_constant_size = 0;
uint32_t push_constant_stages = 0;
uint32_t push_constant_stages_mask = 0;
};
RID_Owner<RenderPipeline, true> render_pipeline_owner;
@ -802,7 +798,7 @@ class RenderingDeviceVulkan : public RenderingDevice {
VkPipelineLayout pipeline_layout = VK_NULL_HANDLE; // Not owned, needed for push constants.
VkPipeline pipeline = VK_NULL_HANDLE;
uint32_t push_constant_size = 0;
uint32_t push_constant_stages = 0;
uint32_t push_constant_stages_mask = 0;
uint32_t local_group_size[3] = { 0, 0, 0 };
};