summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600/r600_shader.c
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2013-04-11 05:51:35 +0100
committerDave Airlie <[email protected]>2013-04-11 21:09:27 +0100
commit184278a804bb92b998b46c1f8db8b516cd7dcf21 (patch)
tree3290b751603bb8d88f9cdedcf89b13ca55e9b76c /src/gallium/drivers/r600/r600_shader.c
parente9fa3a94486d80da34542cfd24425c208a8d30fe (diff)
r600g: fix two issues in compressed msaa reading code
I've no idea when sample_chan would ever be 4 here, but 4 is most definitely wrong, array textures have it as 3 as well. Also the cayman code though unused is obviously wrong. Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r600/r600_shader.c')
-rw-r--r--src/gallium/drivers/r600/r600_shader.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c
index f8017072228..6dbca505cbe 100644
--- a/src/gallium/drivers/r600/r600_shader.c
+++ b/src/gallium/drivers/r600/r600_shader.c
@@ -4504,7 +4504,7 @@ static int tgsi_tex(struct r600_shader_ctx *ctx)
* Then fetch the texel with src.
*/
if (read_compressed_msaa) {
- unsigned sample_chan = inst->Texture.Texture == TGSI_TEXTURE_2D_MSAA ? 3 : 4;
+ unsigned sample_chan = 3;
unsigned temp = r600_get_temp(ctx);
assert(src_loaded);
@@ -4535,7 +4535,7 @@ static int tgsi_tex(struct r600_shader_ctx *ctx)
if (ctx->bc->chip_class == CAYMAN) {
for (i = 0 ; i < 4; i++) {
memset(&alu, 0, sizeof(struct r600_bytecode_alu));
- alu.op = ctx->inst_info->op;
+ alu.op = ALU_OP2_MULLO_INT;
alu.src[0].sel = src_gpr;
alu.src[0].chan = sample_chan;
alu.src[1].sel = V_SQ_ALU_SRC_LITERAL;