GS:SW: Use restrict on DrawTriangleSection

Improves compiler optimization
This commit is contained in:
TellowKrinkle 2022-05-16 16:32:59 -05:00 committed by tellowkrinkle
parent 24de0866f7
commit e58b1054ea
2 changed files with 4 additions and 4 deletions

View File

@ -553,7 +553,7 @@ void GSRasterizer::DrawTriangle(const GSVertexSW* vertex, const u32* index)
}
}
void GSRasterizer::DrawTriangleSection(int top, int bottom, GSVertexSW2& edge, const GSVertexSW2& dedge, const GSVertexSW2& dscan, const GSVector4& p0)
void GSRasterizer::DrawTriangleSection(int top, int bottom, GSVertexSW2& RESTRICT edge, const GSVertexSW2& RESTRICT dedge, const GSVertexSW2& RESTRICT dscan, const GSVector4& RESTRICT p0)
{
ASSERT(top < bottom);
ASSERT(edge.p.x <= edge.p.y);
@ -732,7 +732,7 @@ void GSRasterizer::DrawTriangle(const GSVertexSW* vertex, const u32* index)
}
}
void GSRasterizer::DrawTriangleSection(int top, int bottom, GSVertexSW& edge, const GSVertexSW& dedge, const GSVertexSW& dscan, const GSVector4& p0)
void GSRasterizer::DrawTriangleSection(int top, int bottom, GSVertexSW& RESTRICT edge, const GSVertexSW& RESTRICT dedge, const GSVertexSW& RESTRICT dscan, const GSVector4& RESTRICT p0)
{
ASSERT(top < bottom);
ASSERT(edge.p.x <= edge.p.y);

View File

@ -150,9 +150,9 @@ protected:
void DrawSprite(const GSVertexSW* vertex, const u32* index);
#if _M_SSE >= 0x501
__forceinline void DrawTriangleSection(int top, int bottom, GSVertexSW2& edge, const GSVertexSW2& dedge, const GSVertexSW2& dscan, const GSVector4& p0);
__forceinline void DrawTriangleSection(int top, int bottom, GSVertexSW2& RESTRICT edge, const GSVertexSW2& RESTRICT dedge, const GSVertexSW2& RESTRICT dscan, const GSVector4& RESTRICT p0);
#else
__forceinline void DrawTriangleSection(int top, int bottom, GSVertexSW& edge, const GSVertexSW& dedge, const GSVertexSW& dscan, const GSVector4& p0);
__forceinline void DrawTriangleSection(int top, int bottom, GSVertexSW& RESTRICT edge, const GSVertexSW& RESTRICT dedge, const GSVertexSW& RESTRICT dscan, const GSVector4& RESTRICT p0);
#endif
void DrawEdge(const GSVertexSW& v0, const GSVertexSW& v1, const GSVertexSW& dv, int orientation, int side);