i915_debug.h File Reference

Include dependency graph for i915_debug.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  debug_stream

Defines

#define DEBUG_BATCH   0x1
#define DEBUG_BLIT   0x2
#define DEBUG_BUFFER   0x4
#define DEBUG_CONSTANTS   0x8
#define DEBUG_CONTEXT   0x10
#define DEBUG_DRAW   0x20
#define DEBUG_DYNAMIC   0x40
#define DEBUG_FLUSH   0x80
#define DEBUG_MAP   0x100
#define DEBUG_PROGRAM   0x200
#define DEBUG_REGIONS   0x400
#define DEBUG_SAMPLER   0x800
#define DEBUG_STATIC   0x1000
#define DEBUG_SURFACE   0x2000
#define DEBUG_WINSYS   0x4000

Functions

void i915_disassemble_program (struct debug_stream *stream, const unsigned *program, unsigned sz)
void i915_print_ureg (const char *msg, unsigned ureg)
static void I915_DBG (struct i915_context *i915, const char *fmt,...)
void i915_dump_batchbuffer (struct i915_context *i915)
void i915_debug_init (struct i915_context *i915)


Define Documentation

#define DEBUG_BATCH   0x1

Definition at line 56 of file i915_debug.h.

#define DEBUG_BLIT   0x2

Definition at line 57 of file i915_debug.h.

#define DEBUG_BUFFER   0x4

Definition at line 58 of file i915_debug.h.

#define DEBUG_CONSTANTS   0x8

Definition at line 59 of file i915_debug.h.

#define DEBUG_CONTEXT   0x10

Definition at line 60 of file i915_debug.h.

#define DEBUG_DRAW   0x20

Definition at line 61 of file i915_debug.h.

#define DEBUG_DYNAMIC   0x40

Definition at line 62 of file i915_debug.h.

#define DEBUG_FLUSH   0x80

Definition at line 63 of file i915_debug.h.

#define DEBUG_MAP   0x100

Definition at line 64 of file i915_debug.h.

#define DEBUG_PROGRAM   0x200

Definition at line 65 of file i915_debug.h.

#define DEBUG_REGIONS   0x400

Definition at line 66 of file i915_debug.h.

#define DEBUG_SAMPLER   0x800

Definition at line 67 of file i915_debug.h.

#define DEBUG_STATIC   0x1000

Definition at line 68 of file i915_debug.h.

#define DEBUG_SURFACE   0x2000

Definition at line 69 of file i915_debug.h.

#define DEBUG_WINSYS   0x4000

Definition at line 70 of file i915_debug.h.


Function Documentation

static void I915_DBG ( struct i915_context i915,
const char *  fmt,
  ... 
) [static]

Definition at line 96 of file i915_debug.h.

00100 {
00101    (void) i915;
00102    (void) fmt;
00103 }

void i915_debug_init ( struct i915_context i915  ) 

void i915_disassemble_program ( struct debug_stream stream,
const unsigned *  program,
unsigned  sz 
)

Definition at line 343 of file i915_debug_fp.c.

References A0_NOP, A0_SLT, D0_DCL, print_arith_op(), print_dcl_op(), print_tex_op(), print_texkil_op(), PRINTF(), T0_TEXKILL, and T0_TEXLD.

00343                                              {
00344       unsigned opcode = program[0] & (0x1f << 24);
00345 
00346       PRINTF(stream, "\t\t");
00347 
00348       if ((int) opcode >= A0_NOP && opcode <= A0_SLT)
00349          print_arith_op(stream, opcode >> 24, program);
00350       else if (opcode >= T0_TEXLD && opcode < T0_TEXKILL)
00351          print_tex_op(stream, opcode >> 24, program);
00352       else if (opcode == T0_TEXKILL)
00353          print_texkil_op(stream, opcode >> 24, program);
00354       else if (opcode == D0_DCL)
00355          print_dcl_op(stream, opcode >> 24, program);
00356       else
00357          PRINTF(stream, "Unknown opcode 0x%x\n", opcode);
00358    }
00359 
00360    PRINTF(stream, "\t\tEND\n\n");
00361 }
00362 
00363 
00364 

void i915_dump_batchbuffer ( struct i915_context i915  ) 

Definition at line 861 of file i915_debug.c.

References assert, debug_printf(), debug_stream::end, FALSE, i915_debug_packet(), debug_stream::offset, i915_context::pipe, debug_stream::print_addresses, debug_stream::ptr, pipe_context::winsys, and debug_stream::winsys.

00862 {
00863    struct debug_stream stream;
00864    /* TODO fix me */
00865    unsigned *start = 0;/*i915->batch_start;*/
00866    unsigned *end = 0;/*i915->winsys->batch_start( i915->winsys, 0, 0 );*/
00867    unsigned long bytes = (unsigned long) (end - start) * 4;
00868    boolean done = FALSE;
00869 
00870    stream.offset = 0;
00871    stream.ptr = (char *)start;
00872    stream.print_addresses = 0;
00873    stream.winsys = i915->pipe.winsys;
00874 
00875    if (!start || !end) {
00876       debug_printf( "\n\nBATCH: ???\n");
00877       return;
00878    }
00879    
00880    debug_printf( "\n\nBATCH: (%d)\n", bytes / 4);
00881 
00882    while (!done &&
00883           stream.offset < bytes)
00884    {
00885       if (!i915_debug_packet( &stream ))
00886          break;
00887 
00888       assert(stream.offset <= bytes &&
00889              stream.offset >= 0);
00890    }
00891 
00892    debug_printf( "END-BATCH\n\n\n");
00893 }

void i915_print_ureg ( const char *  msg,
unsigned  ureg 
)


Generated on Tue Sep 29 06:25:34 2009 for Gallium3D by  doxygen 1.5.4