diff options
author | Dave Airlie <[email protected]> | 2011-12-10 18:33:49 +0000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2011-12-18 20:54:50 +0000 |
commit | 3788b4b5c942b2346bf122486b687c632ab7eac4 (patch) | |
tree | bc260166fadf2d373878b0a8783b698149dc6d84 /src/mesa | |
parent | bdd76ebef126281d837f3a817a9f19fca7799a88 (diff) |
glsl_to_tgsi: make sure copied instructions don't lose texture target. (v2)
The piglit draw-pixel-with-texture was asserting in the glsl->tgsi code,
due to 0 texture target, this makes sure the texture target is copied over
correctly when we copy instructions around.
v2: drive-by fix bitmap on the way past.
This avoids the assertion, have to contemplate fixing things as per the spec
later.
Signed-off-by: Dave Airlie <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp index b929806ad3d..77aa0d17bae 100644 --- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp +++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp @@ -3786,6 +3786,7 @@ get_pixel_transfer_visitor(struct st_fragment_program *fp, * new visitor. */ foreach_iter(exec_list_iterator, iter, original->instructions) { glsl_to_tgsi_instruction *inst = (glsl_to_tgsi_instruction *)iter.get(); + glsl_to_tgsi_instruction *newinst; st_src_reg src_regs[3]; if (inst->dst.file == PROGRAM_OUTPUT) @@ -3803,7 +3804,8 @@ get_pixel_transfer_visitor(struct st_fragment_program *fp, prog->InputsRead |= BITFIELD64_BIT(src_regs[i].index); } - v->emit(NULL, inst->op, inst->dst, src_regs[0], src_regs[1], src_regs[2]); + newinst = v->emit(NULL, inst->op, inst->dst, src_regs[0], src_regs[1], src_regs[2]); + newinst->tex_target = inst->tex_target; } /* Make modifications to fragment program info. */ @@ -3867,6 +3869,7 @@ get_bitmap_visitor(struct st_fragment_program *fp, * new visitor. */ foreach_iter(exec_list_iterator, iter, original->instructions) { glsl_to_tgsi_instruction *inst = (glsl_to_tgsi_instruction *)iter.get(); + glsl_to_tgsi_instruction *newinst; st_src_reg src_regs[3]; if (inst->dst.file == PROGRAM_OUTPUT) @@ -3878,7 +3881,8 @@ get_bitmap_visitor(struct st_fragment_program *fp, prog->InputsRead |= BITFIELD64_BIT(src_regs[i].index); } - v->emit(NULL, inst->op, inst->dst, src_regs[0], src_regs[1], src_regs[2]); + newinst = v->emit(NULL, inst->op, inst->dst, src_regs[0], src_regs[1], src_regs[2]); + newinst->tex_target = inst->tex_target; } /* Make modifications to fragment program info. */ |