[g3dvl] make resource format selection a public interface
[mesa.git] / src / gallium / state_trackers / vdpau / surface.c
index f0aafae79b5d3ca4c897a8476738959047cc0fa0..2b1eb0471418f6abade9fc1a8eb44d72faa09272 100644 (file)
@@ -41,6 +41,12 @@ 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;
 
@@ -71,6 +77,7 @@ 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);