brw_eu_debug.c File Reference

Include dependency graph for brw_eu_debug.c:

Go to the source code of this file.

Functions

void brw_print_reg (struct brw_reg hwreg)


Function Documentation

void brw_print_reg ( struct brw_reg  hwreg  ) 

Definition at line 37 of file brw_eu_debug.c.

References brw_reg::abs, BRW_GENERAL_REGISTER_FILE, BRW_HORIZONTAL_STRIDE_0, BRW_HORIZONTAL_STRIDE_1, BRW_REGISTER_TYPE_F, BRW_VERTICAL_STRIDE_0, BRW_VERTICAL_STRIDE_8, BRW_WIDTH_1, BRW_WIDTH_8, debug_printf(), brw_reg::file, brw_reg::hstride, brw_reg::negate, brw_reg::nr, brw_reg::subnr, brw_reg::type, type_sz(), brw_reg::vstride, and brw_reg::width.

00038 {
00039    static const char *file[] = {
00040       "arf",
00041       "grf",
00042       "msg",
00043       "imm"
00044    };
00045 
00046    static const char *type[] = {
00047       "ud",
00048       "d",
00049       "uw",
00050       "w",
00051       "ub",
00052       "vf",
00053       "hf",
00054       "f"
00055    };
00056 
00057    debug_printf("%s%s", 
00058                 hwreg.abs ? "abs/" : "",
00059                 hwreg.negate ? "-" : "");
00060      
00061    if (hwreg.file == BRW_GENERAL_REGISTER_FILE &&
00062        hwreg.nr % 2 == 0 &&
00063        hwreg.subnr == 0 &&
00064        hwreg.vstride == BRW_VERTICAL_STRIDE_8 &&
00065        hwreg.width == BRW_WIDTH_8 &&
00066        hwreg.hstride == BRW_HORIZONTAL_STRIDE_1 &&
00067        hwreg.type == BRW_REGISTER_TYPE_F) {
00068       debug_printf("vec%d", hwreg.nr);
00069    }
00070    else if (hwreg.file == BRW_GENERAL_REGISTER_FILE &&
00071             hwreg.vstride == BRW_VERTICAL_STRIDE_0 &&
00072             hwreg.width == BRW_WIDTH_1 &&
00073             hwreg.hstride == BRW_HORIZONTAL_STRIDE_0 &&
00074             hwreg.type == BRW_REGISTER_TYPE_F) {      
00075       debug_printf("scl%d.%d", hwreg.nr, hwreg.subnr / 4);
00076    }
00077    else {
00078       debug_printf("%s%d.%d<%d;%d,%d>:%s", 
00079                    file[hwreg.file],
00080                    hwreg.nr,
00081                    hwreg.subnr / type_sz(hwreg.type),
00082                    hwreg.vstride ? (1<<(hwreg.vstride-1)) : 0,
00083                    1<<hwreg.width,
00084                    hwreg.hstride ? (1<<(hwreg.hstride-1)) : 0,          
00085                    type[hwreg.type]);
00086    }
00087 }


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