Ejemplo n.º 1
0
static void
identity_resource_copy_region(struct pipe_context *_pipe,
                              struct pipe_resource *_dst,
                              unsigned dst_level,
                              unsigned dstx,
                              unsigned dsty,
                              unsigned dstz,
                              struct pipe_resource *_src,
                              unsigned src_level,
                              const struct pipe_box *src_box)
{
   struct identity_context *id_pipe = identity_context(_pipe);
   struct identity_resource *id_resource_dst = identity_resource(_dst);
   struct identity_resource *id_resource_src = identity_resource(_src);
   struct pipe_context *pipe = id_pipe->pipe;
   struct pipe_resource *dst = id_resource_dst->resource;
   struct pipe_resource *src = id_resource_src->resource;

   pipe->resource_copy_region(pipe,
                              dst,
                              dst_level,
                              dstx,
                              dsty,
                              dstz,
                              src,
                              src_level,
                              src_box);
}
Ejemplo n.º 2
0
static void
identity_blit(struct pipe_context *_pipe,
              const struct pipe_blit_info *info)
{
   struct identity_context *id_pipe = identity_context(_pipe);
   struct pipe_context *pipe = id_pipe->pipe;
   struct pipe_blit_info blit = *info;

   blit.src.resource = identity_resource(blit.src.resource)->resource;
   blit.dst.resource = identity_resource(blit.dst.resource)->resource;

   pipe->blit(pipe, &blit);
}
Ejemplo n.º 3
0
static boolean
identity_screen_resource_get_handle(struct pipe_screen *_screen,
                                    struct pipe_resource *_resource,
                                    struct winsys_handle *handle)
{
   struct identity_screen *id_screen = identity_screen(_screen);
   struct identity_resource *id_resource = identity_resource(_resource);
   struct pipe_screen *screen = id_screen->screen;
   struct pipe_resource *resource = id_resource->resource;

   /* TODO trace call */

   return screen->resource_get_handle(screen, resource, handle);
}
Ejemplo n.º 4
0
static void
identity_screen_flush_frontbuffer(struct pipe_screen *_screen,
                                  struct pipe_resource *_resource,
                                  unsigned level, unsigned layer,
                                  void *context_private)
{
   struct identity_screen *id_screen = identity_screen(_screen);
   struct identity_resource *id_resource = identity_resource(_resource);
   struct pipe_screen *screen = id_screen->screen;
   struct pipe_resource *resource = id_resource->resource;

   screen->flush_frontbuffer(screen,
                             resource,
                             level, layer,
                             context_private);
}
Ejemplo n.º 5
0
static struct pipe_surface *
identity_context_create_surface(struct pipe_context *_pipe,
                                struct pipe_resource *_resource,
                                const struct pipe_surface *templ)
{
   struct identity_context *id_context = identity_context(_pipe);
   struct identity_resource *id_resource = identity_resource(_resource);
   struct pipe_context *pipe = id_context->pipe;
   struct pipe_resource *resource = id_resource->resource;
   struct pipe_surface *result;

   result = pipe->create_surface(pipe,
                                 resource,
                                 templ);

   if (result)
      return identity_surface_create(id_context, id_resource, result);
   return NULL;
}
Ejemplo n.º 6
0
static struct pipe_transfer *
identity_context_get_transfer(struct pipe_context *_context,
                              struct pipe_resource *_resource,
                              unsigned level,
                              unsigned usage,
                              const struct pipe_box *box)
{
   struct identity_context *id_context = identity_context(_context);
   struct identity_resource *id_resource = identity_resource(_resource);
   struct pipe_context *context = id_context->pipe;
   struct pipe_resource *resource = id_resource->resource;
   struct pipe_transfer *result;

   result = context->get_transfer(context,
                                  resource,
                                  level,
                                  usage,
                                  box);

   if (result)
      return identity_transfer_create(id_context, id_resource, result);
   return NULL;
}
Ejemplo n.º 7
0
static void 
identity_context_transfer_inline_write(struct pipe_context *_context,
                                       struct pipe_resource *_resource,
                                       unsigned level,
                                       unsigned usage,
                                       const struct pipe_box *box,
                                       const void *data,
                                       unsigned stride,
                                       unsigned layer_stride)
{
   struct identity_context *id_context = identity_context(_context);
   struct identity_resource *id_resource = identity_resource(_resource);
   struct pipe_context *context = id_context->pipe;
   struct pipe_resource *resource = id_resource->resource;

   context->transfer_inline_write(context,
                                  resource,
                                  level,
                                  usage,
                                  box,
                                  data,
                                  stride,
                                  layer_stride);
}
Ejemplo n.º 8
0
static void
identity_screen_resource_destroy(struct pipe_screen *screen,
                                 struct pipe_resource *_resource)
{
   identity_resource_destroy(identity_resource(_resource));
}