i965: Represent depth surfaces with isl
[mesa.git] / src / mesa / drivers / dri / nouveau / nv04_state_fb.c
index 91bd0518fa14a20ef806f0d08649a6301d52a7a5..4c17190b8c44776293e1154a3bf62a4982a18287 100644 (file)
 #include "nv04_driver.h"
 
 static inline unsigned
-get_rt_format(gl_format format)
+get_rt_format(mesa_format format)
 {
        switch (format) {
-       case MESA_FORMAT_XRGB8888:
+       case MESA_FORMAT_B8G8R8X8_UNORM:
                return NV04_CONTEXT_SURFACES_3D_FORMAT_COLOR_X8R8G8B8_X8R8G8B8;
-       case MESA_FORMAT_ARGB8888:
+       case MESA_FORMAT_B8G8R8A8_UNORM:
                return NV04_CONTEXT_SURFACES_3D_FORMAT_COLOR_A8R8G8B8;
-       case MESA_FORMAT_RGB565:
+       case MESA_FORMAT_B5G6R5_UNORM:
                return NV04_CONTEXT_SURFACES_3D_FORMAT_COLOR_R5G6B5;
        default:
                assert(0);
@@ -93,6 +93,7 @@ nv04_emit_framebuffer(struct gl_context *ctx, int emit)
 
        /* Recompute the scissor state. */
        context_dirty(ctx, SCISSOR);
+       context_dirty(ctx, CONTROL);
 }
 
 void
@@ -106,12 +107,4 @@ nv04_emit_scissor(struct gl_context *ctx, int emit)
        BEGIN_NV04(push, NV04_SF3D(CLIP_HORIZONTAL), 2);
        PUSH_DATA (push, w << 16 | x);
        PUSH_DATA (push, h << 16 | y);
-
-       /* Messing with surf3d invalidates the engine state. */
-       context_dirty_i(ctx, TEX_ENV, 0);
-       context_dirty_i(ctx, TEX_ENV, 1);
-       context_dirty_i(ctx, TEX_OBJ, 0);
-       context_dirty_i(ctx, TEX_OBJ, 1);
-       context_dirty(ctx, CONTROL);
-       context_dirty(ctx, BLEND);
 }