summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBryan Cain <[email protected]>2011-07-10 17:36:04 -0500
committerBryan Cain <[email protected]>2011-08-01 17:59:09 -0500
commit87f8d8547db9b947ae847c509a464e06d0ac6c64 (patch)
treef079292bb488424bfd62f1f738068e6c7c17b3bc /src
parent5f0b4b0e9d376f9ec1cb5ae08c36052f4f51ac37 (diff)
glsl_to_tgsi: fix mistakes in get_pixel_transfer_visitor()
I noticed these issues while working on get_bitmap_visitor().
Diffstat (limited to 'src')
-rw-r--r--src/mesa/state_tracker/st_glsl_to_tgsi.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
index 74f15087947..3df22eae918 100644
--- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
@@ -3534,7 +3534,6 @@ get_pixel_transfer_visitor(struct st_fragment_program *fp,
inst->tex_target = TEXTURE_2D_INDEX;
prog->InputsRead |= (1 << FRAG_ATTRIB_TEX0);
- prog->OutputsWritten |= BITFIELD64_BIT(FRAG_RESULT_COLOR);
prog->SamplersUsed |= (1 << 0); /* mark sampler 0 as used */
v->samplers_used |= (1 << 0);
@@ -3593,6 +3592,9 @@ get_pixel_transfer_visitor(struct st_fragment_program *fp,
glsl_to_tgsi_instruction *inst = (glsl_to_tgsi_instruction *)iter.get();
st_src_reg src_regs[3];
+ if (inst->dst.file == PROGRAM_OUTPUT)
+ prog->OutputsWritten |= BITFIELD64_BIT(inst->dst.index);
+
for (int i=0; i<3; i++) {
src_regs[i] = inst->src[i];
if (src_regs[i].file == PROGRAM_INPUT &&
@@ -3603,8 +3605,6 @@ get_pixel_transfer_visitor(struct st_fragment_program *fp,
}
else if (src_regs[i].file == PROGRAM_INPUT)
prog->InputsRead |= (1 << src_regs[i].index);
- else if (src_regs[i].file == PROGRAM_OUTPUT)
- prog->OutputsWritten |= BITFIELD64_BIT(src_regs[i].index);
}
v->emit(NULL, inst->op, inst->dst, src_regs[0], src_regs[1], src_regs[2]);