Metal: Add back static compilation for no_geom shaders

These are metal specific shaders and needed to be tagged as such before
enabling static compilation.
This commit is contained in:
Clément Foucault
2022-12-08 23:32:17 +01:00
parent 2e61c446ac
commit 237fd48d01
6 changed files with 34 additions and 17 deletions

View File

@@ -48,7 +48,8 @@ GPU_SHADER_CREATE_INFO(eevee_legacy_probe_filter_glossy_no_geom)
.push_constant(Type::FLOAT, "fireflyFactor")
.push_constant(Type::FLOAT, "sampleCount")
.fragment_out(0, Type::VEC4, "FragColor")
// .do_static_compilation(true)
.metal_backend_only(true)
.do_static_compilation(true)
.auto_resource_location(true);
#endif
@@ -87,7 +88,8 @@ GPU_SHADER_CREATE_INFO(eevee_legacy_effect_downsample_cube_no_geom)
.sampler(0, ImageType::FLOAT_CUBE, "source")
.push_constant(Type::FLOAT, "texelSize")
.fragment_out(0, Type::VEC4, "FragColor")
// .do_static_compilation(true)
.metal_backend_only(true)
.do_static_compilation(true)
.auto_resource_location(true);
#endif
@@ -231,7 +233,8 @@ GPU_SHADER_CREATE_INFO(eevee_legacy_lightprobe_planar_downsample)
GPU_SHADER_CREATE_INFO(eevee_legacy_lightprobe_planar_downsample_no_geom)
.additional_info("eevee_legacy_lightprobe_planar_downsample_common")
.vertex_out(eevee_legacy_probe_planar_downsample_geom_frag_iface)
// .do_static_compilation(true)
.metal_backend_only(true)
.do_static_compilation(true)
.auto_resource_location(true);
#endif

View File

@@ -52,7 +52,8 @@ GPU_SHADER_CREATE_INFO(eevee_legacy_volumes_clear_no_geom)
.fragment_out(1, Type::VEC4, "volumeExtinction")
.fragment_out(2, Type::VEC4, "volumeEmissive")
.fragment_out(3, Type::VEC4, "volumePhase")
// .do_static_compilation(true)
.metal_backend_only(true)
.do_static_compilation(true)
.auto_resource_location(true);
#endif
@@ -93,7 +94,8 @@ GPU_SHADER_CREATE_INFO(eevee_legacy_volumes_scatter)
GPU_SHADER_CREATE_INFO(eevee_legacy_volumes_scatter_no_geom)
.additional_info("eevee_legacy_volumes_scatter_common")
.vertex_out(legacy_volume_geom_frag_iface)
// .do_static_compilation(true)
.metal_backend_only(true)
.do_static_compilation(true)
.auto_resource_location(true);
#endif
@@ -110,7 +112,8 @@ GPU_SHADER_CREATE_INFO(eevee_legacy_volumes_scatter_with_lights)
GPU_SHADER_CREATE_INFO(eevee_legacy_volumes_scatter_with_lights_no_geom)
.additional_info("eevee_legacy_volumes_scatter_with_lights_common")
.additional_info("eevee_legacy_volumes_scatter_no_geom")
// .do_static_compilation(true)
.metal_backend_only(true)
.do_static_compilation(true)
.auto_resource_location(true);
#endif
@@ -167,13 +170,15 @@ GPU_SHADER_CREATE_INFO(eevee_legacy_volumes_integration_OPTI)
GPU_SHADER_CREATE_INFO(eevee_legacy_volumes_integration_no_geom)
.additional_info("eevee_legacy_volumes_integration_common_no_geom")
.additional_info("eevee_legacy_volumes_integration_common_no_opti")
// .do_static_compilation(true)
.metal_backend_only(true)
.do_static_compilation(true)
.auto_resource_location(true);
GPU_SHADER_CREATE_INFO(eevee_legacy_volumes_integration_OPTI_no_geom)
.additional_info("eevee_legacy_volumes_integration_common_no_geom")
.additional_info("eevee_legacy_volumes_integration_common_opti")
// .do_static_compilation(true)
.metal_backend_only(true)
.do_static_compilation(true)
.auto_resource_location(true);
#endif

View File

@@ -91,7 +91,8 @@ GPU_SHADER_CREATE_INFO(overlay_armature_shape_outline)
.additional_info("overlay_frag_output", "overlay_armature_common", "draw_globals");
GPU_SHADER_CREATE_INFO(overlay_armature_shape_outline_no_geom)
// .do_static_compilation(true) /* TODO fix on GL */
.metal_backend_only(true)
.do_static_compilation(true)
.vertex_in(0, Type::VEC3, "pos")
.vertex_in(1, Type::VEC3, "snor")
/* Per instance. */
@@ -107,7 +108,8 @@ GPU_SHADER_CREATE_INFO(overlay_armature_shape_outline_clipped)
.additional_info("overlay_armature_shape_outline", "drw_clipped");
GPU_SHADER_CREATE_INFO(overlay_armature_shape_outline_clipped_no_geom)
// .do_static_compilation(true) /* TODO fix on GL */
.metal_backend_only(true)
.do_static_compilation(true)
.additional_info("overlay_armature_shape_outline_no_geom", "drw_clipped");
GPU_SHADER_INTERFACE_INFO(overlay_armature_shape_solid_iface, "")

View File

@@ -203,7 +203,8 @@ GPU_SHADER_CREATE_INFO(overlay_motion_path_line)
.additional_info("draw_view", "draw_globals");
GPU_SHADER_CREATE_INFO(overlay_motion_path_line_no_geom)
// .do_static_compilation(true) /* TODO fix on GL */
.metal_backend_only(true)
.do_static_compilation(true)
.vertex_in(0, Type::VEC3, "pos")
.push_constant(Type::IVEC4, "mpathLineSettings")
.push_constant(Type::BOOL, "selected")
@@ -220,7 +221,8 @@ GPU_SHADER_CREATE_INFO(overlay_motion_path_line_clipped)
.additional_info("overlay_motion_path_line", "drw_clipped");
GPU_SHADER_CREATE_INFO(overlay_motion_path_line_clipped_no_geom)
// .do_static_compilation(true) /* TODO fix on GL */
.metal_backend_only(true)
.do_static_compilation(true)
.additional_info("overlay_motion_path_line_no_geom", "drw_clipped");
GPU_SHADER_INTERFACE_INFO(overlay_motion_path_point_iface, "").flat(Type::VEC4, "finalColor");

View File

@@ -55,7 +55,8 @@ GPU_SHADER_CREATE_INFO(overlay_outline_prepass_wire)
.geometry_source("overlay_outline_prepass_geom.glsl");
GPU_SHADER_CREATE_INFO(overlay_outline_prepass_wire_no_geom)
// .do_static_compilation(true)
.metal_backend_only(true)
.do_static_compilation(true)
.additional_info("overlay_outline_prepass_wire_common")
.vertex_source("overlay_outline_prepass_vert_no_geom.glsl");

View File

@@ -49,7 +49,8 @@ GPU_SHADER_CREATE_INFO(gpu_shader_3D_polyline_uniform_color)
.additional_info("gpu_shader_3D_polyline");
GPU_SHADER_CREATE_INFO(gpu_shader_3D_polyline_uniform_color_no_geom)
// .do_static_compilation(true) /* TODO fix on GL */
.metal_backend_only(true)
.do_static_compilation(true)
.define("UNIFORM")
.push_constant(Type::VEC4, "color")
.additional_info("gpu_shader_3D_polyline_no_geom");
@@ -63,7 +64,8 @@ GPU_SHADER_CREATE_INFO(gpu_shader_3D_polyline_uniform_color_clipped)
.additional_info("gpu_shader_3D_polyline_uniform_color");
GPU_SHADER_CREATE_INFO(gpu_shader_3D_polyline_uniform_color_clipped_no_geom)
// .do_static_compilation(true) /* TODO fix on GL */
.metal_backend_only(true)
.do_static_compilation(true)
/* TODO(fclem): Put in an UBO to fit the 128byte requirement. */
.push_constant(Type::MAT4, "ModelMatrix")
.push_constant(Type::VEC4, "ClipPlane")
@@ -77,7 +79,8 @@ GPU_SHADER_CREATE_INFO(gpu_shader_3D_polyline_flat_color)
.additional_info("gpu_shader_3D_polyline");
GPU_SHADER_CREATE_INFO(gpu_shader_3D_polyline_flat_color_no_geom)
// .do_static_compilation(true) /* TODO fix on GL */
.metal_backend_only(true)
.do_static_compilation(true)
.define("FLAT")
.vertex_in(1, Type::VEC4, "color")
.additional_info("gpu_shader_3D_polyline_no_geom");
@@ -89,7 +92,8 @@ GPU_SHADER_CREATE_INFO(gpu_shader_3D_polyline_smooth_color)
.additional_info("gpu_shader_3D_polyline");
GPU_SHADER_CREATE_INFO(gpu_shader_3D_polyline_smooth_color_no_geom)
// .do_static_compilation(true) /* TODO fix on GL */
.metal_backend_only(true)
.do_static_compilation(true)
.define("SMOOTH")
.vertex_in(1, Type::VEC4, "color")
.additional_info("gpu_shader_3D_polyline_no_geom");