当前位置: 首页>>代码示例>>C++>>正文


C++ LOCK_HARDWARE函数代码示例

本文整理汇总了C++中LOCK_HARDWARE函数的典型用法代码示例。如果您正苦于以下问题:C++ LOCK_HARDWARE函数的具体用法?C++ LOCK_HARDWARE怎么用?C++ LOCK_HARDWARE使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了LOCK_HARDWARE函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: intel_region_cow

/* Break the COW tie to the pbo.  Both the pbo and the region end up
 * with a copy of the data.
 */
void
intel_region_cow(struct intel_context *intel, struct intel_region *region)
{
   struct intel_buffer_object *pbo = region->pbo;
   GLboolean ok;

   intel_region_release_pbo(intel, region);

   assert(region->cpp * region->pitch * region->height == pbo->Base.Size);

   _DBG("%s %p (%d bytes)\n", __FUNCTION__, region, pbo->Base.Size);

   /* Now blit from the texture buffer to the new buffer: 
    */

   LOCK_HARDWARE(intel);
   ok = intelEmitCopyBlit(intel,
                          region->cpp,
                          region->pitch, pbo->buffer, 0, region->tiling,
                          region->pitch, region->buffer, 0, region->tiling,
                          0, 0, 0, 0,
                          region->pitch, region->height,
                          GL_COPY);
   assert(ok);
   UNLOCK_HARDWARE(intel);
}
开发者ID:emcmanus,项目名称:FlashMesa3D,代码行数:29,代码来源:intel_regions.c

示例2: r128SpanRenderStart

void r128SpanRenderStart( GLcontext *ctx )
{
   r128ContextPtr rmesa = R128_CONTEXT(ctx);
   FLUSH_BATCH(rmesa);
   LOCK_HARDWARE(rmesa);
   r128WaitForIdleLocked( rmesa );
}
开发者ID:DavidGriffith,项目名称:finx,代码行数:7,代码来源:r128_span.c

示例3: intel_region_data

/* Upload data to a rectangular sub-region.  Lots of choices how to do this:
 *
 * - memcpy by span to current destination
 * - upload data as new buffer and blit
 *
 * Currently always memcpy.
 */
void
intel_region_data(struct intel_context *intel,
                  struct intel_region *dst,
                  GLuint dst_offset,
                  GLuint dstx, GLuint dsty,
                  const void *src, GLuint src_pitch,
                  GLuint srcx, GLuint srcy, GLuint width, GLuint height)
{
   _DBG("%s\n", __FUNCTION__);

   if (intel == NULL)
      return;

   if (dst->pbo) {
      if (dstx == 0 &&
          dsty == 0 && width == dst->pitch && height == dst->height)
         intel_region_release_pbo(intel, dst);
      else
         intel_region_cow(intel, dst);
   }

   LOCK_HARDWARE(intel);
   _mesa_copy_rect(intel_region_map(intel, dst) + dst_offset,
                   dst->cpp,
                   dst->pitch,
                   dstx, dsty, width, height, src, src_pitch, srcx, srcy);

   intel_region_unmap(intel, dst);
   UNLOCK_HARDWARE(intel);
}
开发者ID:emcmanus,项目名称:FlashMesa3D,代码行数:37,代码来源:intel_regions.c

示例4: sisSpanRenderStart

void sisSpanRenderStart( GLcontext *ctx )
{
   sisContextPtr smesa = SIS_CONTEXT(ctx);

   SIS_FIREVERTICES(smesa);
   LOCK_HARDWARE();
   WaitEngIdle( smesa );
}
开发者ID:Multi2Sim,项目名称:m2s-bench-parsec-3.0-src,代码行数:8,代码来源:sis_span.c

示例5: i830FlushPrims

void i830FlushPrims( i830ContextPtr imesa )
{
   if (imesa->vertex_buffer) {
      LOCK_HARDWARE( imesa );
      i830FlushPrimsLocked( imesa );
      UNLOCK_HARDWARE( imesa );
   }
}
开发者ID:dikerex,项目名称:theqvd,代码行数:8,代码来源:i830_ioctl.c

示例6: i810DmaFinish

/* This waits for *everybody* to finish rendering -- overkill.
 */
void i810DmaFinish( i810ContextPtr imesa  ) 
{
   I810_FIREVERTICES( imesa );

   LOCK_HARDWARE( imesa );
   i810RegetLockQuiescent( imesa );
   UNLOCK_HARDWARE( imesa );
}
开发者ID:GunioRobot,项目名称:mesa-7.10.2-PS3,代码行数:10,代码来源:i810ioctl.c

示例7: nouveauSpanRenderStart

static void
nouveauSpanRenderStart( GLcontext *ctx )
{
   nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx);
   FIRE_RING();
   LOCK_HARDWARE(nmesa);
   nouveauWaitForIdleLocked( nmesa );
}
开发者ID:Starlink,项目名称:mesa,代码行数:8,代码来源:nouveau_span.c

示例8: ffbDDFinish

static void ffbDDFinish(GLcontext *ctx)
{
	ffbContextPtr fmesa = FFB_CONTEXT(ctx);

	LOCK_HARDWARE(fmesa);
	FFBWait(fmesa, fmesa->regs);
	UNLOCK_HARDWARE(fmesa);
}
开发者ID:DavidGriffith,项目名称:finx,代码行数:8,代码来源:ffb_dd.c

示例9: intelSpanRenderStart

/* Move locking out to get reasonable span performance.
 */
void intelSpanRenderStart( GLcontext *ctx )
{
   intelContextPtr intel = INTEL_CONTEXT(ctx);

   intelFlush(&intel->ctx);
   LOCK_HARDWARE(intel);
   intelWaitForIdle(intel);
}
开发者ID:DavidGriffith,项目名称:finx,代码行数:10,代码来源:intel_span.c

示例10: radeonSpanRenderStart

static void radeonSpanRenderStart( GLcontext *ctx )
{
   radeonContextPtr rmesa = RADEON_CONTEXT( ctx );
   //   R300_FIREVERTICES( rmesa );
   // old code has flush
   r300Flush(ctx);
   LOCK_HARDWARE( rmesa );
   radeonWaitForIdleLocked( rmesa );
}
开发者ID:Magister,项目名称:x11rdp_xorg71,代码行数:9,代码来源:radeon_span.c

示例11: radeonUploadTexImages

int radeonUploadTexImages( radeonContextPtr rmesa, radeonTexObjPtr t, GLuint face )
{
   const int numLevels = t->base.lastLevel - t->base.firstLevel + 1;

   if ( RADEON_DEBUG & (DEBUG_TEXTURE|DEBUG_IOCTL) ) {
      fprintf( stderr, "%s( %p, %p ) sz=%d lvls=%d-%d\n", __FUNCTION__,
	       (void *)rmesa->glCtx, (void *)t->base.tObj, t->base.totalSize,
	       t->base.firstLevel, t->base.lastLevel );
   }

   if ( !t || t->base.totalSize == 0 )
      return 0;

   LOCK_HARDWARE( rmesa );

   if ( t->base.memBlock == NULL ) {
      int heap;

      heap = driAllocateTexture( rmesa->texture_heaps, rmesa->nr_heaps,
				 (driTextureObject *) t );
      if ( heap == -1 ) {
	 UNLOCK_HARDWARE( rmesa );
	 return -1;
      }

      /* Set the base offset of the texture image */
      t->bufAddr = rmesa->radeonScreen->texOffset[heap] 
	   + t->base.memBlock->ofs;
      t->pp_txoffset = t->bufAddr;


      /* Mark this texobj as dirty on all units:
       */
      t->dirty_state = TEX_ALL;
   }


   /* Let the world know we've used this memory recently.
    */
   driUpdateTextureLRU( (driTextureObject *) t );
   UNLOCK_HARDWARE( rmesa );


   /* Upload any images that are new */
   if (t->base.dirty_images[face]) {
      int i;
      for ( i = 0 ; i < numLevels ; i++ ) {
         if ( (t->base.dirty_images[face] & (1 << (i+t->base.firstLevel))) != 0 ) {
            uploadSubImage( rmesa, t, i, 0, 0, t->image[face][i].width,
			    t->image[face][i].height, face );
         }
      }
      t->base.dirty_images[face] = 0;
   }

   return 0;
}
开发者ID:BackupTheBerlios,项目名称:dri-ex-svn,代码行数:57,代码来源:radeon_texmem.c

示例12: ffbBufferSize

static void ffbBufferSize(GLframebuffer *buffer, GLuint *width, GLuint *height)
{
	GET_CURRENT_CONTEXT(ctx);
	ffbContextPtr fmesa = FFB_CONTEXT(ctx);

	LOCK_HARDWARE(fmesa);
	*width = fmesa->driDrawable->w;
	*height = fmesa->driDrawable->h;
	UNLOCK_HARDWARE(fmesa);
}
开发者ID:DavidGriffith,项目名称:finx,代码行数:10,代码来源:ffb_dd.c

示例13: sisFinish

/* Make sure all commands have been sent to the hardware and have
 * completed processing.
 */
static void
sisFinish( GLcontext *ctx )
{
   sisContextPtr smesa = SIS_CONTEXT(ctx);

   SIS_FIREVERTICES(smesa);
   LOCK_HARDWARE();
   WaitEngIdle( smesa );
   UNLOCK_HARDWARE();
}
开发者ID:Multi2Sim,项目名称:m2s-bench-parsec-3.0-src,代码行数:13,代码来源:sis_dd.c

示例14: ffbSWRenderStart

/* Even when doing full software rendering we need to
 * wrap render{start,finish} so that the hardware is kept
 * in sync (because multipass rendering changes the write
 * buffer etc.)
 */
static void ffbSWRenderStart(GLcontext *ctx)
{
	ffbContextPtr fmesa = FFB_CONTEXT(ctx);

	LOCK_HARDWARE(fmesa);
	fmesa->hw_locked = 1;

	if (fmesa->state_dirty != 0)
		ffbSyncHardware(fmesa);
}
开发者ID:aosm,项目名称:X11,代码行数:15,代码来源:ffb_tris.c

示例15: mach64DDFlush

/* Send all commands to the hardware.  If vertex buffers or indirect
 * buffers are in use, then we need to make sure they are sent to the
 * hardware.  All commands that are normally sent to the ring are
 * already considered `flushed'.
 */
static void mach64DDFlush( GLcontext *ctx )
{
   mach64ContextPtr mmesa = MACH64_CONTEXT(ctx);

   LOCK_HARDWARE( mmesa );
   FLUSH_DMA_LOCKED( mmesa );
   UNLOCK_HARDWARE( mmesa );

#if ENABLE_PERF_BOXES
   if ( mmesa->boxes ) {
      LOCK_HARDWARE( mmesa );
      mach64PerformanceBoxesLocked( mmesa );
      UNLOCK_HARDWARE( mmesa );
   }

   /* Log the performance counters if necessary */
   mach64PerformanceCounters( mmesa );
#endif
}
开发者ID:Multi2Sim,项目名称:m2s-bench-parsec-3.0-src,代码行数:24,代码来源:mach64_dd.c


注:本文中的LOCK_HARDWARE函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。