assert(buffer);
xsp_buf->mapped_data = xsp_buf->data;
+
return xsp_buf->mapped_data;
}
surface->nblocksy = pf_get_nblocksy(&surface->block, height);
surface->stride = round_up(surface->nblocksx * surface->block.size, ALIGNMENT);
surface->usage = flags;
- /* XXX: Need to consider block dims? See xm_winsys.c */
- surface->buffer = pws->buffer_create(pws, ALIGNMENT, PIPE_BUFFER_USAGE_PIXEL, surface->stride * height);
+ surface->buffer = pws->buffer_create(pws, ALIGNMENT, PIPE_BUFFER_USAGE_PIXEL, surface->stride * surface->nblocksy);
return 0;
}
*surface = NULL;
}
+static void xsp_fence_reference(struct pipe_winsys *pws, struct pipe_fence_handle **ptr, struct pipe_fence_handle *fence)
+{
+ assert(pws);
+ assert(ptr);
+ assert(fence);
+}
+
+static int xsp_fence_signalled(struct pipe_winsys *pws, struct pipe_fence_handle *fence, unsigned flag)
+{
+ assert(pws);
+ assert(fence);
+
+ return 0;
+}
+
+static int xsp_fence_finish(struct pipe_winsys *pws, struct pipe_fence_handle *fence, unsigned flag)
+{
+ assert(pws);
+ assert(fence);
+
+ return 0;
+}
+
static void xsp_flush_frontbuffer(struct pipe_winsys *pws, struct pipe_surface *surface, void *context_private)
{
struct xsp_pipe_winsys *xsp_winsys;
return "X11 SoftPipe";
}
-/* softpipe_winsys implementation */
-
-static boolean xsp_is_format_supported(struct softpipe_winsys *spws, enum pipe_format format)
-{
- assert(spws);
-
- /* TODO: Test that 'format' is equal to our output window's format */
- return TRUE;
-}
-
/* Show starts here */
struct pipe_context* create_pipe_context(Display *display)
{
struct xsp_pipe_winsys *xsp_winsys;
- struct softpipe_winsys *sp_winsys;
struct pipe_screen *p_screen;
struct pipe_context *p_context;
xsp_winsys->base.surface_alloc = xsp_surface_alloc;
xsp_winsys->base.surface_alloc_storage = xsp_surface_alloc_storage;
xsp_winsys->base.surface_release = xsp_surface_release;
+ xsp_winsys->base.fence_reference = xsp_fence_reference;
+ xsp_winsys->base.fence_signalled = xsp_fence_signalled;
+ xsp_winsys->base.fence_finish = xsp_fence_finish;
xsp_winsys->base.flush_frontbuffer = xsp_flush_frontbuffer;
xsp_winsys->base.get_name = xsp_get_name;
xsp_winsys->display = display;
XDestroyImage(template);
}
-
- sp_winsys = calloc(1, sizeof(struct softpipe_winsys));
- sp_winsys->is_format_supported = xsp_is_format_supported;
p_screen = softpipe_create_screen((struct pipe_winsys*)xsp_winsys);
- p_context = softpipe_create(p_screen, (struct pipe_winsys*)xsp_winsys, sp_winsys);
+ p_context = softpipe_create(p_screen, (struct pipe_winsys*)xsp_winsys, NULL);
return p_context;
}
* XvMC defines 64 element blocks (8x8 elements).
* Elements are 8 bits when they represent color values,
* 9 bits when they reprecent DCT coefficients, we
- * store them in 2 bytes in either case. DCT coefficients
- * can be signed or unsigned, at our option.
+ * store them in 2 bytes in either case.
*/
#define BLOCK_SIZE (64 * 2)