GPU: tiny optimization and log fix

This commit is contained in:
Henrik Rydgard 2013-08-06 19:08:38 +02:00
parent 201282f28c
commit 773115bb6d
4 changed files with 6 additions and 6 deletions

View File

@ -338,7 +338,7 @@ void GLES_GPU::FastRunLoop(DisplayList &list) {
u32 cmd = op >> 24;
u32 diff = op ^ gstate.cmdmem[cmd];
CheckFlushOp(op, diff);
CheckFlushOp(cmd, diff);
gstate.cmdmem[cmd] = op;
ExecuteOp(op, diff);
@ -346,8 +346,7 @@ void GLES_GPU::FastRunLoop(DisplayList &list) {
}
}
inline void GLES_GPU::CheckFlushOp(u32 op, u32 diff) {
u32 cmd = op >> 24;
inline void GLES_GPU::CheckFlushOp(int cmd, u32 diff) {
if (flushBeforeCommand_[cmd] == 1 || (diff && flushBeforeCommand_[cmd] == 2))
{
if (dumpThisFrame_) {
@ -358,7 +357,7 @@ inline void GLES_GPU::CheckFlushOp(u32 op, u32 diff) {
}
void GLES_GPU::PreExecuteOp(u32 op, u32 diff) {
CheckFlushOp(op, diff);
CheckFlushOp(op >> 24, diff);
}
void GLES_GPU::ExecuteOp(u32 op, u32 diff) {

View File

@ -73,7 +73,7 @@ protected:
private:
void DoBlockTransfer();
void ApplyDrawState(int prim);
void CheckFlushOp(u32 op, u32 diff);
void CheckFlushOp(int cmd, u32 diff);
void BuildReportingInfo();
FramebufferManager framebufferManager_;

View File

@ -1057,6 +1057,7 @@ u32 TransformDrawEngine::ComputeHash() {
int vertexSize = dec_->GetDecVtxFmt().stride;
// TODO: Add some caps both for numDrawCalls and num verts to check?
// It is really very expensive to check all the vertex data so often.
for (int i = 0; i < numDrawCalls; i++) {
if (!drawCalls[i].inds) {
fullhash += CityHash32((const char *)drawCalls[i].verts, vertexSize * drawCalls[i].vertexCount);

View File

@ -1074,7 +1074,7 @@ void GeDisassembleOp(u32 pc, u32 op, u32 prev, char *buffer) {
if (data & ~0x7F)
sprintf(buffer, "BONE #%i (extra %x)", data & 0x7F, data);
else
sprintf(buffer, "BONE #%i", data & 0xF);
sprintf(buffer, "BONE #%i", data & 0x7F);
break;
case GE_CMD_BONEMATRIXDATA: