[g3dvl] remove resource_format workaround
authorChristian König <deathsimple@vodafone.de>
Sun, 24 Apr 2011 14:04:23 +0000 (16:04 +0200)
committerChristian König <deathsimple@vodafone.de>
Sun, 24 Apr 2011 14:04:23 +0000 (16:04 +0200)
src/gallium/auxiliary/vl/vl_context.c
src/gallium/include/pipe/p_video_context.h
src/gallium/state_trackers/vdpau/surface.c
src/gallium/state_trackers/xorg/xvmc/surface.c

index 49a9b50863cc41cd9a09fc636d34cb2142989dd3..1240b0b4c32815f83bd77c39a748c4ad3f6d93f9 100644 (file)
@@ -199,10 +199,15 @@ vl_context_create_decoder(struct pipe_video_context *context,
 static struct pipe_video_buffer *
 vl_context_create_buffer(struct pipe_video_context *context,
                          enum pipe_format buffer_format,
-                         const enum pipe_format resource_formats[3],
                          enum pipe_video_chroma_format chroma_format,
                          unsigned width, unsigned height)
 {
+   const enum pipe_format resource_formats[3] = {
+      PIPE_FORMAT_R8_UNORM,
+      PIPE_FORMAT_R8_UNORM,
+      PIPE_FORMAT_R8_UNORM
+   };
+
    struct vl_context *ctx = (struct vl_context*)context;
    struct pipe_video_buffer *result;
    unsigned buffer_width, buffer_height;
index 8775bbb27056903c4b2121c6ad79f36d3436a6cd..7e971641618110e57689b3f483cf212e273b582d 100644 (file)
@@ -121,7 +121,6 @@ struct pipe_video_context
     */
    struct pipe_video_buffer *(*create_buffer)(struct pipe_video_context *context,
                                               enum pipe_format buffer_format,
-                                              const enum pipe_format resource_formats[3],
                                               enum pipe_video_chroma_format chroma_format,
                                               unsigned width, unsigned height);
 
index 57f5563b12fa025e05ecc94aa727fd04b784b8c3..cd2125fce6362550f51a16f8e70b0391cb551799 100644 (file)
@@ -41,12 +41,6 @@ vlVdpVideoSurfaceCreate(VdpDevice device, VdpChromaType chroma_type,
                         uint32_t width, uint32_t height,
                         VdpVideoSurface *surface)
 {
-   const enum pipe_format resource_formats[3] = {
-      PIPE_FORMAT_R8_UNORM,
-      PIPE_FORMAT_R8_UNORM,
-      PIPE_FORMAT_R8_UNORM
-   };
-
    vlVdpSurface *p_surf;
    VdpStatus ret;
 
@@ -77,7 +71,6 @@ vlVdpVideoSurfaceCreate(VdpDevice device, VdpChromaType chroma_type,
    p_surf->device = dev;
    p_surf->video_buffer = dev->context->vpipe->create_buffer(dev->context->vpipe,
                                                              PIPE_FORMAT_YV12, // most common used
-                                                             resource_formats,
                                                              ChromaToPipe(chroma_type),
                                                              width, height);
 
index f8a0f3c7fd9dc5e5cf26415f5b64eafacb41b611..7429fdfcfb95e9742c64d3366fa78a7d3c7c369f 100644 (file)
@@ -284,12 +284,6 @@ unmap_and_flush_surface(XvMCSurfacePrivate *surface)
 PUBLIC
 Status XvMCCreateSurface(Display *dpy, XvMCContext *context, XvMCSurface *surface)
 {
-   const enum pipe_format resource_formats[3] = {
-      PIPE_FORMAT_R8_SNORM,
-      PIPE_FORMAT_R8_SNORM,
-      PIPE_FORMAT_R8_SNORM
-   };
-
    XvMCContextPrivate *context_priv;
    struct pipe_video_context *vpipe;
    XvMCSurfacePrivate *surface_priv;
@@ -313,7 +307,6 @@ Status XvMCCreateSurface(Display *dpy, XvMCContext *context, XvMCSurface *surfac
    surface_priv->decode_buffer = context_priv->decoder->create_buffer(context_priv->decoder);
    surface_priv->mv_stride = surface_priv->decode_buffer->get_mv_stream_stride(surface_priv->decode_buffer);
    surface_priv->video_buffer = vpipe->create_buffer(vpipe, PIPE_FORMAT_YV12, //TODO
-                                                     resource_formats,
                                                      context_priv->decoder->chroma_format,
                                                      context_priv->decoder->width,
                                                      context_priv->decoder->height);