diff options
author | Christian König <[email protected]> | 2011-04-12 19:21:07 +0200 |
---|---|---|
committer | Christian König <[email protected]> | 2011-04-12 19:21:07 +0200 |
commit | 4f3fb1586aebfe248321e935651b5af92b5a8261 (patch) | |
tree | e726624324d952dec27643f35524c15390209d73 /src/gallium/state_trackers | |
parent | ccc80d2c09ad35f867c0c0a85f7e1cadd73941bb (diff) |
[g3dvl] make resource format selection a public interface
Diffstat (limited to 'src/gallium/state_trackers')
-rw-r--r-- | src/gallium/state_trackers/vdpau/surface.c | 7 | ||||
-rw-r--r-- | src/gallium/state_trackers/xorg/xvmc/surface.c | 7 |
2 files changed, 14 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); diff --git a/src/gallium/state_trackers/xorg/xvmc/surface.c b/src/gallium/state_trackers/xorg/xvmc/surface.c index 68d003e470a..10701856223 100644 --- a/src/gallium/state_trackers/xorg/xvmc/surface.c +++ b/src/gallium/state_trackers/xorg/xvmc/surface.c @@ -197,6 +197,12 @@ 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; @@ -219,6 +225,7 @@ Status XvMCCreateSurface(Display *dpy, XvMCContext *context, XvMCSurface *surfac surface_priv->decode_buffer = context_priv->decoder->create_buffer(context_priv->decoder); 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); |