2 Copyright (C) Intel Corp. 2006. All Rights Reserved.
3 Intel funded Tungsten Graphics (http://www.tungstengraphics.com) to
4 develop this 3D driver.
6 Permission is hereby granted, free of charge, to any person obtaining
7 a copy of this software and associated documentation files (the
8 "Software"), to deal in the Software without restriction, including
9 without limitation the rights to use, copy, modify, merge, publish,
10 distribute, sublicense, and/or sell copies of the Software, and to
11 permit persons to whom the Software is furnished to do so, subject to
12 the following conditions:
14 The above copyright notice and this permission notice (including the
15 next paragraph) shall be included in all copies or substantial
16 portions of the Software.
18 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
19 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
21 IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
22 LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
23 OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
24 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
26 **********************************************************************/
29 * Keith Whitwell <keith@tungstengraphics.com>
33 #include "main/glheader.h"
34 #include "main/macros.h"
35 #include "main/enums.h"
37 #include "intel_batchbuffer.h"
39 #include "brw_defines.h"
40 #include "brw_context.h"
46 static struct brw_reg
get_vert_attr(struct brw_sf_compile
*c
,
50 GLuint off
= c
->attr_to_idx
[attr
] / 2;
51 GLuint sub
= c
->attr_to_idx
[attr
] % 2;
53 return brw_vec4_grf(vert
.nr
+ off
, sub
* 4);
56 static GLboolean
have_attr(struct brw_sf_compile
*c
,
59 return (c
->key
.attrs
& (1<<attr
)) ? 1 : 0;
63 * Sets VERT_RESULT_FOGC.Y for gl_FrontFacing
65 * This is currently executed if the fragment program uses VERT_RESULT_FOGC
66 * at all, but this could be eliminated with a scan of the FP contents.
69 do_front_facing( struct brw_sf_compile
*c
)
71 struct brw_compile
*p
= &c
->func
;
74 if (!have_attr(c
, VERT_RESULT_FOGC
))
77 brw_push_insn_state(p
);
78 brw_CMP(p
, brw_null_reg(),
79 c
->key
.frontface_ccw
? BRW_CONDITIONAL_G
: BRW_CONDITIONAL_L
,
80 c
->det
, brw_imm_f(0));
81 brw_set_predicate_control(p
, BRW_PREDICATE_NONE
);
82 for (i
= 0; i
< 3; i
++) {
83 struct brw_reg fogc
= get_vert_attr(c
, c
->vert
[i
],FRAG_ATTRIB_FOGC
);
84 brw_MOV(p
, get_element(fogc
, 1), brw_imm_f(0));
85 brw_set_predicate_control(p
, BRW_PREDICATE_NORMAL
);
86 brw_MOV(p
, get_element(fogc
, 1), brw_imm_f(1));
87 brw_set_predicate_control(p
, BRW_PREDICATE_NONE
);
89 brw_pop_insn_state(p
);
93 /***********************************************************************
96 static void copy_bfc( struct brw_sf_compile
*c
,
99 struct brw_compile
*p
= &c
->func
;
102 for (i
= 0; i
< 2; i
++) {
103 if (have_attr(c
, VERT_RESULT_COL0
+i
) &&
104 have_attr(c
, VERT_RESULT_BFC0
+i
))
106 get_vert_attr(c
, vert
, VERT_RESULT_COL0
+i
),
107 get_vert_attr(c
, vert
, VERT_RESULT_BFC0
+i
));
112 static void do_twoside_color( struct brw_sf_compile
*c
)
114 struct brw_compile
*p
= &c
->func
;
115 struct brw_instruction
*if_insn
;
116 GLuint backface_conditional
= c
->key
.frontface_ccw
? BRW_CONDITIONAL_G
: BRW_CONDITIONAL_L
;
118 /* Already done in clip program:
120 if (c
->key
.primitive
== SF_UNFILLED_TRIS
)
123 /* XXX: What happens if BFC isn't present? This could only happen
124 * for user-supplied vertex programs, as t_vp_build.c always does
127 if (!(have_attr(c
, VERT_RESULT_COL0
) && have_attr(c
, VERT_RESULT_BFC0
)) &&
128 !(have_attr(c
, VERT_RESULT_COL1
) && have_attr(c
, VERT_RESULT_BFC1
)))
131 /* Need to use BRW_EXECUTE_4 and also do an 4-wide compare in order
132 * to get all channels active inside the IF. In the clipping code
133 * we run with NoMask, so it's not an option and we can use
134 * BRW_EXECUTE_1 for all comparisions.
136 brw_push_insn_state(p
);
137 brw_CMP(p
, vec4(brw_null_reg()), backface_conditional
, c
->det
, brw_imm_f(0));
138 if_insn
= brw_IF(p
, BRW_EXECUTE_4
);
140 switch (c
->nr_verts
) {
141 case 3: copy_bfc(c
, c
->vert
[2]);
142 case 2: copy_bfc(c
, c
->vert
[1]);
143 case 1: copy_bfc(c
, c
->vert
[0]);
146 brw_ENDIF(p
, if_insn
);
147 brw_pop_insn_state(p
);
152 /***********************************************************************
156 #define VERT_RESULT_COLOR_BITS ((1<<VERT_RESULT_COL0) | \
157 (1<<VERT_RESULT_COL1))
159 static void copy_colors( struct brw_sf_compile
*c
,
163 struct brw_compile
*p
= &c
->func
;
166 for (i
= VERT_RESULT_COL0
; i
<= VERT_RESULT_COL1
; i
++) {
169 get_vert_attr(c
, dst
, i
),
170 get_vert_attr(c
, src
, i
));
176 /* Need to use a computed jump to copy flatshaded attributes as the
177 * vertices are ordered according to y-coordinate before reaching this
178 * point, so the PV could be anywhere.
180 static void do_flatshade_triangle( struct brw_sf_compile
*c
)
182 struct brw_compile
*p
= &c
->func
;
183 struct brw_reg ip
= brw_ip_reg();
184 GLuint nr
= brw_count_bits(c
->key
.attrs
& VERT_RESULT_COLOR_BITS
);
188 /* Already done in clip program:
190 if (c
->key
.primitive
== SF_UNFILLED_TRIS
)
193 brw_push_insn_state(p
);
195 brw_MUL(p
, c
->pv
, c
->pv
, brw_imm_ud(nr
*2+1));
196 brw_JMPI(p
, ip
, ip
, c
->pv
);
198 copy_colors(c
, c
->vert
[1], c
->vert
[0]);
199 copy_colors(c
, c
->vert
[2], c
->vert
[0]);
200 brw_JMPI(p
, ip
, ip
, brw_imm_ud(nr
*4+1));
202 copy_colors(c
, c
->vert
[0], c
->vert
[1]);
203 copy_colors(c
, c
->vert
[2], c
->vert
[1]);
204 brw_JMPI(p
, ip
, ip
, brw_imm_ud(nr
*2));
206 copy_colors(c
, c
->vert
[0], c
->vert
[2]);
207 copy_colors(c
, c
->vert
[1], c
->vert
[2]);
209 brw_pop_insn_state(p
);
213 static void do_flatshade_line( struct brw_sf_compile
*c
)
215 struct brw_compile
*p
= &c
->func
;
216 struct brw_reg ip
= brw_ip_reg();
217 GLuint nr
= brw_count_bits(c
->key
.attrs
& VERT_RESULT_COLOR_BITS
);
222 /* Already done in clip program:
224 if (c
->key
.primitive
== SF_UNFILLED_TRIS
)
227 brw_push_insn_state(p
);
229 brw_MUL(p
, c
->pv
, c
->pv
, brw_imm_ud(nr
+1));
230 brw_JMPI(p
, ip
, ip
, c
->pv
);
231 copy_colors(c
, c
->vert
[1], c
->vert
[0]);
233 brw_JMPI(p
, ip
, ip
, brw_imm_ud(nr
));
234 copy_colors(c
, c
->vert
[0], c
->vert
[1]);
236 brw_pop_insn_state(p
);
241 /***********************************************************************
246 static void alloc_regs( struct brw_sf_compile
*c
)
250 /* Values computed by fixed function unit:
252 c
->pv
= retype(brw_vec1_grf(1, 1), BRW_REGISTER_TYPE_UD
);
253 c
->det
= brw_vec1_grf(1, 2);
254 c
->dx0
= brw_vec1_grf(1, 3);
255 c
->dx2
= brw_vec1_grf(1, 4);
256 c
->dy0
= brw_vec1_grf(1, 5);
257 c
->dy2
= brw_vec1_grf(1, 6);
259 /* z and 1/w passed in seperately:
261 c
->z
[0] = brw_vec1_grf(2, 0);
262 c
->inv_w
[0] = brw_vec1_grf(2, 1);
263 c
->z
[1] = brw_vec1_grf(2, 2);
264 c
->inv_w
[1] = brw_vec1_grf(2, 3);
265 c
->z
[2] = brw_vec1_grf(2, 4);
266 c
->inv_w
[2] = brw_vec1_grf(2, 5);
271 for (i
= 0; i
< c
->nr_verts
; i
++) {
272 c
->vert
[i
] = brw_vec8_grf(reg
, 0);
273 reg
+= c
->nr_attr_regs
;
276 /* Temporaries, allocated after last vertex reg.
278 c
->inv_det
= brw_vec1_grf(reg
, 0); reg
++;
279 c
->a1_sub_a0
= brw_vec8_grf(reg
, 0); reg
++;
280 c
->a2_sub_a0
= brw_vec8_grf(reg
, 0); reg
++;
281 c
->tmp
= brw_vec8_grf(reg
, 0); reg
++;
283 /* Note grf allocation:
285 c
->prog_data
.total_grf
= reg
;
288 /* Outputs of this program - interpolation coefficients for
291 c
->m1Cx
= brw_vec8_reg(BRW_MESSAGE_REGISTER_FILE
, 1, 0);
292 c
->m2Cy
= brw_vec8_reg(BRW_MESSAGE_REGISTER_FILE
, 2, 0);
293 c
->m3C0
= brw_vec8_reg(BRW_MESSAGE_REGISTER_FILE
, 3, 0);
297 static void copy_z_inv_w( struct brw_sf_compile
*c
)
299 struct brw_compile
*p
= &c
->func
;
302 brw_push_insn_state(p
);
304 /* Copy both scalars with a single MOV:
306 for (i
= 0; i
< c
->nr_verts
; i
++)
307 brw_MOV(p
, vec2(suboffset(c
->vert
[i
], 2)), vec2(c
->z
[i
]));
309 brw_pop_insn_state(p
);
313 static void invert_det( struct brw_sf_compile
*c
)
315 /* Looks like we invert all 8 elements just to get 1/det in
320 BRW_MATH_FUNCTION_INV
,
321 BRW_MATH_SATURATE_NONE
,
324 BRW_MATH_DATA_SCALAR
,
325 BRW_MATH_PRECISION_FULL
);
329 #define NON_PERPECTIVE_ATTRS (FRAG_BIT_WPOS | \
333 static GLboolean
calculate_masks( struct brw_sf_compile
*c
,
339 GLboolean is_last_attr
= (reg
== c
->nr_setup_regs
- 1);
340 GLuint persp_mask
= c
->key
.attrs
& ~NON_PERPECTIVE_ATTRS
;
343 if (c
->key
.do_flat_shading
)
344 linear_mask
= c
->key
.attrs
& ~(FRAG_BIT_COL0
|FRAG_BIT_COL1
);
346 linear_mask
= c
->key
.attrs
;
352 if (persp_mask
& (1 << c
->idx_to_attr
[reg
*2]))
355 if (linear_mask
& (1 << c
->idx_to_attr
[reg
*2]))
358 /* Maybe only processs one attribute on the final round:
360 if (reg
*2+1 < c
->nr_setup_attrs
) {
363 if (persp_mask
& (1 << c
->idx_to_attr
[reg
*2+1]))
366 if (linear_mask
& (1 << c
->idx_to_attr
[reg
*2+1]))
375 void brw_emit_tri_setup( struct brw_sf_compile
*c
, GLboolean allocate
)
377 struct brw_compile
*p
= &c
->func
;
389 if (c
->key
.do_twoside_color
)
392 if (c
->key
.do_flat_shading
)
393 do_flatshade_triangle(c
);
396 for (i
= 0; i
< c
->nr_setup_regs
; i
++)
398 /* Pair of incoming attributes:
400 struct brw_reg a0
= offset(c
->vert
[0], i
);
401 struct brw_reg a1
= offset(c
->vert
[1], i
);
402 struct brw_reg a2
= offset(c
->vert
[2], i
);
403 GLushort pc
, pc_persp
, pc_linear
;
404 GLboolean last
= calculate_masks(c
, i
, &pc
, &pc_persp
, &pc_linear
);
408 brw_set_predicate_control_flag_value(p
, pc_persp
);
409 brw_MUL(p
, a0
, a0
, c
->inv_w
[0]);
410 brw_MUL(p
, a1
, a1
, c
->inv_w
[1]);
411 brw_MUL(p
, a2
, a2
, c
->inv_w
[2]);
415 /* Calculate coefficients for interpolated values:
419 brw_set_predicate_control_flag_value(p
, pc_linear
);
421 brw_ADD(p
, c
->a1_sub_a0
, a1
, negate(a0
));
422 brw_ADD(p
, c
->a2_sub_a0
, a2
, negate(a0
));
426 brw_MUL(p
, brw_null_reg(), c
->a1_sub_a0
, c
->dy2
);
427 brw_MAC(p
, c
->tmp
, c
->a2_sub_a0
, negate(c
->dy0
));
428 brw_MUL(p
, c
->m1Cx
, c
->tmp
, c
->inv_det
);
432 brw_MUL(p
, brw_null_reg(), c
->a2_sub_a0
, c
->dx0
);
433 brw_MAC(p
, c
->tmp
, c
->a1_sub_a0
, negate(c
->dx2
));
434 brw_MUL(p
, c
->m2Cy
, c
->tmp
, c
->inv_det
);
438 brw_set_predicate_control_flag_value(p
, pc
);
439 /* start point for interpolation
441 brw_MOV(p
, c
->m3C0
, a0
);
443 /* Copy m0..m3 to URB. m0 is implicitly copied from r0 in
444 * the send instruction:
449 brw_vec8_grf(0, 0), /* r0, will be copied to m0 */
453 0, /* response len */
455 last
, /* writes complete */
457 BRW_URB_SWIZZLE_TRANSPOSE
); /* XXX: Swizzle control "SF to windower" */
464 void brw_emit_line_setup( struct brw_sf_compile
*c
, GLboolean allocate
)
466 struct brw_compile
*p
= &c
->func
;
478 if (c
->key
.do_flat_shading
)
479 do_flatshade_line(c
);
481 for (i
= 0; i
< c
->nr_setup_regs
; i
++)
483 /* Pair of incoming attributes:
485 struct brw_reg a0
= offset(c
->vert
[0], i
);
486 struct brw_reg a1
= offset(c
->vert
[1], i
);
487 GLushort pc
, pc_persp
, pc_linear
;
488 GLboolean last
= calculate_masks(c
, i
, &pc
, &pc_persp
, &pc_linear
);
492 brw_set_predicate_control_flag_value(p
, pc_persp
);
493 brw_MUL(p
, a0
, a0
, c
->inv_w
[0]);
494 brw_MUL(p
, a1
, a1
, c
->inv_w
[1]);
497 /* Calculate coefficients for position, color:
500 brw_set_predicate_control_flag_value(p
, pc_linear
);
502 brw_ADD(p
, c
->a1_sub_a0
, a1
, negate(a0
));
504 brw_MUL(p
, c
->tmp
, c
->a1_sub_a0
, c
->dx0
);
505 brw_MUL(p
, c
->m1Cx
, c
->tmp
, c
->inv_det
);
507 brw_MUL(p
, c
->tmp
, c
->a1_sub_a0
, c
->dy0
);
508 brw_MUL(p
, c
->m2Cy
, c
->tmp
, c
->inv_det
);
512 brw_set_predicate_control_flag_value(p
, pc
);
514 /* start point for interpolation
516 brw_MOV(p
, c
->m3C0
, a0
);
518 /* Copy m0..m3 to URB.
527 0, /* response len */
529 last
, /* writes complete */
530 i
*4, /* urb destination offset */
531 BRW_URB_SWIZZLE_TRANSPOSE
);
536 void brw_emit_point_sprite_setup( struct brw_sf_compile
*c
, GLboolean allocate
)
538 struct brw_compile
*p
= &c
->func
;
547 for (i
= 0; i
< c
->nr_setup_regs
; i
++)
549 struct brw_sf_point_tex
*tex
= &c
->point_attrs
[c
->idx_to_attr
[2*i
]];
550 struct brw_reg a0
= offset(c
->vert
[0], i
);
551 GLushort pc
, pc_persp
, pc_linear
;
552 GLboolean last
= calculate_masks(c
, i
, &pc
, &pc_persp
, &pc_linear
);
556 if (!tex
->CoordReplace
) {
557 brw_set_predicate_control_flag_value(p
, pc_persp
);
558 brw_MUL(p
, a0
, a0
, c
->inv_w
[0]);
562 if (tex
->CoordReplace
) {
563 /* Caculate 1.0/PointWidth */
566 BRW_MATH_FUNCTION_INV
,
567 BRW_MATH_SATURATE_NONE
,
570 BRW_MATH_DATA_SCALAR
,
571 BRW_MATH_PRECISION_FULL
);
573 if (c
->key
.SpriteOrigin
== GL_LOWER_LEFT
) {
574 brw_MUL(p
, c
->m1Cx
, c
->tmp
, c
->inv_w
[0]);
575 brw_MOV(p
, vec1(suboffset(c
->m1Cx
, 1)), brw_imm_f(0.0));
576 brw_MUL(p
, c
->m2Cy
, c
->tmp
, negate(c
->inv_w
[0]));
577 brw_MOV(p
, vec1(suboffset(c
->m2Cy
, 0)), brw_imm_f(0.0));
579 brw_MUL(p
, c
->m1Cx
, c
->tmp
, c
->inv_w
[0]);
580 brw_MOV(p
, vec1(suboffset(c
->m1Cx
, 1)), brw_imm_f(0.0));
581 brw_MUL(p
, c
->m2Cy
, c
->tmp
, c
->inv_w
[0]);
582 brw_MOV(p
, vec1(suboffset(c
->m2Cy
, 0)), brw_imm_f(0.0));
585 brw_MOV(p
, c
->m1Cx
, brw_imm_ud(0));
586 brw_MOV(p
, c
->m2Cy
, brw_imm_ud(0));
590 brw_set_predicate_control_flag_value(p
, pc
);
591 if (tex
->CoordReplace
) {
592 if (c
->key
.SpriteOrigin
== GL_LOWER_LEFT
) {
593 brw_MUL(p
, c
->m3C0
, c
->inv_w
[0], brw_imm_f(1.0));
594 brw_MOV(p
, vec1(suboffset(c
->m3C0
, 0)), brw_imm_f(0.0));
597 brw_MOV(p
, c
->m3C0
, brw_imm_f(0.0));
599 brw_MOV(p
, c
->m3C0
, a0
); /* constant value */
602 /* Copy m0..m3 to URB.
611 0, /* response len */
613 last
, /* writes complete */
614 i
*4, /* urb destination offset */
615 BRW_URB_SWIZZLE_TRANSPOSE
);
620 /* Points setup - several simplifications as all attributes are
621 * constant across the face of the point (point sprites excluded!)
623 void brw_emit_point_setup( struct brw_sf_compile
*c
, GLboolean allocate
)
625 struct brw_compile
*p
= &c
->func
;
635 brw_MOV(p
, c
->m1Cx
, brw_imm_ud(0)); /* zero - move out of loop */
636 brw_MOV(p
, c
->m2Cy
, brw_imm_ud(0)); /* zero - move out of loop */
638 for (i
= 0; i
< c
->nr_setup_regs
; i
++)
640 struct brw_reg a0
= offset(c
->vert
[0], i
);
641 GLushort pc
, pc_persp
, pc_linear
;
642 GLboolean last
= calculate_masks(c
, i
, &pc
, &pc_persp
, &pc_linear
);
646 /* This seems odd as the values are all constant, but the
647 * fragment shader will be expecting it:
649 brw_set_predicate_control_flag_value(p
, pc_persp
);
650 brw_MUL(p
, a0
, a0
, c
->inv_w
[0]);
654 /* The delta values are always zero, just send the starting
655 * coordinate. Again, this is to fit in with the interpolation
656 * code in the fragment shader.
659 brw_set_predicate_control_flag_value(p
, pc
);
661 brw_MOV(p
, c
->m3C0
, a0
); /* constant value */
663 /* Copy m0..m3 to URB.
672 0, /* response len */
674 last
, /* writes complete */
675 i
*4, /* urb destination offset */
676 BRW_URB_SWIZZLE_TRANSPOSE
);
681 void brw_emit_anyprim_setup( struct brw_sf_compile
*c
)
683 struct brw_compile
*p
= &c
->func
;
684 struct brw_reg ip
= brw_ip_reg();
685 struct brw_reg payload_prim
= brw_uw1_reg(BRW_GENERAL_REGISTER_FILE
, 1, 0);
686 struct brw_reg payload_attr
= get_element_ud(brw_vec1_reg(BRW_GENERAL_REGISTER_FILE
, 1, 0), 0);
687 struct brw_reg primmask
;
688 struct brw_instruction
*jmp
;
689 struct brw_reg v1_null_ud
= vec1(retype(brw_null_reg(), BRW_REGISTER_TYPE_UD
));
696 primmask
= retype(get_element(c
->tmp
, 0), BRW_REGISTER_TYPE_UD
);
698 brw_MOV(p
, primmask
, brw_imm_ud(1));
699 brw_SHL(p
, primmask
, primmask
, payload_prim
);
701 brw_set_conditionalmod(p
, BRW_CONDITIONAL_Z
);
702 brw_AND(p
, v1_null_ud
, primmask
, brw_imm_ud((1<<_3DPRIM_TRILIST
) |
703 (1<<_3DPRIM_TRISTRIP
) |
704 (1<<_3DPRIM_TRIFAN
) |
705 (1<<_3DPRIM_TRISTRIP_REVERSE
) |
706 (1<<_3DPRIM_POLYGON
) |
707 (1<<_3DPRIM_RECTLIST
) |
708 (1<<_3DPRIM_TRIFAN_NOSTIPPLE
)));
709 jmp
= brw_JMPI(p
, ip
, ip
, brw_imm_w(0));
711 saveflag
= p
->flag_value
;
712 brw_push_insn_state(p
);
713 brw_emit_tri_setup( c
, GL_FALSE
);
714 brw_pop_insn_state(p
);
715 p
->flag_value
= saveflag
;
716 /* note - thread killed in subroutine, so must
717 * restore the flag which is changed when building
718 * the subroutine. fix #13240
721 brw_land_fwd_jump(p
, jmp
);
723 brw_set_conditionalmod(p
, BRW_CONDITIONAL_Z
);
724 brw_AND(p
, v1_null_ud
, primmask
, brw_imm_ud((1<<_3DPRIM_LINELIST
) |
725 (1<<_3DPRIM_LINESTRIP
) |
726 (1<<_3DPRIM_LINELOOP
) |
727 (1<<_3DPRIM_LINESTRIP_CONT
) |
728 (1<<_3DPRIM_LINESTRIP_BF
) |
729 (1<<_3DPRIM_LINESTRIP_CONT_BF
)));
730 jmp
= brw_JMPI(p
, ip
, ip
, brw_imm_w(0));
732 saveflag
= p
->flag_value
;
733 brw_push_insn_state(p
);
734 brw_emit_line_setup( c
, GL_FALSE
);
735 brw_pop_insn_state(p
);
736 p
->flag_value
= saveflag
;
737 /* note - thread killed in subroutine */
739 brw_land_fwd_jump(p
, jmp
);
741 brw_set_conditionalmod(p
, BRW_CONDITIONAL_Z
);
742 brw_AND(p
, v1_null_ud
, payload_attr
, brw_imm_ud(1<<BRW_SPRITE_POINT_ENABLE
));
743 jmp
= brw_JMPI(p
, ip
, ip
, brw_imm_w(0));
745 saveflag
= p
->flag_value
;
746 brw_push_insn_state(p
);
747 brw_emit_point_sprite_setup( c
, GL_FALSE
);
748 brw_pop_insn_state(p
);
749 p
->flag_value
= saveflag
;
751 brw_land_fwd_jump(p
, jmp
);
753 brw_emit_point_setup( c
, GL_FALSE
);