Path: blob/21.2-virgl/src/gallium/auxiliary/rbug/rbug_shader.h
4561 views
/*1* Copyright 2009 VMware, Inc.2* All Rights Reserved.3*4* Permission is hereby granted, free of charge, to any person obtaining a5* copy of this software and associated documentation files (the "Software"),6* to deal in the Software without restriction, including without limitation7* on the rights to use, copy, modify, merge, publish, distribute, sub8* license, and/or sell copies of the Software, and to permit persons to whom9* the Software is furnished to do so, subject to the following conditions:10*11* The above copyright notice and this permission notice (including the next12* paragraph) shall be included in all copies or substantial portions of the13* Software.14*15* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR16* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,17* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL18* VMWARE AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,19* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR20* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE21* USE OR OTHER DEALINGS IN THE SOFTWARE.22*/2324/*25* This file holds structs decelerations and function prototypes for one of26* the rbug extensions. Implementation of the functions is in the same folder27* in the c file matching this file's name.28*29* The structs what is returned from the demarshal functions. The functions30* starting rbug_send_* encodes a call to the write format and sends that to31* the supplied connection, while functions starting with rbug_demarshal_*32* demarshal data from the wire protocol.33*34* Structs and functions ending with _reply are replies to requests.35*/3637#ifndef _RBUG_PROTO_SHADER_H_38#define _RBUG_PROTO_SHADER_H_3940#include "rbug_proto.h"41#include "rbug_core.h"4243struct rbug_proto_shader_list44{45struct rbug_header header;46rbug_context_t context;47};4849struct rbug_proto_shader_info50{51struct rbug_header header;52rbug_context_t context;53rbug_shader_t shader;54};5556struct rbug_proto_shader_disable57{58struct rbug_header header;59rbug_context_t context;60rbug_shader_t shader;61uint8_t disable;62};6364struct rbug_proto_shader_replace65{66struct rbug_header header;67rbug_context_t context;68rbug_shader_t shader;69uint32_t *tokens;70uint32_t tokens_len;71};7273struct rbug_proto_shader_list_reply74{75struct rbug_header header;76uint32_t serial;77rbug_shader_t *shaders;78uint32_t shaders_len;79};8081struct rbug_proto_shader_info_reply82{83struct rbug_header header;84uint32_t serial;85uint32_t *original;86uint32_t original_len;87uint32_t *replaced;88uint32_t replaced_len;89uint8_t disabled;90};9192int rbug_send_shader_list(struct rbug_connection *__con,93rbug_context_t context,94uint32_t *__serial);9596int rbug_send_shader_info(struct rbug_connection *__con,97rbug_context_t context,98rbug_shader_t shader,99uint32_t *__serial);100101int rbug_send_shader_disable(struct rbug_connection *__con,102rbug_context_t context,103rbug_shader_t shader,104uint8_t disable,105uint32_t *__serial);106107int rbug_send_shader_replace(struct rbug_connection *__con,108rbug_context_t context,109rbug_shader_t shader,110uint32_t *tokens,111uint32_t tokens_len,112uint32_t *__serial);113114int rbug_send_shader_list_reply(struct rbug_connection *__con,115uint32_t serial,116rbug_shader_t *shaders,117uint32_t shaders_len,118uint32_t *__serial);119120int rbug_send_shader_info_reply(struct rbug_connection *__con,121uint32_t serial,122uint32_t *original,123uint32_t original_len,124uint32_t *replaced,125uint32_t replaced_len,126uint8_t disabled,127uint32_t *__serial);128129struct rbug_proto_shader_list * rbug_demarshal_shader_list(struct rbug_proto_header *header);130131struct rbug_proto_shader_info * rbug_demarshal_shader_info(struct rbug_proto_header *header);132133struct rbug_proto_shader_disable * rbug_demarshal_shader_disable(struct rbug_proto_header *header);134135struct rbug_proto_shader_replace * rbug_demarshal_shader_replace(struct rbug_proto_header *header);136137struct rbug_proto_shader_list_reply * rbug_demarshal_shader_list_reply(struct rbug_proto_header *header);138139struct rbug_proto_shader_info_reply * rbug_demarshal_shader_info_reply(struct rbug_proto_header *header);140141#endif142143144