summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlon Levy <alevy@redhat.com>2011-07-23 15:48:24 +0300
committerAlon Levy <alevy@redhat.com>2011-08-26 16:22:13 +0300
commitb9ab603b12e2c5cbac6c3c9a0e5101c9719518db (patch)
tree4526e141956f69b7cfd7151512a8db707146323d /src
parent558dde17202f9d546c6b33462807451593ec4efd (diff)
remote: (wip) winsys (from old, doesn't build), remote makefile
Diffstat (limited to 'src')
-rw-r--r--src/gallium/winsys/sw/remote_xlib/remote_winsys.h90
1 files changed, 90 insertions, 0 deletions
diff --git a/src/gallium/winsys/sw/remote_xlib/remote_winsys.h b/src/gallium/winsys/sw/remote_xlib/remote_winsys.h
new file mode 100644
index 0000000000..6f103bbd06
--- /dev/null
+++ b/src/gallium/winsys/sw/remote_xlib/remote_winsys.h
@@ -0,0 +1,90 @@
+/**************************************************************************
+ *
+ * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+#ifndef TR_WINSYS_H_
+#define TR_WINSYS_H_
+
+
+#include "pipe/p_compiler.h"
+#include "util/u_debug.h"
+//#include "pipe/p_winsys.h"
+#include "pipe/p_screen.h"
+#include "pipe/p_context.h"
+#include "util/u_simple_screen.h"
+#include <remote_screen.h>
+
+
+/**
+ * It often happens that new data is written directly to the user buffers
+ * without mapping/unmapping. This flag marks user buffers, so that their
+ * contents can be dumpped before being used by the pipe context.
+ */
+#define remote_BUFFER_USAGE_USER (1 << 31)
+
+
+/* Trying to do xlib style inheritance, not sure yet
+ * what is the right approach so using this ifdef to keep the
+ * old code */
+#define REMOTE_USES_SW_WINSYS
+
+#ifdef REMOTE_USES_SW_WINSYS
+#include "state_tracker/sw_winsys.h"
+// TODO - include the actual header with Display
+typedef struct Display Display;
+#else
+typedef struct Display Display; // leave opaque
+#endif
+
+
+static INLINE struct remote_winsys *
+remote_winsys(struct pipe_winsys *winsys)
+{
+ assert(winsys);
+ return (struct remote_winsys *)winsys;
+}
+
+struct remote_winsys
+{
+#ifdef REMOTE_USES_SW_WINSYS
+ struct sw_winsys base;
+#else
+ struct pipe_winsys base;
+#endif
+ struct remote_screen* screen;
+ Display *display;
+};
+
+struct pipe_buffer* create_anon_buffer(unsigned);
+
+struct pipe_winsys * remote_winsys_create();
+
+
+void
+remote_winsys_user_buffer_update(struct pipe_winsys *winsys,
+ struct pipe_buffer *buffer);
+
+#endif /* TR_WINSYS_H_ */