2 * Copyright 2009 VMware, Inc.
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
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"
46 RBUG_BLOCK_BEFORE
= 1,
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
;
70 struct rbug_proto_context_draw_step
72 struct rbug_header header
;
73 rbug_context_t context
;
77 struct rbug_proto_context_draw_unblock
79 struct rbug_header header
;
80 rbug_context_t context
;
84 struct rbug_proto_context_draw_rule
86 struct rbug_header header
;
87 rbug_context_t context
;
89 rbug_shader_t fragment
;
90 rbug_texture_t texture
;
91 rbug_texture_t surface
;
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
;
105 rbug_context_t
*contexts
;
106 uint32_t contexts_len
;
109 struct rbug_proto_context_info_reply
111 struct rbug_header header
;
113 rbug_shader_t vertex
;
114 rbug_shader_t fragment
;
115 rbug_texture_t
*texs
;
117 rbug_texture_t
*cbufs
;
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
;
131 int rbug_send_context_list(struct rbug_connection
*__con
,
134 int rbug_send_context_info(struct rbug_connection
*__con
,
135 rbug_context_t context
,
138 int rbug_send_context_draw_block(struct rbug_connection
*__con
,
139 rbug_context_t context
,
143 int rbug_send_context_draw_step(struct rbug_connection
*__con
,
144 rbug_context_t context
,
148 int rbug_send_context_draw_unblock(struct rbug_connection
*__con
,
149 rbug_context_t context
,
150 rbug_block_t unblock
,
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
,
162 int rbug_send_context_flush(struct rbug_connection
*__con
,
163 rbug_context_t context
,
166 int rbug_send_context_list_reply(struct rbug_connection
*__con
,
168 rbug_context_t
*contexts
,
169 uint32_t contexts_len
,
172 int rbug_send_context_info_reply(struct rbug_connection
*__con
,
174 rbug_shader_t vertex
,
175 rbug_shader_t fragment
,
176 rbug_texture_t
*texs
,
178 rbug_texture_t
*cbufs
,
180 rbug_texture_t zsbuf
,
181 rbug_block_t blocker
,
182 rbug_block_t blocked
,
185 int rbug_send_context_draw_blocked(struct rbug_connection
*__con
,
186 rbug_context_t context
,
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
);