Fix missing regions

This commit is contained in:
Francisco Javier Trujillo Mata
2025-05-13 17:36:50 +02:00
parent ee208d234a
commit a47fce5a52
3 changed files with 21 additions and 6 deletions

View File

@@ -21,9 +21,14 @@ void sceGuDisable(int state)
case GU_SCISSOR_TEST: case GU_SCISSOR_TEST:
{ {
GuContext *context = &gu_contexts[gu_curr_context]; GuContext *context = &gu_contexts[gu_curr_context];
int orig = 0;
int end = ((gu_draw_buffer.height - 1) << 10) | (gu_draw_buffer.width - 1);
context->scissor_enable = 0; context->scissor_enable = 0;
sendCommandi(SCISSOR1, 0); sendCommandi(SCISSOR1, orig);
sendCommandi(SCISSOR2, ((gu_draw_buffer.height - 1) << 10) | (gu_draw_buffer.width - 1)); sendCommandi(SCISSOR2, end);
sendCommandi(REGION1, orig);
sendCommandi(REGION2, end);
} }
break; break;
case GU_STENCIL_TEST: case GU_STENCIL_TEST:

View File

@@ -21,9 +21,14 @@ void sceGuEnable(int state)
case GU_SCISSOR_TEST: case GU_SCISSOR_TEST:
{ {
GuContext *context = &gu_contexts[gu_curr_context]; GuContext *context = &gu_contexts[gu_curr_context];
int orig = (context->scissor_start[1] << 10) | context->scissor_start[0];
int end = (context->scissor_end[1] << 10) | context->scissor_end[0];
context->scissor_enable = 1; context->scissor_enable = 1;
sendCommandi(SCISSOR1, (context->scissor_start[1] << 10) | context->scissor_start[0]); sendCommandi(SCISSOR1, orig);
sendCommandi(SCISSOR2, (context->scissor_end[1] << 10) | context->scissor_end[0]); sendCommandi(SCISSOR2, end);
sendCommandi(REGION1, orig);
sendCommandi(REGION2, end);
} }
break; break;
case GU_STENCIL_TEST: case GU_STENCIL_TEST:

View File

@@ -19,7 +19,12 @@ void sceGuScissor(int x, int y, int w, int h)
if (context->scissor_enable) if (context->scissor_enable)
{ {
sendCommandi(SCISSOR1, (context->scissor_start[1] << 10) | context->scissor_start[0]); int orig = (context->scissor_start[1] << 10) | context->scissor_start[0];
sendCommandi(SCISSOR2, (context->scissor_end[1] << 10) | context->scissor_end[0]); int end = (context->scissor_end[1] << 10) | context->scissor_end[0];
sendCommandi(SCISSOR1, orig);
sendCommandi(SCISSOR2, end);
sendCommandi(REGION1, orig);
sendCommandi(REGION2, end);
} }
} }