Merge pull request #69709 from RandomShaper/refactor_spirv_reflection
Refactor SPIR-V reflection into a generic RenderingDevice feature
This commit is contained in:
commit
762c6d4b36
8 changed files with 435 additions and 561 deletions
|
|
@ -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 };
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue