mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Merge pull request #102792 from clayjohn/varying-crash
Validate varying count when compiling shaders
This commit is contained in:
commit
b607110ad2
17 changed files with 92 additions and 27 deletions
|
|
@ -329,3 +329,11 @@ Size2i Utilities::get_maximum_viewport_size() const {
|
|||
int max_y = device->limit_get(RenderingDevice::LIMIT_MAX_VIEWPORT_DIMENSIONS_Y);
|
||||
return Size2i(max_x, max_y);
|
||||
}
|
||||
|
||||
uint32_t Utilities::get_maximum_shader_varyings() const {
|
||||
return RenderingDevice::get_singleton()->limit_get(RenderingDevice::LIMIT_MAX_SHADER_VARYINGS);
|
||||
}
|
||||
|
||||
uint64_t Utilities::get_maximum_uniform_buffer_size() const {
|
||||
return RenderingDevice::get_singleton()->limit_get(RenderingDevice::LIMIT_MAX_UNIFORM_BUFFER_SIZE);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -117,6 +117,8 @@ public:
|
|||
virtual String get_video_adapter_api_version() const override;
|
||||
|
||||
virtual Size2i get_maximum_viewport_size() const override;
|
||||
virtual uint32_t get_maximum_shader_varyings() const override;
|
||||
virtual uint64_t get_maximum_uniform_buffer_size() const override;
|
||||
};
|
||||
|
||||
} // namespace RendererRD
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue