Skip to content

Commit

Permalink
Fix metal command list flush
Browse files Browse the repository at this point in the history
  • Loading branch information
luboslenco committed Jul 31, 2023
1 parent 492a0d0 commit 628cc36
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 0 additions & 3 deletions base/Sources/arm/ui/UIBase.hx
Original file line number Diff line number Diff line change
Expand Up @@ -835,9 +835,6 @@ class UIBase {
if (mouse.started() && Config.keymap.action_paint == Config.keymap.action_rotate) {
action_paint_remap = Config.keymap.action_paint;
RenderUtil.pickPosNorTex();
#if kha_metal
RenderUtil.pickPosNorTex(); // Flush
#end
var isMesh = Math.abs(Context.raw.posXPicked) < 50 && Math.abs(Context.raw.posYPicked) < 50 && Math.abs(Context.raw.posZPicked) < 50;
#if kha_android
// Allow rotating with both pen and touch, because hovering a pen prevents touch input on android
Expand Down
4 changes: 4 additions & 0 deletions base/Sources/arm/util/RenderUtil.hx
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,10 @@ class RenderUtil {
arm.render.RenderPathPaint.setPlaneMesh();
}
arm.render.RenderPathPaint.commandsPaint(false);
#if kha_metal
// Flush command list
arm.render.RenderPathPaint.commandsPaint(false);
#end
if (Context.raw.paint2d) {
arm.render.RenderPathPaint.restorePlaneMesh();
}
Expand Down

0 comments on commit 628cc36

Please sign in to comment.