summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers
diff options
context:
space:
mode:
authorChristian König <[email protected]>2011-07-08 12:15:48 +0200
committerChristian König <[email protected]>2011-07-08 12:15:48 +0200
commit06ddbc3b8e58a6cf22708263a8b7d16cf1db5dbc (patch)
tree1c712b07bac17c050c1bfd9912a07452c8d68949 /src/gallium/state_trackers
parent2ec350ff1d9f13ec95d7b9d46f57ad9b9efcc8ea (diff)
[g3dvl] remove create_surface from video context
Diffstat (limited to 'src/gallium/state_trackers')
-rw-r--r--src/gallium/state_trackers/vdpau/output.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/gallium/state_trackers/vdpau/output.c b/src/gallium/state_trackers/vdpau/output.c
index 72e63fc2f32..b45f699b83f 100644
--- a/src/gallium/state_trackers/vdpau/output.c
+++ b/src/gallium/state_trackers/vdpau/output.c
@@ -30,6 +30,7 @@
#include <util/u_debug.h>
#include <util/u_memory.h>
+#include <util/u_sampler.h>
#include "vdpau_private.h"
@@ -39,6 +40,7 @@ vlVdpOutputSurfaceCreate(VdpDevice device,
uint32_t width, uint32_t height,
VdpOutputSurface *surface)
{
+ struct pipe_context *pipe;
struct pipe_video_context *context;
struct pipe_resource res_tmpl, *res;
struct pipe_sampler_view sv_templ;
@@ -54,8 +56,9 @@ vlVdpOutputSurfaceCreate(VdpDevice device,
if (!dev)
return VDP_STATUS_INVALID_HANDLE;
+ pipe = dev->context->pipe;
context = dev->context->vpipe;
- if (!context)
+ if (!pipe || !context)
return VDP_STATUS_INVALID_HANDLE;
vlsurface = CALLOC(1, sizeof(vlVdpOutputSurface));
@@ -85,7 +88,7 @@ vlVdpOutputSurfaceCreate(VdpDevice device,
// as long as we don't have a background picture we don't want an alpha channel
sv_templ.swizzle_a = PIPE_SWIZZLE_ONE;
- vlsurface->sampler_view = context->create_sampler_view(context, res, &sv_templ);
+ vlsurface->sampler_view = pipe->create_sampler_view(pipe, res, &sv_templ);
if (!vlsurface->sampler_view) {
FREE(dev);
return VDP_STATUS_ERROR;
@@ -94,7 +97,7 @@ vlVdpOutputSurfaceCreate(VdpDevice device,
memset(&surf_templ, 0, sizeof(surf_templ));
surf_templ.format = res->format;
surf_templ.usage = PIPE_BIND_SAMPLER_VIEW | PIPE_BIND_RENDER_TARGET;
- vlsurface->surface = context->create_surface(context, res, &surf_templ);
+ vlsurface->surface = pipe->create_surface(pipe, res, &surf_templ);
if (!vlsurface->surface) {
FREE(dev);
return VDP_STATUS_ERROR;