Path: blob/21.2-virgl/src/gallium/drivers/svga/include/svga3d_caps.h
4574 views
/**********************************************************1* Copyright 2007-2015 VMware, Inc. All rights reserved.2*3* Permission is hereby granted, free of charge, to any person4* obtaining a copy of this software and associated documentation5* files (the "Software"), to deal in the Software without6* restriction, including without limitation the rights to use, copy,7* modify, merge, publish, distribute, sublicense, and/or sell copies8* of the Software, and to permit persons to whom the Software is9* furnished to do so, subject to the following conditions:10*11* The above copyright notice and this permission notice shall be12* included in all copies or substantial portions of the Software.13*14* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,15* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF16* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND17* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS18* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN19* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN20* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE21* SOFTWARE.22*23**********************************************************/2425/*26* svga3d_caps.h --27*28* Definitions for SVGA3D hardware capabilities. Capabilities29* are used to query for optional rendering features during30* driver initialization. The capability data is stored as very31* basic key/value dictionary within the "FIFO register" memory32* area at the beginning of BAR2.33*34* Note that these definitions are only for 3D capabilities.35* The SVGA device also has "device capabilities" and "FIFO36* capabilities", which are non-3D-specific and are stored as37* bitfields rather than key/value pairs.38*/3940#ifndef _SVGA3D_CAPS_H_41#define _SVGA3D_CAPS_H_4243#define INCLUDE_ALLOW_MODULE44#define INCLUDE_ALLOW_USERLEVEL4546#include "includeCheck.h"4748#include <string.h>49#include "svga_reg.h"5051#define SVGA_FIFO_3D_CAPS_SIZE (SVGA_FIFO_3D_CAPS_LAST - \52SVGA_FIFO_3D_CAPS + 1)535455/*56* SVGA3dCapsRecordType57*58* Record types that can be found in the caps block.59* Related record types are grouped together numerically so that60* SVGA3dCaps_FindRecord() can be applied on a range of record61* types.62*/6364typedef enum {65SVGA3DCAPS_RECORD_UNKNOWN = 0,66SVGA3DCAPS_RECORD_DEVCAPS_MIN = 0x100,67SVGA3DCAPS_RECORD_DEVCAPS = 0x100,68SVGA3DCAPS_RECORD_DEVCAPS_MAX = 0x1ff,69} SVGA3dCapsRecordType;707172/*73* SVGA3dCapsRecordHeader74*75* Header field leading each caps block record. Contains the offset (in76* register words, NOT bytes) to the next caps block record (or the end77* of caps block records which will be a zero word) and the record type78* as defined above.79*/8081typedef82#include "vmware_pack_begin.h"83struct SVGA3dCapsRecordHeader {84uint32 length;85SVGA3dCapsRecordType type;86}87#include "vmware_pack_end.h"88SVGA3dCapsRecordHeader;899091/*92* SVGA3dCapsRecord93*94* Caps block record; "data" is a placeholder for the actual data structure95* contained within the record; for example a record containing a FOOBAR96* structure would be of size "sizeof(SVGA3dCapsRecordHeader) +97* sizeof(FOOBAR)".98*/99100typedef101#include "vmware_pack_begin.h"102struct SVGA3dCapsRecord {103SVGA3dCapsRecordHeader header;104uint32 data[1];105}106#include "vmware_pack_end.h"107SVGA3dCapsRecord;108109110typedef uint32 SVGA3dCapPair[2];111112113#endif114115116