radv: Only save the descriptor set if we have one.
[mesa.git] / src / mesa / drivers / dri / nouveau / nv10_state_fb.c
index 19769e5c47fa363947898080ffeb6c9ffd8f41c7..75931849eb9ffd1cde5caf2f14de5e2121cbc640 100644 (file)
@@ -106,7 +106,7 @@ nv10_emit_framebuffer(struct gl_context *ctx, int emit)
 
        /* At least nv11 seems to get sad if we don't do this before
         * swapping RTs.*/
-       if (context_chipset(ctx) < 0x17) {
+       if (context_eng3d(ctx)->oclass < NV17_3D_CLASS) {
                int i;
 
                for (i = 0; i < 6; i++) {
@@ -140,7 +140,7 @@ nv10_emit_framebuffer(struct gl_context *ctx, int emit)
                PUSH_MTHDl(push, NV10_3D(ZETA_OFFSET), BUFCTX_FB,
                                 s->bo, 0, bo_flags);
 
-               if (context_chipset(ctx) >= 0x17) {
+               if (context_eng3d(ctx)->oclass >= NV17_3D_CLASS) {
                        setup_hierz_buffer(ctx);
                        context_dirty(ctx, ZCLEAR);
                }
@@ -152,6 +152,7 @@ nv10_emit_framebuffer(struct gl_context *ctx, int emit)
 
        context_dirty(ctx, VIEWPORT);
        context_dirty(ctx, SCISSOR);
+       context_dirty(ctx, DEPTH);
 }
 
 void