mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Merge pull request #111183 from stuartcarnie/matias-uma-pc-pr
Add Persistent Buffers utilizing UMA
This commit is contained in:
commit
edbfb7a6ec
38 changed files with 2848 additions and 1466 deletions
|
|
@ -413,6 +413,7 @@ void ShaderBakerExportPlugin::_customize_shader_version(ShaderRD *p_shader, RID
|
|||
work_item.cache_path = group_items[group].cache_path;
|
||||
work_item.shader_name = p_shader->get_name();
|
||||
work_item.stage_sources = p_shader->version_build_variant_stage_sources(p_version, i);
|
||||
work_item.dynamic_buffers = p_shader->get_dynamic_buffers();
|
||||
work_item.variant = i;
|
||||
|
||||
WorkerThreadPool::TaskID task_id = WorkerThreadPool::get_singleton()->add_template_task(this, &ShaderBakerExportPlugin::_process_work_item, work_item);
|
||||
|
|
@ -428,7 +429,7 @@ void ShaderBakerExportPlugin::_customize_shader_version(ShaderRD *p_shader, RID
|
|||
void ShaderBakerExportPlugin::_process_work_item(WorkItem p_work_item) {
|
||||
if (!tasks_cancelled) {
|
||||
// Only process the item if the tasks haven't been cancelled by the user yet.
|
||||
Vector<RD::ShaderStageSPIRVData> spirv_data = ShaderRD::compile_stages(p_work_item.stage_sources);
|
||||
Vector<RD::ShaderStageSPIRVData> spirv_data = ShaderRD::compile_stages(p_work_item.stage_sources, p_work_item.dynamic_buffers);
|
||||
ERR_FAIL_COND_MSG(spirv_data.is_empty(), "Unable to retrieve SPIR-V data for shader");
|
||||
|
||||
Ref<RenderingShaderContainer> shader_container = shader_container_format->create_container();
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@ protected:
|
|||
String cache_path;
|
||||
String shader_name;
|
||||
Vector<String> stage_sources;
|
||||
Vector<uint64_t> dynamic_buffers;
|
||||
int64_t variant = 0;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue