cso: can memcmp-compare pipe_framebuffer_state now it includes fb dimensions
authorKeith Whitwell <keith@tungstengraphics.com>
Thu, 1 May 2008 16:55:52 +0000 (17:55 +0100)
committerKeith Whitwell <keith@tungstengraphics.com>
Fri, 2 May 2008 10:11:27 +0000 (11:11 +0100)
src/gallium/auxiliary/cso_cache/cso_context.c

index eef898f4865d6779cc10881be7081a35dbfc8456..5d626b7cdc7f91807a7e8fd199a5b6f56120b80f 100644 (file)
@@ -769,8 +769,7 @@ void cso_restore_vertex_shader(struct cso_context *ctx)
 enum pipe_error cso_set_framebuffer(struct cso_context *ctx,
                                     const struct pipe_framebuffer_state *fb)
 {
-   /* XXX this memcmp() fails to detect buffer size changes */
-   if (1/*memcmp(&ctx->fb, fb, sizeof(*fb))*/) {
+   if (memcmp(&ctx->fb, fb, sizeof(*fb)) != 0) {
       ctx->fb = *fb;
       ctx->pipe->set_framebuffer_state(ctx->pipe, fb);
    }