• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ FLUSH_BATCH函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: mgaDDTexParameter

static void
mgaDDTexParameter( GLcontext *ctx, GLenum target,
		   struct gl_texture_object *tObj,
		   GLenum pname, const GLfloat *params )
{
   mgaContextPtr       mmesa = MGA_CONTEXT( ctx );
   mgaTextureObjectPtr t;

   t = (mgaTextureObjectPtr) tObj->DriverData;

   /* If we don't have a hardware texture, it will be automatically
    * created with current state before it is used, so we don't have
    * to do anything now 
    */

   if ( (t == NULL) ||
        (target != GL_TEXTURE_2D &&
         target != GL_TEXTURE_RECTANGLE_NV) ) {
      return;
   }

   switch (pname) {
   case GL_TEXTURE_MIN_FILTER:
      driSwapOutTextureObject( (driTextureObject *) t );
      /* FALLTHROUGH */
   case GL_TEXTURE_MAG_FILTER:
      FLUSH_BATCH(mmesa);
      mgaSetTexFilter( t, tObj->MinFilter, tObj->MagFilter );
      break;

   case GL_TEXTURE_WRAP_S:
   case GL_TEXTURE_WRAP_T:
      FLUSH_BATCH(mmesa);
      mgaSetTexWrapping(t,tObj->WrapS,tObj->WrapT);
      break;

   case GL_TEXTURE_BORDER_COLOR:
      FLUSH_BATCH(mmesa);
      mgaSetTexBorderColor(t, tObj->_BorderChan);
      break;

   case GL_TEXTURE_BASE_LEVEL:
   case GL_TEXTURE_MAX_LEVEL:
   case GL_TEXTURE_MIN_LOD:
   case GL_TEXTURE_MAX_LOD:
      /* This isn't the most efficient solution but there doesn't appear to
       * be a nice alternative.  Since there's no LOD clamping,
       * we just have to rely on loading the right subset of mipmap levels
       * to simulate a clamped LOD.
       */
      driSwapOutTextureObject( (driTextureObject *) t );
      break;

   default:
      return;
   }
}
开发者ID:aosm,项目名称:X11,代码行数:57,代码来源:mgatex.c


示例2: mach64DDTexEnv

static void mach64DDTexEnv( struct gl_context *ctx, GLenum target,
			    GLenum pname, const GLfloat *param )
{
   mach64ContextPtr mmesa = MACH64_CONTEXT(ctx);
#if 0
   struct gl_texture_unit *texUnit;
   GLubyte c[4];
#endif

   if ( MACH64_DEBUG & DEBUG_VERBOSE_API ) {
      fprintf( stderr, "%s( %s )\n",
	       __FUNCTION__, _mesa_lookup_enum_by_nr( pname ) );
   }

   switch ( pname ) {
   case GL_TEXTURE_ENV_MODE:
      FLUSH_BATCH( mmesa );
      mmesa->new_state |= MACH64_NEW_TEXTURE | MACH64_NEW_ALPHA;
      break;

#if 0
   case GL_TEXTURE_ENV_COLOR:
      texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit];
      CLAMPED_FLOAT_TO_UBYTE( c[0], texUnit->EnvColor[0] );
      CLAMPED_FLOAT_TO_UBYTE( c[1], texUnit->EnvColor[1] );
      CLAMPED_FLOAT_TO_UBYTE( c[2], texUnit->EnvColor[2] );
      CLAMPED_FLOAT_TO_UBYTE( c[3], texUnit->EnvColor[3] );
      mmesa->env_color = mach64PackColor( 32, c[0], c[1], c[2], c[3] );
      if ( mmesa->setup.constant_color_c != mmesa->env_color ) {
	 FLUSH_BATCH( mmesa );
	 mmesa->setup.constant_color_c = mmesa->env_color;

	 mmesa->new_state |= MACH64_NEW_TEXTURE;

	 /* More complex multitexture/multipass fallbacks for GL_BLEND
	  * can be done later, but this allows a single pass GL_BLEND
	  * in some cases (ie. Performer town demo).
	  */
	 mmesa->blend_flags &= ~MACH64_BLEND_ENV_COLOR;
	 if ( mmesa->env_color != 0x00000000 &&
	      mmesa->env_color != 0xff000000 &&
	      mmesa->env_color != 0x00ffffff &&
	      mmesa->env_color != 0xffffffff )) {	
	    mmesa->blend_flags |= MACH64_BLEND_ENV_COLOR;
	 }
      }
      break;
#endif

   default:
      return;
   }
开发者ID:GunioRobot,项目名称:mesa-7.10.2-PS3,代码行数:52,代码来源:mach64_tex.c


示例3: i915_fill_blit

void
i915_fill_blit(struct i915_context *i915,
               unsigned cpp,
               unsigned rgba_mask,
               unsigned short dst_pitch,
               struct i915_winsys_buffer *dst_buffer,
               unsigned dst_offset,
               short x, short y, 
               short w, short h, 
               unsigned color)
{
   unsigned BR13, CMD;


   I915_DBG(DBG_BLIT, "%s dst:buf(%p)/%d+%d %d,%d sz:%dx%d\n",
            __FUNCTION__, dst_buffer, dst_pitch, dst_offset, x, y, w, h);

   if(!i915_winsys_validate_buffers(i915->batch, &dst_buffer, 1)) {
      FLUSH_BATCH(NULL);
      assert(i915_winsys_validate_buffers(i915->batch, &dst_buffer, 1));
   }

   switch (cpp) {
   case 1:
   case 2:
   case 3:
      BR13 = (((int) dst_pitch) & 0xffff) |
         (0xF0 << 16) | (1 << 24);
      CMD = XY_COLOR_BLT_CMD;
      break;
   case 4:
      BR13 = (((int) dst_pitch) & 0xffff) |
         (0xF0 << 16) | (1 << 24) | (1 << 25);
      CMD = (XY_COLOR_BLT_CMD | rgba_mask);
      break;
   default:
      return;
   }

   if (!BEGIN_BATCH(6)) {
      FLUSH_BATCH(NULL);
      assert(BEGIN_BATCH(6));
   }
   OUT_BATCH(CMD);
   OUT_BATCH(BR13);
   OUT_BATCH((y << 16) | x);
   OUT_BATCH(((y + h) << 16) | (x + w));
   OUT_RELOC_FENCED(dst_buffer, I915_USAGE_2D_TARGET, dst_offset);
   OUT_BATCH(color);

   i915_set_flush_dirty(i915, I915_FLUSH_CACHE);
}
开发者ID:ChillyWillyGuru,项目名称:RSXGL,代码行数:52,代码来源:i915_blit.c


示例4: r128TexParameter

static void r128TexParameter( GLcontext *ctx, GLenum target,
                              struct gl_texture_object *tObj,
                              GLenum pname, const GLfloat *params )
{
   r128ContextPtr rmesa = R128_CONTEXT(ctx);
   r128TexObjPtr t = (r128TexObjPtr)tObj->DriverData;

   if ( R128_DEBUG & DEBUG_VERBOSE_API ) {
      fprintf( stderr, "%s( %s )\n",
	       __FUNCTION__, _mesa_lookup_enum_by_nr( pname ) );
   }

   if ( ( target != GL_TEXTURE_2D ) && ( target != GL_TEXTURE_1D ) )
      return;

   switch ( pname ) {
   case GL_TEXTURE_MIN_FILTER:
   case GL_TEXTURE_MAG_FILTER:
      if ( t->base.bound ) FLUSH_BATCH( rmesa );
      r128SetTexFilter( t, tObj->MinFilter, tObj->MagFilter );
      break;

   case GL_TEXTURE_WRAP_S:
   case GL_TEXTURE_WRAP_T:
      if ( t->base.bound ) FLUSH_BATCH( rmesa );
      r128SetTexWrap( t, tObj->WrapS, tObj->WrapT );
      break;

   case GL_TEXTURE_BORDER_COLOR:
      if ( t->base.bound ) FLUSH_BATCH( rmesa );
      r128SetTexBorderColor( t, tObj->BorderColor.f );
      break;

   case GL_TEXTURE_BASE_LEVEL:
   case GL_TEXTURE_MAX_LEVEL:
   case GL_TEXTURE_MIN_LOD:
   case GL_TEXTURE_MAX_LOD:
      /* This isn't the most efficient solution but there doesn't appear to
       * be a nice alternative for R128.  Since there's no LOD clamping,
       * we just have to rely on loading the right subset of mipmap levels
       * to simulate a clamped LOD.
       */
      if ( t->base.bound ) FLUSH_BATCH( rmesa );
      driSwapOutTextureObject( (driTextureObject *) t );
      break;

   default:
      return;
   }
}
开发者ID:CPFDSoftware-Tony,项目名称:gmv,代码行数:50,代码来源:r128_tex.c


示例5: i915_fill_blit

void
i915_fill_blit(struct i915_context *i915,
               unsigned cpp,
               unsigned short dst_pitch,
               struct intel_buffer *dst_buffer,
               unsigned dst_offset,
               short x, short y, 
               short w, short h, 
               unsigned color)
{
   unsigned BR13, CMD;


   I915_DBG(i915,
      "%s dst:buf(%p)/%d+%d %d,%d sz:%dx%d\n",
      __FUNCTION__,
      dst_buffer, dst_pitch, dst_offset, x, y, w, h);

   switch (cpp) {
   case 1:
   case 2:
   case 3:
      BR13 = (((int) dst_pitch) & 0xffff) |
         (0xF0 << 16) | (1 << 24);
      CMD = XY_COLOR_BLT_CMD;
      break;
   case 4:
      BR13 = (((int) dst_pitch) & 0xffff) |
         (0xF0 << 16) | (1 << 24) | (1 << 25);
      CMD = (XY_COLOR_BLT_CMD | XY_COLOR_BLT_WRITE_ALPHA |
             XY_COLOR_BLT_WRITE_RGB);
      break;
   default:
      return;
   }

   if (!BEGIN_BATCH(6, 1)) {
      FLUSH_BATCH(NULL);
      assert(BEGIN_BATCH(6, 1));
   }
   OUT_BATCH(CMD);
   OUT_BATCH(BR13);
   OUT_BATCH((y << 16) | x);
   OUT_BATCH(((y + h) << 16) | (x + w));
   OUT_RELOC(dst_buffer, INTEL_USAGE_2D_TARGET, dst_offset);
   OUT_BATCH(color);
   FLUSH_BATCH(NULL);
}
开发者ID:CPFDSoftware-Tony,项目名称:gmv,代码行数:48,代码来源:i915_blit.c


示例6: tdfxDDStencilMask

static void tdfxDDStencilMask( GLcontext *ctx, GLuint mask )
{
   tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx);

   FLUSH_BATCH( fxMesa );
   fxMesa->new_state |= TDFX_NEW_STENCIL;
}
开发者ID:BackupTheBerlios,项目名称:dri-ex-svn,代码行数:7,代码来源:tdfx_state.c


示例7: mgaDDDrawBuffer

static void mgaDDDrawBuffer(GLcontext *ctx, GLenum mode )
{
   mgaContextPtr mmesa = MGA_CONTEXT(ctx);

   FLUSH_BATCH( mmesa );

   /*
    * _DrawDestMask is easier to cope with than <mode>.
    */
   switch ( ctx->Color._DrawDestMask[0] ) {
   case DD_FRONT_LEFT_BIT:
      mmesa->setup.dstorg = mmesa->mgaScreen->frontOffset;
      mmesa->dirty |= MGA_UPLOAD_CONTEXT;
      mmesa->draw_buffer = MGA_FRONT;
      mgaXMesaSetFrontClipRects( mmesa );
      FALLBACK( ctx, MGA_FALLBACK_DRAW_BUFFER, GL_FALSE );
      break;
   case DD_BACK_LEFT_BIT:
      mmesa->setup.dstorg = mmesa->mgaScreen->backOffset;
      mmesa->draw_buffer = MGA_BACK;
      mmesa->dirty |= MGA_UPLOAD_CONTEXT;
      mgaXMesaSetBackClipRects( mmesa );
      FALLBACK( ctx, MGA_FALLBACK_DRAW_BUFFER, GL_FALSE );
      break;
   default:
      /* GL_NONE or GL_FRONT_AND_BACK or stereo left&right, etc */
      FALLBACK( ctx, MGA_FALLBACK_DRAW_BUFFER, GL_TRUE );
      return;
   }

   /* We want to update the s/w rast state too so that r200SetBuffer()
    * gets called.
    */
   _swrast_DrawBuffer(ctx, mode);
}
开发者ID:BackupTheBerlios,项目名称:dri-ex-svn,代码行数:35,代码来源:mgastate.c


示例8: mgaFallback

void mgaFallback( GLcontext *ctx, GLuint bit, GLboolean mode )
{
   TNLcontext *tnl = TNL_CONTEXT(ctx);
   mgaContextPtr mmesa = MGA_CONTEXT(ctx);
   GLuint oldfallback = mmesa->Fallback;

   if (mode) {
      mmesa->Fallback |= bit;
      if (oldfallback == 0) {
	 FLUSH_BATCH(mmesa);
	 _swsetup_Wakeup( ctx );
	 mmesa->RenderIndex = ~0;
         if (MGA_DEBUG & DEBUG_VERBOSE_FALLBACK) {
            fprintf(stderr, "MGA begin rasterization fallback: 0x%x %s\n",
                    bit, getFallbackString(bit));
         }
      }
   }
   else {
      mmesa->Fallback &= ~bit;
      if (oldfallback == bit) {
	 _swrast_flush( ctx );
	 tnl->Driver.Render.Start = mgaCheckTexSizes;
	 tnl->Driver.Render.PrimitiveNotify = mgaRenderPrimitive;
	 tnl->Driver.Render.Finish = mgaRenderFinish;
	 tnl->Driver.Render.BuildVertices = mgaBuildVertices;
	 mmesa->NewGLState |= (_MGA_NEW_RENDERSTATE |
			       _MGA_NEW_RASTERSETUP);
         if (MGA_DEBUG & DEBUG_VERBOSE_FALLBACK) {
            fprintf(stderr, "MGA end rasterization fallback: 0x%x %s\n",
                    bit, getFallbackString(bit));
         }
      }
   }
}
开发者ID:astrofimov,项目名称:vgallium,代码行数:35,代码来源:mgatris.c


示例9: gammaDDFrontFace

static void gammaDDFrontFace( GLcontext *ctx, GLenum mode )
{
   gammaContextPtr gmesa = GAMMA_CONTEXT(ctx);

   FLUSH_BATCH( gmesa );
   gmesa->new_state |= GAMMA_NEW_CULL;
}
开发者ID:DavidGriffith,项目名称:finx,代码行数:7,代码来源:gamma_state.c


示例10: gammaDDFogfv

static void gammaDDFogfv( GLcontext *ctx, GLenum pname, const GLfloat *param )
{
   gammaContextPtr gmesa = GAMMA_CONTEXT(ctx);

   FLUSH_BATCH( gmesa );
   gmesa->new_state |= GAMMA_NEW_FOG;
}
开发者ID:DavidGriffith,项目名称:finx,代码行数:7,代码来源:gamma_state.c


示例11: gammaDDDepthMask

static void gammaDDDepthMask( GLcontext *ctx, GLboolean flag )
{
   gammaContextPtr gmesa = GAMMA_CONTEXT(ctx);

   FLUSH_BATCH( gmesa );
   gmesa->new_state |= GAMMA_NEW_DEPTH;
}
开发者ID:DavidGriffith,项目名称:finx,代码行数:7,代码来源:gamma_state.c


示例12: gammaDDDepthFunc

static void gammaDDDepthFunc( GLcontext *ctx, GLenum func )
{
   gammaContextPtr gmesa = GAMMA_CONTEXT(ctx);

   FLUSH_BATCH( gmesa );
   gmesa->new_state |= GAMMA_NEW_DEPTH;
}
开发者ID:DavidGriffith,项目名称:finx,代码行数:7,代码来源:gamma_state.c


示例13: 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


示例14: tdfxDDFrontFace

static void tdfxDDFrontFace( GLcontext *ctx, GLenum mode )
{
   tdfxContextPtr fxMesa = TDFX_CONTEXT( ctx );

   FLUSH_BATCH( fxMesa );
   fxMesa->new_state |= TDFX_NEW_CULL;
}
开发者ID:AchironOS,项目名称:chromium.src,代码行数:7,代码来源:tdfx_state.c


示例15: tdfxDDScissor

static void
tdfxDDScissor(GLcontext * ctx, GLint x, GLint y, GLsizei w, GLsizei h)
{
   tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx);
   FLUSH_BATCH( fxMesa );
   fxMesa->new_state |= TDFX_NEW_CLIP;
}
开发者ID:AchironOS,项目名称:chromium.src,代码行数:7,代码来源:tdfx_state.c


示例16: tdfxDDColorMask

static void tdfxDDColorMask( GLcontext *ctx,
			     GLboolean r, GLboolean g,
			     GLboolean b, GLboolean a )
{
   tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx);

   FLUSH_BATCH( fxMesa );

   if ( fxMesa->Color.ColorMask[RCOMP] != r ||
	fxMesa->Color.ColorMask[GCOMP] != g ||
	fxMesa->Color.ColorMask[BCOMP] != b ||
	fxMesa->Color.ColorMask[ACOMP] != a ) {
      fxMesa->Color.ColorMask[RCOMP] = r;
      fxMesa->Color.ColorMask[GCOMP] = g;
      fxMesa->Color.ColorMask[BCOMP] = b;
      fxMesa->Color.ColorMask[ACOMP] = a;
      fxMesa->dirty |= TDFX_UPLOAD_COLOR_MASK;

      if (ctx->Visual.redBits < 8) {
         /* Can't do RGB colormasking in 16bpp mode. */
         /* We can completely ignore the alpha mask. */
	 FALLBACK( fxMesa, TDFX_FALLBACK_COLORMASK, (r != g || g != b) );
      }
   }
}
开发者ID:AchironOS,项目名称:chromium.src,代码行数:25,代码来源:tdfx_state.c


示例17: tdfxDDClearDepth

static void tdfxDDClearDepth( GLcontext *ctx, GLclampd d )
{
   tdfxContextPtr fxMesa = TDFX_CONTEXT( ctx );

   FLUSH_BATCH( fxMesa );
   fxMesa->new_state |= TDFX_NEW_DEPTH;
}
开发者ID:AchironOS,项目名称:chromium.src,代码行数:7,代码来源:tdfx_state.c


示例18: tdfxDDFogfv

static void tdfxDDFogfv( GLcontext *ctx, GLenum pname, const GLfloat *param )
{
   tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx);

   FLUSH_BATCH( fxMesa );
   fxMesa->new_state |= TDFX_NEW_FOG;

   switch (pname) {
      case GL_FOG_COORDINATE_SOURCE_EXT: {
         GLenum p = (GLenum)*param;
         if (p == GL_FOG_COORDINATE_EXT) {
            _swrast_allow_vertex_fog(ctx, GL_TRUE);
            _swrast_allow_pixel_fog(ctx, GL_FALSE);
            _tnl_allow_vertex_fog( ctx, GL_TRUE);
            _tnl_allow_pixel_fog( ctx, GL_FALSE);
         } else {
            _swrast_allow_vertex_fog(ctx, GL_FALSE);
            _swrast_allow_pixel_fog(ctx, GL_TRUE);
            _tnl_allow_vertex_fog( ctx, GL_FALSE);
            _tnl_allow_pixel_fog( ctx, GL_TRUE);
         }
         break;
      }
      default:
         ;
   }
}
开发者ID:AchironOS,项目名称:chromium.src,代码行数:27,代码来源:tdfx_state.c


示例19: tdfxDDDepthFunc

static void tdfxDDDepthFunc( GLcontext *ctx, GLenum func )
{
   tdfxContextPtr fxMesa = TDFX_CONTEXT( ctx );

   FLUSH_BATCH( fxMesa );
   fxMesa->new_state |= TDFX_NEW_DEPTH;
}
开发者ID:AchironOS,项目名称:chromium.src,代码行数:7,代码来源:tdfx_state.c


示例20: tdfxDDDrawBuffer

/* XXX support for separate read/draw buffers hasn't been tested */
static void tdfxDDDrawBuffer( GLcontext *ctx, GLenum mode )
{
   tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx);

   if ( TDFX_DEBUG & DEBUG_VERBOSE_API ) {
      fprintf( stderr, "%s()\n", __FUNCTION__ );
   }

   FLUSH_BATCH( fxMesa );

   if (ctx->DrawBuffer->_NumColorDrawBuffers > 1) {
      FALLBACK( fxMesa, TDFX_FALLBACK_DRAW_BUFFER, GL_TRUE );
      return;
   }

   switch ( ctx->DrawBuffer->_ColorDrawBufferIndexes[0] ) {
   case BUFFER_FRONT_LEFT:
      fxMesa->DrawBuffer = fxMesa->ReadBuffer = GR_BUFFER_FRONTBUFFER;
      fxMesa->new_state |= TDFX_NEW_RENDER;
      FALLBACK( fxMesa, TDFX_FALLBACK_DRAW_BUFFER, GL_FALSE );
      break;
   case BUFFER_BACK_LEFT:
      fxMesa->DrawBuffer = fxMesa->ReadBuffer = GR_BUFFER_BACKBUFFER;
      fxMesa->new_state |= TDFX_NEW_RENDER;
      FALLBACK( fxMesa, TDFX_FALLBACK_DRAW_BUFFER, GL_FALSE );
      break;
   case -1:
      FX_grColorMaskv( ctx, false4 );
      FALLBACK( fxMesa, TDFX_FALLBACK_DRAW_BUFFER, GL_FALSE );
      break;
   default:
      FALLBACK( fxMesa, TDFX_FALLBACK_DRAW_BUFFER, GL_TRUE );
      break;
   }
}
开发者ID:AchironOS,项目名称:chromium.src,代码行数:36,代码来源:tdfx_state.c



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ FLUSH_CURRENT函数代码示例发布时间:2022-05-30
下一篇:
C++ FLUSH函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap