On Sat, Aug 27, 2016 at 8:01 PM, Ilia Mirkin <[email protected]> wrote: > Experimentally, this is required for glxgears and others to display the > proper colors. > > Signed-off-by: Ilia Mirkin <[email protected]> > --- > src/mesa/drivers/dri/nouveau/nv20_state_frag.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/mesa/drivers/dri/nouveau/nv20_state_frag.c > b/src/mesa/drivers/dri/nouveau/nv20_state_frag.c > index 492ecdc..2c5c2db 100644 > --- a/src/mesa/drivers/dri/nouveau/nv20_state_frag.c > +++ b/src/mesa/drivers/dri/nouveau/nv20_state_frag.c > @@ -67,5 +67,5 @@ nv20_emit_frag(struct gl_context *ctx, int emit) > PUSH_DATA (push, in >> 32); > > BEGIN_NV04(push, NV20_3D(RC_ENABLE), 1); > - PUSH_DATA (push, n); > + PUSH_DATA (push, MAX2(1, n));
As an add-on analysis, it looks like that's what this driver did back in antiquity: https://cgit.freedesktop.org/mesa/mesa/tree/src/mesa/drivers/dri/nouveau/nv10_state_frag.c?h=7.10#n365 *n = log2i(ctx->Texture._EnabledUnits) + 1; Whereas now it does https://cgit.freedesktop.org/mesa/mesa/tree/src/mesa/drivers/dri/nouveau/nv10_state_frag.c?h=12.0#n365 *n = ctx->Texture._MaxEnabledTexImageUnit + 1; The old code would always return at least 1, while the new code will return 0 when there are no enabled tex image units. -ilia > } > -- > 2.7.3 > _______________________________________________ mesa-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-dev
