Path: blob/21.2-virgl/src/gallium/auxiliary/rbug/rbug_context.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_CONTEXT_H_38#define _RBUG_PROTO_CONTEXT_H_3940#include "rbug_proto.h"41#include "rbug_core.h"4243typedef enum44{45RBUG_BLOCK_BEFORE = 1,46RBUG_BLOCK_AFTER = 2,47RBUG_BLOCK_RULE = 4,48RBUG_BLOCK_MASK = 749} rbug_block_t;5051struct rbug_proto_context_list52{53struct rbug_header header;54};5556struct rbug_proto_context_info57{58struct rbug_header header;59rbug_context_t context;60};6162struct rbug_proto_context_draw_block63{64struct rbug_header header;65rbug_context_t context;66rbug_block_t block;67};6869struct rbug_proto_context_draw_step70{71struct rbug_header header;72rbug_context_t context;73rbug_block_t step;74};7576struct rbug_proto_context_draw_unblock77{78struct rbug_header header;79rbug_context_t context;80rbug_block_t unblock;81};8283struct rbug_proto_context_draw_rule84{85struct rbug_header header;86rbug_context_t context;87rbug_shader_t vertex;88rbug_shader_t fragment;89rbug_texture_t texture;90rbug_texture_t surface;91rbug_block_t block;92};9394struct rbug_proto_context_flush95{96struct rbug_header header;97rbug_context_t context;98};99100struct rbug_proto_context_list_reply101{102struct rbug_header header;103uint32_t serial;104rbug_context_t *contexts;105uint32_t contexts_len;106};107108struct rbug_proto_context_info_reply109{110struct rbug_header header;111uint32_t serial;112rbug_shader_t vertex;113rbug_shader_t fragment;114rbug_texture_t *texs;115uint32_t texs_len;116rbug_texture_t *cbufs;117uint32_t cbufs_len;118rbug_texture_t zsbuf;119rbug_block_t blocker;120rbug_block_t blocked;121};122123struct rbug_proto_context_draw_blocked124{125struct rbug_header header;126rbug_context_t context;127rbug_block_t block;128};129130int rbug_send_context_list(struct rbug_connection *__con,131uint32_t *__serial);132133int rbug_send_context_info(struct rbug_connection *__con,134rbug_context_t context,135uint32_t *__serial);136137int rbug_send_context_draw_block(struct rbug_connection *__con,138rbug_context_t context,139rbug_block_t block,140uint32_t *__serial);141142int rbug_send_context_draw_step(struct rbug_connection *__con,143rbug_context_t context,144rbug_block_t step,145uint32_t *__serial);146147int rbug_send_context_draw_unblock(struct rbug_connection *__con,148rbug_context_t context,149rbug_block_t unblock,150uint32_t *__serial);151152int rbug_send_context_draw_rule(struct rbug_connection *__con,153rbug_context_t context,154rbug_shader_t vertex,155rbug_shader_t fragment,156rbug_texture_t texture,157rbug_texture_t surface,158rbug_block_t block,159uint32_t *__serial);160161int rbug_send_context_flush(struct rbug_connection *__con,162rbug_context_t context,163uint32_t *__serial);164165int rbug_send_context_list_reply(struct rbug_connection *__con,166uint32_t serial,167rbug_context_t *contexts,168uint32_t contexts_len,169uint32_t *__serial);170171int rbug_send_context_info_reply(struct rbug_connection *__con,172uint32_t serial,173rbug_shader_t vertex,174rbug_shader_t fragment,175rbug_texture_t *texs,176uint32_t texs_len,177rbug_texture_t *cbufs,178uint32_t cbufs_len,179rbug_texture_t zsbuf,180rbug_block_t blocker,181rbug_block_t blocked,182uint32_t *__serial);183184int rbug_send_context_draw_blocked(struct rbug_connection *__con,185rbug_context_t context,186rbug_block_t block,187uint32_t *__serial);188189struct rbug_proto_context_list * rbug_demarshal_context_list(struct rbug_proto_header *header);190191struct rbug_proto_context_info * rbug_demarshal_context_info(struct rbug_proto_header *header);192193struct rbug_proto_context_draw_block * rbug_demarshal_context_draw_block(struct rbug_proto_header *header);194195struct rbug_proto_context_draw_step * rbug_demarshal_context_draw_step(struct rbug_proto_header *header);196197struct rbug_proto_context_draw_unblock * rbug_demarshal_context_draw_unblock(struct rbug_proto_header *header);198199struct rbug_proto_context_draw_rule * rbug_demarshal_context_draw_rule(struct rbug_proto_header *header);200201struct rbug_proto_context_flush * rbug_demarshal_context_flush(struct rbug_proto_header *header);202203struct rbug_proto_context_list_reply * rbug_demarshal_context_list_reply(struct rbug_proto_header *header);204205struct rbug_proto_context_info_reply * rbug_demarshal_context_info_reply(struct rbug_proto_header *header);206207struct rbug_proto_context_draw_blocked * rbug_demarshal_context_draw_blocked(struct rbug_proto_header *header);208209#endif210211212