⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 i915_structs.h

📁 显驱动 Intel英特尔G45G43G41G35G33G31G965Q963Q965GM965系列显卡最新X.Org驱动2.4.0版For Linux
💻 H
📖 第 1 页 / 共 2 页
字号:
/* * Copyright © 2006 Intel Corporation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) shall be included in all copies or substantial portions of the * Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * Authors: *    Xiang Haihao <haihao.xiang@intel.com> * */#ifndef _I915_STRUCTS_H#define _I915_STRUCTS_H#include <stdint.h>/* MI_INSTRUCTION */#define CMD_MI          0x00#define OPC_MI_FLUSH                            (0x04)struct i915_mi_flush{    struct {        unsigned map_cache_invalidate : 1;        unsigned pad0 : 1;        unsigned render_cache_flush_inhibit : 1;        unsigned scene_count : 1;        unsigned end_scene : 1;        unsigned pad1 : 18;        unsigned opcode : 6;        unsigned type : 3;    } dw0;};/* BLT */#define CMD_2D          0x02#define OPC_COLOR_BLT                           (0x40)struct i915_color_blt{    struct {        unsigned length : 5;        unsigned pad0 : 15;        unsigned bpp_mask : 2;        unsigned opcode : 7;        unsigned type : 3;    } dw0;    struct {        unsigned pitch : 16;        unsigned rop : 8;        unsigned color_depth : 2;        unsigned pad0 : 6;    } dw1;    struct {        unsigned width : 16;        unsigned height : 16;    } dw2;    struct {        unsigned address;    } dw3;    struct {        unsigned pattern;    } dw4;};/* 3D_INSTRUCTION */#define CMD_3D          0x03#define OPC_3DMPEG_MACROBLOCK_IPICTURE          (0x01 + (0x1e << 5))#define OPC_3DMPEG_SET_ORIGIN                   (0x10 + (0x1e << 5))#define OPC_3DMPEG_MACROBLOCK                   (0x11 + (0x1e << 5))        #define OPC_3DMPEG_SLICE                        (0x12 + (0x1e << 5))#define OPC_3DMPEG_QM_PALETTE_LOAD              (0x13 + (0x1e << 5))#define OPC_3DSTATE_SCISSOR_ENABLE              (0x10 + (0x1c << 5))#define OPC_3DSTATE_MAP_STATE                   (0x00 + (0x1d << 8))#define OPC_3DSTATE_SAMPLER_STATE               (0x01 + (0x1d << 8))#define OPC_3DSTATE_LOAD_STATE_IMMEDIATE_1      (0x04 + (0x1d << 8))#define OPC_3DSTATE_PIXEL_SHADER_PROGRAM        (0x05 + (0x1d << 8))#define OPC_3DSTATE_PIXEL_SHADER_CONSTANTS      (0x06 + (0x1d << 8))#define OPC_3DSTATE_LOAD_INDIRECT               (0x07 + (0x1d << 8))#define OPC_3DSTATE_MODES_5                     (0x0c)#define OPC_3DSTATE_COORD_SET_BINDINGS          (0x16)#define OPC_3DPRIMITIVE                         (0x1f)#define OPC_3DSTATE_DRAWING_RECTANGLE           (0x80 + (0x1d << 8))#define OPC_3DSTATE_SCISSOR_RECTANGLE           (0x81 + (0x1d << 8))#define OPC_3DSTATE_DEST_BUFFER_VARIABLES       (0x85 + (0x1d << 8))#define OPC_3DSTATE_DEST_BUFFER_VARIABLES_MPEG  (0x87 + (0x1d << 8))#define OPC_3DSTATE_BUFFER_INFO                 (0x8e + (0x1d << 8))/* * 3DMPEG instructions */struct i915_3dmpeg_macroblock_header{    struct {        unsigned length : 19;        unsigned opcode : 10;        unsigned type : 3;    } dw0;        struct {        unsigned mb_intra : 1;        unsigned forward : 1;        unsigned backward : 1;        unsigned h263_4mv : 1;        unsigned pad0 : 1;        unsigned dct_type : 1;        unsigned pad1 : 2;        unsigned motion_type : 2;        unsigned pad2 : 2;        unsigned vertical_field_select : 4;        unsigned coded_block_pattern : 6;        unsigned pad3 : 2;        unsigned skipped_macroblocks : 7;        unsigned pad4 : 1;    } dw1;};struct i915_3dmpeg_macroblock_0mv{    struct i915_3dmpeg_macroblock_header header;};struct i915_3dmpeg_macroblock_1fbmv{    struct i915_3dmpeg_macroblock_header header;        unsigned dw2;    unsigned dw3;};struct i915_3dmpeg_macroblock_2fbmv{    struct i915_3dmpeg_macroblock_header header;    unsigned dw2;    unsigned dw3;    unsigned dw4;    unsigned dw5;};struct i915_3dmpeg_macroblock_5fmv{    struct i915_3dmpeg_macroblock_header header;    unsigned dw2;    unsigned dw3;    unsigned dw4;    unsigned dw5;    unsigned dw6;};  struct i915_3dmpeg_macroblock_ipicture{    struct {        unsigned pad0 : 5;        unsigned dct_type : 1;        unsigned pad1 : 13;        unsigned opcode : 10;        unsigned type : 3;    } dw0;};struct i915_3dmpeg_set_origin{    struct {        unsigned length : 19;        unsigned opcode : 10;        unsigned type : 3;    } dw0;    struct {        unsigned v_origin : 7;        unsigned pad0 : 1;        unsigned h_origin : 7;        unsigned pad1 : 17;    } dw1;};      struct i915_3dmpeg_slice{    struct {        unsigned length : 19;        unsigned opcode : 10;        unsigned type : 3;    } dw0;        struct {        unsigned fst_mb_bit_off : 3;        unsigned pad0 : 5;        unsigned mb_count : 7;        unsigned pad1 : 1;        unsigned v_position : 7;        unsigned pad2 : 1;        unsigned h_position : 7;        unsigned pad3 : 1;    } dw1;    struct {        unsigned length_minus_one : 17;        unsigned pad0 : 7;        unsigned qt_scale_code : 5;        unsigned pad1 : 3;    } dw2;};struct i915_3dmpeg_qm_palette_load{    struct {        unsigned length : 4;        unsigned pad0 : 15;        unsigned opcode : 10;        unsigned type : 3;    } dw0;        unsigned quantmatrix[16];    };        /* * 3DSTATE instruction */#define BUFFERID_COLOR_BACK     3#define BUFFERID_COLOR_AUX      4#define BUFFERID_MC_INTRA_CORR  5#define BUFFERID_DEPTH          7#define TILEWALK_XMAJOR         0#define TILEWALK_YMAJOR         1struct i915_3dstate_buffer_info{    struct {        unsigned length : 16;        unsigned opcode : 13;        unsigned type : 3;    } dw0;    struct {        unsigned pad0 : 2;        unsigned pitch : 12;        unsigned pad1 : 7;        unsigned walk : 1;        unsigned tiled_surface : 1;        unsigned fence_regs : 1;        unsigned buffer_id : 4;        unsigned aux_id : 1;        unsigned pad2 : 3;    } dw1;    struct {        unsigned pad0 : 2;        unsigned base_address : 27;        unsigned pad1 : 3;    } dw2;};#define COLORBUFFER_8BIT         0x00#define COLORBUFFER_X1R5G5B5     0x01#define COLORBUFFER_R5G6B5       0x02#define COLORBUFFER_A8R8G8B8     0x03#define COLORBUFFER_YCRCB_SWAP   0x04#define COLORBUFFER_YCRCB_NORMAL 0x05#define COLORBUFFER_YCRCB_SWAPUV 0x06#define COLORBUFFER_YCRCB_SWAPUVY   0x07#define COLORBUFFER_A4R4G4B4     0x08#define COLORBUFFER_A1R5G5B5     0x09#define COLORBUFFER_A2R10G10B10  0x0astruct i915_3dstate_dest_buffer_variables{    struct {        unsigned length : 16;        unsigned opcode : 13;        unsigned type : 3;    } dw0;        struct {        unsigned v_ls_offset : 1;        unsigned v_ls : 1;        unsigned depth_fmt : 2;        unsigned pad0 : 4;        unsigned color_fmt : 4;        unsigned yuv422_select : 3;        unsigned pad1 : 1;        unsigned dest_v_bias : 4;        unsigned dest_h_bias : 4;        unsigned dither_enhancement : 1;        unsigned linear_gamma : 1;        unsigned dither_pattern : 2;        unsigned lod_preclamp : 1;        unsigned edt_zone : 1;          /* early depth test in zone rendering */        unsigned texture_default_color : 1;        unsigned edt_classic : 1;       /* early depth test in classic mode */    } dw1;};#define MPEG_DECODE_MC          0#define MPEG_DECODE_VLD_IDCT_MC 1#define MPEG_I_PICTURE          1#define MPEG_P_PICTURE          2#define MPEG_B_PICTURE          3#define MC_SUB_1H               0#define MC_SUB_2H               1#define MC_SUB_4H               2#define MC_SUB_1V               0#define MC_SUB_2V               1struct i915_3dstate_dest_buffer_variables_mpeg{    struct {        unsigned length : 16;        unsigned opcode : 13;        unsigned type : 3;    } dw0;    struct {        unsigned picture_width : 7;        unsigned pad0 : 1;        unsigned v_subsample_factor : 2;        unsigned h_subsample_factor : 2;        unsigned tff : 1;        unsigned mismatch : 1;        unsigned pad1 : 1;        unsigned intra8 : 1;        unsigned abort_on_error : 8;        unsigned pad2 : 4;        unsigned bidir_avrg_control : 1;        unsigned rcontrol : 1;        unsigned decode_mode : 2;    } dw1;    struct {        unsigned pad0 : 1;        unsigned picture_coding_type : 2;        unsigned pad1 : 2;        unsigned scan_order : 1;        unsigned pad2 : 2;        unsigned q_scale_type : 1;        unsigned concealment : 1;        unsigned fpf_dct : 1;        unsigned pad3 : 2;        unsigned intra_dc : 2;        unsigned intra_vlc : 1;        unsigned f_code00 : 4;        unsigned f_code01 : 4;        unsigned f_code10 : 4;        unsigned f_code11 : 4;    } dw2;};struct i915_mc_static_indirect_state_buffer {    struct i915_3dstate_buffer_info dest_y;    struct i915_3dstate_buffer_info dest_u;    struct i915_3dstate_buffer_info dest_v;    struct i915_3dstate_dest_buffer_variables dest_buf;    struct i915_3dstate_dest_buffer_variables_mpeg dest_buf_mpeg;    struct i915_3dstate_buffer_info corr;};#define MAP_MAP0        0x0001#define MAP_MAP1        0x0002#define MAP_MAP2        0x0004#define MAP_MAP3        0x0008#define MAP_MAP4        0x0010#define MAP_MAP5        0x0020#define MAP_MAP6        0x0040#define MAP_MAP7        0x0080#define MAP_MAP8        0x0100#define MAP_MAP9        0x0200#define MAP_MAP10       0x0400#define MAP_MAP11       0x0800#define MAP_MAP12       0x1000#define MAP_MAP13       0x2000#define MAP_MAP14       0x4000#define MAP_MAP15       0x8000struct texture_map{    struct {        unsigned v_ls_offset : 1;        unsigned v_ls : 1;        unsigned base_address : 27;        unsigned pad0 : 2;        unsigned untrusted : 1;    } tm0;    struct {        unsigned tile_walk : 1;        unsigned tiled_surface : 1;        unsigned utilize_fence_regs : 1;        unsigned texel_fmt : 4;        unsigned surface_fmt : 3;        unsigned width : 11;        unsigned height : 11;    } tm1;        struct {        unsigned depth : 8;        unsigned mipmap_layout : 1;        unsigned max_lod : 6;        unsigned cube_face : 6;        unsigned pitch : 11;    } tm2;};struct i915_3dstate_map_state{    struct {        unsigned length : 6;        unsigned pad0 : 9;        unsigned retain : 1;        unsigned opcode : 13;        unsigned type : 3;    } dw0;    struct {        unsigned map_mask : 16;        unsigned pad0 : 16;    } dw1;};struct i915_mc_map_state {    struct i915_3dstate_map_state y_map;    struct texture_map y_forward;    struct texture_map y_backward;    struct i915_3dstate_map_state u_map;    struct texture_map u_forward;    struct texture_map u_backward;    struct i915_3dstate_map_state v_map;    struct texture_map v_forward;    struct texture_map v_backward;};#define SAMPLER_SAMPLER0        0x0001#define SAMPLER_SAMPLER1        0x0002#define SAMPLER_SAMPLER2        0x0004#define SAMPLER_SAMPLER3        0x0008#define SAMPLER_SAMPLER4        0x0010#define SAMPLER_SAMPLER5        0x0020#define SAMPLER_SAMPLER6        0x0040#define SAMPLER_SAMPLER7        0x0080#define SAMPLER_SAMPLER8        0x0100#define SAMPLER_SAMPLER9        0x0200#define SAMPLER_SAMPLER10       0x0400#define SAMPLER_SAMPLER11       0x0800#define SAMPLER_SAMPLER12       0x1000#define SAMPLER_SAMPLER13       0x2000#define SAMPLER_SAMPLER14       0x4000#define SAMPLER_SAMPLER15       0x8000#define MIPFILTER_NONE          0#define MIPFILTER_NEAREST       1#define MIPFILTER_LINEAR        3#define MAPFILTER_NEAREST       0#define MAPFILTER_LINEAR        1#define MAPFILTER_ANISOTROPIC   2#define MAPFILTER_4X4_1         3#define MAPFILTER_4X4_2         4#define MAPFILTER_4X4_FLAT      5#define MAPFILTER_MONO          6#define ANISORATIO_2            0#define ANISORATIO_4            1#define PREFILTEROP_ALWAYS      0#define PREFILTEROP_NEVER       1#define PREFILTEROP_LESS        2#define PREFILTEROP_EQUAL       3#define PREFILTEROP_LEQUAL      4#define PREFILTEROP_GREATER     5#define PREFILTEROP_NOTEQUAL    6#define PREFILTEROP_GEQUAL      7#define TEXCOORDMODE_WRAP       0#define TEXCOORDMODE_MIRROR     1#define TEXCOORDMODE_CLAMP      2#define TEXCOORDMODE_CUBE       3#define TEXCOORDMODE_CLAMP_BORDER       4#define TEXCOORDMODE_MIRROR_ONCE        5struct texture_sampler{    struct {        unsigned shadow_function : 3;        unsigned max_anisotropy : 1;        unsigned shadow_enable : 1;        unsigned lod_bias : 9;        unsigned min_filter : 3;        unsigned mag_filter : 3;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -