summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/vdpau/surface.c
diff options
context:
space:
mode:
authorChristian König <[email protected]>2011-04-12 19:21:07 +0200
committerChristian König <[email protected]>2011-04-12 19:21:07 +0200
commit4f3fb1586aebfe248321e935651b5af92b5a8261 (patch)
treee726624324d952dec27643f35524c15390209d73 /src/gallium/state_trackers/vdpau/surface.c
parentccc80d2c09ad35f867c0c0a85f7e1cadd73941bb (diff)
[g3dvl] make resource format selection a public interface
Diffstat (limited to 'src/gallium/state_trackers/vdpau/surface.c')
-rw-r--r--src/gallium/state_trackers/vdpau/surface.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/vdpau/surface.c b/src/gallium/state_trackers/vdpau/surface.c
index f0aafae79b5..2b1eb047141 100644
--- a/src/gallium/state_trackers/vdpau/surface.c
+++ b/src/gallium/state_trackers/vdpau/surface.c
@@ -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);