X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fmesa%2Fdrivers%2Fdri%2Fnouveau%2Fnv04_state_fb.c;h=4c17190b8c44776293e1154a3bf62a4982a18287;hb=67b53ee41837bb4438dd473f92b4906734cc4fbe;hp=91bd0518fa14a20ef806f0d08649a6301d52a7a5;hpb=2e47d01c9e5325906cf3bb979279599991c6328e;p=mesa.git diff --git a/src/mesa/drivers/dri/nouveau/nv04_state_fb.c b/src/mesa/drivers/dri/nouveau/nv04_state_fb.c index 91bd0518fa1..4c17190b8c4 100644 --- a/src/mesa/drivers/dri/nouveau/nv04_state_fb.c +++ b/src/mesa/drivers/dri/nouveau/nv04_state_fb.c @@ -32,14 +32,14 @@ #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); }