GS:MTL: Don't dispatch 0-element imgui draws

Metal validation doesn't like them
This commit is contained in:
TellowKrinkle 2023-07-16 02:35:50 -05:00 committed by TellowKrinkle
parent bf34eb32ed
commit 96a43ca254
1 changed files with 2 additions and 0 deletions

View File

@ -2407,6 +2407,8 @@ void GSDeviceMTL::RenderImGui(ImDrawData* data)
{
if (cmd.UserCallback)
[NSException raise:@"Unimplemented" format:@"UserCallback not implemented"];
if (!cmd.ElemCount)
continue;
simd::float4 clip_rect = (ToSimd(cmd.ClipRect) - clip_off.xyxy) * clip_scale.xyxy;
simd::float2 clip_min = clip_rect.xy;