diff --git a/source/base.c b/source/base.c index b606cb1..061c8d9 100644 --- a/source/base.c +++ b/source/base.c @@ -168,12 +168,6 @@ void C3Di_UpdateContext(void) int i; C3D_Context* ctx = C3Di_GetContext(); - if (ctx->flags & C3DiF_Program) - { - shaderProgramConfigure(ctx->program, (ctx->flags & C3DiF_VshCode) != 0, (ctx->flags & C3DiF_GshCode) != 0); - ctx->flags &= ~(C3DiF_Program | C3DiF_VshCode | C3DiF_GshCode); - } - if (ctx->flags & C3DiF_FrameBuf) { ctx->flags &= ~C3DiF_FrameBuf; @@ -199,6 +193,12 @@ void C3Di_UpdateContext(void) GPUCMD_AddIncrementalWrites(GPUREG_SCISSORTEST_MODE, ctx->scissor, 3); } + if (ctx->flags & C3DiF_Program) + { + shaderProgramConfigure(ctx->program, (ctx->flags & C3DiF_VshCode) != 0, (ctx->flags & C3DiF_GshCode) != 0); + ctx->flags &= ~(C3DiF_Program | C3DiF_VshCode | C3DiF_GshCode); + } + if (ctx->flags & C3DiF_AttrInfo) { ctx->flags &= ~C3DiF_AttrInfo;