Skip to content

Commit e9e6050

Browse files
committed
Set first provoking vertex on Metal
Signed-off-by: Isaac Marovitz <[email protected]>
1 parent 86b8363 commit e9e6050

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

core/rend/metal/metal_renderer.mm

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#include "hw/aica/dsp.h"
2525
#include "hw/pvr/ta.h"
2626
#include "hw/pvr/pvr_mem.h"
27+
#include "rend/sorter.h"
2728

2829
bool MetalRenderer::Init()
2930
{
@@ -550,6 +551,8 @@
550551
palTsp.ClampV = 1;
551552
[renderEncoder setFragmentSamplerState:samplers.GetSampler(palTsp) atIndex:3];
552553

554+
setFirstProvokingVertex(pvrrc);
555+
553556
// Upload vertex and index buffers
554557
VertexShaderUniforms vtxUniforms {};
555558
vtxUniforms.ndcMat = matrices.GetNormalMatrix();

core/rend/sorter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
#include <cstring>
2020

21-
// Vulkan and DirectX use the color values of the first vertex for flat shaded triangle strips.
21+
// Vulkan, DirectX, and Metal use the color values of the first vertex for flat shaded triangle strips.
2222
// On Dreamcast the last vertex is the provoking one so we must copy it onto the first.
2323
void setFirstProvokingVertex(rend_context& rendContext)
2424
{

0 commit comments

Comments
 (0)