Пример #1
0
static void emit_primitives( struct brw_clip_compile *c,
			     GLuint mode,
			     bool do_offset )
{
   switch (mode) {
   case CLIP_FILL:
      brw_clip_tri_emit_polygon(c);
      break;

   case CLIP_LINE:
      emit_lines(c, do_offset);
      break;

   case CLIP_POINT:
      emit_points(c, do_offset);
      break;

   case CLIP_CULL:
      unreachable("not reached");
   }
}
Пример #2
0
void brw_emit_tri_clip( struct brw_clip_compile *c )
{
   struct brw_instruction *neg_rhw;
   struct brw_compile *p = &c->func;
   brw_clip_tri_alloc_regs(c, 3 + c->key.nr_userclip + 6);
   brw_clip_tri_init_vertices(c);
   brw_clip_init_clipmask(c);
   brw_clip_init_ff_sync(c);

   /* if -ve rhw workaround bit is set, 
      do cliptest */
   if (c->chipset.is_965) {
      brw_set_conditionalmod(p, BRW_CONDITIONAL_NZ);
      brw_AND(p, brw_null_reg(), get_element_ud(c->reg.R0, 2), 
              brw_imm_ud(1<<20));
      neg_rhw = brw_IF(p, BRW_EXECUTE_1); 
      {
         brw_clip_test(c);
      }
      brw_ENDIF(p, neg_rhw);
   }
   /* Can't push into do_clip_tri because with polygon (or quad)
    * flatshading, need to apply the flatshade here because we don't
    * respect the PV when converting to trifan for emit:
    */
   if (c->key.do_flat_shading) 
      brw_clip_tri_flat_shade(c); 
      
   if ((c->key.clip_mode == BRW_CLIPMODE_NORMAL) ||
       (c->key.clip_mode == BRW_CLIPMODE_KERNEL_CLIP))
      do_clip_tri(c);
   else 
      maybe_do_clip_tri(c);

   brw_clip_tri_emit_polygon(c);

   /* Send an empty message to kill the thread:
    */
   brw_clip_kill_thread(c);
}
Пример #3
0
static void emit_primitives( struct brw_clip_compile *c,
			     GLuint mode, 
			     GLboolean do_offset )
{
   switch (mode) {
   case CLIP_FILL:
      brw_clip_tri_emit_polygon(c);
      break;

   case CLIP_LINE:
      emit_lines(c, do_offset);
      break;

   case CLIP_POINT:
      emit_points(c, do_offset);
      break;

   case CLIP_CULL:
      assert(0);
      break;
   }
}