Go to the source code of this file.
Definition at line 85 of file brw_aub.h.
00085 { 00086 DWGS_NOTYPE, 00087 DWGS_VERTEX_SHADER_STATE, 00088 DWGS_GEOMETRY_SHADER_STATE , 00089 DWGS_CLIPPER_STATE, 00090 DWGS_STRIPS_FANS_STATE, 00091 DWGS_WINDOWER_IZ_STATE, 00092 DWGS_COLOR_CALC_STATE, 00093 DWGS_CLIPPER_VIEWPORT_STATE, /* was 0x7 */ 00094 DWGS_STRIPS_FANS_VIEWPORT_STATE, 00095 DWGS_COLOR_CALC_VIEWPORT_STATE, /* was 0x9 */ 00096 DWGS_SAMPLER_STATE, 00097 DWGS_KERNEL_INSTRUCTIONS, 00098 DWGS_SCRATCH_SPACE, 00099 DWGS_SAMPLER_DEFAULT_COLOR, 00100 DWGS_INTERFACE_DESCRIPTOR, 00101 DWGS_VLD_STATE, 00102 DWGS_VFE_STATE, 00103 DWGS_MAX_TYPE 00104 };
Definition at line 106 of file brw_aub.h.
00106 { 00107 DWSS_NOTYPE, 00108 DWSS_BINDING_TABLE_STATE, 00109 DWSS_SURFACE_STATE, 00110 DWSS_MAX_TYPE 00111 };
enum data_write_type |
Definition at line 64 of file brw_aub.h.
00064 { 00065 DW_NOTYPE, 00066 DW_BATCH_BUFFER, 00067 DW_BIN_BUFFER, 00068 DW_BIN_POINTER_LIST, 00069 DW_SLOW_STATE_BUFFER, 00070 DW_VERTEX_BUFFER, 00071 DW_2D_MAP, 00072 DW_CUBE_MAP, 00073 DW_INDIRECT_STATE_BUFFER, 00074 DW_VOLUME_MAP, 00075 DW_1D_MAP, 00076 DW_CONSTANT_BUFFER, 00077 DW_CONSTANT_URB_ENTRY, 00078 DW_INDEX_BUFFER, 00079 DW_GENERAL_STATE, 00080 DW_SURFACE_STATE, 00081 DW_MEDIA_OBJECT_INDIRECT_DATA, 00082 DW_MAX_TYPE 00083 };
void brw_aub_destroy | ( | struct brw_aubfile * | aubfile | ) |
void brw_aub_dump_bmp | ( | struct brw_aubfile * | aubfile, | |
struct pipe_surface * | surface, | |||
unsigned | gtt_offset | |||
) |
Definition at line 318 of file brw_aub.c.
References aub_dump_bmp::addr, assert, AUB_DUMP_BMP, pipe_surface::block, aub_dump_bmp::bpp, brw_aubfile::file, aub_dump_bmp::format, pipe_surface::height, pipe_format_block::height, aub_dump_bmp::instruction_type, aub_dump_bmp::pitch, pipe_format_block::size, pipe_surface::stride, aub_dump_bmp::unknown, pipe_surface::width, pipe_format_block::width, write_dump_bmp(), aub_dump_bmp::xmin, aub_dump_bmp::xsize, aub_dump_bmp::ymin, and aub_dump_bmp::ysize.
00321 { 00322 struct aub_dump_bmp db; 00323 unsigned format; 00324 00325 assert(surface->block.width == 1); 00326 assert(surface->block.height == 1); 00327 00328 if (surface->block.size == 4) 00329 format = 0x7; 00330 else 00331 format = 0x3; 00332 00333 db.instruction_type = AUB_DUMP_BMP; 00334 db.xmin = 0; 00335 db.ymin = 0; 00336 db.format = format; 00337 db.bpp = surface->block.size * 8; 00338 db.pitch = surface->stride/surface->block.size; 00339 db.xsize = surface->width; 00340 db.ysize = surface->height; 00341 db.addr = gtt_offset; 00342 db.unknown = /* surface->tiled ? 0x4 : */ 0x0; 00343 00344 write_dump_bmp(aubfile->file, &db); 00345 }
void brw_aub_gtt_cmds | ( | struct brw_aubfile * | aubfile, | |
unsigned | offset, | |||
const void * | data, | |||
unsigned | sz | |||
) |
Definition at line 295 of file brw_aub.c.
References ADDR_GTT, aub_block_header::address, aub_block_header::address_space, AUB_BLOCK_HEADER, BH_COMMAND_WRITE, CW_PRIMARY_RING_A, brw_aubfile::file, aub_block_header::general_state_type, aub_block_header::instruction_type, aub_block_header::length, aub_block_header::operation, aub_block_header::pad0, aub_block_header::pad1, aub_block_header::surface_state_type, aub_block_header::type, and write_block_header().
00299 { 00300 struct aub_block_header bh; 00301 unsigned type = CW_PRIMARY_RING_A; 00302 00303 00304 bh.instruction_type = AUB_BLOCK_HEADER; 00305 bh.operation = BH_COMMAND_WRITE; 00306 bh.type = type; 00307 bh.address_space = ADDR_GTT; 00308 bh.pad0 = 0; 00309 bh.general_state_type = 0; 00310 bh.surface_state_type = 0; 00311 bh.pad1 = 0; 00312 bh.address = offset; 00313 bh.length = sz; 00314 00315 write_block_header(aubfile->file, &bh, data, sz); 00316 }
void brw_aub_gtt_data | ( | struct brw_aubfile * | aubfile, | |
unsigned | offset, | |||
const void * | data, | |||
unsigned | sz, | |||
unsigned | type, | |||
unsigned | state_type | |||
) |
Definition at line 262 of file brw_aub.c.
References ADDR_GTT, aub_block_header::address, aub_block_header::address_space, AUB_BLOCK_HEADER, BH_DATA_WRITE, DW_GENERAL_STATE, brw_aubfile::file, aub_block_header::general_state_type, aub_block_header::instruction_type, aub_block_header::length, aub_block_header::operation, aub_block_header::pad0, aub_block_header::pad1, aub_block_header::surface_state_type, aub_block_header::type, and write_block_header().
00268 { 00269 struct aub_block_header bh; 00270 00271 bh.instruction_type = AUB_BLOCK_HEADER; 00272 bh.operation = BH_DATA_WRITE; 00273 bh.type = type; 00274 bh.address_space = ADDR_GTT; 00275 bh.pad0 = 0; 00276 00277 if (type == DW_GENERAL_STATE) { 00278 bh.general_state_type = state_type; 00279 bh.surface_state_type = 0; 00280 } 00281 else { 00282 bh.general_state_type = 0; 00283 bh.surface_state_type = state_type; 00284 } 00285 00286 bh.pad1 = 0; 00287 bh.address = offset; 00288 bh.length = sz; 00289 00290 write_block_header(aubfile->file, &bh, data, sz); 00291 }
struct brw_aubfile* brw_aubfile_create | ( | void | ) | [read] |
Definition at line 349 of file brw_aub.c.
References __progname, AUB_BUF_SIZE, AUB_BUF_START, CALLOC_STRUCT, debug_printf(), brw_aubfile::file, init_aub_gtt(), init_aubfile(), brw_aubfile::next_free_page, and NR_GTT_ENTRIES.
00350 { 00351 struct brw_aubfile *aubfile = CALLOC_STRUCT(brw_aubfile); 00352 char filename[80]; 00353 int val; 00354 static int i = 0; 00355 00356 i++; 00357 00358 if (getenv("INTEL_AUBFILE")) { 00359 val = snprintf(filename, sizeof(filename), "%s%d.aub", getenv("INTEL_AUBFILE"), i%4); 00360 debug_printf("--> Aub file: %s\n", filename); 00361 aubfile->file = fopen(filename, "w"); 00362 } 00363 else { 00364 val = snprintf(filename, sizeof(filename), "%s.aub", __progname); 00365 if (val < 0 || val > sizeof(filename)) 00366 strcpy(filename, "default.aub"); 00367 00368 debug_printf("--> Aub file: %s\n", filename); 00369 aubfile->file = fopen(filename, "w"); 00370 } 00371 00372 if (!aubfile->file) { 00373 debug_printf("couldn't open aubfile\n"); 00374 exit(1); 00375 } 00376 00377 init_aubfile(aubfile->file); 00378 00379 /* The GTT is located starting address zero in main memory. Pages 00380 * to populate the gtt start after this point. 00381 */ 00382 aubfile->next_free_page = (NR_GTT_ENTRIES * 4 + 4095) & ~4095; 00383 00384 /* More or less correspond with all the agp regions mapped by the 00385 * driver: 00386 */ 00387 init_aub_gtt(aubfile, 0, 4096*4); 00388 init_aub_gtt(aubfile, AUB_BUF_START, AUB_BUF_SIZE); 00389 00390 return aubfile; 00391 }