#include <stdlib.h>
#include <xf86drm.h>
-//#include "dri_bufpool.h"
-//#include "dri_bufmgr.h"
#include "intel_context.h"
#include "intel_winsys.h"
#include "pipe/p_util.h"
#include "pipe/p_inlines.h"
-
-
struct intel_pipe_winsys {
struct pipe_winsys winsys;
struct _DriBufferPool *regionPool;
};
-
/* Turn a pipe winsys into an intel/pipe winsys:
*/
static inline struct intel_pipe_winsys *
}
-/* Most callbacks map direcly onto dri_bufmgr operations:
+/*
+ * Buffer functions.
+ *
+ * Most callbacks map direcly onto dri_bufmgr operations:
*/
+
static void *intel_buffer_map(struct pipe_winsys *winsys,
struct pipe_buffer *buf,
unsigned flags )
driBOUnmap( dri_bo(buf) );
}
-
static void
intel_buffer_destroy(struct pipe_winsys *winsys,
struct pipe_buffer *buf)
FREE(buf);
}
-
-/* Pipe has no concept of pools. We choose the tex/region pool
- * for all buffers.
- * Grabs the hardware lock!
- */
static struct pipe_buffer *
intel_buffer_create(struct pipe_winsys *winsys,
unsigned alignment,
}
-/* The state tracker (should!) keep track of whether the fake
- * frontbuffer has been touched by any rendering since the last time
- * we copied its contents to the real frontbuffer. Our task is easy:
- */
-static void
-intel_flush_frontbuffer( struct pipe_winsys *winsys,
- struct pipe_surface *surf,
- void *context_private)
-{
- struct intel_context *intel = (struct intel_context *) context_private;
- __DRIdrawablePrivate *dPriv = intel->driDrawable;
-
- intelDisplaySurface(dPriv, surf, NULL);
-}
-
/*
- * Deprecated surface functions
+ * Surface functions.
+ *
+ * Deprecated!
*/
+
static struct pipe_surface *
intel_i915_surface_alloc(struct pipe_winsys *winsys)
{
assert("intel_i915_surface_release is deprecated" & 0);
}
-
-
-static const char *
-intel_get_name( struct pipe_winsys *winsys )
-{
- return "Intel/DRI/ttm";
-}
+/*
+ * Fence functions
+ */
static void
intel_fence_reference( struct pipe_winsys *sws,
return driFenceFinish((struct _DriFenceObject *)fence, flag, 0);
}
+
+/*
+ * Mixed functions
+ */
+
+static const char *
+intel_get_name( struct pipe_winsys *winsys )
+{
+ return "Intel/DRI/ttm";
+}
+
+/*
+ * The state tracker (should!) keep track of whether the fake
+ * frontbuffer has been touched by any rendering since the last time
+ * we copied its contents to the real frontbuffer. Our task is easy:
+ */
+static void
+intel_flush_frontbuffer( struct pipe_winsys *winsys,
+ struct pipe_surface *surf,
+ void *context_private)
+{
+ struct intel_context *intel = (struct intel_context *) context_private;
+ __DRIdrawablePrivate *dPriv = intel->driDrawable;
+
+ intelDisplaySurface(dPriv, surf, NULL);
+}
+
struct pipe_winsys *
intel_create_pipe_winsys( int fd, struct _DriFreeSlabManager *fMan )
{
return &iws->winsys;
}
-
void
intel_destroy_pipe_winsys( struct pipe_winsys *winsys )
{
}
free(iws);
}
-