Path: blob/21.2-virgl/src/gallium/auxiliary/rbug/rbug_proto.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 common definitions of the gallium remote debugging protocol.26*/2728#ifndef _RBUG_PROTO_H_29#define _RBUG_PROTO_H_3031#include "pipe/p_compiler.h"3233/**34* Uniqe indentifier for each command.35*36* Replys are designated by negative.37*/38enum rbug_opcode39{40RBUG_OP_NOOP = 0,41RBUG_OP_PING = 1,42RBUG_OP_ERROR = 2,43RBUG_OP_PING_REPLY = -1,44RBUG_OP_ERROR_REPLY = -2,45RBUG_OP_TEXTURE_LIST = 256,46RBUG_OP_TEXTURE_INFO = 257,47RBUG_OP_TEXTURE_WRITE = 258,48RBUG_OP_TEXTURE_READ = 259,49RBUG_OP_TEXTURE_LIST_REPLY = -256,50RBUG_OP_TEXTURE_INFO_REPLY = -257,51RBUG_OP_TEXTURE_READ_REPLY = -259,52RBUG_OP_CONTEXT_LIST = 512,53RBUG_OP_CONTEXT_INFO = 513,54RBUG_OP_CONTEXT_DRAW_BLOCK = 514,55RBUG_OP_CONTEXT_DRAW_STEP = 515,56RBUG_OP_CONTEXT_DRAW_UNBLOCK = 516,57RBUG_OP_CONTEXT_DRAW_RULE = 518,58RBUG_OP_CONTEXT_FLUSH = 519,59RBUG_OP_CONTEXT_LIST_REPLY = -512,60RBUG_OP_CONTEXT_INFO_REPLY = -513,61RBUG_OP_CONTEXT_DRAW_BLOCKED = 517,62RBUG_OP_SHADER_LIST = 768,63RBUG_OP_SHADER_INFO = 769,64RBUG_OP_SHADER_DISABLE = 770,65RBUG_OP_SHADER_REPLACE = 771,66RBUG_OP_SHADER_LIST_REPLY = -768,67RBUG_OP_SHADER_INFO_REPLY = -76968};6970/**71* Header for demarshaled message.72*/73struct rbug_header74{75enum rbug_opcode opcode;76void *__message;77};7879/**80* Header for a message in wire format.81*/82struct rbug_proto_header83{84int32_t opcode;85uint32_t length;86};8788/**89* Forward declare connection here, as this file is included by all users.90*/91struct rbug_connection;9293/**94* Get printable string for opcode.95*/96const char* rbug_proto_get_name(enum rbug_opcode opcode);9798#endif99100101