diff options
author | Oliver McFadden <z3ro.geek@gmail.com> | 2007-05-12 01:53:56 +0000 |
---|---|---|
committer | Oliver McFadden <z3ro.geek@gmail.com> | 2007-05-12 01:53:56 +0000 |
commit | 6bae7d40f725be24df0be196fbb6bdcfd2aaa581 (patch) | |
tree | 2883e66a99e11a217539256784f4c48f2c2fd268 | |
parent | 5f1f1f5704d1336e7376e7e47a9a92868356b88d (diff) |
r300: Removed the name argument to ALLOC_STATE; do the name via the macro.
-rw-r--r-- | src/mesa/drivers/dri/r300/r300_cmdbuf.c | 152 |
1 files changed, 76 insertions, 76 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_cmdbuf.c b/src/mesa/drivers/dri/r300/r300_cmdbuf.c index b4c94de977..f271d5819b 100644 --- a/src/mesa/drivers/dri/r300/r300_cmdbuf.c +++ b/src/mesa/drivers/dri/r300/r300_cmdbuf.c @@ -261,11 +261,11 @@ CHECK(always, atom->cmd_size) CHECK(vpu, vpu_count(atom->cmd) ? (1 + vpu_count(atom->cmd) * 4) : 0) #undef packet0_count #undef vpu_count -#define ALLOC_STATE( ATOM, CHK, SZ, NM, IDX ) \ +#define ALLOC_STATE( ATOM, CHK, SZ, IDX ) \ do { \ r300->hw.ATOM.cmd_size = (SZ); \ r300->hw.ATOM.cmd = (uint32_t*)CALLOC((SZ) * sizeof(uint32_t)); \ - r300->hw.ATOM.name = (NM); \ + r300->hw.ATOM.name = #ATOM; \ r300->hw.ATOM.idx = (IDX); \ r300->hw.ATOM.check = check_##CHK; \ r300->hw.ATOM.dirty = GL_FALSE; \ @@ -296,187 +296,187 @@ void r300InitCmdBuf(r300ContextPtr r300) r300->hw.atomlist.name = "atom-list"; /* Initialize state atoms */ - ALLOC_STATE(vpt, always, R300_VPT_CMDSIZE, "vpt", 0); + ALLOC_STATE(vpt, always, R300_VPT_CMDSIZE, 0); r300->hw.vpt.cmd[R300_VPT_CMD_0] = cmdpacket0(R300_SE_VPORT_XSCALE, 6); - ALLOC_STATE(vap_cntl, always, 2, "vap_cntl", 0); + ALLOC_STATE(vap_cntl, always, 2, 0); r300->hw.vap_cntl.cmd[0] = cmdpacket0(R300_VAP_CNTL, 1); - ALLOC_STATE(vte, always, 3, "vte", 0); + ALLOC_STATE(vte, always, 3, 0); r300->hw.vte.cmd[0] = cmdpacket0(R300_SE_VTE_CNTL, 2); - ALLOC_STATE(unk2134, always, 3, "unk2134", 0); + ALLOC_STATE(unk2134, always, 3, 0); r300->hw.unk2134.cmd[0] = cmdpacket0(0x2134, 2); - ALLOC_STATE(vap_cntl_status, always, 2, "vap_cntl_status", 0); + ALLOC_STATE(vap_cntl_status, always, 2, 0); r300->hw.vap_cntl_status.cmd[0] = cmdpacket0(R300_VAP_CNTL_STATUS, 1); - ALLOC_STATE(vir[0], variable, R300_VIR_CMDSIZE, "vir[0]", 0); + ALLOC_STATE(vir[0], variable, R300_VIR_CMDSIZE, 0); r300->hw.vir[0].cmd[R300_VIR_CMD_0] = cmdpacket0(R300_VAP_INPUT_ROUTE_0_0, 1); - ALLOC_STATE(vir[1], variable, R300_VIR_CMDSIZE, "vir[1]", 1); + ALLOC_STATE(vir[1], variable, R300_VIR_CMDSIZE, 1); r300->hw.vir[1].cmd[R300_VIR_CMD_0] = cmdpacket0(R300_VAP_INPUT_ROUTE_1_0, 1); - ALLOC_STATE(vic, always, R300_VIC_CMDSIZE, "vic", 0); + ALLOC_STATE(vic, always, R300_VIC_CMDSIZE, 0); r300->hw.vic.cmd[R300_VIC_CMD_0] = cmdpacket0(R300_VAP_INPUT_CNTL_0, 2); - ALLOC_STATE(unk21DC, always, 2, "unk21DC", 0); + ALLOC_STATE(unk21DC, always, 2, 0); r300->hw.unk21DC.cmd[0] = cmdpacket0(0x21DC, 1); - ALLOC_STATE(unk221C, always, 2, "unk221C", 0); + ALLOC_STATE(unk221C, always, 2, 0); r300->hw.unk221C.cmd[0] = cmdpacket0(R300_VAP_UNKNOWN_221C, 1); - ALLOC_STATE(unk2220, always, 5, "unk2220", 0); + ALLOC_STATE(unk2220, always, 5, 0); r300->hw.unk2220.cmd[0] = cmdpacket0(0x2220, 4); - ALLOC_STATE(unk2288, always, 2, "unk2288", 0); + ALLOC_STATE(unk2288, always, 2, 0); r300->hw.unk2288.cmd[0] = cmdpacket0(R300_VAP_UNKNOWN_2288, 1); - ALLOC_STATE(vof, always, R300_VOF_CMDSIZE, "vof", 0); + ALLOC_STATE(vof, always, R300_VOF_CMDSIZE, 0); r300->hw.vof.cmd[R300_VOF_CMD_0] = cmdpacket0(R300_VAP_OUTPUT_VTX_FMT_0, 2); if (has_tcl) { - ALLOC_STATE(pvs, always, R300_PVS_CMDSIZE, "pvs", 0); + ALLOC_STATE(pvs, always, R300_PVS_CMDSIZE, 0); r300->hw.pvs.cmd[R300_PVS_CMD_0] = cmdpacket0(R300_VAP_PVS_CNTL_1, 3); } - ALLOC_STATE(gb_enable, always, 2, "gb_enable", 0); + ALLOC_STATE(gb_enable, always, 2, 0); r300->hw.gb_enable.cmd[0] = cmdpacket0(R300_GB_ENABLE, 1); - ALLOC_STATE(gb_misc, always, R300_GB_MISC_CMDSIZE, "gb_misc", 0); + ALLOC_STATE(gb_misc, always, R300_GB_MISC_CMDSIZE, 0); r300->hw.gb_misc.cmd[0] = cmdpacket0(R300_GB_MSPOS0, 5); - ALLOC_STATE(txe, always, R300_TXE_CMDSIZE, "txe", 0); + ALLOC_STATE(txe, always, R300_TXE_CMDSIZE, 0); r300->hw.txe.cmd[R300_TXE_CMD_0] = cmdpacket0(R300_TX_ENABLE, 1); - ALLOC_STATE(unk4200, always, 5, "unk4200", 0); + ALLOC_STATE(unk4200, always, 5, 0); r300->hw.unk4200.cmd[0] = cmdpacket0(0x4200, 4); - ALLOC_STATE(unk4214, always, 2, "unk4214", 0); + ALLOC_STATE(unk4214, always, 2, 0); r300->hw.unk4214.cmd[0] = cmdpacket0(0x4214, 1); - ALLOC_STATE(ps, always, R300_PS_CMDSIZE, "ps", 0); + ALLOC_STATE(ps, always, R300_PS_CMDSIZE, 0); r300->hw.ps.cmd[0] = cmdpacket0(R300_RE_POINTSIZE, 1); - ALLOC_STATE(unk4230, always, 4, "unk4230", 0); + ALLOC_STATE(unk4230, always, 4, 0); r300->hw.unk4230.cmd[0] = cmdpacket0(0x4230, 3); - ALLOC_STATE(lcntl, always, 2, "lcntl", 0); + ALLOC_STATE(lcntl, always, 2, 0); r300->hw.lcntl.cmd[0] = cmdpacket0(R300_RE_LINE_CNT, 1); - ALLOC_STATE(unk4260, always, 4, "unk4260", 0); + ALLOC_STATE(unk4260, always, 4, 0); r300->hw.unk4260.cmd[0] = cmdpacket0(0x4260, 3); - ALLOC_STATE(shade, always, 5, "shade", 0); + ALLOC_STATE(shade, always, 5, 0); r300->hw.shade.cmd[0] = cmdpacket0(R300_RE_SHADE, 4); - ALLOC_STATE(polygon_mode, always, 4, "polygon_mode", 0); + ALLOC_STATE(polygon_mode, always, 4, 0); r300->hw.polygon_mode.cmd[0] = cmdpacket0(R300_RE_POLYGON_MODE, 3); - ALLOC_STATE(fogp, always, 3, "fogp", 0); + ALLOC_STATE(fogp, always, 3, 0); r300->hw.fogp.cmd[0] = cmdpacket0(R300_RE_FOG_SCALE, 2); - ALLOC_STATE(zbias_cntl, always, 2, "zbias_cntl", 0); + ALLOC_STATE(zbias_cntl, always, 2, 0); r300->hw.zbias_cntl.cmd[0] = cmdpacket0(R300_RE_ZBIAS_CNTL, 1); - ALLOC_STATE(zbs, always, R300_ZBS_CMDSIZE, "zbs", 0); + ALLOC_STATE(zbs, always, R300_ZBS_CMDSIZE, 0); r300->hw.zbs.cmd[R300_ZBS_CMD_0] = cmdpacket0(R300_RE_ZBIAS_T_FACTOR, 4); - ALLOC_STATE(occlusion_cntl, always, 2, "occlusion_cntl", 0); + ALLOC_STATE(occlusion_cntl, always, 2, 0); r300->hw.occlusion_cntl.cmd[0] = cmdpacket0(R300_RE_OCCLUSION_CNTL, 1); - ALLOC_STATE(cul, always, R300_CUL_CMDSIZE, "cul", 0); + ALLOC_STATE(cul, always, R300_CUL_CMDSIZE, 0); r300->hw.cul.cmd[R300_CUL_CMD_0] = cmdpacket0(R300_RE_CULL_CNTL, 1); - ALLOC_STATE(unk42C0, always, 3, "unk42C0", 0); + ALLOC_STATE(unk42C0, always, 3, 0); r300->hw.unk42C0.cmd[0] = cmdpacket0(0x42C0, 2); - ALLOC_STATE(rc, always, R300_RC_CMDSIZE, "rc", 0); + ALLOC_STATE(rc, always, R300_RC_CMDSIZE, 0); r300->hw.rc.cmd[R300_RC_CMD_0] = cmdpacket0(R300_RS_CNTL_0, 2); - ALLOC_STATE(ri, always, R300_RI_CMDSIZE, "ri", 0); + ALLOC_STATE(ri, always, R300_RI_CMDSIZE, 0); r300->hw.ri.cmd[R300_RI_CMD_0] = cmdpacket0(R300_RS_INTERP_0, 8); - ALLOC_STATE(rr, variable, R300_RR_CMDSIZE, "rr", 0); + ALLOC_STATE(rr, variable, R300_RR_CMDSIZE, 0); r300->hw.rr.cmd[R300_RR_CMD_0] = cmdpacket0(R300_RS_ROUTE_0, 1); - ALLOC_STATE(unk43A4, always, 3, "unk43A4", 0); + ALLOC_STATE(unk43A4, always, 3, 0); r300->hw.unk43A4.cmd[0] = cmdpacket0(0x43A4, 2); - ALLOC_STATE(unk43E8, always, 2, "unk43E8", 0); + ALLOC_STATE(unk43E8, always, 2, 0); r300->hw.unk43E8.cmd[0] = cmdpacket0(0x43E8, 1); - ALLOC_STATE(fp, always, R300_FP_CMDSIZE, "fp", 0); + ALLOC_STATE(fp, always, R300_FP_CMDSIZE, 0); r300->hw.fp.cmd[R300_FP_CMD_0] = cmdpacket0(R300_PFS_CNTL_0, 3); r300->hw.fp.cmd[R300_FP_CMD_1] = cmdpacket0(R300_PFS_NODE_0, 4); - ALLOC_STATE(fpt, variable, R300_FPT_CMDSIZE, "fpt", 0); + ALLOC_STATE(fpt, variable, R300_FPT_CMDSIZE, 0); r300->hw.fpt.cmd[R300_FPT_CMD_0] = cmdpacket0(R300_PFS_TEXI_0, 0); - ALLOC_STATE(unk46A4, always, 6, "unk46A4", 0); + ALLOC_STATE(unk46A4, always, 6, 0); r300->hw.unk46A4.cmd[0] = cmdpacket0(0x46A4, 5); - ALLOC_STATE(fpi[0], variable, R300_FPI_CMDSIZE, "fpi[0]", 0); + ALLOC_STATE(fpi[0], variable, R300_FPI_CMDSIZE, 0); r300->hw.fpi[0].cmd[R300_FPI_CMD_0] = cmdpacket0(R300_PFS_INSTR0_0, 1); - ALLOC_STATE(fpi[1], variable, R300_FPI_CMDSIZE, "fpi[1]", 1); + ALLOC_STATE(fpi[1], variable, R300_FPI_CMDSIZE, 1); r300->hw.fpi[1].cmd[R300_FPI_CMD_0] = cmdpacket0(R300_PFS_INSTR1_0, 1); - ALLOC_STATE(fpi[2], variable, R300_FPI_CMDSIZE, "fpi[2]", 2); + ALLOC_STATE(fpi[2], variable, R300_FPI_CMDSIZE, 2); r300->hw.fpi[2].cmd[R300_FPI_CMD_0] = cmdpacket0(R300_PFS_INSTR2_0, 1); - ALLOC_STATE(fpi[3], variable, R300_FPI_CMDSIZE, "fpi[3]", 3); + ALLOC_STATE(fpi[3], variable, R300_FPI_CMDSIZE, 3); r300->hw.fpi[3].cmd[R300_FPI_CMD_0] = cmdpacket0(R300_PFS_INSTR3_0, 1); - ALLOC_STATE(fogs, always, R300_FOGS_CMDSIZE, "fogs", 0); + ALLOC_STATE(fogs, always, R300_FOGS_CMDSIZE, 0); r300->hw.fogs.cmd[R300_FOGS_CMD_0] = cmdpacket0(R300_RE_FOG_STATE, 1); - ALLOC_STATE(fogc, always, R300_FOGC_CMDSIZE, "fogc", 0); + ALLOC_STATE(fogc, always, R300_FOGC_CMDSIZE, 0); r300->hw.fogc.cmd[R300_FOGC_CMD_0] = cmdpacket0(R300_FOG_COLOR_R, 3); - ALLOC_STATE(at, always, R300_AT_CMDSIZE, "at", 0); + ALLOC_STATE(at, always, R300_AT_CMDSIZE, 0); r300->hw.at.cmd[R300_AT_CMD_0] = cmdpacket0(R300_PP_ALPHA_TEST, 2); - ALLOC_STATE(unk4BD8, always, 2, "unk4BD8", 0); + ALLOC_STATE(unk4BD8, always, 2, 0); r300->hw.unk4BD8.cmd[0] = cmdpacket0(0x4BD8, 1); - ALLOC_STATE(fpp, variable, R300_FPP_CMDSIZE, "fpp", 0); + ALLOC_STATE(fpp, variable, R300_FPP_CMDSIZE, 0); r300->hw.fpp.cmd[R300_FPP_CMD_0] = cmdpacket0(R300_PFS_PARAM_0_X, 0); - ALLOC_STATE(unk4E00, always, 2, "unk4E00", 0); + ALLOC_STATE(unk4E00, always, 2, 0); r300->hw.unk4E00.cmd[0] = cmdpacket0(0x4E00, 1); - ALLOC_STATE(bld, always, R300_BLD_CMDSIZE, "bld", 0); + ALLOC_STATE(bld, always, R300_BLD_CMDSIZE, 0); r300->hw.bld.cmd[R300_BLD_CMD_0] = cmdpacket0(R300_RB3D_CBLEND, 2); - ALLOC_STATE(cmk, always, R300_CMK_CMDSIZE, "cmk", 0); + ALLOC_STATE(cmk, always, R300_CMK_CMDSIZE, 0); r300->hw.cmk.cmd[R300_CMK_CMD_0] = cmdpacket0(R300_RB3D_COLORMASK, 1); - ALLOC_STATE(blend_color, always, 4, "blend_color", 0); + ALLOC_STATE(blend_color, always, 4, 0); r300->hw.blend_color.cmd[0] = cmdpacket0(R300_RB3D_BLEND_COLOR, 3); - ALLOC_STATE(cb, always, R300_CB_CMDSIZE, "cb", 0); + ALLOC_STATE(cb, always, R300_CB_CMDSIZE, 0); r300->hw.cb.cmd[R300_CB_CMD_0] = cmdpacket0(R300_RB3D_COLOROFFSET0, 1); r300->hw.cb.cmd[R300_CB_CMD_1] = cmdpacket0(R300_RB3D_COLORPITCH0, 1); - ALLOC_STATE(unk4E50, always, 10, "unk4E50", 0); + ALLOC_STATE(unk4E50, always, 10, 0); r300->hw.unk4E50.cmd[0] = cmdpacket0(0x4E50, 9); - ALLOC_STATE(unk4E88, always, 2, "unk4E88", 0); + ALLOC_STATE(unk4E88, always, 2, 0); r300->hw.unk4E88.cmd[0] = cmdpacket0(0x4E88, 1); - ALLOC_STATE(unk4EA0, always, 3, "unk4EA0 R350 only", 0); + ALLOC_STATE(unk4EA0, always, 3, 0); r300->hw.unk4EA0.cmd[0] = cmdpacket0(0x4EA0, 2); - ALLOC_STATE(zs, always, R300_ZS_CMDSIZE, "zstencil", 0); + ALLOC_STATE(zs, always, R300_ZS_CMDSIZE, 0); r300->hw.zs.cmd[R300_ZS_CMD_0] = cmdpacket0(R300_RB3D_ZSTENCIL_CNTL_0, 3); - ALLOC_STATE(zstencil_format, always, 5, "zstencil_format", 0); + ALLOC_STATE(zstencil_format, always, 5, 0); r300->hw.zstencil_format.cmd[0] = cmdpacket0(R300_RB3D_ZSTENCIL_FORMAT, 4); - ALLOC_STATE(zb, always, R300_ZB_CMDSIZE, "zb", 0); + ALLOC_STATE(zb, always, R300_ZB_CMDSIZE, 0); r300->hw.zb.cmd[R300_ZB_CMD_0] = cmdpacket0(R300_RB3D_DEPTHOFFSET, 2); - ALLOC_STATE(unk4F28, always, 2, "unk4F28", 0); + ALLOC_STATE(unk4F28, always, 2, 0); r300->hw.unk4F28.cmd[0] = cmdpacket0(0x4F28, 1); - ALLOC_STATE(unk4F30, always, 3, "unk4F30", 0); + ALLOC_STATE(unk4F30, always, 3, 0); r300->hw.unk4F30.cmd[0] = cmdpacket0(0x4F30, 2); - ALLOC_STATE(unk4F44, always, 2, "unk4F44", 0); + ALLOC_STATE(unk4F44, always, 2, 0); r300->hw.unk4F44.cmd[0] = cmdpacket0(0x4F44, 1); - ALLOC_STATE(unk4F54, always, 2, "unk4F54", 0); + ALLOC_STATE(unk4F54, always, 2, 0); r300->hw.unk4F54.cmd[0] = cmdpacket0(0x4F54, 1); /* VPU only on TCL */ if (has_tcl) { - ALLOC_STATE(vpi, vpu, R300_VPI_CMDSIZE, "vpi", 0); + ALLOC_STATE(vpi, vpu, R300_VPI_CMDSIZE, 0); r300->hw.vpi.cmd[R300_VPI_CMD_0] = cmdvpu(R300_PVS_UPLOAD_PROGRAM, 0); - ALLOC_STATE(vpp, vpu, R300_VPP_CMDSIZE, "vpp", 0); + ALLOC_STATE(vpp, vpu, R300_VPP_CMDSIZE, 0); r300->hw.vpp.cmd[R300_VPP_CMD_0] = cmdvpu(R300_PVS_UPLOAD_PARAMETERS, 0); - ALLOC_STATE(vps, vpu, R300_VPS_CMDSIZE, "vps", 0); + ALLOC_STATE(vps, vpu, R300_VPS_CMDSIZE, 0); r300->hw.vps.cmd[R300_VPS_CMD_0] = cmdvpu(R300_PVS_UPLOAD_POINTSIZE, 1); } /* Textures */ - ALLOC_STATE(tex.filter, variable, mtu + 1, "tex_filter", 0); + ALLOC_STATE(tex.filter, variable, mtu + 1, 0); r300->hw.tex.filter.cmd[R300_TEX_CMD_0] = cmdpacket0(R300_TX_FILTER_0, 0); - ALLOC_STATE(tex.filter_1, variable, mtu + 1, "tex_filter_1", 0); + ALLOC_STATE(tex.filter_1, variable, mtu + 1, 0); r300->hw.tex.filter_1.cmd[R300_TEX_CMD_0] = cmdpacket0(R300_TX_FILTER1_0, 0); - ALLOC_STATE(tex.size, variable, mtu + 1, "tex_size", 0); + ALLOC_STATE(tex.size, variable, mtu + 1, 0); r300->hw.tex.size.cmd[R300_TEX_CMD_0] = cmdpacket0(R300_TX_SIZE_0, 0); - ALLOC_STATE(tex.format, variable, mtu + 1, "tex_format", 0); + ALLOC_STATE(tex.format, variable, mtu + 1, 0); r300->hw.tex.format.cmd[R300_TEX_CMD_0] = cmdpacket0(R300_TX_FORMAT_0, 0); - ALLOC_STATE(tex.pitch, variable, mtu + 1, "tex_pitch", 0); + ALLOC_STATE(tex.pitch, variable, mtu + 1, 0); r300->hw.tex.pitch.cmd[R300_TEX_CMD_0] = cmdpacket0(R300_TX_PITCH_0, 0); - ALLOC_STATE(tex.offset, variable, mtu + 1, "tex_offset", 0); + ALLOC_STATE(tex.offset, variable, mtu + 1, 0); r300->hw.tex.offset.cmd[R300_TEX_CMD_0] = cmdpacket0(R300_TX_OFFSET_0, 0); - ALLOC_STATE(tex.chroma_key, variable, mtu + 1, "tex_chroma_key", 0); + ALLOC_STATE(tex.chroma_key, variable, mtu + 1, 0); r300->hw.tex.chroma_key.cmd[R300_TEX_CMD_0] = cmdpacket0(R300_TX_CHROMA_KEY_0, 0); - ALLOC_STATE(tex.border_color, variable, mtu + 1, "tex_border_color", 0); + ALLOC_STATE(tex.border_color, variable, mtu + 1, 0); r300->hw.tex.border_color.cmd[R300_TEX_CMD_0] = cmdpacket0(R300_TX_BORDER_COLOR_0, 0); |