Merge branch 'mesa_7_5_branch'
[mesa.git] / src / gallium / winsys / xlib / xlib_brw_aub.h
1 /*
2 Copyright (C) Intel Corp. 2006. All Rights Reserved.
3 Intel funded Tungsten Graphics (http://www.tungstengraphics.com) to
4 develop this 3D driver.
5
6 Permission is hereby granted, free of charge, to any person obtaining
7 a copy of this software and associated documentation files (the
8 "Software"), to deal in the Software without restriction, including
9 without limitation the rights to use, copy, modify, merge, publish,
10 distribute, sublicense, and/or sell copies of the Software, and to
11 permit persons to whom the Software is furnished to do so, subject to
12 the following conditions:
13
14 The above copyright notice and this permission notice (including the
15 next paragraph) shall be included in all copies or substantial
16 portions of the Software.
17
18 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
19 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
21 IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
22 LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
23 OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
24 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25
26 **********************************************************************/
27 /*
28 * Authors:
29 * Keith Whitwell <keith@tungstengraphics.com>
30 */
31
32 #ifndef BRW_AUB_H
33 #define BRW_AUB_H
34
35 /* We set up this region, buffers may be allocated here:
36 */
37 #define AUB_BUF_START (4096*4)
38 #define AUB_BUF_SIZE (8*1024*1024)
39
40 struct intel_context;
41 struct pipe_surface;
42
43 struct brw_aubfile *brw_aubfile_create( void );
44
45 void brw_aub_destroy( struct brw_aubfile *aubfile );
46
47 void brw_aub_gtt_data( struct brw_aubfile *aubfile,
48 unsigned offset,
49 const void *data,
50 unsigned sz,
51 unsigned type,
52 unsigned state_type );
53
54 void brw_aub_gtt_cmds( struct brw_aubfile *aubfile,
55 unsigned offset,
56 const void *data,
57 unsigned sz );
58
59 void brw_aub_dump_bmp( struct brw_aubfile *aubfile,
60 struct pipe_surface *surface,
61 unsigned gtt_offset );
62
63
64 enum data_write_type {
65 DW_NOTYPE,
66 DW_BATCH_BUFFER,
67 DW_BIN_BUFFER,
68 DW_BIN_POINTER_LIST,
69 DW_SLOW_STATE_BUFFER,
70 DW_VERTEX_BUFFER,
71 DW_2D_MAP,
72 DW_CUBE_MAP,
73 DW_INDIRECT_STATE_BUFFER,
74 DW_VOLUME_MAP,
75 DW_1D_MAP,
76 DW_CONSTANT_BUFFER,
77 DW_CONSTANT_URB_ENTRY,
78 DW_INDEX_BUFFER,
79 DW_GENERAL_STATE,
80 DW_SURFACE_STATE,
81 DW_MEDIA_OBJECT_INDIRECT_DATA,
82 DW_MAX_TYPE
83 };
84
85 enum data_write_general_state_type {
86 DWGS_NOTYPE,
87 DWGS_VERTEX_SHADER_STATE,
88 DWGS_GEOMETRY_SHADER_STATE ,
89 DWGS_CLIPPER_STATE,
90 DWGS_STRIPS_FANS_STATE,
91 DWGS_WINDOWER_IZ_STATE,
92 DWGS_COLOR_CALC_STATE,
93 DWGS_CLIPPER_VIEWPORT_STATE, /* was 0x7 */
94 DWGS_STRIPS_FANS_VIEWPORT_STATE,
95 DWGS_COLOR_CALC_VIEWPORT_STATE, /* was 0x9 */
96 DWGS_SAMPLER_STATE,
97 DWGS_KERNEL_INSTRUCTIONS,
98 DWGS_SCRATCH_SPACE,
99 DWGS_SAMPLER_DEFAULT_COLOR,
100 DWGS_INTERFACE_DESCRIPTOR,
101 DWGS_VLD_STATE,
102 DWGS_VFE_STATE,
103 DWGS_MAX_TYPE
104 };
105
106 enum data_write_surface_state_type {
107 DWSS_NOTYPE,
108 DWSS_BINDING_TABLE_STATE,
109 DWSS_SURFACE_STATE,
110 DWSS_MAX_TYPE
111 };
112
113
114 #endif