#define SVGA_RELOC_WRITE 0x1
#define SVGA_RELOC_READ 0x2
-
+#define SVGA_FENCE_FLAG_EXEC (1 << 0)
+#define SVGA_FENCE_FLAG_QUERY (1 << 1)
/** Opaque surface handle */
struct svga_winsys_surface;
-/** Opaque buffer handle */
-struct svga_winsys_handle;
-
/**
* SVGA per-context winsys interface.
/**
* Emit a relocation for a host surface.
*
- * @param flags PIPE_BUFFER_USAGE_GPU_READ/WRITE
+ * @param flags bitmask of SVGA_RELOC_* flags
*
* NOTE: Order of this call does matter. It should be the same order
* as relocations appear in the command buffer.
/**
* Emit a relocation for a guest memory region.
*
- * @param flags PIPE_BUFFER_USAGE_GPU_READ/WRITE
+ * @param flags bitmask of SVGA_RELOC_* flags
*
* NOTE: Order of this call does matter. It should be the same order
* as relocations appear in the command buffer.
void
(*destroy)(struct svga_winsys_screen *sws);
+ SVGA3dHardwareVersion
+ (*get_hw_version)(struct svga_winsys_screen *sws);
+
boolean
(*get_cap)(struct svga_winsys_screen *sws,
SVGA3dDevCapIndex index,
/**
* Buffer management. Buffer attributes are mostly fixed over its lifetime.
*
- * XXX usage seems to be a bitmask of SVGA_BUFFER_USAGE_* flags.
+ * @param usage bitmask of SVGA_BUFFER_USAGE_* flags.
*
* alignment indicates the client's alignment requirements, eg for
* SSE instructions.
/**
* Map the entire data store of a buffer object into the client's address.
- * flags is a bitmask of:
- * - PB_USAGE_CPU_READ/WRITE
- * - PB_USAGE_DONTBLOCK
- * - PB_USAGE_UNSYNCHRONIZED
+ * usage is a bitmask of PIPE_TRANSFER_*
*/
void *
(*buffer_map)( struct svga_winsys_screen *sws,
};
-struct pipe_screen *
-svga_screen_create(struct svga_winsys_screen *sws);
-
struct svga_winsys_screen *
svga_winsys_screen(struct pipe_screen *screen);
+struct svga_winsys_context *
+svga_winsys_context(struct pipe_context *context);
+
struct pipe_resource *
svga_screen_buffer_wrap_surface(struct pipe_screen *screen,
enum SVGA3dSurfaceFormat format,