From 6027cd0a1dc0726b039a96c8d1b811158464540b Mon Sep 17 00:00:00 2001 From: reduz Date: Mon, 16 Aug 2021 14:51:29 -0300 Subject: Fixes to mobile renderer * Make sure shaders are named, to aid in debug in case of failure * SceneRenderRD was being wrongly initialized (virtual functions being called when derivative class not initialized). * Fixed some bugs resulting on the above being corrected. --- servers/rendering/rendering_device.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'servers/rendering/rendering_device.h') diff --git a/servers/rendering/rendering_device.h b/servers/rendering/rendering_device.h index bb028cb84c..e2d207dab2 100644 --- a/servers/rendering/rendering_device.h +++ b/servers/rendering/rendering_device.h @@ -668,9 +668,9 @@ public: }; virtual String shader_get_binary_cache_key() const = 0; - virtual Vector shader_compile_binary_from_spirv(const Vector &p_spirv) = 0; + virtual Vector shader_compile_binary_from_spirv(const Vector &p_spirv, const String &p_shader_name = "") = 0; - virtual RID shader_create_from_spirv(const Vector &p_spirv); + virtual RID shader_create_from_spirv(const Vector &p_spirv, const String &p_shader_name = ""); virtual RID shader_create_from_bytecode(const Vector &p_shader_binary) = 0; virtual uint32_t shader_get_vertex_input_attribute_mask(RID p_shader) = 0; @@ -1200,8 +1200,8 @@ protected: RID _vertex_array_create(uint32_t p_vertex_count, VertexFormatID p_vertex_format, const TypedArray &p_src_buffers); Ref _shader_compile_spirv_from_source(const Ref &p_source, bool p_allow_cache = true); - Vector _shader_compile_binary_from_spirv(const Ref &p_bytecode); - RID _shader_create_from_spirv(const Ref &p_spirv); + Vector _shader_compile_binary_from_spirv(const Ref &p_bytecode, const String &p_shader_name = ""); + RID _shader_create_from_spirv(const Ref &p_spirv, const String &p_shader_name = ""); RID _uniform_set_create(const Array &p_uniforms, RID p_shader, uint32_t p_shader_set); -- cgit v1.2.3