diff options
author | Xiang, Haihao <[email protected]> | 2007-12-19 09:59:37 +0800 |
---|---|---|
committer | Xiang, Haihao <[email protected]> | 2007-12-19 09:59:37 +0800 |
commit | e3a1ae0fcbd7582eb6fbd02384410d786c2b671b (patch) | |
tree | 65a72d686237402e20849f0da35529d47521edd8 /src | |
parent | 88f1419f961397c62fa3551551cdf00f9903f20d (diff) |
i965: restore the flag after building the subroutine of the
GS thread. fix #13240
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_sf_emit.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_sf_emit.c b/src/mesa/drivers/dri/i965/brw_sf_emit.c index 5e86e428fa8..afbb90a9a82 100644 --- a/src/mesa/drivers/dri/i965/brw_sf_emit.c +++ b/src/mesa/drivers/dri/i965/brw_sf_emit.c @@ -645,6 +645,8 @@ void brw_emit_anyprim_setup( struct brw_sf_compile *c ) struct brw_reg primmask; struct brw_instruction *jmp; struct brw_reg v1_null_ud = vec1(retype(brw_null_reg(), BRW_REGISTER_TYPE_UD)); + + GLuint saveflag; alloc_regs(c); @@ -663,10 +665,15 @@ void brw_emit_anyprim_setup( struct brw_sf_compile *c ) (1<<_3DPRIM_TRIFAN_NOSTIPPLE))); jmp = brw_JMPI(p, ip, ip, brw_imm_w(0)); { + saveflag = p->flag_value; brw_push_insn_state(p); brw_emit_tri_setup( c ); brw_pop_insn_state(p); - /* note - thread killed in subroutine */ + p->flag_value = saveflag; + /* note - thread killed in subroutine, so must + * restore the flag which is changed when building + * the subroutine. fix #13240 + */ } brw_land_fwd_jump(p, jmp); @@ -679,9 +686,11 @@ void brw_emit_anyprim_setup( struct brw_sf_compile *c ) (1<<_3DPRIM_LINESTRIP_CONT_BF))); jmp = brw_JMPI(p, ip, ip, brw_imm_w(0)); { + saveflag = p->flag_value; brw_push_insn_state(p); brw_emit_line_setup( c ); brw_pop_insn_state(p); + p->flag_value = saveflag; /* note - thread killed in subroutine */ } brw_land_fwd_jump(p, jmp); @@ -690,9 +699,11 @@ void brw_emit_anyprim_setup( struct brw_sf_compile *c ) brw_AND(p, v1_null_ud, payload_attr, brw_imm_ud(1<<BRW_SPRITE_POINT_ENABLE)); jmp = brw_JMPI(p, ip, ip, brw_imm_w(0)); { + saveflag = p->flag_value; brw_push_insn_state(p); brw_emit_point_sprite_setup( c ); brw_pop_insn_state(p); + p->flag_value = saveflag; } brw_land_fwd_jump(p, jmp); |