From 233c6fb694ebd946ae76cb48701adf4d2086b1c1 Mon Sep 17 00:00:00 2001 From: Corbin Simpson Date: Sat, 25 Apr 2009 16:53:38 -0700 Subject: r300-gallium: Fix vertex shader OVM counting. Attribs must be packed: position, point size, colors, texcoords. Thanks to osiris for pointing it out. --- src/gallium/drivers/r300/r300_state_tcl.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src/gallium/drivers/r300/r300_state_tcl.h') diff --git a/src/gallium/drivers/r300/r300_state_tcl.h b/src/gallium/drivers/r300/r300_state_tcl.h index de944028ba..e2e1357d43 100644 --- a/src/gallium/drivers/r300/r300_state_tcl.h +++ b/src/gallium/drivers/r300/r300_state_tcl.h @@ -99,7 +99,13 @@ struct r300_vs_asm { unsigned imm_offset; /* Number of immediate constants. */ unsigned imm_count; - /* Offsets into vertex output memory. */ + /* Number of colors to write. */ + unsigned out_colors; + /* Number of texcoords to write. */ + unsigned out_texcoords; + /* Whether to emit point size. */ + boolean point_size; + /* Tab of declared outputs to OVM outputs. */ unsigned tab[16]; }; @@ -115,7 +121,7 @@ static struct r300_vertex_shader r300_passthrough_vertex_shader = { .instructions[0].inst3 = 0x0, .instructions[1].inst0 = R300_PVS_DST_OPCODE(R300_VE_ADD) | R300_PVS_DST_REG_TYPE(R300_PVS_DST_REG_OUT) | - R300_PVS_DST_OFFSET(2) | R300_PVS_DST_WE_XYZW, + R300_PVS_DST_OFFSET(1) | R300_PVS_DST_WE_XYZW, .instructions[1].inst1 = R300_PVS_SRC_REG_TYPE(R300_PVS_SRC_REG_INPUT) | R300_PVS_SRC_OFFSET(1) | R300_PVS_SRC_SWIZZLE_XYZW, .instructions[1].inst2 = R300_PVS_SRC_SWIZZLE_ZERO, @@ -134,7 +140,7 @@ static struct r300_vertex_shader r300_texture_vertex_shader = { .instructions[0].inst3 = 0x0, .instructions[1].inst0 = R300_PVS_DST_OPCODE(R300_VE_ADD) | R300_PVS_DST_REG_TYPE(R300_PVS_DST_REG_OUT) | - R300_PVS_DST_OFFSET(6) | R300_PVS_DST_WE_XYZW, + R300_PVS_DST_OFFSET(1) | R300_PVS_DST_WE_XYZW, .instructions[1].inst1 = R300_PVS_SRC_REG_TYPE(R300_PVS_SRC_REG_INPUT) | R300_PVS_SRC_OFFSET(1) | R300_PVS_SRC_SWIZZLE_XYZW, .instructions[1].inst2 = R300_PVS_SRC_SWIZZLE_ZERO, -- cgit v1.2.3