revert 213 commits (to 56092) from the last month. 10 still need work to resolve...
[AROS.git] / workbench / libs / mesa / src / gallium / auxiliary / rbug / rbug_context.h
blob4a865c25fc55746c82a3841240ab373d68ac14e0
1 /*
2 * Copyright 2009 VMware, Inc.
3 * All Rights Reserved.
5 * Permission is hereby granted, free of charge, to any person obtaining a
6 * copy of this software and associated documentation files (the "Software"),
7 * to deal in the Software without restriction, including without limitation
8 * on the rights to use, copy, modify, merge, publish, distribute, sub
9 * license, and/or sell copies of the Software, and to permit persons to whom
10 * the Software is furnished to do so, subject to the following conditions:
12 * The above copyright notice and this permission notice (including the next
13 * paragraph) shall be included in all copies or substantial portions of the
14 * Software.
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
19 * VMWARE AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
20 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
21 * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
22 * USE OR OTHER DEALINGS IN THE SOFTWARE.
26 * This file holds structs decelerations and function prototypes for one of
27 * the rbug extensions. Implementation of the functions is in the same folder
28 * in the c file matching this file's name.
30 * The structs what is returned from the demarshal functions. The functions
31 * starting rbug_send_* encodes a call to the write format and sends that to
32 * the supplied connection, while functions starting with rbug_demarshal_*
33 * demarshal data from the wire protocol.
35 * Structs and functions ending with _reply are replies to requests.
38 #ifndef _RBUG_PROTO_CONTEXT_H_
39 #define _RBUG_PROTO_CONTEXT_H_
41 #include "rbug/rbug_proto.h"
42 #include "rbug/rbug_core.h"
44 typedef enum
46 RBUG_BLOCK_BEFORE = 1,
47 RBUG_BLOCK_AFTER = 2,
48 RBUG_BLOCK_RULE = 4,
49 RBUG_BLOCK_MASK = 7
50 } rbug_block_t;
52 struct rbug_proto_context_list
54 struct rbug_header header;
57 struct rbug_proto_context_info
59 struct rbug_header header;
60 rbug_context_t context;
63 struct rbug_proto_context_draw_block
65 struct rbug_header header;
66 rbug_context_t context;
67 rbug_block_t block;
70 struct rbug_proto_context_draw_step
72 struct rbug_header header;
73 rbug_context_t context;
74 rbug_block_t step;
77 struct rbug_proto_context_draw_unblock
79 struct rbug_header header;
80 rbug_context_t context;
81 rbug_block_t unblock;
84 struct rbug_proto_context_draw_rule
86 struct rbug_header header;
87 rbug_context_t context;
88 rbug_shader_t vertex;
89 rbug_shader_t fragment;
90 rbug_texture_t texture;
91 rbug_texture_t surface;
92 rbug_block_t block;
95 struct rbug_proto_context_flush
97 struct rbug_header header;
98 rbug_context_t context;
101 struct rbug_proto_context_list_reply
103 struct rbug_header header;
104 uint32_t serial;
105 rbug_context_t *contexts;
106 uint32_t contexts_len;
109 struct rbug_proto_context_info_reply
111 struct rbug_header header;
112 uint32_t serial;
113 rbug_shader_t vertex;
114 rbug_shader_t fragment;
115 rbug_texture_t *texs;
116 uint32_t texs_len;
117 rbug_texture_t *cbufs;
118 uint32_t cbufs_len;
119 rbug_texture_t zsbuf;
120 rbug_block_t blocker;
121 rbug_block_t blocked;
124 struct rbug_proto_context_draw_blocked
126 struct rbug_header header;
127 rbug_context_t context;
128 rbug_block_t block;
131 int rbug_send_context_list(struct rbug_connection *__con,
132 uint32_t *__serial);
134 int rbug_send_context_info(struct rbug_connection *__con,
135 rbug_context_t context,
136 uint32_t *__serial);
138 int rbug_send_context_draw_block(struct rbug_connection *__con,
139 rbug_context_t context,
140 rbug_block_t block,
141 uint32_t *__serial);
143 int rbug_send_context_draw_step(struct rbug_connection *__con,
144 rbug_context_t context,
145 rbug_block_t step,
146 uint32_t *__serial);
148 int rbug_send_context_draw_unblock(struct rbug_connection *__con,
149 rbug_context_t context,
150 rbug_block_t unblock,
151 uint32_t *__serial);
153 int rbug_send_context_draw_rule(struct rbug_connection *__con,
154 rbug_context_t context,
155 rbug_shader_t vertex,
156 rbug_shader_t fragment,
157 rbug_texture_t texture,
158 rbug_texture_t surface,
159 rbug_block_t block,
160 uint32_t *__serial);
162 int rbug_send_context_flush(struct rbug_connection *__con,
163 rbug_context_t context,
164 uint32_t *__serial);
166 int rbug_send_context_list_reply(struct rbug_connection *__con,
167 uint32_t serial,
168 rbug_context_t *contexts,
169 uint32_t contexts_len,
170 uint32_t *__serial);
172 int rbug_send_context_info_reply(struct rbug_connection *__con,
173 uint32_t serial,
174 rbug_shader_t vertex,
175 rbug_shader_t fragment,
176 rbug_texture_t *texs,
177 uint32_t texs_len,
178 rbug_texture_t *cbufs,
179 uint32_t cbufs_len,
180 rbug_texture_t zsbuf,
181 rbug_block_t blocker,
182 rbug_block_t blocked,
183 uint32_t *__serial);
185 int rbug_send_context_draw_blocked(struct rbug_connection *__con,
186 rbug_context_t context,
187 rbug_block_t block,
188 uint32_t *__serial);
190 struct rbug_proto_context_list * rbug_demarshal_context_list(struct rbug_proto_header *header);
192 struct rbug_proto_context_info * rbug_demarshal_context_info(struct rbug_proto_header *header);
194 struct rbug_proto_context_draw_block * rbug_demarshal_context_draw_block(struct rbug_proto_header *header);
196 struct rbug_proto_context_draw_step * rbug_demarshal_context_draw_step(struct rbug_proto_header *header);
198 struct rbug_proto_context_draw_unblock * rbug_demarshal_context_draw_unblock(struct rbug_proto_header *header);
200 struct rbug_proto_context_draw_rule * rbug_demarshal_context_draw_rule(struct rbug_proto_header *header);
202 struct rbug_proto_context_flush * rbug_demarshal_context_flush(struct rbug_proto_header *header);
204 struct rbug_proto_context_list_reply * rbug_demarshal_context_list_reply(struct rbug_proto_header *header);
206 struct rbug_proto_context_info_reply * rbug_demarshal_context_info_reply(struct rbug_proto_header *header);
208 struct rbug_proto_context_draw_blocked * rbug_demarshal_context_draw_blocked(struct rbug_proto_header *header);
210 #endif