Lines Matching refs:stream

68 debug(struct debug_stream *stream, const char *name, unsigned len)
71 unsigned *ptr = (unsigned *)(stream->ptr + stream->offset);
74 mesa_logi("Error - zero length packet (0x%08x)", stream->ptr[0]);
79 if (stream->print_addresses)
80 mesa_logi("%08x: ", stream->offset);
87 stream->offset += len * sizeof(unsigned);
139 debug_prim(struct debug_stream *stream, const char *name, bool dump_floats,
142 unsigned *ptr = (unsigned *)(stream->ptr + stream->offset);
157 stream->offset += len * sizeof(unsigned);
163 debug_program(struct debug_stream *stream, const char *name, unsigned len)
165 unsigned *ptr = (unsigned *)(stream->ptr + stream->offset);
168 mesa_logi("Error - zero length packet (0x%08x)", stream->ptr[0]);
173 if (stream->print_addresses)
174 mesa_logi("%08x: ", stream->offset);
179 stream->offset += len * sizeof(unsigned);
184 debug_chain(struct debug_stream *stream, const char *name, unsigned len)
186 unsigned *ptr = (unsigned *)(stream->ptr + stream->offset);
187 unsigned old_offset = stream->offset + len * sizeof(unsigned);
194 stream->offset = ptr[1] & ~0x3;
196 if (stream->offset < old_offset)
198 stream->offset);
201 stream->offset);
207 debug_variable_length_prim(struct debug_stream *stream)
209 unsigned *ptr = (unsigned *)(stream->ptr + stream->offset);
225 stream->offset += len * sizeof(unsigned);
230 BITS(struct debug_stream *stream, unsigned dw, unsigned hi, unsigned lo,
255 FLAG(struct debug_stream *stream, unsigned dw, unsigned bit, const char *fmt,
271 debug_load_immediate(struct debug_stream *stream, const char *name,
274 unsigned *ptr = (unsigned *)(stream->ptr + stream->offset);
284 BITS(stream, ptr[j], 0, 0, "vb invalidate disable");
289 BITS(stream, ptr[j], 29, 24, "vb dword width");
290 BITS(stream, ptr[j], 21, 16, "vb dword pitch");
291 BITS(stream, ptr[j], 15, 0, "vb max index");
300 BITS(stream, tc, 3, 0, "tex coord %d", i);
310 BITS(stream, ptr[j], 31, 23, "point width");
311 BITS(stream, ptr[j], 22, 19, "line width");
312 FLAG(stream, ptr[j], 18, "alpha flatshade");
313 FLAG(stream, ptr[j], 17, "fog flatshade");
314 FLAG(stream, ptr[j], 16, "spec flatshade");
315 FLAG(stream, ptr[j], 15, "rgb flatshade");
316 BITS(stream, ptr[j], 14, 13, "cull mode");
317 FLAG(stream, ptr[j], 12, "vfmt: point width");
318 FLAG(stream, ptr[j], 11, "vfmt: specular/fog");
319 FLAG(stream, ptr[j], 10, "vfmt: rgba");
320 FLAG(stream, ptr[j], 9, "vfmt: depth offset");
321 BITS(stream, ptr[j], 8, 6, "vfmt: position (2==xyzw)");
322 FLAG(stream, ptr[j], 5, "force dflt diffuse");
323 FLAG(stream, ptr[j], 4, "force dflt specular");
324 FLAG(stream, ptr[j], 3, "local depth offset enable");
325 FLAG(stream, ptr[j], 2, "vfmt: fp32 fog coord");
326 FLAG(stream, ptr[j], 1, "sprite point");
327 FLAG(stream, ptr[j], 0, "antialiasing");
332 BITS(stream, ptr[j], 31, 28, "rgba write disables");
333 FLAG(stream, ptr[j], 27, "force dflt point width");
334 FLAG(stream, ptr[j], 26, "last pixel enable");
335 FLAG(stream, ptr[j], 25, "global z offset enable");
336 FLAG(stream, ptr[j], 24, "fog enable");
337 BITS(stream, ptr[j], 23, 16, "stencil ref");
338 BITS(stream, ptr[j], 15, 13, "stencil test");
339 BITS(stream, ptr[j], 12, 10, "stencil fail op");
340 BITS(stream, ptr[j], 9, 7, "stencil pass z fail op");
341 BITS(stream, ptr[j], 6, 4, "stencil pass z pass op");
342 FLAG(stream, ptr[j], 3, "stencil write enable");
343 FLAG(stream, ptr[j], 2, "stencil test enable");
344 FLAG(stream, ptr[j], 1, "color dither enable");
345 FLAG(stream, ptr[j], 0, "logiop enable");
350 FLAG(stream, ptr[j], 31, "alpha test enable");
351 BITS(stream, ptr[j], 30, 28, "alpha func");
352 BITS(stream, ptr[j], 27, 20, "alpha ref");
353 FLAG(stream, ptr[j], 19, "depth test enable");
354 BITS(stream, ptr[j], 18, 16, "depth func");
355 FLAG(stream, ptr[j], 15, "blend enable");
356 BITS(stream, ptr[j], 14, 12, "blend func");
357 BITS(stream, ptr[j], 11, 8, "blend src factor");
358 BITS(stream, ptr[j], 7, 4, "blend dst factor");
359 FLAG(stream, ptr[j], 3, "depth write enable");
360 FLAG(stream, ptr[j], 2, "color write enable");
361 BITS(stream, ptr[j], 1, 0, "provoking vertex");
369 stream->offset += len * sizeof(unsigned);
375 debug_load_indirect(struct debug_stream *stream, const char *name, unsigned len)
377 unsigned *ptr = (unsigned *)(stream->ptr + stream->offset);
431 stream->offset += len * sizeof(unsigned);
437 BR13(struct debug_stream *stream, unsigned val)
440 FLAG(stream, val, 30, "clipping enable");
441 BITS(stream, val, 25, 24, "color depth (3==32bpp)");
442 BITS(stream, val, 23, 16, "raster op");
443 BITS(stream, val, 15, 0, "dest pitch");
447 BR22(struct debug_stream *stream, unsigned val)
450 BITS(stream, val, 31, 16, "dest y1");
451 BITS(stream, val, 15, 0, "dest x1");
455 BR23(struct debug_stream *stream, unsigned val)
458 BITS(stream, val, 31, 16, "dest y2");
459 BITS(stream, val, 15, 0, "dest x2");
463 BR09(struct debug_stream *stream, unsigned val)
469 BR26(struct debug_stream *stream, unsigned val)
472 BITS(stream, val, 31, 16, "src y1");
473 BITS(stream, val, 15, 0, "src x1");
477 BR11(struct debug_stream *stream, unsigned val)
480 BITS(stream, val, 15, 0, "src pitch");
484 BR12(struct debug_stream *stream, unsigned val)
490 BR16(struct debug_stream *stream, unsigned val)
496 debug_copy_blit(struct debug_stream *stream, const char *name, unsigned len)
498 unsigned *ptr = (unsigned *)(stream->ptr + stream->offset);
504 BR13(stream, ptr[j++]);
505 BR22(stream, ptr[j++]);
506 BR23(stream, ptr[j++]);
507 BR09(stream, ptr[j++]);
508 BR26(stream, ptr[j++]);
509 BR11(stream, ptr[j++]);
510 BR12(stream, ptr[j++]);
512 stream->offset += len * sizeof(unsigned);
518 debug_color_blit(struct debug_stream *stream, const char *name, unsigned len)
520 unsigned *ptr = (unsigned *)(stream->ptr + stream->offset);
526 BR13(stream, ptr[j++]);
527 BR22(stream, ptr[j++]);
528 BR23(stream, ptr[j++]);
529 BR09(stream, ptr[j++]);
530 BR16(stream, ptr[j++]);
532 stream->offset += len * sizeof(unsigned);
538 debug_modes4(struct debug_stream *stream, const char *name, unsigned len)
540 unsigned *ptr = (unsigned *)(stream->ptr + stream->offset);
545 BITS(stream, ptr[j], 21, 18, "logicop func");
546 FLAG(stream, ptr[j], 17, "stencil test mask modify-enable");
547 FLAG(stream, ptr[j], 16, "stencil write mask modify-enable");
548 BITS(stream, ptr[j], 15, 8, "stencil test mask");
549 BITS(stream, ptr[j], 7, 0, "stencil write mask");
552 stream->offset += len * sizeof(unsigned);
558 debug_map_state(struct debug_stream *stream, const char *name, unsigned len)
560 unsigned *ptr = (unsigned *)(stream->ptr + stream->offset);
568 BITS(stream, ptr[j], 15, 0, "map mask");
576 FLAG(stream, ptr[j], 1, "vertical line stride");
577 FLAG(stream, ptr[j], 0, "vertical line stride offset");
583 BITS(stream, ptr[j], 31, 21, "height");
584 BITS(stream, ptr[j], 20, 10, "width");
585 BITS(stream, ptr[j], 9, 7, "surface format");
586 BITS(stream, ptr[j], 6, 3, "texel format");
587 FLAG(stream, ptr[j], 2, "use fence regs");
588 FLAG(stream, ptr[j], 1, "tiled surface");
589 FLAG(stream, ptr[j], 0, "tile walk ymajor");
594 BITS(stream, ptr[j], 31, 21, "dword pitch");
595 BITS(stream, ptr[j], 20, 15, "cube face enables");
596 BITS(stream, ptr[j], 14, 9, "max lod");
597 FLAG(stream, ptr[j], 8, "mip layout right");
598 BITS(stream, ptr[j], 7, 0, "depth");
603 stream->offset += len * sizeof(unsigned);
609 debug_sampler_state(struct debug_stream *stream, const char *name, unsigned len)
611 unsigned *ptr = (unsigned *)(stream->ptr + stream->offset);
619 BITS(stream, ptr[j], 15, 0, "sampler mask");
626 FLAG(stream, ptr[j], 31, "reverse gamma");
627 FLAG(stream, ptr[j], 30, "planar to packed");
628 FLAG(stream, ptr[j], 29, "yuv->rgb");
629 BITS(stream, ptr[j], 28, 27, "chromakey index");
630 BITS(stream, ptr[j], 26, 22, "base mip level");
631 BITS(stream, ptr[j], 21, 20, "mip mode filter");
632 BITS(stream, ptr[j], 19, 17, "mag mode filter");
633 BITS(stream, ptr[j], 16, 14, "min mode filter");
634 BITS(stream, ptr[j], 13, 5, "lod bias (s4.4)");
635 FLAG(stream, ptr[j], 4, "shadow enable");
636 FLAG(stream, ptr[j], 3, "max-aniso-4");
637 BITS(stream, ptr[j], 2, 0, "shadow func");
643 BITS(stream, ptr[j], 31, 24, "min lod");
645 FLAG(stream, ptr[j], 17, "kill pixel enable");
646 FLAG(stream, ptr[j], 16, "keyed tex filter mode");
647 FLAG(stream, ptr[j], 15, "chromakey enable");
648 BITS(stream, ptr[j], 14, 12, "tcx wrap mode");
649 BITS(stream, ptr[j], 11, 9, "tcy wrap mode");
650 BITS(stream, ptr[j], 8, 6, "tcz wrap mode");
651 FLAG(stream, ptr[j], 5, "normalized coords");
652 BITS(stream, ptr[j], 4, 1, "map (surface) index");
653 FLAG(stream, ptr[j], 0, "EAST deinterlacer enable");
662 stream->offset += len * sizeof(unsigned);
668 debug_dest_vars(struct debug_stream *stream, const char *name, unsigned len)
670 unsigned *ptr = (unsigned *)(stream->ptr + stream->offset);
678 FLAG(stream, ptr[j], 31, "early classic ztest");
679 FLAG(stream, ptr[j], 30, "opengl tex default color");
680 FLAG(stream, ptr[j], 29, "bypass iz");
681 FLAG(stream, ptr[j], 28, "lod preclamp");
682 BITS(stream, ptr[j], 27, 26, "dither pattern");
683 FLAG(stream, ptr[j], 25, "linear gamma blend");
684 FLAG(stream, ptr[j], 24, "debug dither");
685 BITS(stream, ptr[j], 23, 20, "dstorg x");
686 BITS(stream, ptr[j], 19, 16, "dstorg y");
688 BITS(stream, ptr[j], 14, 12, "422 write select");
689 BITS(stream, ptr[j], 11, 8, "cbuf format");
690 BITS(stream, ptr[j], 3, 2, "zbuf format");
691 FLAG(stream, ptr[j], 1, "vert line stride");
692 FLAG(stream, ptr[j], 1, "vert line stride offset");
696 stream->offset += len * sizeof(unsigned);
702 debug_buf_info(struct debug_stream *stream, const char *name, unsigned len)
704 unsigned *ptr = (unsigned *)(stream->ptr + stream->offset);
712 BITS(stream, ptr[j], 28, 28, "aux buffer id");
713 BITS(stream, ptr[j], 27, 24, "buffer id (7=depth, 3=back)");
714 FLAG(stream, ptr[j], 23, "use fence regs");
715 FLAG(stream, ptr[j], 22, "tiled surface");
716 FLAG(stream, ptr[j], 21, "tile walk ymajor");
718 BITS(stream, ptr[j], 13, 2, "dword pitch");
725 stream->offset += len * sizeof(unsigned);
731 i915_debug_packet(struct debug_stream *stream)
733 unsigned *ptr = (unsigned *)(stream->ptr + stream->offset);
740 return debug(stream, "MI_NOOP", 1);
742 return debug(stream, "MI_WAIT_FOR_EVENT", 1);
744 return debug(stream, "MI_FLUSH", 1);
746 debug(stream, "MI_BATCH_BUFFER_END", 1);
749 return debug(stream, "MI_LOAD_REGISTER_IMM", 3);
751 return debug_chain(stream, "MI_BATCH_BUFFER_START", 2);
753 (void)debug(stream, "UNKNOWN 0x0 case!", 1);
759 (void)debug(stream, "UNKNOWN 0x1 case!", 1);
765 return debug_color_blit(stream, "XY_COLOR_BLT", (cmd & 0xff) + 2);
767 return debug_copy_blit(stream, "XY_SRC_COPY_BLT", (cmd & 0xff) + 2);
769 return debug(stream, "blit command", (cmd & 0xff) + 2);
775 return debug(stream, "3DSTATE_ANTI_ALIASING", 1);
777 return debug(stream, "3DSTATE_RASTERIZATION_RULES", 1);
779 return debug(stream, "3DSTATE_BACKFACE_STENCIL_OPS", 1);
781 return debug(stream, "3DSTATE_BACKFACE_STENCIL_MASKS", 1);
783 return debug(stream, "3DSTATE_INDEPENDENT_ALPHA_BLEND", 1);
785 return debug(stream, "3DSTATE_MODES5", 1);
787 return debug_modes4(stream, "3DSTATE_MODES4", 1);
789 return debug(stream, "3DSTATE_FOG_COLOR", 1);
791 return debug(stream, "3DSTATE_COORD_SET_BINDINGS", 1);
796 return debug(stream, "3DSTATE_SCISSOR_ENABLE", 1);
798 return debug(stream, "3DSTATE_DEPTH_SUBRECTANGLE_DISABLE", 1);
800 (void)debug(stream, "UNKNOWN 0x1c case!", 1);
809 return debug_map_state(stream, "3DSTATE_MAP_STATE",
812 return debug_sampler_state(stream, "3DSTATE_SAMPLER_STATE",
815 return debug_load_immediate(stream, "3DSTATE_LOAD_STATE_IMMEDIATE",
818 return debug_program(stream, "3DSTATE_PIXEL_SHADER_PROGRAM",
821 return debug(stream, "3DSTATE_PIXEL_SHADER_CONSTANTS",
824 return debug_load_indirect(stream, "3DSTATE_LOAD_INDIRECT",
827 return debug(stream, "3DSTATE_DRAWING_RECTANGLE",
830 return debug(stream, "3DSTATE_SCISSOR_RECTANGLE",
833 return debug(stream, "3DSTATE_SPAN_STIPPLE", (cmd & 0xffff) + 2);
835 return debug_dest_vars(stream, "3DSTATE_DEST_BUFFER_VARS",
838 return debug(stream, "3DSTATE_CONSTANT_BLEND_COLOR",
841 return debug(stream, "3DSTATE_FOG_MODE", (cmd & 0xffff) + 2);
843 return debug_buf_info(stream, "3DSTATE_BUFFER_INFO",
846 return debug(stream, "3DSTATE_DEPTH_OFFSET_SCALE",
849 return debug(stream, "3DSTATE_DEFAULT_Z", (cmd & 0xffff) + 2);
851 return debug(stream, "3DSTATE_DEFAULT_DIFFUSE", (cmd & 0xffff) + 2);
853 return debug(stream, "3DSTATE_DEFAULT_SPECULAR",
856 return debug(stream, "3DSTATE_CLEAR_PARAMETERS",
865 return debug(stream, "???", (cmd & 0xffff) + 1);
867 return debug(stream, "", 1);
871 return debug_prim(stream, "3DPRIM (inline)", 1,
875 return debug_variable_length_prim(stream);
877 return debug_prim(stream, "3DPRIM (indexed)", 0,
880 return debug_prim(stream, "3DPRIM (indirect sequential)", 0, 2);
883 return debug(stream, "", 0);
898 struct debug_stream stream;
904 stream.offset = 0;
905 stream.ptr = (char *)start;
906 stream.print_addresses = 0;
915 while (!done && stream.offset < bytes) {
916 if (!i915_debug_packet(&stream))
919 assert(stream.offset <= bytes);