Mesa (gallium-fb-dimensions): llvmpipe: update for framebuffer width/ height removal

Keith Whitwell keithw at kemper.freedesktop.org
Fri Jan 8 14:58:08 UTC 2010


Module: Mesa
Branch: gallium-fb-dimensions
Commit: 2148fa86bcecc8a50c24a75a85a9f5c86b481e2a
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=2148fa86bcecc8a50c24a75a85a9f5c86b481e2a

Author: Keith Whitwell <keithw at vmware.com>
Date:   Fri Jan  8 14:57:08 2010 +0000

llvmpipe: update for framebuffer width/height removal

---

 src/gallium/drivers/llvmpipe/lp_context.h       |    5 +++++
 src/gallium/drivers/llvmpipe/lp_state_derived.c |    4 ++--
 src/gallium/drivers/llvmpipe/lp_state_surface.c |    6 ++++--
 3 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/src/gallium/drivers/llvmpipe/lp_context.h b/src/gallium/drivers/llvmpipe/lp_context.h
index cc4d5ad..5f49b9f 100644
--- a/src/gallium/drivers/llvmpipe/lp_context.h
+++ b/src/gallium/drivers/llvmpipe/lp_context.h
@@ -73,6 +73,11 @@ struct llvmpipe_context {
    struct pipe_viewport_state viewport;
    struct pipe_vertex_buffer vertex_buffer[PIPE_MAX_ATTRIBS];
    struct pipe_vertex_element vertex_element[PIPE_MAX_ATTRIBS];
+   
+   /* Currently not supporting mixed-sized framebuffer surfaces:
+    */
+   unsigned framebuffer_width;
+   unsigned framebuffer_height;
 
    unsigned num_samplers;
    unsigned num_textures;
diff --git a/src/gallium/drivers/llvmpipe/lp_state_derived.c b/src/gallium/drivers/llvmpipe/lp_state_derived.c
index acfd7be..2f16a8a 100644
--- a/src/gallium/drivers/llvmpipe/lp_state_derived.c
+++ b/src/gallium/drivers/llvmpipe/lp_state_derived.c
@@ -166,8 +166,8 @@ compute_cliprect(struct llvmpipe_context *lp)
 {
    /* LP_NEW_FRAMEBUFFER
     */
-   uint surfWidth = lp->framebuffer.width;
-   uint surfHeight = lp->framebuffer.height;
+   uint surfWidth = lp->framebuffer_width;
+   uint surfHeight = lp->framebuffer_height;
 
    /* LP_NEW_RASTERIZER
     */
diff --git a/src/gallium/drivers/llvmpipe/lp_state_surface.c b/src/gallium/drivers/llvmpipe/lp_state_surface.c
index e37ff04..f26ad07 100644
--- a/src/gallium/drivers/llvmpipe/lp_state_surface.c
+++ b/src/gallium/drivers/llvmpipe/lp_state_surface.c
@@ -36,6 +36,7 @@
 #include "draw/draw_context.h"
 
 #include "util/u_format.h"
+#include "util/u_surface.h"
 
 
 /**
@@ -105,8 +106,9 @@ llvmpipe_set_framebuffer_state(struct pipe_context *pipe,
       }
    }
 
-   lp->framebuffer.width = fb->width;
-   lp->framebuffer.height = fb->height;
+   util_framebuffer_uniform_size( fb, 
+                                  &lp->framebuffer_width,
+                                  &lp->framebuffer_height );
 
    lp->dirty |= LP_NEW_FRAMEBUFFER;
 }




More information about the mesa-commit mailing list