Lines Matching refs:stream
71 struct debug_stream *stream, in PRINTF() argument
83 static boolean debug( struct debug_stream *stream, const char *name, unsigned len ) in debug() argument
86 unsigned *ptr = (unsigned *)(stream->ptr + stream->offset); in debug()
89 PRINTF(stream, "Error - zero length packet (0x%08x)\n", stream->ptr[0]); in debug()
94 if (stream->print_addresses) in debug()
95 PRINTF(stream, "%08x: ", stream->offset); in debug()
98 PRINTF(stream, "%s (%d dwords):\n", name, len); in debug()
100 PRINTF(stream, "\t0x%08x\n", ptr[i]); in debug()
101 PRINTF(stream, "\n"); in debug()
103 stream->offset += len * sizeof(unsigned); in debug()
128 static boolean debug_prim( struct debug_stream *stream, const char *name, in debug_prim() argument
132 unsigned *ptr = (unsigned *)(stream->ptr + stream->offset); in debug_prim()
138 PRINTF(stream, "%s %s (%d dwords):\n", name, prim, len); in debug_prim()
139 PRINTF(stream, "\t0x%08x\n", ptr[0]); in debug_prim()
142 PRINTF(stream, "\t0x%08x // %f\n", ptr[i], *(float *)&ptr[i]); in debug_prim()
144 PRINTF(stream, "\t0x%08x\n", ptr[i]); in debug_prim()
148 PRINTF(stream, "\n"); in debug_prim()
150 stream->offset += len * sizeof(unsigned); in debug_prim()
158 static boolean debug_program( struct debug_stream *stream, const char *name, unsigned len ) in debug_program() argument
160 unsigned *ptr = (unsigned *)(stream->ptr + stream->offset); in debug_program()
163 PRINTF(stream, "Error - zero length packet (0x%08x)\n", stream->ptr[0]); in debug_program()
168 if (stream->print_addresses) in debug_program()
169 PRINTF(stream, "%08x: ", stream->offset); in debug_program()
171 PRINTF(stream, "%s (%d dwords):\n", name, len); in debug_program()
172 i915_disassemble_program( stream, ptr, len ); in debug_program()
174 stream->offset += len * sizeof(unsigned); in debug_program()
179 static boolean debug_chain( struct debug_stream *stream, const char *name, unsigned len ) in debug_chain() argument
181 unsigned *ptr = (unsigned *)(stream->ptr + stream->offset); in debug_chain()
182 unsigned old_offset = stream->offset + len * sizeof(unsigned); in debug_chain()
185 PRINTF(stream, "%s (%d dwords):\n", name, len); in debug_chain()
187 PRINTF(stream, "\t0x%08x\n", ptr[i]); in debug_chain()
189 stream->offset = ptr[1] & ~0x3; in debug_chain()
191 if (stream->offset < old_offset) in debug_chain()
192 PRINTF(stream, "\n... skipping backwards from 0x%x --> 0x%x ...\n\n", in debug_chain()
193 old_offset, stream->offset ); in debug_chain()
195 PRINTF(stream, "\n... skipping from 0x%x --> 0x%x ...\n\n", in debug_chain()
196 old_offset, stream->offset ); in debug_chain()
203 static boolean debug_variable_length_prim( struct debug_stream *stream ) in debug_variable_length_prim() argument
205 unsigned *ptr = (unsigned *)(stream->ptr + stream->offset); in debug_variable_length_prim()
215 PRINTF(stream, "3DPRIM, %s variable length %d indicies (%d dwords):\n", prim, i, len); in debug_variable_length_prim()
217 PRINTF(stream, "\t0x%08x\n", ptr[i]); in debug_variable_length_prim()
218 PRINTF(stream, "\n"); in debug_variable_length_prim()
220 stream->offset += len * sizeof(unsigned); in debug_variable_length_prim()
227 struct debug_stream *stream, in BITS() argument
237 PRINTF(stream, "\t\t "); in BITS()
243 PRINTF(stream, ": 0x%x\n", ((dw) & himask) >> (lo)); in BITS()
261 struct debug_stream *stream, in FLAG() argument
270 PRINTF(stream, "\t\t "); in FLAG()
276 PRINTF(stream, "\n"); in FLAG()
280 static boolean debug_load_immediate( struct debug_stream *stream, in debug_load_immediate() argument
284 unsigned *ptr = (unsigned *)(stream->ptr + stream->offset); in debug_load_immediate()
288 PRINTF(stream, "%s (%d dwords, flags: %x):\n", name, len, bits); in debug_load_immediate()
289 PRINTF(stream, "\t0x%08x\n", ptr[j++]); in debug_load_immediate()
292 PRINTF(stream, "\t LIS0: 0x%08x\n", ptr[j]); in debug_load_immediate()
293 PRINTF(stream, "\t vb address: 0x%08x\n", (ptr[j] & ~0x3)); in debug_load_immediate()
294 BITS(stream, ptr[j], 0, 0, "vb invalidate disable"); in debug_load_immediate()
298 PRINTF(stream, "\t LIS1: 0x%08x\n", ptr[j]); in debug_load_immediate()
299 BITS(stream, ptr[j], 29, 24, "vb dword width"); in debug_load_immediate()
300 BITS(stream, ptr[j], 21, 16, "vb dword pitch"); in debug_load_immediate()
301 BITS(stream, ptr[j], 15, 0, "vb max index"); in debug_load_immediate()
306 PRINTF(stream, "\t LIS2: 0x%08x\n", ptr[j]); in debug_load_immediate()
310 BITS(stream, tc, 3, 0, "tex coord %d", i); in debug_load_immediate()
315 PRINTF(stream, "\t LIS3: 0x%08x\n", ptr[j]); in debug_load_immediate()
319 PRINTF(stream, "\t LIS4: 0x%08x\n", ptr[j]); in debug_load_immediate()
320 BITS(stream, ptr[j], 31, 23, "point width"); in debug_load_immediate()
321 BITS(stream, ptr[j], 22, 19, "line width"); in debug_load_immediate()
322 FLAG(stream, ptr[j], 18, "alpha flatshade"); in debug_load_immediate()
323 FLAG(stream, ptr[j], 17, "fog flatshade"); in debug_load_immediate()
324 FLAG(stream, ptr[j], 16, "spec flatshade"); in debug_load_immediate()
325 FLAG(stream, ptr[j], 15, "rgb flatshade"); in debug_load_immediate()
326 BITS(stream, ptr[j], 14, 13, "cull mode"); in debug_load_immediate()
327 FLAG(stream, ptr[j], 12, "vfmt: point width"); in debug_load_immediate()
328 FLAG(stream, ptr[j], 11, "vfmt: specular/fog"); in debug_load_immediate()
329 FLAG(stream, ptr[j], 10, "vfmt: rgba"); in debug_load_immediate()
330 FLAG(stream, ptr[j], 9, "vfmt: depth offset"); in debug_load_immediate()
331 BITS(stream, ptr[j], 8, 6, "vfmt: position (2==xyzw)"); in debug_load_immediate()
332 FLAG(stream, ptr[j], 5, "force dflt diffuse"); in debug_load_immediate()
333 FLAG(stream, ptr[j], 4, "force dflt specular"); in debug_load_immediate()
334 FLAG(stream, ptr[j], 3, "local depth offset enable"); in debug_load_immediate()
335 FLAG(stream, ptr[j], 2, "vfmt: fp32 fog coord"); in debug_load_immediate()
336 FLAG(stream, ptr[j], 1, "sprite point"); in debug_load_immediate()
337 FLAG(stream, ptr[j], 0, "antialiasing"); in debug_load_immediate()
341 PRINTF(stream, "\t LIS5: 0x%08x\n", ptr[j]); in debug_load_immediate()
342 BITS(stream, ptr[j], 31, 28, "rgba write disables"); in debug_load_immediate()
343 FLAG(stream, ptr[j], 27, "force dflt point width"); in debug_load_immediate()
344 FLAG(stream, ptr[j], 26, "last pixel enable"); in debug_load_immediate()
345 FLAG(stream, ptr[j], 25, "global z offset enable"); in debug_load_immediate()
346 FLAG(stream, ptr[j], 24, "fog enable"); in debug_load_immediate()
347 BITS(stream, ptr[j], 23, 16, "stencil ref"); in debug_load_immediate()
348 BITS(stream, ptr[j], 15, 13, "stencil test"); in debug_load_immediate()
349 BITS(stream, ptr[j], 12, 10, "stencil fail op"); in debug_load_immediate()
350 BITS(stream, ptr[j], 9, 7, "stencil pass z fail op"); in debug_load_immediate()
351 BITS(stream, ptr[j], 6, 4, "stencil pass z pass op"); in debug_load_immediate()
352 FLAG(stream, ptr[j], 3, "stencil write enable"); in debug_load_immediate()
353 FLAG(stream, ptr[j], 2, "stencil test enable"); in debug_load_immediate()
354 FLAG(stream, ptr[j], 1, "color dither enable"); in debug_load_immediate()
355 FLAG(stream, ptr[j], 0, "logiop enable"); in debug_load_immediate()
359 PRINTF(stream, "\t LIS6: 0x%08x\n", ptr[j]); in debug_load_immediate()
360 FLAG(stream, ptr[j], 31, "alpha test enable"); in debug_load_immediate()
361 BITS(stream, ptr[j], 30, 28, "alpha func"); in debug_load_immediate()
362 BITS(stream, ptr[j], 27, 20, "alpha ref"); in debug_load_immediate()
363 FLAG(stream, ptr[j], 19, "depth test enable"); in debug_load_immediate()
364 BITS(stream, ptr[j], 18, 16, "depth func"); in debug_load_immediate()
365 FLAG(stream, ptr[j], 15, "blend enable"); in debug_load_immediate()
366 BITS(stream, ptr[j], 14, 12, "blend func"); in debug_load_immediate()
367 BITS(stream, ptr[j], 11, 8, "blend src factor"); in debug_load_immediate()
368 BITS(stream, ptr[j], 7, 4, "blend dst factor"); in debug_load_immediate()
369 FLAG(stream, ptr[j], 3, "depth write enable"); in debug_load_immediate()
370 FLAG(stream, ptr[j], 2, "color write enable"); in debug_load_immediate()
371 BITS(stream, ptr[j], 1, 0, "provoking vertex"); in debug_load_immediate()
376 PRINTF(stream, "\n"); in debug_load_immediate()
380 stream->offset += len * sizeof(unsigned); in debug_load_immediate()
387 static boolean debug_load_indirect( struct debug_stream *stream, in debug_load_indirect() argument
391 unsigned *ptr = (unsigned *)(stream->ptr + stream->offset); in debug_load_indirect()
395 PRINTF(stream, "%s (%d dwords):\n", name, len); in debug_load_indirect()
396 PRINTF(stream, "\t0x%08x\n", ptr[j++]); in debug_load_indirect()
402 PRINTF(stream, " STATIC: 0x%08x | %x\n", ptr[j]&~3, ptr[j]&3); j++; in debug_load_indirect()
403 PRINTF(stream, " 0x%08x\n", ptr[j++]); in debug_load_indirect()
406 PRINTF(stream, " DYNAMIC: 0x%08x | %x\n", ptr[j]&~3, ptr[j]&3); j++; in debug_load_indirect()
409 PRINTF(stream, " SAMPLER: 0x%08x | %x\n", ptr[j]&~3, ptr[j]&3); j++; in debug_load_indirect()
410 PRINTF(stream, " 0x%08x\n", ptr[j++]); in debug_load_indirect()
413 PRINTF(stream, " MAP: 0x%08x | %x\n", ptr[j]&~3, ptr[j]&3); j++; in debug_load_indirect()
414 PRINTF(stream, " 0x%08x\n", ptr[j++]); in debug_load_indirect()
417 PRINTF(stream, " PROGRAM: 0x%08x | %x\n", ptr[j]&~3, ptr[j]&3); j++; in debug_load_indirect()
418 PRINTF(stream, " 0x%08x\n", ptr[j++]); in debug_load_indirect()
421 PRINTF(stream, " CONSTANTS: 0x%08x | %x\n", ptr[j]&~3, ptr[j]&3); j++; in debug_load_indirect()
422 PRINTF(stream, " 0x%08x\n", ptr[j++]); in debug_load_indirect()
432 PRINTF(stream, "\t DUMMY: 0x%08x\n", ptr[j++]); in debug_load_indirect()
435 PRINTF(stream, "\n"); in debug_load_indirect()
440 stream->offset += len * sizeof(unsigned); in debug_load_indirect()
445 static void BR13( struct debug_stream *stream, in BR13() argument
448 PRINTF(stream, "\t0x%08x\n", val); in BR13()
449 FLAG(stream, val, 30, "clipping enable"); in BR13()
450 BITS(stream, val, 25, 24, "color depth (3==32bpp)"); in BR13()
451 BITS(stream, val, 23, 16, "raster op"); in BR13()
452 BITS(stream, val, 15, 0, "dest pitch"); in BR13()
456 static void BR22( struct debug_stream *stream, in BR22() argument
459 PRINTF(stream, "\t0x%08x\n", val); in BR22()
460 BITS(stream, val, 31, 16, "dest y1"); in BR22()
461 BITS(stream, val, 15, 0, "dest x1"); in BR22()
464 static void BR23( struct debug_stream *stream, in BR23() argument
467 PRINTF(stream, "\t0x%08x\n", val); in BR23()
468 BITS(stream, val, 31, 16, "dest y2"); in BR23()
469 BITS(stream, val, 15, 0, "dest x2"); in BR23()
472 static void BR09( struct debug_stream *stream, in BR09() argument
475 PRINTF(stream, "\t0x%08x -- dest address\n", val); in BR09()
478 static void BR26( struct debug_stream *stream, in BR26() argument
481 PRINTF(stream, "\t0x%08x\n", val); in BR26()
482 BITS(stream, val, 31, 16, "src y1"); in BR26()
483 BITS(stream, val, 15, 0, "src x1"); in BR26()
486 static void BR11( struct debug_stream *stream, in BR11() argument
489 PRINTF(stream, "\t0x%08x\n", val); in BR11()
490 BITS(stream, val, 15, 0, "src pitch"); in BR11()
493 static void BR12( struct debug_stream *stream, in BR12() argument
496 PRINTF(stream, "\t0x%08x -- src address\n", val); in BR12()
499 static void BR16( struct debug_stream *stream, in BR16() argument
502 PRINTF(stream, "\t0x%08x -- color\n", val); in BR16()
505 static boolean debug_copy_blit( struct debug_stream *stream, in debug_copy_blit() argument
509 unsigned *ptr = (unsigned *)(stream->ptr + stream->offset); in debug_copy_blit()
512 PRINTF(stream, "%s (%d dwords):\n", name, len); in debug_copy_blit()
513 PRINTF(stream, "\t0x%08x\n", ptr[j++]); in debug_copy_blit()
515 BR13(stream, ptr[j++]); in debug_copy_blit()
516 BR22(stream, ptr[j++]); in debug_copy_blit()
517 BR23(stream, ptr[j++]); in debug_copy_blit()
518 BR09(stream, ptr[j++]); in debug_copy_blit()
519 BR26(stream, ptr[j++]); in debug_copy_blit()
520 BR11(stream, ptr[j++]); in debug_copy_blit()
521 BR12(stream, ptr[j++]); in debug_copy_blit()
523 stream->offset += len * sizeof(unsigned); in debug_copy_blit()
528 static boolean debug_color_blit( struct debug_stream *stream, in debug_color_blit() argument
532 unsigned *ptr = (unsigned *)(stream->ptr + stream->offset); in debug_color_blit()
535 PRINTF(stream, "%s (%d dwords):\n", name, len); in debug_color_blit()
536 PRINTF(stream, "\t0x%08x\n", ptr[j++]); in debug_color_blit()
538 BR13(stream, ptr[j++]); in debug_color_blit()
539 BR22(stream, ptr[j++]); in debug_color_blit()
540 BR23(stream, ptr[j++]); in debug_color_blit()
541 BR09(stream, ptr[j++]); in debug_color_blit()
542 BR16(stream, ptr[j++]); in debug_color_blit()
544 stream->offset += len * sizeof(unsigned); in debug_color_blit()
549 static boolean debug_modes4( struct debug_stream *stream, in debug_modes4() argument
553 unsigned *ptr = (unsigned *)(stream->ptr + stream->offset); in debug_modes4()
556 PRINTF(stream, "%s (%d dwords):\n", name, len); in debug_modes4()
557 PRINTF(stream, "\t0x%08x\n", ptr[j]); in debug_modes4()
558 BITS(stream, ptr[j], 21, 18, "logicop func"); in debug_modes4()
559 FLAG(stream, ptr[j], 17, "stencil test mask modify-enable"); in debug_modes4()
560 FLAG(stream, ptr[j], 16, "stencil write mask modify-enable"); in debug_modes4()
561 BITS(stream, ptr[j], 15, 8, "stencil test mask"); in debug_modes4()
562 BITS(stream, ptr[j], 7, 0, "stencil write mask"); in debug_modes4()
565 stream->offset += len * sizeof(unsigned); in debug_modes4()
570 static boolean debug_map_state( struct debug_stream *stream, in debug_map_state() argument
574 unsigned *ptr = (unsigned *)(stream->ptr + stream->offset); in debug_map_state()
577 PRINTF(stream, "%s (%d dwords):\n", name, len); in debug_map_state()
578 PRINTF(stream, "\t0x%08x\n", ptr[j++]); in debug_map_state()
581 PRINTF(stream, "\t0x%08x\n", ptr[j]); in debug_map_state()
582 BITS(stream, ptr[j], 15, 0, "map mask"); in debug_map_state()
588 PRINTF(stream, "\t TMn.0: 0x%08x\n", ptr[j]); in debug_map_state()
589 PRINTF(stream, "\t map address: 0x%08x\n", (ptr[j] & ~0x3)); in debug_map_state()
590 FLAG(stream, ptr[j], 1, "vertical line stride"); in debug_map_state()
591 FLAG(stream, ptr[j], 0, "vertical line stride offset"); in debug_map_state()
596 PRINTF(stream, "\t TMn.1: 0x%08x\n", ptr[j]); in debug_map_state()
597 BITS(stream, ptr[j], 31, 21, "height"); in debug_map_state()
598 BITS(stream, ptr[j], 20, 10, "width"); in debug_map_state()
599 BITS(stream, ptr[j], 9, 7, "surface format"); in debug_map_state()
600 BITS(stream, ptr[j], 6, 3, "texel format"); in debug_map_state()
601 FLAG(stream, ptr[j], 2, "use fence regs"); in debug_map_state()
602 FLAG(stream, ptr[j], 1, "tiled surface"); in debug_map_state()
603 FLAG(stream, ptr[j], 0, "tile walk ymajor"); in debug_map_state()
607 PRINTF(stream, "\t TMn.2: 0x%08x\n", ptr[j]); in debug_map_state()
608 BITS(stream, ptr[j], 31, 21, "dword pitch"); in debug_map_state()
609 BITS(stream, ptr[j], 20, 15, "cube face enables"); in debug_map_state()
610 BITS(stream, ptr[j], 14, 9, "max lod"); in debug_map_state()
611 FLAG(stream, ptr[j], 8, "mip layout right"); in debug_map_state()
612 BITS(stream, ptr[j], 7, 0, "depth"); in debug_map_state()
617 stream->offset += len * sizeof(unsigned); in debug_map_state()
622 static boolean debug_sampler_state( struct debug_stream *stream, in debug_sampler_state() argument
626 unsigned *ptr = (unsigned *)(stream->ptr + stream->offset); in debug_sampler_state()
629 PRINTF(stream, "%s (%d dwords):\n", name, len); in debug_sampler_state()
630 PRINTF(stream, "\t0x%08x\n", ptr[j++]); in debug_sampler_state()
633 PRINTF(stream, "\t0x%08x\n", ptr[j]); in debug_sampler_state()
634 BITS(stream, ptr[j], 15, 0, "sampler mask"); in debug_sampler_state()
640 PRINTF(stream, "\t TSn.0: 0x%08x\n", ptr[j]); in debug_sampler_state()
641 FLAG(stream, ptr[j], 31, "reverse gamma"); in debug_sampler_state()
642 FLAG(stream, ptr[j], 30, "planar to packed"); in debug_sampler_state()
643 FLAG(stream, ptr[j], 29, "yuv->rgb"); in debug_sampler_state()
644 BITS(stream, ptr[j], 28, 27, "chromakey index"); in debug_sampler_state()
645 BITS(stream, ptr[j], 26, 22, "base mip level"); in debug_sampler_state()
646 BITS(stream, ptr[j], 21, 20, "mip mode filter"); in debug_sampler_state()
647 BITS(stream, ptr[j], 19, 17, "mag mode filter"); in debug_sampler_state()
648 BITS(stream, ptr[j], 16, 14, "min mode filter"); in debug_sampler_state()
649 BITS(stream, ptr[j], 13, 5, "lod bias (s4.4)"); in debug_sampler_state()
650 FLAG(stream, ptr[j], 4, "shadow enable"); in debug_sampler_state()
651 FLAG(stream, ptr[j], 3, "max-aniso-4"); in debug_sampler_state()
652 BITS(stream, ptr[j], 2, 0, "shadow func"); in debug_sampler_state()
657 PRINTF(stream, "\t TSn.1: 0x%08x\n", ptr[j]); in debug_sampler_state()
658 BITS(stream, ptr[j], 31, 24, "min lod"); in debug_sampler_state()
660 FLAG(stream, ptr[j], 17, "kill pixel enable"); in debug_sampler_state()
661 FLAG(stream, ptr[j], 16, "keyed tex filter mode"); in debug_sampler_state()
662 FLAG(stream, ptr[j], 15, "chromakey enable"); in debug_sampler_state()
663 BITS(stream, ptr[j], 14, 12, "tcx wrap mode"); in debug_sampler_state()
664 BITS(stream, ptr[j], 11, 9, "tcy wrap mode"); in debug_sampler_state()
665 BITS(stream, ptr[j], 8, 6, "tcz wrap mode"); in debug_sampler_state()
666 FLAG(stream, ptr[j], 5, "normalized coords"); in debug_sampler_state()
667 BITS(stream, ptr[j], 4, 1, "map (surface) index"); in debug_sampler_state()
668 FLAG(stream, ptr[j], 0, "EAST deinterlacer enable"); in debug_sampler_state()
672 PRINTF(stream, "\t TSn.2: 0x%08x (default color)\n", ptr[j]); in debug_sampler_state()
677 stream->offset += len * sizeof(unsigned); in debug_sampler_state()
682 static boolean debug_dest_vars( struct debug_stream *stream, in debug_dest_vars() argument
686 unsigned *ptr = (unsigned *)(stream->ptr + stream->offset); in debug_dest_vars()
689 PRINTF(stream, "%s (%d dwords):\n", name, len); in debug_dest_vars()
690 PRINTF(stream, "\t0x%08x\n", ptr[j++]); in debug_dest_vars()
693 PRINTF(stream, "\t0x%08x\n", ptr[j]); in debug_dest_vars()
694 FLAG(stream, ptr[j], 31, "early classic ztest"); in debug_dest_vars()
695 FLAG(stream, ptr[j], 30, "opengl tex default color"); in debug_dest_vars()
696 FLAG(stream, ptr[j], 29, "bypass iz"); in debug_dest_vars()
697 FLAG(stream, ptr[j], 28, "lod preclamp"); in debug_dest_vars()
698 BITS(stream, ptr[j], 27, 26, "dither pattern"); in debug_dest_vars()
699 FLAG(stream, ptr[j], 25, "linear gamma blend"); in debug_dest_vars()
700 FLAG(stream, ptr[j], 24, "debug dither"); in debug_dest_vars()
701 BITS(stream, ptr[j], 23, 20, "dstorg x"); in debug_dest_vars()
702 BITS(stream, ptr[j], 19, 16, "dstorg y"); in debug_dest_vars()
704 BITS(stream, ptr[j], 14, 12, "422 write select"); in debug_dest_vars()
705 BITS(stream, ptr[j], 11, 8, "cbuf format"); in debug_dest_vars()
706 BITS(stream, ptr[j], 3, 2, "zbuf format"); in debug_dest_vars()
707 FLAG(stream, ptr[j], 1, "vert line stride"); in debug_dest_vars()
708 FLAG(stream, ptr[j], 1, "vert line stride offset"); in debug_dest_vars()
712 stream->offset += len * sizeof(unsigned); in debug_dest_vars()
717 static boolean debug_buf_info( struct debug_stream *stream, in debug_buf_info() argument
721 unsigned *ptr = (unsigned *)(stream->ptr + stream->offset); in debug_buf_info()
724 PRINTF(stream, "%s (%d dwords):\n", name, len); in debug_buf_info()
725 PRINTF(stream, "\t0x%08x\n", ptr[j++]); in debug_buf_info()
728 PRINTF(stream, "\t0x%08x\n", ptr[j]); in debug_buf_info()
729 BITS(stream, ptr[j], 28, 28, "aux buffer id"); in debug_buf_info()
730 BITS(stream, ptr[j], 27, 24, "buffer id (7=depth, 3=back)"); in debug_buf_info()
731 FLAG(stream, ptr[j], 23, "use fence regs"); in debug_buf_info()
732 FLAG(stream, ptr[j], 22, "tiled surface"); in debug_buf_info()
733 FLAG(stream, ptr[j], 21, "tile walk ymajor"); in debug_buf_info()
735 BITS(stream, ptr[j], 13, 2, "dword pitch"); in debug_buf_info()
740 PRINTF(stream, "\t0x%08x -- buffer base address\n", ptr[j++]); in debug_buf_info()
742 stream->offset += len * sizeof(unsigned); in debug_buf_info()
747 static boolean i915_debug_packet( struct debug_stream *stream ) in i915_debug_packet() argument
749 unsigned *ptr = (unsigned *)(stream->ptr + stream->offset); in i915_debug_packet()
756 return debug(stream, "MI_NOOP", 1); in i915_debug_packet()
758 return debug(stream, "MI_WAIT_FOR_EVENT", 1); in i915_debug_packet()
760 return debug(stream, "MI_FLUSH", 1); in i915_debug_packet()
762 debug(stream, "MI_BATCH_BUFFER_END", 1); in i915_debug_packet()
765 return debug(stream, "MI_LOAD_REGISTER_IMM", 3); in i915_debug_packet()
767 return debug_chain(stream, "MI_BATCH_BUFFER_START", 2); in i915_debug_packet()
769 (void)debug(stream, "UNKNOWN 0x0 case!", 1); in i915_debug_packet()
775 (void) debug(stream, "UNKNOWN 0x1 case!", 1); in i915_debug_packet()
781 return debug_color_blit(stream, "XY_COLOR_BLT", (cmd & 0xff) + 2); in i915_debug_packet()
783 return debug_copy_blit(stream, "XY_SRC_COPY_BLT", (cmd & 0xff) + 2); in i915_debug_packet()
785 return debug(stream, "blit command", (cmd & 0xff) + 2); in i915_debug_packet()
791 return debug(stream, "3DSTATE_ANTI_ALIASING", 1); in i915_debug_packet()
793 return debug(stream, "3DSTATE_RASTERIZATION_RULES", 1); in i915_debug_packet()
795 return debug(stream, "3DSTATE_BACKFACE_STENCIL_OPS", 2); in i915_debug_packet()
797 return debug(stream, "3DSTATE_BACKFACE_STENCIL_MASKS", 1); in i915_debug_packet()
799 return debug(stream, "3DSTATE_INDEPENDENT_ALPHA_BLEND", 1); in i915_debug_packet()
801 return debug(stream, "3DSTATE_MODES5", 1); in i915_debug_packet()
803 return debug_modes4(stream, "3DSTATE_MODES4", 1); in i915_debug_packet()
805 return debug(stream, "3DSTATE_FOG_COLOR", 1); in i915_debug_packet()
807 return debug(stream, "3DSTATE_COORD_SET_BINDINGS", 1); in i915_debug_packet()
812 return debug(stream, "3DSTATE_SCISSOR_ENABLE", 1); in i915_debug_packet()
814 return debug(stream, "3DSTATE_DEPTH_SUBRECTANGLE_DISABLE", 1); in i915_debug_packet()
816 (void) debug(stream, "UNKNOWN 0x1c case!", 1); in i915_debug_packet()
825 return debug_map_state(stream, "3DSTATE_MAP_STATE", (cmd & 0x1f) + 2); in i915_debug_packet()
827 return debug_sampler_state(stream, "3DSTATE_SAMPLER_STATE", (cmd & 0x1f) + 2); in i915_debug_packet()
829 return debug_load_immediate(stream, "3DSTATE_LOAD_STATE_IMMEDIATE", (cmd & 0xf) + 2); in i915_debug_packet()
831 return debug_program(stream, "3DSTATE_PIXEL_SHADER_PROGRAM", (cmd & 0x1ff) + 2); in i915_debug_packet()
833 return debug(stream, "3DSTATE_PIXEL_SHADER_CONSTANTS", (cmd & 0xff) + 2); in i915_debug_packet()
835 return debug_load_indirect(stream, "3DSTATE_LOAD_INDIRECT", (cmd & 0xff) + 2); in i915_debug_packet()
837 return debug(stream, "3DSTATE_DRAWING_RECTANGLE", (cmd & 0xffff) + 2); in i915_debug_packet()
839 return debug(stream, "3DSTATE_SCISSOR_RECTANGLE", (cmd & 0xffff) + 2); in i915_debug_packet()
841 return debug(stream, "3DSTATE_SPAN_STIPPLE", (cmd & 0xffff) + 2); in i915_debug_packet()
843 return debug_dest_vars(stream, "3DSTATE_DEST_BUFFER_VARS", (cmd & 0xffff) + 2); in i915_debug_packet()
845 return debug(stream, "3DSTATE_CONSTANT_BLEND_COLOR", (cmd & 0xffff) + 2); in i915_debug_packet()
847 return debug(stream, "3DSTATE_FOG_MODE", (cmd & 0xffff) + 2); in i915_debug_packet()
849 return debug_buf_info(stream, "3DSTATE_BUFFER_INFO", (cmd & 0xffff) + 2); in i915_debug_packet()
851 return debug(stream, "3DSTATE_DEPTH_OFFSET_SCALE", (cmd & 0xffff) + 2); in i915_debug_packet()
853 return debug(stream, "3DSTATE_DEFAULT_Z", (cmd & 0xffff) + 2); in i915_debug_packet()
855 return debug(stream, "3DSTATE_DEFAULT_DIFFUSE", (cmd & 0xffff) + 2); in i915_debug_packet()
857 return debug(stream, "3DSTATE_DEFAULT_SPECULAR", (cmd & 0xffff) + 2); in i915_debug_packet()
859 return debug(stream, "3DSTATE_CLEAR_PARAMETERS", (cmd & 0xffff) + 2); in i915_debug_packet()
867 return debug(stream, "???", (cmd & 0xffff) + 1); in i915_debug_packet()
869 return debug(stream, "", 1); in i915_debug_packet()
873 return debug_prim(stream, "3DPRIM (inline)", 1, (cmd & 0x1ffff) + 2); in i915_debug_packet()
877 return debug_variable_length_prim(stream); in i915_debug_packet()
879 return debug_prim(stream, "3DPRIM (indexed)", 0, (((cmd & 0xffff) + 1) / 2) + 1); in i915_debug_packet()
882 return debug_prim(stream, "3DPRIM (indirect sequential)", 0, 2); in i915_debug_packet()
885 return debug(stream, "", 0); in i915_debug_packet()
902 struct debug_stream stream; in i915_dump_batchbuffer() local
908 stream.offset = 0; in i915_dump_batchbuffer()
909 stream.ptr = (char *)start; in i915_dump_batchbuffer()
910 stream.print_addresses = 0; in i915_dump_batchbuffer()
920 stream.offset < bytes) in i915_dump_batchbuffer()
922 if (!i915_debug_packet( &stream )) in i915_dump_batchbuffer()
925 assert(stream.offset <= bytes); in i915_dump_batchbuffer()