From f72e77791116eda427438f9d9e895de71123c334 Mon Sep 17 00:00:00 2001 From: Corbin Simpson Date: Mon, 23 Feb 2009 04:25:29 -0800 Subject: r300-gallium: Decode passthrough shader for r300. Looks pretty sane. --- src/gallium/drivers/r300/r300_state_shader.h | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'src/gallium/drivers/r300/r300_state_shader.h') diff --git a/src/gallium/drivers/r300/r300_state_shader.h b/src/gallium/drivers/r300/r300_state_shader.h index 1d5d9ee943..73025b2dcc 100644 --- a/src/gallium/drivers/r300/r300_state_shader.h +++ b/src/gallium/drivers/r300/r300_state_shader.h @@ -47,11 +47,18 @@ static const struct r300_fragment_shader r300_passthrough_fragment_shader = { .indirections = 1, .shader.stack_size = 2, - /* XXX decode these */ - .instructions[0].alu_rgb_inst = 0x50A80, - .instructions[0].alu_rgb_inst = 0x1C000000, - .instructions[0].alu_alpha_inst = 0x40889, - .instructions[0].alu_alpha_inst = 0x1000000, + .instructions[0].alu_rgb_inst = R300_RGB_SWIZA(R300_ALU_ARGC_SRC0C_XYZ) | + R300_RGB_SWIZB(R300_ALU_ARGC_ONE) | + R300_RGB_SWIZC(R300_ALU_ARGC_ZERO) | + R300_ALU_OUTC_MAD, + .instructions[0].alu_rgb_addr = R300_RGB_ADDR0(0) | R300_RGB_ADDR1(0) | + R300_RGB_ADDR2(0) | R300_ALU_DSTC_OUTPUT_XYZ, + .instructions[0].alu_alpha_inst = R300_ALPHA_SWIZA(R300_ALU_ARGA_SRC0A) | + R300_ALPHA_SWIZB(R300_ALU_ARGA_ONE) | + R300_ALPHA_SWIZC(R300_ALU_ARGA_ZERO) | + R300_ALU_OUTA_MAD, + .instructions[0].alu_alpha_addr = R300_ALPHA_ADDR0(0) | + R300_ALPHA_ADDR1(0) | R300_ALPHA_ADDR2(0) | R300_ALU_DSTA_OUTPUT, }; static const struct r500_fragment_shader r500_passthrough_fragment_shader = { -- cgit v1.2.3