Path: blob/21.2-virgl/src/gallium/auxiliary/rbug/rbug_core.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_CORE_H_38#define _RBUG_PROTO_CORE_H_3940#include "rbug_proto.h"4142typedef uint64_t rbug_shader_t;43typedef uint64_t rbug_context_t;44typedef uint64_t rbug_texture_t;4546struct rbug_proto_noop47{48struct rbug_header header;49};5051struct rbug_proto_ping52{53struct rbug_header header;54};5556struct rbug_proto_error57{58struct rbug_header header;59uint32_t error;60};6162struct rbug_proto_ping_reply63{64struct rbug_header header;65uint32_t serial;66};6768struct rbug_proto_error_reply69{70struct rbug_header header;71uint32_t serial;72uint32_t error;73};7475int rbug_send_noop(struct rbug_connection *__con,76uint32_t *__serial);7778int rbug_send_ping(struct rbug_connection *__con,79uint32_t *__serial);8081int rbug_send_error(struct rbug_connection *__con,82uint32_t error,83uint32_t *__serial);8485int rbug_send_ping_reply(struct rbug_connection *__con,86uint32_t serial,87uint32_t *__serial);8889int rbug_send_error_reply(struct rbug_connection *__con,90uint32_t serial,91uint32_t error,92uint32_t *__serial);9394struct rbug_proto_noop * rbug_demarshal_noop(struct rbug_proto_header *header);9596struct rbug_proto_ping * rbug_demarshal_ping(struct rbug_proto_header *header);9798struct rbug_proto_error * rbug_demarshal_error(struct rbug_proto_header *header);99100struct rbug_proto_ping_reply * rbug_demarshal_ping_reply(struct rbug_proto_header *header);101102struct rbug_proto_error_reply * rbug_demarshal_error_reply(struct rbug_proto_header *header);103104#endif105106107