14a49301eSmrg/* 24a49301eSmrg * Copyright 2009 VMware, Inc. 34a49301eSmrg * All Rights Reserved. 44a49301eSmrg * 54a49301eSmrg * Permission is hereby granted, free of charge, to any person obtaining a 64a49301eSmrg * copy of this software and associated documentation files (the "Software"), 74a49301eSmrg * to deal in the Software without restriction, including without limitation 84a49301eSmrg * on the rights to use, copy, modify, merge, publish, distribute, sub 94a49301eSmrg * license, and/or sell copies of the Software, and to permit persons to whom 104a49301eSmrg * the Software is furnished to do so, subject to the following conditions: 114a49301eSmrg * 124a49301eSmrg * The above copyright notice and this permission notice (including the next 134a49301eSmrg * paragraph) shall be included in all copies or substantial portions of the 144a49301eSmrg * Software. 154a49301eSmrg * 164a49301eSmrg * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 174a49301eSmrg * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 184a49301eSmrg * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL 194a49301eSmrg * VMWARE AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, 204a49301eSmrg * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 214a49301eSmrg * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE 224a49301eSmrg * USE OR OTHER DEALINGS IN THE SOFTWARE. 234a49301eSmrg */ 244a49301eSmrg 254a49301eSmrg/* 264a49301eSmrg * This file holds structs decelerations and function prototypes for one of 274a49301eSmrg * the rbug extensions. Implementation of the functions is in the same folder 284a49301eSmrg * in the c file matching this file's name. 294a49301eSmrg * 304a49301eSmrg * The structs what is returned from the demarshal functions. The functions 314a49301eSmrg * starting rbug_send_* encodes a call to the write format and sends that to 324a49301eSmrg * the supplied connection, while functions starting with rbug_demarshal_* 334a49301eSmrg * demarshal data from the wire protocol. 344a49301eSmrg * 354a49301eSmrg * Structs and functions ending with _reply are replies to requests. 364a49301eSmrg */ 374a49301eSmrg 384a49301eSmrg#ifndef _RBUG_PROTO_SHADER_H_ 394a49301eSmrg#define _RBUG_PROTO_SHADER_H_ 404a49301eSmrg 41af69d88dSmrg#include "rbug_proto.h" 42af69d88dSmrg#include "rbug_core.h" 434a49301eSmrg 444a49301eSmrgstruct rbug_proto_shader_list 454a49301eSmrg{ 464a49301eSmrg struct rbug_header header; 474a49301eSmrg rbug_context_t context; 484a49301eSmrg}; 494a49301eSmrg 504a49301eSmrgstruct rbug_proto_shader_info 514a49301eSmrg{ 524a49301eSmrg struct rbug_header header; 534a49301eSmrg rbug_context_t context; 544a49301eSmrg rbug_shader_t shader; 554a49301eSmrg}; 564a49301eSmrg 574a49301eSmrgstruct rbug_proto_shader_disable 584a49301eSmrg{ 594a49301eSmrg struct rbug_header header; 604a49301eSmrg rbug_context_t context; 614a49301eSmrg rbug_shader_t shader; 624a49301eSmrg uint8_t disable; 634a49301eSmrg}; 644a49301eSmrg 654a49301eSmrgstruct rbug_proto_shader_replace 664a49301eSmrg{ 674a49301eSmrg struct rbug_header header; 684a49301eSmrg rbug_context_t context; 694a49301eSmrg rbug_shader_t shader; 704a49301eSmrg uint32_t *tokens; 714a49301eSmrg uint32_t tokens_len; 724a49301eSmrg}; 734a49301eSmrg 744a49301eSmrgstruct rbug_proto_shader_list_reply 754a49301eSmrg{ 764a49301eSmrg struct rbug_header header; 774a49301eSmrg uint32_t serial; 784a49301eSmrg rbug_shader_t *shaders; 794a49301eSmrg uint32_t shaders_len; 804a49301eSmrg}; 814a49301eSmrg 824a49301eSmrgstruct rbug_proto_shader_info_reply 834a49301eSmrg{ 844a49301eSmrg struct rbug_header header; 854a49301eSmrg uint32_t serial; 864a49301eSmrg uint32_t *original; 874a49301eSmrg uint32_t original_len; 884a49301eSmrg uint32_t *replaced; 894a49301eSmrg uint32_t replaced_len; 904a49301eSmrg uint8_t disabled; 914a49301eSmrg}; 924a49301eSmrg 934a49301eSmrgint rbug_send_shader_list(struct rbug_connection *__con, 944a49301eSmrg rbug_context_t context, 954a49301eSmrg uint32_t *__serial); 964a49301eSmrg 974a49301eSmrgint rbug_send_shader_info(struct rbug_connection *__con, 984a49301eSmrg rbug_context_t context, 994a49301eSmrg rbug_shader_t shader, 1004a49301eSmrg uint32_t *__serial); 1014a49301eSmrg 1024a49301eSmrgint rbug_send_shader_disable(struct rbug_connection *__con, 1034a49301eSmrg rbug_context_t context, 1044a49301eSmrg rbug_shader_t shader, 1054a49301eSmrg uint8_t disable, 1064a49301eSmrg uint32_t *__serial); 1074a49301eSmrg 1084a49301eSmrgint rbug_send_shader_replace(struct rbug_connection *__con, 1094a49301eSmrg rbug_context_t context, 1104a49301eSmrg rbug_shader_t shader, 1114a49301eSmrg uint32_t *tokens, 1124a49301eSmrg uint32_t tokens_len, 1134a49301eSmrg uint32_t *__serial); 1144a49301eSmrg 1154a49301eSmrgint rbug_send_shader_list_reply(struct rbug_connection *__con, 1164a49301eSmrg uint32_t serial, 1174a49301eSmrg rbug_shader_t *shaders, 1184a49301eSmrg uint32_t shaders_len, 1194a49301eSmrg uint32_t *__serial); 1204a49301eSmrg 1214a49301eSmrgint rbug_send_shader_info_reply(struct rbug_connection *__con, 1224a49301eSmrg uint32_t serial, 1234a49301eSmrg uint32_t *original, 1244a49301eSmrg uint32_t original_len, 1254a49301eSmrg uint32_t *replaced, 1264a49301eSmrg uint32_t replaced_len, 1274a49301eSmrg uint8_t disabled, 1284a49301eSmrg uint32_t *__serial); 1294a49301eSmrg 1304a49301eSmrgstruct rbug_proto_shader_list * rbug_demarshal_shader_list(struct rbug_proto_header *header); 1314a49301eSmrg 1324a49301eSmrgstruct rbug_proto_shader_info * rbug_demarshal_shader_info(struct rbug_proto_header *header); 1334a49301eSmrg 1344a49301eSmrgstruct rbug_proto_shader_disable * rbug_demarshal_shader_disable(struct rbug_proto_header *header); 1354a49301eSmrg 1364a49301eSmrgstruct rbug_proto_shader_replace * rbug_demarshal_shader_replace(struct rbug_proto_header *header); 1374a49301eSmrg 1384a49301eSmrgstruct rbug_proto_shader_list_reply * rbug_demarshal_shader_list_reply(struct rbug_proto_header *header); 1394a49301eSmrg 1404a49301eSmrgstruct rbug_proto_shader_info_reply * rbug_demarshal_shader_info_reply(struct rbug_proto_header *header); 1414a49301eSmrg 1424a49301eSmrg#endif 143