summaryrefslogtreecommitdiff
path: root/sample-implementation-tmp/0002-gallium-Suffix-st_framebuffer-and-st_context-with-_i.patch
blob: 22990fd071b1c0efe4a65ee6e5584d8c1a7e5c10 (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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
From e2bd293a0f9c775487ea007c72ba9feca2a52afc Mon Sep 17 00:00:00 2001
From: Chia-I Wu <olvaffe@gmail.com>
Date: Tue, 2 Feb 2010 13:45:53 +0800
Subject: [PATCH 2/5] gallium: Suffix st_framebuffer and st_context with _iface.

---
 src/gallium/include/state_tracker/st_api.h |   54 ++++++++++++++-------------
 1 files changed, 28 insertions(+), 26 deletions(-)

diff --git a/src/gallium/include/state_tracker/st_api.h b/src/gallium/include/state_tracker/st_api.h
index 8feaade..5a47b63 100644
--- a/src/gallium/include/state_tracker/st_api.h
+++ b/src/gallium/include/state_tracker/st_api.h
@@ -63,7 +63,7 @@ enum st_api_type {
 };
 
 /**
- * Used in st_context->teximage.
+ * Used in st_context_iface->teximage.
  */
 enum st_texture_type {
    ST_TEXTURE_1D,
@@ -175,7 +175,7 @@ struct st_visual
  * The thread syncronisation is put inside the framebuffer
  * and only called once the framebuffer has become dirty.
  */
-struct st_framebuffer
+struct st_framebuffer_iface
 {
    /**
     * Available for the state tracker manager to use.
@@ -195,7 +195,7 @@ struct st_framebuffer
     *
     * @att is one of the front buffer attachments.
     */
-   boolean (*flush_front)(struct st_framebuffer *stfb,
+   boolean (*flush_front)(struct st_framebuffer_iface *stfbi,
                           enum st_attachment_type statt);
 
    /**
@@ -215,7 +215,7 @@ struct st_framebuffer
     * the last call might be destroyed.  This behavior might change in the
     * future.
     */
-   boolean (*validate)(struct st_framebuffer *stfb,
+   boolean (*validate)(struct st_framebuffer_iface *stfbi,
                        const enum st_attachment_type *statts,
                        unsigned count,
                        struct pipe_texture **out);
@@ -226,7 +226,7 @@ struct st_framebuffer
  *
  * This entity is created from st_api and used by the state tracker manager.
  */
-struct st_context
+struct st_context_iface
 {
    /**
     * The API of the context.
@@ -241,7 +241,7 @@ struct st_context
    /**
     * Destroy the context.
     */
-   void (*destroy)(struct st_context *stctx);
+   void (*destroy)(struct st_context_iface *stctxi);
 
    /**
     * Lock and unlock a state tracker context resource.
@@ -251,9 +251,9 @@ struct st_context
     * can lengthen the lifetime of the data structure, it is valid only until
     * unlocked.
     */
-   void *(*lock_resource)(struct st_context *stctx,
+   void *(*lock_resource)(struct st_context_iface *stctxi,
                           enum st_context_resource_type type, void *res);
-   void (*unlock_resource)(struct st_context *stctx,
+   void (*unlock_resource)(struct st_context_iface *stctxi,
                            enum st_context_resource_type type, void *res);
 
    /**
@@ -261,7 +261,7 @@ struct st_context
     *
     * The state tracker manager calls this function to let the rendering
     * context know that it should update the textures it got from
-    * st_framebuffer::validate.  It should do so at the latest time possible.
+    * st_framebuffer_iface::validate.  It should do so at the latest time possible.
     * Possible right before sending triangles to the pipe context.
     *
     * For certain platforms this function might be called from a thread other
@@ -272,13 +272,13 @@ struct st_context
     *
     * Thus reducing the sync primitive needed to a single atomic flag.
     */
-   void (*notify_invalid_framebuffer)(struct st_context *stctx,
-                                      struct st_framebuffer *stfb);
+   void (*notify_invalid_framebuffer)(struct st_context_iface *stctxi,
+                                      struct st_framebuffer_iface *stfbi);
 
    /**
     * Flush all drawing from context to the pipe also flushes the pipe.
     */
-   void (*flush)(struct st_context *stctx, unsigned flags,
+   void (*flush)(struct st_context_iface *stctxi, unsigned flags,
                  struct pipe_fence_handle **fence);
 
    /**
@@ -286,15 +286,15 @@ struct st_context
     *
     * This function is optional.
     */
-   boolean (*teximage)(struct st_context *stctx, enum st_texture_type target,
+   boolean (*teximage)(struct st_context_iface *stctxi, enum st_texture_type target,
                        int level, enum pipe_format internal_format,
                        struct pipe_texture *tex, boolean mipmap);
 
    /**
     * Used to implement glXCopyContext.
     */
-   void (*copy)(struct st_context *stctx, struct st_context *stsrc,
-                unsigned mask);
+   void (*copy)(struct st_context_iface *stctxi,
+                struct st_context_iface *stsrci, unsigned mask);
 };
 
 
@@ -314,9 +314,11 @@ struct st_manager
     * can lengthen the lifetime of the data structure, it is valid only until
     * unlocked.
     */
-   void *(*lock_resource)(struct st_manager *smapi, struct st_context *stctx,
+   void *(*lock_resource)(struct st_manager *smapi,
+                          struct st_context_iface *stctxi,
                           enum st_manager_resource_type type, void *res);
-   void (*unlock_resource)(struct st_manager *smapi, struct st_context *stctx,
+   void (*unlock_resource)(struct st_manager *smapi,
+                           struct st_context_iface *stctxi,
                            enum st_manager_resource_type type, void *res);
 };
 
@@ -352,24 +354,24 @@ struct st_api
     * the pipe_screen can create contexts.
     * XXX: Is visual needed?
     */
-   struct st_context *(*create_context)(struct st_api *stapi,
-                                        struct st_manager *smapi,
-                                        struct pipe_context *pipe,
-                                        const struct st_visual *visual,
-                                        struct st_context *stshare);
+   struct st_context_iface *(*create_context)(struct st_api *stapi,
+                                              struct st_manager *smapi,
+                                              struct pipe_context *pipe,
+                                              const struct st_visual *visual,
+                                              struct st_context_iface *stsharei);
 
    /**
     * Bind the context to the calling thread with draw and read as drawables.
     */
    boolean (*make_current)(struct st_api *stapi,
-                           struct st_context *stctx,
-                           struct st_framebuffer *stdraw,
-                           struct st_framebuffer *stread);
+                           struct st_context_iface *stctxi,
+                           struct st_framebuffer_iface *stdrawi,
+                           struct st_framebuffer_iface *streadi);
 
    /**
     * Get the currently bound context in the calling thread.
     */
-   struct st_context *(*get_current)(struct st_api *stapi);
+   struct st_context_iface *(*get_current)(struct st_api *stapi);
 };
 
 /**
-- 
1.6.5