mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Micro-optimization: Don't need to check drawcalls for 0. Extract shared expression. Yes I checked assembly.
This commit is contained in:
parent
52ad0d0335
commit
a2fe906534
2 changed files with 4 additions and 10 deletions
|
@ -1944,7 +1944,7 @@ bool GPUCommon::DescribeCodePtr(const u8 *ptr, std::string &name) {
|
|||
|
||||
void GPUCommon::UpdateUVScaleOffset() {
|
||||
#ifdef _M_SSE
|
||||
__m128i values = _mm_slli_epi32(_mm_load_si128((const __m128i *) & gstate.texscaleu), 8);
|
||||
__m128i values = _mm_slli_epi32(_mm_load_si128((const __m128i *)&gstate.texscaleu), 8);
|
||||
_mm_storeu_si128((__m128i *)&gstate_c.uv, values);
|
||||
#elif PPSSPP_ARCH(ARM_NEON)
|
||||
const uint32x4_t values = vshlq_n_u32(vld1q_u32((const u32 *)&gstate.texscaleu), 8);
|
||||
|
|
|
@ -949,8 +949,6 @@ void GPUCommonHW::Execute_Prim(u32 op, u32 diff) {
|
|||
}
|
||||
|
||||
u32 count = op & 0xFFFF;
|
||||
if (count == 0)
|
||||
return;
|
||||
|
||||
// Must check this after SetRenderFrameBuffer so we know SKIPDRAW_NON_DISPLAYED_FB.
|
||||
if (gstate_c.skipDrawReason & (SKIPDRAW_SKIPFRAME | SKIPDRAW_NON_DISPLAYED_FB)) {
|
||||
|
@ -1017,11 +1015,6 @@ void GPUCommonHW::Execute_Prim(u32 op, u32 diff) {
|
|||
case GE_CMD_PRIM:
|
||||
{
|
||||
u32 count = data & 0xFFFF;
|
||||
if (count == 0) {
|
||||
// Ignore.
|
||||
break;
|
||||
}
|
||||
|
||||
GEPrimitiveType newPrim = static_cast<GEPrimitiveType>((data >> 16) & 7);
|
||||
SetDrawType(DRAW_PRIM, newPrim);
|
||||
// TODO: more efficient updating of verts/inds
|
||||
|
@ -1151,8 +1144,9 @@ bail:
|
|||
}
|
||||
}
|
||||
|
||||
gpuStats.vertexGPUCycles += vertexCost_ * totalVertCount;
|
||||
cyclesExecuted += vertexCost_ * totalVertCount;
|
||||
int cycles = vertexCost_ * totalVertCount;
|
||||
gpuStats.vertexGPUCycles += cycles;
|
||||
cyclesExecuted += cycles;
|
||||
}
|
||||
|
||||
void GPUCommonHW::Execute_Bezier(u32 op, u32 diff) {
|
||||
|
|
Loading…
Add table
Reference in a new issue