summaryrefslogtreecommitdiff
path: root/sample-implementation-tmp/0006-winsys-xlib-st-es-Advertise-st_api.h-support.patch
blob: 8229027efbae2472318aa58c74e8e77fd6b9f822 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
From 7a244a27fa8613acfb67d1e8cf08909136d2b4b3 Mon Sep 17 00:00:00 2001
From: Chia-I Wu <olv@lunarg.com>
Date: Sun, 7 Feb 2010 20:17:48 +0800
Subject: [PATCH 6/6] winsys/xlib, st/es: Advertise st_api.h support.

---
 src/gallium/state_trackers/es/Makefile |    1 +
 src/gallium/state_trackers/es/st_es1.c |    6 ++++++
 src/gallium/state_trackers/es/st_es2.c |    6 ++++++
 src/gallium/winsys/xlib/xlib.c         |    6 ++++++
 4 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/src/gallium/state_trackers/es/Makefile b/src/gallium/state_trackers/es/Makefile
index b036551..e33685d 100644
--- a/src/gallium/state_trackers/es/Makefile
+++ b/src/gallium/state_trackers/es/Makefile
@@ -38,6 +38,7 @@ SYS_LIBS = -lm -pthread
 
 
 INCLUDE_DIRS = \
+	-I$(TOP)/src/mesa \
 	-I$(TOP)/src/gallium/include
 
 .c.o:
diff --git a/src/gallium/state_trackers/es/st_es1.c b/src/gallium/state_trackers/es/st_es1.c
index 25bc53b..eb4d129 100644
--- a/src/gallium/state_trackers/es/st_es1.c
+++ b/src/gallium/state_trackers/es/st_es1.c
@@ -1,3 +1,9 @@
 #include "pipe/p_compiler.h"
+#include "state_tracker/gl_api.h"
 
 PUBLIC const int st_api_OpenGL_ES1 = 1;
+
+PUBLIC const struct st_module st_module_OpenGL_ES1 = {
+   .api = ST_API_OPENGL_ES1,
+   .create_api = st_module_create_api
+};
diff --git a/src/gallium/state_trackers/es/st_es2.c b/src/gallium/state_trackers/es/st_es2.c
index 171ea62..25626b7 100644
--- a/src/gallium/state_trackers/es/st_es2.c
+++ b/src/gallium/state_trackers/es/st_es2.c
@@ -1,3 +1,9 @@
 #include "pipe/p_compiler.h"
+#include "state_tracker/gl_api.h"
 
 PUBLIC const int st_api_OpenGL_ES2 = 1;
+
+PUBLIC const struct st_module st_module_OpenGL_ES2 = {
+   .api = ST_API_OPENGL_ES2,
+   .create_api = st_module_create_api
+};
diff --git a/src/gallium/winsys/xlib/xlib.c b/src/gallium/winsys/xlib/xlib.c
index 67617a4..fd66e2b 100644
--- a/src/gallium/winsys/xlib/xlib.c
+++ b/src/gallium/winsys/xlib/xlib.c
@@ -36,6 +36,7 @@
 
 #include <stdlib.h>
 #include <assert.h>
+#include "state_tracker/gl_api.h"
 
 /* Todo, replace all this with callback-structs provided by the
  * individual implementations.
@@ -50,6 +51,11 @@ enum mode {
 /* advertise OpenGL support */
 PUBLIC const int st_api_OpenGL = 1;
 
+PUBLIC const struct st_module st_module_OpenGL = {
+   .api = ST_API_OPENGL,
+   .create_api = st_module_create_api
+};
+
 static enum mode get_mode()
 {
 #ifdef GALLIUM_CELL
-- 
1.6.4.3