Exemplo n.º 1
0
static struct pipe_resource *
identity_screen_resource_from_handle(struct pipe_screen *_screen,
                                     const struct pipe_resource *templ,
                                     struct winsys_handle *handle)
{
   struct identity_screen *id_screen = identity_screen(_screen);
   struct pipe_screen *screen = id_screen->screen;
   struct pipe_resource *result;

   /* TODO trace call */

   result = screen->resource_from_handle(screen, templ, handle);

   result = identity_resource_create(identity_screen(_screen), result);

   return result;
}
Exemplo n.º 2
0
static const char *
identity_screen_get_vendor(struct pipe_screen *_screen)
{
   struct identity_screen *id_screen = identity_screen(_screen);
   struct pipe_screen *screen = id_screen->screen;

   return screen->get_vendor(screen);
}
Exemplo n.º 3
0
static uint64_t
identity_screen_get_timestamp(struct pipe_screen *_screen)
{
   struct identity_screen *id_screen = identity_screen(_screen);
   struct pipe_screen *screen = id_screen->screen;

   return screen->get_timestamp(screen);
}
Exemplo n.º 4
0
static float
identity_screen_get_paramf(struct pipe_screen *_screen,
                           enum pipe_capf param)
{
   struct identity_screen *id_screen = identity_screen(_screen);
   struct pipe_screen *screen = id_screen->screen;

   return screen->get_paramf(screen,
                             param);
}
Exemplo n.º 5
0
static int
identity_screen_get_shader_param(struct pipe_screen *_screen,
                          unsigned shader, enum pipe_shader_cap param)
{
   struct identity_screen *id_screen = identity_screen(_screen);
   struct pipe_screen *screen = id_screen->screen;

   return screen->get_shader_param(screen, shader,
                            param);
}
Exemplo n.º 6
0
static void
identity_screen_destroy(struct pipe_screen *_screen)
{
   struct identity_screen *id_screen = identity_screen(_screen);
   struct pipe_screen *screen = id_screen->screen;

   screen->destroy(screen);

   FREE(id_screen);
}
Exemplo n.º 7
0
static boolean
identity_screen_fence_signalled(struct pipe_screen *_screen,
                                struct pipe_fence_handle *fence)
{
   struct identity_screen *id_screen = identity_screen(_screen);
   struct pipe_screen *screen = id_screen->screen;

   return screen->fence_signalled(screen,
                                  fence);
}
Exemplo n.º 8
0
static boolean
identity_screen_fence_finish(struct pipe_screen *_screen,
                             struct pipe_fence_handle *fence,
                             uint64_t timeout)
{
   struct identity_screen *id_screen = identity_screen(_screen);
   struct pipe_screen *screen = id_screen->screen;

   return screen->fence_finish(screen,
                               fence,
                               timeout);
}
Exemplo n.º 9
0
static void
identity_screen_fence_reference(struct pipe_screen *_screen,
                                struct pipe_fence_handle **ptr,
                                struct pipe_fence_handle *fence)
{
   struct identity_screen *id_screen = identity_screen(_screen);
   struct pipe_screen *screen = id_screen->screen;

   screen->fence_reference(screen,
                           ptr,
                           fence);
}
Exemplo n.º 10
0
static struct pipe_context *
identity_screen_context_create(struct pipe_screen *_screen,
                               void *priv)
{
   struct identity_screen *id_screen = identity_screen(_screen);
   struct pipe_screen *screen = id_screen->screen;
   struct pipe_context *result;

   result = screen->context_create(screen, priv);
   if (result)
      return identity_context_create(_screen, result);
   return NULL;
}
Exemplo n.º 11
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);
}
Exemplo n.º 12
0
static struct pipe_resource *
identity_screen_resource_create(struct pipe_screen *_screen,
                                const struct pipe_resource *templat)
{
   struct identity_screen *id_screen = identity_screen(_screen);
   struct pipe_screen *screen = id_screen->screen;
   struct pipe_resource *result;

   result = screen->resource_create(screen,
                                    templat);

   if (result)
      return identity_resource_create(id_screen, result);
   return NULL;
}
Exemplo n.º 13
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);
}
Exemplo n.º 14
0
static boolean
identity_screen_is_format_supported(struct pipe_screen *_screen,
                                    enum pipe_format format,
                                    enum pipe_texture_target target,
                                    unsigned sample_count,
                                    unsigned tex_usage)
{
   struct identity_screen *id_screen = identity_screen(_screen);
   struct pipe_screen *screen = id_screen->screen;

   return screen->is_format_supported(screen,
                                      format,
                                      target,
                                      sample_count,
                                      tex_usage);
}
Exemplo n.º 15
0
struct pipe_context *
identity_context_create(struct pipe_screen *_screen, struct pipe_context *pipe)
{
   struct identity_context *id_pipe;
   (void)identity_screen(_screen);

   id_pipe = CALLOC_STRUCT(identity_context);
   if (!id_pipe) {
      return NULL;
   }

   id_pipe->base.winsys = NULL;
   id_pipe->base.screen = _screen;
   id_pipe->base.priv = pipe->priv; /* expose wrapped data */
   id_pipe->base.draw = NULL;

   id_pipe->base.destroy = identity_destroy;
   id_pipe->base.draw_arrays = identity_draw_arrays;
   id_pipe->base.draw_elements = identity_draw_elements;
   id_pipe->base.draw_range_elements = identity_draw_range_elements;
   id_pipe->base.create_query = identity_create_query;
   id_pipe->base.destroy_query = identity_destroy_query;
   id_pipe->base.begin_query = identity_begin_query;
   id_pipe->base.end_query = identity_end_query;
   id_pipe->base.get_query_result = identity_get_query_result;
   id_pipe->base.create_blend_state = identity_create_blend_state;
   id_pipe->base.bind_blend_state = identity_bind_blend_state;
   id_pipe->base.delete_blend_state = identity_delete_blend_state;
   id_pipe->base.create_sampler_state = identity_create_sampler_state;
   id_pipe->base.bind_fragment_sampler_states = identity_bind_fragment_sampler_states;
   id_pipe->base.bind_vertex_sampler_states = identity_bind_vertex_sampler_states;
   id_pipe->base.delete_sampler_state = identity_delete_sampler_state;
   id_pipe->base.create_rasterizer_state = identity_create_rasterizer_state;
   id_pipe->base.bind_rasterizer_state = identity_bind_rasterizer_state;
   id_pipe->base.delete_rasterizer_state = identity_delete_rasterizer_state;
   id_pipe->base.create_depth_stencil_alpha_state = identity_create_depth_stencil_alpha_state;
   id_pipe->base.bind_depth_stencil_alpha_state = identity_bind_depth_stencil_alpha_state;
   id_pipe->base.delete_depth_stencil_alpha_state = identity_delete_depth_stencil_alpha_state;
   id_pipe->base.create_fs_state = identity_create_fs_state;
   id_pipe->base.bind_fs_state = identity_bind_fs_state;
   id_pipe->base.delete_fs_state = identity_delete_fs_state;
   id_pipe->base.create_vs_state = identity_create_vs_state;
   id_pipe->base.bind_vs_state = identity_bind_vs_state;
   id_pipe->base.delete_vs_state = identity_delete_vs_state;
   id_pipe->base.set_blend_color = identity_set_blend_color;
   id_pipe->base.set_stencil_ref = identity_set_stencil_ref;
   id_pipe->base.set_clip_state = identity_set_clip_state;
   id_pipe->base.set_constant_buffer = identity_set_constant_buffer;
   id_pipe->base.set_framebuffer_state = identity_set_framebuffer_state;
   id_pipe->base.set_polygon_stipple = identity_set_polygon_stipple;
   id_pipe->base.set_scissor_state = identity_set_scissor_state;
   id_pipe->base.set_viewport_state = identity_set_viewport_state;
   id_pipe->base.set_fragment_sampler_textures = identity_set_fragment_sampler_textures;
   id_pipe->base.set_vertex_sampler_textures = identity_set_vertex_sampler_textures;
   id_pipe->base.set_vertex_buffers = identity_set_vertex_buffers;
   id_pipe->base.set_vertex_elements = identity_set_vertex_elements;
   id_pipe->base.surface_copy = identity_surface_copy;
   id_pipe->base.surface_fill = identity_surface_fill;
   id_pipe->base.clear = identity_clear;
   id_pipe->base.flush = identity_flush;
   id_pipe->base.is_texture_referenced = identity_is_texture_referenced;
   id_pipe->base.is_buffer_referenced = identity_is_buffer_referenced;

   id_pipe->pipe = pipe;

   return &id_pipe->base;
}
Exemplo n.º 16
0
struct pipe_context *
identity_context_create(struct pipe_screen *_screen, struct pipe_context *pipe)
{
   struct identity_context *id_pipe;
   (void)identity_screen(_screen);

   id_pipe = CALLOC_STRUCT(identity_context);
   if (!id_pipe) {
      return NULL;
   }

   id_pipe->base.screen = _screen;
   id_pipe->base.priv = pipe->priv; /* expose wrapped data */
   id_pipe->base.draw = NULL;

   id_pipe->base.destroy = identity_destroy;
   id_pipe->base.draw_vbo = identity_draw_vbo;
   id_pipe->base.create_query = identity_create_query;
   id_pipe->base.destroy_query = identity_destroy_query;
   id_pipe->base.begin_query = identity_begin_query;
   id_pipe->base.end_query = identity_end_query;
   id_pipe->base.get_query_result = identity_get_query_result;
   id_pipe->base.create_blend_state = identity_create_blend_state;
   id_pipe->base.bind_blend_state = identity_bind_blend_state;
   id_pipe->base.delete_blend_state = identity_delete_blend_state;
   id_pipe->base.create_sampler_state = identity_create_sampler_state;
   id_pipe->base.bind_fragment_sampler_states = identity_bind_fragment_sampler_states;
   id_pipe->base.bind_vertex_sampler_states = identity_bind_vertex_sampler_states;
   id_pipe->base.delete_sampler_state = identity_delete_sampler_state;
   id_pipe->base.create_rasterizer_state = identity_create_rasterizer_state;
   id_pipe->base.bind_rasterizer_state = identity_bind_rasterizer_state;
   id_pipe->base.delete_rasterizer_state = identity_delete_rasterizer_state;
   id_pipe->base.create_depth_stencil_alpha_state = identity_create_depth_stencil_alpha_state;
   id_pipe->base.bind_depth_stencil_alpha_state = identity_bind_depth_stencil_alpha_state;
   id_pipe->base.delete_depth_stencil_alpha_state = identity_delete_depth_stencil_alpha_state;
   id_pipe->base.create_fs_state = identity_create_fs_state;
   id_pipe->base.bind_fs_state = identity_bind_fs_state;
   id_pipe->base.delete_fs_state = identity_delete_fs_state;
   id_pipe->base.create_vs_state = identity_create_vs_state;
   id_pipe->base.bind_vs_state = identity_bind_vs_state;
   id_pipe->base.delete_vs_state = identity_delete_vs_state;
   id_pipe->base.create_vertex_elements_state = identity_create_vertex_elements_state;
   id_pipe->base.bind_vertex_elements_state = identity_bind_vertex_elements_state;
   id_pipe->base.delete_vertex_elements_state = identity_delete_vertex_elements_state;
   id_pipe->base.set_blend_color = identity_set_blend_color;
   id_pipe->base.set_stencil_ref = identity_set_stencil_ref;
   id_pipe->base.set_clip_state = identity_set_clip_state;
   id_pipe->base.set_sample_mask = identity_set_sample_mask;
   id_pipe->base.set_constant_buffer = identity_set_constant_buffer;
   id_pipe->base.set_framebuffer_state = identity_set_framebuffer_state;
   id_pipe->base.set_polygon_stipple = identity_set_polygon_stipple;
   id_pipe->base.set_scissor_state = identity_set_scissor_state;
   id_pipe->base.set_viewport_state = identity_set_viewport_state;
   id_pipe->base.set_fragment_sampler_views = identity_set_fragment_sampler_views;
   id_pipe->base.set_vertex_sampler_views = identity_set_vertex_sampler_views;
   id_pipe->base.set_vertex_buffers = identity_set_vertex_buffers;
   id_pipe->base.set_index_buffer = identity_set_index_buffer;
   id_pipe->base.resource_copy_region = identity_resource_copy_region;
   id_pipe->base.clear = identity_clear;
   id_pipe->base.clear_render_target = identity_clear_render_target;
   id_pipe->base.clear_depth_stencil = identity_clear_depth_stencil;
   id_pipe->base.flush = identity_flush;
   id_pipe->base.create_surface = identity_context_create_surface;
   id_pipe->base.surface_destroy = identity_context_surface_destroy;
   id_pipe->base.create_sampler_view = identity_context_create_sampler_view;
   id_pipe->base.sampler_view_destroy = identity_context_sampler_view_destroy;
   id_pipe->base.get_transfer = identity_context_get_transfer;
   id_pipe->base.transfer_destroy = identity_context_transfer_destroy;
   id_pipe->base.transfer_map = identity_context_transfer_map;
   id_pipe->base.transfer_unmap = identity_context_transfer_unmap;
   id_pipe->base.transfer_flush_region = identity_context_transfer_flush_region;
   id_pipe->base.transfer_inline_write = identity_context_transfer_inline_write;
   id_pipe->base.blit = identity_blit;

   id_pipe->pipe = pipe;

   return &id_pipe->base;
}