1bf215546Sopenharmony_ci/*
2bf215546Sopenharmony_ci * Copyright 2009 VMware, Inc.
3bf215546Sopenharmony_ci * All Rights Reserved.
4bf215546Sopenharmony_ci *
5bf215546Sopenharmony_ci * Permission is hereby granted, free of charge, to any person obtaining a
6bf215546Sopenharmony_ci * copy of this software and associated documentation files (the "Software"),
7bf215546Sopenharmony_ci * to deal in the Software without restriction, including without limitation
8bf215546Sopenharmony_ci * on the rights to use, copy, modify, merge, publish, distribute, sub
9bf215546Sopenharmony_ci * license, and/or sell copies of the Software, and to permit persons to whom
10bf215546Sopenharmony_ci * the Software is furnished to do so, subject to the following conditions:
11bf215546Sopenharmony_ci *
12bf215546Sopenharmony_ci * The above copyright notice and this permission notice (including the next
13bf215546Sopenharmony_ci * paragraph) shall be included in all copies or substantial portions of the
14bf215546Sopenharmony_ci * Software.
15bf215546Sopenharmony_ci *
16bf215546Sopenharmony_ci * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17bf215546Sopenharmony_ci * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18bf215546Sopenharmony_ci * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.  IN NO EVENT SHALL
19bf215546Sopenharmony_ci * VMWARE AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
20bf215546Sopenharmony_ci * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
21bf215546Sopenharmony_ci * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
22bf215546Sopenharmony_ci * USE OR OTHER DEALINGS IN THE SOFTWARE.
23bf215546Sopenharmony_ci */
24bf215546Sopenharmony_ci
25bf215546Sopenharmony_ci/*
26bf215546Sopenharmony_ci * This file holds structs decelerations and function prototypes for one of
27bf215546Sopenharmony_ci * the rbug extensions. Implementation of the functions is in the same folder
28bf215546Sopenharmony_ci * in the c file matching this file's name.
29bf215546Sopenharmony_ci *
30bf215546Sopenharmony_ci * The structs what is returned from the demarshal functions. The functions
31bf215546Sopenharmony_ci * starting rbug_send_* encodes a call to the write format and sends that to
32bf215546Sopenharmony_ci * the supplied connection, while functions starting with rbug_demarshal_*
33bf215546Sopenharmony_ci * demarshal data from the wire protocol.
34bf215546Sopenharmony_ci *
35bf215546Sopenharmony_ci * Structs and functions ending with _reply are replies to requests.
36bf215546Sopenharmony_ci */
37bf215546Sopenharmony_ci
38bf215546Sopenharmony_ci#ifndef _RBUG_PROTO_SHADER_H_
39bf215546Sopenharmony_ci#define _RBUG_PROTO_SHADER_H_
40bf215546Sopenharmony_ci
41bf215546Sopenharmony_ci#include "rbug_proto.h"
42bf215546Sopenharmony_ci#include "rbug_core.h"
43bf215546Sopenharmony_ci
44bf215546Sopenharmony_cistruct rbug_proto_shader_list
45bf215546Sopenharmony_ci{
46bf215546Sopenharmony_ci	struct rbug_header header;
47bf215546Sopenharmony_ci	rbug_context_t context;
48bf215546Sopenharmony_ci};
49bf215546Sopenharmony_ci
50bf215546Sopenharmony_cistruct rbug_proto_shader_info
51bf215546Sopenharmony_ci{
52bf215546Sopenharmony_ci	struct rbug_header header;
53bf215546Sopenharmony_ci	rbug_context_t context;
54bf215546Sopenharmony_ci	rbug_shader_t shader;
55bf215546Sopenharmony_ci};
56bf215546Sopenharmony_ci
57bf215546Sopenharmony_cistruct rbug_proto_shader_disable
58bf215546Sopenharmony_ci{
59bf215546Sopenharmony_ci	struct rbug_header header;
60bf215546Sopenharmony_ci	rbug_context_t context;
61bf215546Sopenharmony_ci	rbug_shader_t shader;
62bf215546Sopenharmony_ci	uint8_t disable;
63bf215546Sopenharmony_ci};
64bf215546Sopenharmony_ci
65bf215546Sopenharmony_cistruct rbug_proto_shader_replace
66bf215546Sopenharmony_ci{
67bf215546Sopenharmony_ci	struct rbug_header header;
68bf215546Sopenharmony_ci	rbug_context_t context;
69bf215546Sopenharmony_ci	rbug_shader_t shader;
70bf215546Sopenharmony_ci	uint32_t *tokens;
71bf215546Sopenharmony_ci	uint32_t tokens_len;
72bf215546Sopenharmony_ci};
73bf215546Sopenharmony_ci
74bf215546Sopenharmony_cistruct rbug_proto_shader_list_reply
75bf215546Sopenharmony_ci{
76bf215546Sopenharmony_ci	struct rbug_header header;
77bf215546Sopenharmony_ci	uint32_t serial;
78bf215546Sopenharmony_ci	rbug_shader_t *shaders;
79bf215546Sopenharmony_ci	uint32_t shaders_len;
80bf215546Sopenharmony_ci};
81bf215546Sopenharmony_ci
82bf215546Sopenharmony_cistruct rbug_proto_shader_info_reply
83bf215546Sopenharmony_ci{
84bf215546Sopenharmony_ci	struct rbug_header header;
85bf215546Sopenharmony_ci	uint32_t serial;
86bf215546Sopenharmony_ci	uint32_t *original;
87bf215546Sopenharmony_ci	uint32_t original_len;
88bf215546Sopenharmony_ci	uint32_t *replaced;
89bf215546Sopenharmony_ci	uint32_t replaced_len;
90bf215546Sopenharmony_ci	uint8_t disabled;
91bf215546Sopenharmony_ci};
92bf215546Sopenharmony_ci
93bf215546Sopenharmony_ciint rbug_send_shader_list(struct rbug_connection *__con,
94bf215546Sopenharmony_ci                          rbug_context_t context,
95bf215546Sopenharmony_ci                          uint32_t *__serial);
96bf215546Sopenharmony_ci
97bf215546Sopenharmony_ciint rbug_send_shader_info(struct rbug_connection *__con,
98bf215546Sopenharmony_ci                          rbug_context_t context,
99bf215546Sopenharmony_ci                          rbug_shader_t shader,
100bf215546Sopenharmony_ci                          uint32_t *__serial);
101bf215546Sopenharmony_ci
102bf215546Sopenharmony_ciint rbug_send_shader_disable(struct rbug_connection *__con,
103bf215546Sopenharmony_ci                             rbug_context_t context,
104bf215546Sopenharmony_ci                             rbug_shader_t shader,
105bf215546Sopenharmony_ci                             uint8_t disable,
106bf215546Sopenharmony_ci                             uint32_t *__serial);
107bf215546Sopenharmony_ci
108bf215546Sopenharmony_ciint rbug_send_shader_replace(struct rbug_connection *__con,
109bf215546Sopenharmony_ci                             rbug_context_t context,
110bf215546Sopenharmony_ci                             rbug_shader_t shader,
111bf215546Sopenharmony_ci                             uint32_t *tokens,
112bf215546Sopenharmony_ci                             uint32_t tokens_len,
113bf215546Sopenharmony_ci                             uint32_t *__serial);
114bf215546Sopenharmony_ci
115bf215546Sopenharmony_ciint rbug_send_shader_list_reply(struct rbug_connection *__con,
116bf215546Sopenharmony_ci                                uint32_t serial,
117bf215546Sopenharmony_ci                                rbug_shader_t *shaders,
118bf215546Sopenharmony_ci                                uint32_t shaders_len,
119bf215546Sopenharmony_ci                                uint32_t *__serial);
120bf215546Sopenharmony_ci
121bf215546Sopenharmony_ciint rbug_send_shader_info_reply(struct rbug_connection *__con,
122bf215546Sopenharmony_ci                                uint32_t serial,
123bf215546Sopenharmony_ci                                uint32_t *original,
124bf215546Sopenharmony_ci                                uint32_t original_len,
125bf215546Sopenharmony_ci                                uint32_t *replaced,
126bf215546Sopenharmony_ci                                uint32_t replaced_len,
127bf215546Sopenharmony_ci                                uint8_t disabled,
128bf215546Sopenharmony_ci                                uint32_t *__serial);
129bf215546Sopenharmony_ci
130bf215546Sopenharmony_cistruct rbug_proto_shader_list * rbug_demarshal_shader_list(struct rbug_proto_header *header);
131bf215546Sopenharmony_ci
132bf215546Sopenharmony_cistruct rbug_proto_shader_info * rbug_demarshal_shader_info(struct rbug_proto_header *header);
133bf215546Sopenharmony_ci
134bf215546Sopenharmony_cistruct rbug_proto_shader_disable * rbug_demarshal_shader_disable(struct rbug_proto_header *header);
135bf215546Sopenharmony_ci
136bf215546Sopenharmony_cistruct rbug_proto_shader_replace * rbug_demarshal_shader_replace(struct rbug_proto_header *header);
137bf215546Sopenharmony_ci
138bf215546Sopenharmony_cistruct rbug_proto_shader_list_reply * rbug_demarshal_shader_list_reply(struct rbug_proto_header *header);
139bf215546Sopenharmony_ci
140bf215546Sopenharmony_cistruct rbug_proto_shader_info_reply * rbug_demarshal_shader_info_reply(struct rbug_proto_header *header);
141bf215546Sopenharmony_ci
142bf215546Sopenharmony_ci#endif
143