You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-07 12:30:27 +00:00
Merge pull request #79606 from clayjohn/ShaderRD-compilation-groups
Shader rd compilation groups
This commit is contained in:
@@ -4858,7 +4858,7 @@ Vector<uint8_t> RenderingDeviceVulkan::shader_compile_binary_from_spirv(const Ve
|
||||
return ret;
|
||||
}
|
||||
|
||||
RID RenderingDeviceVulkan::shader_create_from_bytecode(const Vector<uint8_t> &p_shader_binary) {
|
||||
RID RenderingDeviceVulkan::shader_create_from_bytecode(const Vector<uint8_t> &p_shader_binary, RID p_placeholder) {
|
||||
const uint8_t *binptr = p_shader_binary.ptr();
|
||||
uint32_t binsize = p_shader_binary.size();
|
||||
|
||||
@@ -5184,14 +5184,23 @@ RID RenderingDeviceVulkan::shader_create_from_bytecode(const Vector<uint8_t> &p_
|
||||
|
||||
ERR_FAIL_V_MSG(RID(), error_text);
|
||||
}
|
||||
|
||||
RID id = shader_owner.make_rid(shader);
|
||||
RID id;
|
||||
if (p_placeholder.is_null()) {
|
||||
id = shader_owner.make_rid(shader);
|
||||
} else {
|
||||
shader_owner.initialize_rid(p_placeholder, shader);
|
||||
id = p_placeholder;
|
||||
}
|
||||
#ifdef DEV_ENABLED
|
||||
set_resource_name(id, "RID:" + itos(id.get_id()));
|
||||
#endif
|
||||
return id;
|
||||
}
|
||||
|
||||
RID RenderingDeviceVulkan::shader_create_placeholder() {
|
||||
return shader_owner.allocate_rid();
|
||||
}
|
||||
|
||||
uint32_t RenderingDeviceVulkan::shader_get_vertex_input_attribute_mask(RID p_shader) {
|
||||
_THREAD_SAFE_METHOD_
|
||||
|
||||
|
||||
Reference in New Issue
Block a user