Mesa (pipe-video): [g3dvl] set buffer_format correctly

Christian König deathsimple at kemper.freedesktop.org
Thu Apr 7 18:11:38 UTC 2011


Module: Mesa
Branch: pipe-video
Commit: 05a2247a945db21ec5fdb39f6270c5cb2ab6bb6f
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=05a2247a945db21ec5fdb39f6270c5cb2ab6bb6f

Author: Christian König <deathsimple at vodafone.de>
Date:   Wed Apr  6 20:36:31 2011 +0200

[g3dvl] set buffer_format correctly

---

 src/gallium/auxiliary/vl/vl_context.c |   15 ++++++++++-----
 1 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/src/gallium/auxiliary/vl/vl_context.c b/src/gallium/auxiliary/vl/vl_context.c
index e352475..5a55f3b 100644
--- a/src/gallium/auxiliary/vl/vl_context.c
+++ b/src/gallium/auxiliary/vl/vl_context.c
@@ -208,6 +208,7 @@ vl_context_create_buffer(struct pipe_video_context *context,
    };
 
    struct vl_context *ctx = (struct vl_context*)context;
+   struct pipe_video_buffer *result;
    unsigned buffer_width, buffer_height;
 
    assert(context);
@@ -217,11 +218,15 @@ vl_context_create_buffer(struct pipe_video_context *context,
    buffer_width = ctx->pot_buffers ? util_next_power_of_two(width) : width;
    buffer_height = ctx->pot_buffers ? util_next_power_of_two(height) : height;
 
-   return vl_video_buffer_init(context, ctx->pipe,
-                               buffer_width, buffer_height, 1,
-                               chroma_format, 3,
-                               resource_formats,
-                               PIPE_USAGE_STATIC);
+   result = vl_video_buffer_init(context, ctx->pipe,
+                                 buffer_width, buffer_height, 1,
+                                 chroma_format, 3,
+                                 resource_formats,
+                                 PIPE_USAGE_STATIC);
+   if (result) // TODO move format handling into vl_video_buffer
+      result->buffer_format = buffer_format;
+
+   return result;
 }
 
 static struct pipe_video_compositor *




More information about the mesa-commit mailing list