From 1514e1a5b7e15ec0c11cd40c2b9389982bd5d00e Mon Sep 17 00:00:00 2001 From: Jason Fielder Date: Thu, 22 Sep 2022 17:40:45 +0200 Subject: Metal: First set of Geometry Shader alternative implementations using SSBO vertex shader fetch. These implementations remove dependency on the Geometry pass by instead invoking one vertex shader instance for each expected output vertex, matching what a geometry shader would emit. Each vertex shader instance is then responsible for calculating the same output position based on its vertex_id as the logic would in the geometry shader version. SSBO Vertex fetch enables full random-access into a vertex buffer by binding it as a read-only SSBO. This enables each instance to read neighbouring vertex data to perform contextual calculations as a geometry shader would, for cases where attribute Multiload is not supported. Authored by Apple: Michael Parkin-White Ref T96261 Reviewed By: fclem Differential Revision: https://developer.blender.org/D15901 --- source/blender/gpu/metal/mtl_shader.mm | 1 + 1 file changed, 1 insertion(+) (limited to 'source/blender/gpu/metal') diff --git a/source/blender/gpu/metal/mtl_shader.mm b/source/blender/gpu/metal/mtl_shader.mm index 3b27b60bca0..006d3394378 100644 --- a/source/blender/gpu/metal/mtl_shader.mm +++ b/source/blender/gpu/metal/mtl_shader.mm @@ -539,6 +539,7 @@ void MTLShader::push_constant_bindstate_mark_dirty(bool is_dirty) { push_constant_modified_ = is_dirty; } + /** \} */ /* -------------------------------------------------------------------- */ -- cgit v1.2.3