From e880294d9f867ecde3da694b90793f78359ddae9 Mon Sep 17 00:00:00 2001 From: Fabio Alessandrelli Date: Sat, 18 Dec 2021 11:27:13 +0100 Subject: [PATCH] [Headless] Workaround texture load failure. Some assets are loaded based on OS/server feature detection, namely textures (but potentially others). The ResourceImporter will fail to load a texture if the OS reports not supporting it. The OS, in turn, checks texture format support via the RenderingServer. This commit makes the dummy rasterizer report known texture formats as supported (although unused), so that scenes can be correctly loaded when they include references to imported textures. --- servers/rendering/rasterizer_dummy.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/servers/rendering/rasterizer_dummy.h b/servers/rendering/rasterizer_dummy.h index 3451ea2d393..01e96b3bc6b 100644 --- a/servers/rendering/rasterizer_dummy.h +++ b/servers/rendering/rasterizer_dummy.h @@ -692,7 +692,9 @@ public: virtual void update_memory_info() override {} virtual uint64_t get_rendering_info(RS::RenderingInfo p_info) override { return 0; } - bool has_os_feature(const String &p_feature) const override { return false; } + bool has_os_feature(const String &p_feature) const override { + return p_feature == "rgtc" || p_feature == "bptc" || p_feature == "s3tc" || p_feature == "etc" || p_feature == "etc2"; + } void update_dirty_resources() override {}