Metal: Implement suppot for clip plane toggling via GPU_clip_distances.

The Metal backend already supports output for the 6 clipping planes via gl_ClipDistances equivalent, however, functionality to toggle clipping plane enablement was missing.

Authored by Apple: Michael Parkin-White

Ref T96261
Depends on D16777

Reviewed By: fclem

Maniphest Tasks: T96261

Differential Revision: https://developer.blender.org/D16813
This commit is contained in:
Jason Fielder
2022-12-20 14:15:52 +01:00
committed by Clément Foucault
parent df1fe18ed7
commit b3464fe152
8 changed files with 113 additions and 12 deletions

View File

@@ -80,6 +80,8 @@ class MTLStateManager : public StateManager {
void mtl_depth_range(float near, float far);
void mtl_stencil_mask(uint mask);
void mtl_stencil_set_func(eGPUStencilTest stencil_func, int ref, uint mask);
void mtl_clip_plane_enable(uint i);
void mtl_clip_plane_disable(uint i);
MEM_CXX_CLASS_ALLOC_FUNCS("MTLStateManager")
};