Exemplo n.º 1
0
void
intel_meta_draw_poly(struct intel_context *intel,
                     GLuint n,
                     GLfloat xy[][2],
                     GLfloat z, GLuint color, GLfloat tex[][2])
{
   union fi *vb;
   GLint i;

   /* All 3d primitives should be emitted with INTEL_BATCH_CLIPRECTS,
    * otherwise the drawing origin (DR4) might not be set correctly.
    */
   intelStartInlinePrimitive(intel, PRIM3D_TRIFAN, INTEL_BATCH_CLIPRECTS);
   vb = (union fi *) intelExtendInlinePrimitive(intel, n * 6);

   for (i = 0; i < n; i++) {
      vb[0].f = xy[i][0];
      vb[1].f = xy[i][1];
      vb[2].f = z;
      vb[3].i = color;
      vb[4].f = tex[i][0];
      vb[5].f = tex[i][1];
      vb += 6;
   }

   INTEL_FIREVERTICES(intel);
}
Exemplo n.º 2
0
void intelRestartInlinePrimitive( intelContextPtr intel )
{
   GLuint prim = intel->prim.primitive;

   intel_flush_inline_primitive( &intel->ctx );
   if (1) intelFlushBatch(intel, GL_TRUE); /* GL_TRUE - is critical */
   intelStartInlinePrimitive( intel, prim );
}
Exemplo n.º 3
0
static void
intelDmaPrimitive(struct intel_context *intel, GLenum prim)
{
   if (0)
      fprintf(stderr, "%s %s\n", __FUNCTION__, _mesa_lookup_enum_by_nr(prim));
   INTEL_FIREVERTICES(intel);
   intel->vtbl.reduced_primitive_state(intel, reduced_prim[prim]);
   intelStartInlinePrimitive(intel, hw_prim[prim], INTEL_BATCH_CLIPRECTS);
}
Exemplo n.º 4
0
void intelWrapInlinePrimitive( intelContextPtr intel )
{
   GLuint prim = intel->prim.primitive;

   if (0)
      fprintf(stderr, "%s\n", __FUNCTION__);
   intel_flush_inline_primitive( &intel->ctx );
   intelFlushBatch(intel, GL_TRUE);
   intelStartInlinePrimitive( intel, prim );
}
Exemplo n.º 5
0
void
intelWrapInlinePrimitive(struct intel_context *intel)
{
   GLuint prim = intel->prim.primitive;
   GLuint batchflags = intel->batch->flags;

   intel_flush_inline_primitive(intel);
   intel_batchbuffer_flush(intel->batch);
   intelStartInlinePrimitive(intel, prim, batchflags);  /* ??? */
}
Exemplo n.º 6
0
 /* System to flush dma and emit state changes based on the rasterized
  * primitive.
  */
static void intelRasterPrimitive( GLcontext *ctx, GLenum rprim, GLuint hwprim )
{
   intelContextPtr intel = INTEL_CONTEXT(ctx);

   if (0)
      fprintf(stderr, "%s %s %x\n", __FUNCTION__, 
	      _mesa_lookup_enum_by_nr(rprim), hwprim);

   intel->vtbl.reduced_primitive_state( intel, rprim );
    
   /* Start a new primitive.  Arrange to have it flushed later on.
    */
   if (hwprim != intel->prim.primitive) 
      intelStartInlinePrimitive( intel, hwprim );
}
Exemplo n.º 7
0
 /* System to flush dma and emit state changes based on the rasterized
  * primitive.
  */
static void
intelRasterPrimitive(GLcontext * ctx, GLenum rprim, GLuint hwprim)
{
   struct intel_context *intel = intel_context(ctx);

   if (0)
      fprintf(stderr, "%s %s %x\n", __FUNCTION__,
              _mesa_lookup_enum_by_nr(rprim), hwprim);

   intel->vtbl.reduced_primitive_state(intel, rprim);

   /* Start a new primitive.  Arrange to have it flushed later on.
    */
   if (hwprim != intel->prim.primitive) {
      INTEL_FIREVERTICES(intel);

      intelStartInlinePrimitive(intel, hwprim, INTEL_BATCH_CLIPRECTS);
   }
}