Add Shader compile groups to RD Shader system

This allows us to specify a subset of variants to compile at load time and conditionally other variants later.

This works seamlessly with shader caching.

Needed to ensure that users only pay the cost for variants they use
This commit is contained in:
clayjohn 2023-07-18 11:21:27 +02:00
parent f8dbed4d0a
commit e970f5249c
13 changed files with 355 additions and 140 deletions

View file

@ -89,7 +89,7 @@ void PipelineCacheRD::setup(RID p_shader, RD::RenderPrimitive p_primitive, const
ERR_FAIL_COND(p_shader.is_null());
_clear();
shader = p_shader;
input_mask = RD::get_singleton()->shader_get_vertex_input_attribute_mask(p_shader);
input_mask = 0;
render_primitive = p_primitive;
rasterization_state = p_rasterization_state;
multisample_state = p_multisample;