1bf215546Sopenharmony_ci/********************************************************** 2bf215546Sopenharmony_ci * Copyright 2007-2015 VMware, Inc. All rights reserved. 3bf215546Sopenharmony_ci * 4bf215546Sopenharmony_ci * Permission is hereby granted, free of charge, to any person 5bf215546Sopenharmony_ci * obtaining a copy of this software and associated documentation 6bf215546Sopenharmony_ci * files (the "Software"), to deal in the Software without 7bf215546Sopenharmony_ci * restriction, including without limitation the rights to use, copy, 8bf215546Sopenharmony_ci * modify, merge, publish, distribute, sublicense, and/or sell copies 9bf215546Sopenharmony_ci * of the Software, and to permit persons to whom the Software is 10bf215546Sopenharmony_ci * furnished to do so, subject to the following conditions: 11bf215546Sopenharmony_ci * 12bf215546Sopenharmony_ci * The above copyright notice and this permission notice shall be 13bf215546Sopenharmony_ci * included in all copies or substantial portions of the Software. 14bf215546Sopenharmony_ci * 15bf215546Sopenharmony_ci * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 16bf215546Sopenharmony_ci * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 17bf215546Sopenharmony_ci * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 18bf215546Sopenharmony_ci * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 19bf215546Sopenharmony_ci * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 20bf215546Sopenharmony_ci * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21bf215546Sopenharmony_ci * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22bf215546Sopenharmony_ci * SOFTWARE. 23bf215546Sopenharmony_ci * 24bf215546Sopenharmony_ci **********************************************************/ 25bf215546Sopenharmony_ci 26bf215546Sopenharmony_ci/* 27bf215546Sopenharmony_ci * svga3d_caps.h -- 28bf215546Sopenharmony_ci * 29bf215546Sopenharmony_ci * Definitions for SVGA3D hardware capabilities. Capabilities 30bf215546Sopenharmony_ci * are used to query for optional rendering features during 31bf215546Sopenharmony_ci * driver initialization. The capability data is stored as very 32bf215546Sopenharmony_ci * basic key/value dictionary within the "FIFO register" memory 33bf215546Sopenharmony_ci * area at the beginning of BAR2. 34bf215546Sopenharmony_ci * 35bf215546Sopenharmony_ci * Note that these definitions are only for 3D capabilities. 36bf215546Sopenharmony_ci * The SVGA device also has "device capabilities" and "FIFO 37bf215546Sopenharmony_ci * capabilities", which are non-3D-specific and are stored as 38bf215546Sopenharmony_ci * bitfields rather than key/value pairs. 39bf215546Sopenharmony_ci */ 40bf215546Sopenharmony_ci 41bf215546Sopenharmony_ci#ifndef _SVGA3D_CAPS_H_ 42bf215546Sopenharmony_ci#define _SVGA3D_CAPS_H_ 43bf215546Sopenharmony_ci 44bf215546Sopenharmony_ci#define INCLUDE_ALLOW_MODULE 45bf215546Sopenharmony_ci#define INCLUDE_ALLOW_USERLEVEL 46bf215546Sopenharmony_ci 47bf215546Sopenharmony_ci#include "includeCheck.h" 48bf215546Sopenharmony_ci 49bf215546Sopenharmony_ci#include <string.h> 50bf215546Sopenharmony_ci#include "svga_reg.h" 51bf215546Sopenharmony_ci 52bf215546Sopenharmony_ci#define SVGA_FIFO_3D_CAPS_SIZE (SVGA_FIFO_3D_CAPS_LAST - \ 53bf215546Sopenharmony_ci SVGA_FIFO_3D_CAPS + 1) 54bf215546Sopenharmony_ci 55bf215546Sopenharmony_ci 56bf215546Sopenharmony_ci/* 57bf215546Sopenharmony_ci * SVGA3dCapsRecordType 58bf215546Sopenharmony_ci * 59bf215546Sopenharmony_ci * Record types that can be found in the caps block. 60bf215546Sopenharmony_ci * Related record types are grouped together numerically so that 61bf215546Sopenharmony_ci * SVGA3dCaps_FindRecord() can be applied on a range of record 62bf215546Sopenharmony_ci * types. 63bf215546Sopenharmony_ci */ 64bf215546Sopenharmony_ci 65bf215546Sopenharmony_citypedef enum { 66bf215546Sopenharmony_ci SVGA3DCAPS_RECORD_UNKNOWN = 0, 67bf215546Sopenharmony_ci SVGA3DCAPS_RECORD_DEVCAPS_MIN = 0x100, 68bf215546Sopenharmony_ci SVGA3DCAPS_RECORD_DEVCAPS = 0x100, 69bf215546Sopenharmony_ci SVGA3DCAPS_RECORD_DEVCAPS_MAX = 0x1ff, 70bf215546Sopenharmony_ci} SVGA3dCapsRecordType; 71bf215546Sopenharmony_ci 72bf215546Sopenharmony_ci 73bf215546Sopenharmony_ci/* 74bf215546Sopenharmony_ci * SVGA3dCapsRecordHeader 75bf215546Sopenharmony_ci * 76bf215546Sopenharmony_ci * Header field leading each caps block record. Contains the offset (in 77bf215546Sopenharmony_ci * register words, NOT bytes) to the next caps block record (or the end 78bf215546Sopenharmony_ci * of caps block records which will be a zero word) and the record type 79bf215546Sopenharmony_ci * as defined above. 80bf215546Sopenharmony_ci */ 81bf215546Sopenharmony_ci 82bf215546Sopenharmony_citypedef 83bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 84bf215546Sopenharmony_cistruct SVGA3dCapsRecordHeader { 85bf215546Sopenharmony_ci uint32 length; 86bf215546Sopenharmony_ci SVGA3dCapsRecordType type; 87bf215546Sopenharmony_ci} 88bf215546Sopenharmony_ci#include "vmware_pack_end.h" 89bf215546Sopenharmony_ciSVGA3dCapsRecordHeader; 90bf215546Sopenharmony_ci 91bf215546Sopenharmony_ci 92bf215546Sopenharmony_ci/* 93bf215546Sopenharmony_ci * SVGA3dCapsRecord 94bf215546Sopenharmony_ci * 95bf215546Sopenharmony_ci * Caps block record; "data" is a placeholder for the actual data structure 96bf215546Sopenharmony_ci * contained within the record; for example a record containing a FOOBAR 97bf215546Sopenharmony_ci * structure would be of size "sizeof(SVGA3dCapsRecordHeader) + 98bf215546Sopenharmony_ci * sizeof(FOOBAR)". 99bf215546Sopenharmony_ci */ 100bf215546Sopenharmony_ci 101bf215546Sopenharmony_citypedef 102bf215546Sopenharmony_ci#include "vmware_pack_begin.h" 103bf215546Sopenharmony_cistruct SVGA3dCapsRecord { 104bf215546Sopenharmony_ci SVGA3dCapsRecordHeader header; 105bf215546Sopenharmony_ci uint32 data[1]; 106bf215546Sopenharmony_ci} 107bf215546Sopenharmony_ci#include "vmware_pack_end.h" 108bf215546Sopenharmony_ciSVGA3dCapsRecord; 109bf215546Sopenharmony_ci 110bf215546Sopenharmony_ci 111bf215546Sopenharmony_citypedef uint32 SVGA3dCapPair[2]; 112bf215546Sopenharmony_ci 113bf215546Sopenharmony_ci 114bf215546Sopenharmony_ci#endif 115