diff --git a/hw/xbox/nv2a/pgraph.c b/hw/xbox/nv2a/pgraph.c index 39e72f42e9..259d585494 100644 --- a/hw/xbox/nv2a/pgraph.c +++ b/hw/xbox/nv2a/pgraph.c @@ -3747,7 +3747,6 @@ static void pgraph_bind_shaders(PGRAPHState *pg) /* register combiner stuff */ state.psh.window_clip_exclusive = pg->regs[NV_PGRAPH_SETUPRASTER] & NV_PGRAPH_SETUPRASTER_WINDOWCLIPTYPE; - assert(!state.psh.window_clip_exclusive); /* FIXME: Untested */ state.psh.combiner_control = pg->regs[NV_PGRAPH_COMBINECTL]; state.psh.shader_stage_program = pg->regs[NV_PGRAPH_SHADERPROG]; state.psh.other_stage_input = pg->regs[NV_PGRAPH_SHADERCTL]; diff --git a/hw/xbox/nv2a/psh.c b/hw/xbox/nv2a/psh.c index 92c00957a8..edebbc480f 100644 --- a/hw/xbox/nv2a/psh.c +++ b/hw/xbox/nv2a/psh.c @@ -621,19 +621,17 @@ static MString* psh_convert(struct PixelShader *ps) " greaterThan(gl_FragCoord.xy-0.5, clipRegion[i].zw));\n" " if (!any(clipTest)) {\n"); if (ps->state.window_clip_exclusive) { - /* Pixel in clip region = exclude by discarding */ mstring_append(clip, " discard;\n"); - assert(false); /* Untested */ } else { - /* Pixel in clip region = mark pixel as contained and leave */ mstring_append(clip, " clipContained = true;\n" " break;\n"); } mstring_append(clip, " }\n" "}\n"); - /* Check for inclusive window clip */ if (!ps->state.window_clip_exclusive) { - mstring_append(clip, "if (!clipContained) { discard; }\n"); + mstring_append(clip, "if (!clipContained) {\n" + " discard;\n" + "}\n"); } /* calculate perspective-correct inputs */