1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Validate varying count when compiling shaders

This avoids crashing on devices when a number of varyings greater than the device limit is used.

For now this accurately prints an error when compiling the shader, but the error text only pops up in the editor if the number of user varyings is above the limit.
This commit is contained in:
clayjohn
2025-02-12 16:12:46 -08:00
parent 296de7da83
commit 35100396e4
17 changed files with 92 additions and 27 deletions

View File

@@ -184,6 +184,8 @@ public:
virtual String get_video_adapter_api_version() const = 0;
virtual Size2i get_maximum_viewport_size() const = 0;
virtual uint32_t get_maximum_shader_varyings() const = 0;
virtual uint64_t get_maximum_uniform_buffer_size() const = 0;
};
#endif // RENDERER_UTILITIES_H