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


C++ DIRTY函数代码示例

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


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

示例1: crStateFogCoordPointerEXT

void STATE_APIENTRY crStateFogCoordPointerEXT(GLenum type, GLsizei stride, const GLvoid *p) 
{
	CRContext *g = GetCurrentContext();
	CRClientState *c = &(g->client);
	CRStateBits *sb = GetCurrentBits();
	CRClientBits *cb = &(sb->client);

	FLUSH();

	if (type != GL_BYTE && type != GL_UNSIGNED_BYTE &&
			type != GL_SHORT && type != GL_UNSIGNED_SHORT &&
			type != GL_INT && type != GL_UNSIGNED_INT &&
			type != GL_FLOAT && type != GL_DOUBLE)
	{
		crStateError(__LINE__, __FILE__, GL_INVALID_ENUM, "glFogCoordPointerEXT: invalid type: 0x%x", type);
		return;
	}
	if (stride < 0) 
	{
		crStateError(__LINE__, __FILE__, GL_INVALID_VALUE, "glFogCoordPointerEXT: stride was negative: %d", stride);
		return;
	}

	crStateClientSetPointer(&(c->array.f), 1, type, GL_FALSE, stride, p);
	DIRTY(cb->dirty, g->neg_bitid);
	DIRTY(cb->clientPointer, g->neg_bitid);
	DIRTY(cb->f, g->neg_bitid);
}
开发者ID:L3oV1nc3,项目名称:VMGL,代码行数:28,代码来源:state_client.c

示例2: VAR_MATCH

static inline int VAR_MATCH(struct fb_var_screeninfo *x, struct fb_var_screeninfo *y)
{
	return (!DIRTY(bits_per_pixel) && !DIRTY(xres)
		&& !DIRTY(yres) && !DIRTY(xres_virtual)
		&& !DIRTY(yres_virtual)
		&& !DIRTY_CMAP(red) && !DIRTY_CMAP(green) && !DIRTY_CMAP(blue));
}
开发者ID:debbiche,项目名称:android_kernel_huawei_p8,代码行数:7,代码来源:controlfb.c

示例3: gen8_draw_sf

static void
gen8_draw_sf(struct ilo_render *r,
             const struct ilo_state_vector *vec,
             struct ilo_render_draw_session *session)
{
   /* 3DSTATE_RASTER */
   if (DIRTY(RASTERIZER)) {
      gen8_3DSTATE_RASTER(r->builder, (vec->rasterizer) ?
            &vec->rasterizer->sf : NULL);
   }

   /* 3DSTATE_SBE */
   if (DIRTY(RASTERIZER) || DIRTY(FS)) {
      gen8_3DSTATE_SBE(r->builder, vec->fs, (vec->rasterizer) ?
            vec->rasterizer->state.sprite_coord_mode : 0);
   }

   /* 3DSTATE_SBE_SWIZ */
   if (DIRTY(FS))
      gen8_3DSTATE_SBE_SWIZ(r->builder, vec->fs);

   /* 3DSTATE_SF */
   if (DIRTY(RASTERIZER)) {
      gen8_3DSTATE_SF(r->builder, (vec->rasterizer) ?
            &vec->rasterizer->sf : NULL);
   }
}
开发者ID:freedesktop-unofficial-mirror,项目名称:mesa__mesa,代码行数:27,代码来源:ilo_render_gen8.c

示例4: gen6_draw_clip

void
gen6_draw_clip(struct ilo_render *r,
               const struct ilo_state_vector *vec,
               struct ilo_render_draw_session *session)
{
   /* 3DSTATE_CLIP */
   if (DIRTY(RASTERIZER) || DIRTY(FS) || DIRTY(VIEWPORT) || DIRTY(FB)) {
      bool enable_guardband = true;
      unsigned i;

      /*
       * Gen8+ has viewport extent test.  Guard band test can be enabled on
       * prior Gens only when the viewport is larger than the framebuffer,
       * unless we emulate viewport extent test on them.
       */
      if (ilo_dev_gen(r->dev) < ILO_GEN(8)) {
         for (i = 0; i < vec->viewport.count; i++) {
            const struct ilo_viewport_cso *vp = &vec->viewport.cso[i];

            if (vp->min_x > 0.0f || vp->max_x < vec->fb.state.width ||
                vp->min_y > 0.0f || vp->max_y < vec->fb.state.height) {
               enable_guardband = false;
               break;
            }
         }
      }

      gen6_3DSTATE_CLIP(r->builder, vec->rasterizer,
            vec->fs, enable_guardband, 1);
   }
}
开发者ID:ashmew2,项目名称:kolibriosSVN,代码行数:31,代码来源:ilo_render_gen6.c

示例5: crStateTexCoordPointer

void STATE_APIENTRY crStateTexCoordPointer(GLint size, GLenum type, 
		GLsizei stride, const GLvoid *p) 
{
	CRContext *g = GetCurrentContext();
	CRClientState *c = &(g->client);
	CRStateBits *sb = GetCurrentBits();
	CRClientBits *cb = &(sb->client);

	FLUSH();

	if (size != 1 && size != 2 && size != 3 && size != 4)
	{
		crStateError(__LINE__, __FILE__, GL_INVALID_VALUE, "glTexCoordPointer: invalid size: %d", size);
		return;
	}
	if (type != GL_SHORT && type != GL_INT &&
			type != GL_FLOAT && type != GL_DOUBLE)
	{
		crStateError(__LINE__, __FILE__, GL_INVALID_ENUM, "glTexCoordPointer: invalid type: 0x%x", type);
		return;
	}
	if (stride < 0) 
	{
		crStateError(__LINE__, __FILE__, GL_INVALID_VALUE, "glTexCoordPointer: stride was negative: %d", stride);
		return;
	}

	crStateClientSetPointer(&(c->array.t[c->curClientTextureUnit]), size, type, GL_FALSE, stride, p);
	DIRTY(cb->dirty, g->neg_bitid);
	DIRTY(cb->clientPointer, g->neg_bitid);
	DIRTY(cb->t[c->curClientTextureUnit], g->neg_bitid);
}
开发者ID:L3oV1nc3,项目名称:VMGL,代码行数:32,代码来源:state_client.c

示例6: crStatePolygonStipple

void STATE_APIENTRY crStatePolygonStipple (PCRStateTracker pState, const GLubyte *p) 
{
    CRContext *g = GetCurrentContext(pState);
    CRPolygonState *poly = &(g->polygon);
        CRStateBits *sb = GetCurrentBits(pState);
    CRPolygonBits *pb = &(sb->polygon);

    if (g->current.inBeginEnd) 
    {
        crStateError(pState, __LINE__, __FILE__, GL_INVALID_OPERATION,
                "glPolygonStipple called in begin/end");
        return;
    }

    FLUSH();

    if (!p && !crStateIsBufferBound(pState, GL_PIXEL_UNPACK_BUFFER_ARB))
    {
        crDebug("Void pointer passed to PolygonStipple");
        return;
    }

    /** @todo track mask if buffer is bound?*/
    if (!crStateIsBufferBound(pState, GL_PIXEL_UNPACK_BUFFER_ARB))
    {
        crMemcpy((char*)poly->stipple, (char*)p, 128);
    }

    DIRTY(pb->dirty, g->neg_bitid);
    DIRTY(pb->stipple, g->neg_bitid);
}
开发者ID:mdaniel,项目名称:virtualbox-org-svn-vbox-trunk,代码行数:31,代码来源:state_polygon.c

示例7: crStatePointSize

void STATE_APIENTRY crStatePointSize(GLfloat size) 
{
	CRContext *g = GetCurrentContext();
	CRPointState *p = &(g->point);
	CRStateBits *sb = GetCurrentBits();
	CRPointBits *pb = &(sb->point);

	if (g->current.inBeginEnd)
	{
		crStateError(__LINE__, __FILE__, GL_INVALID_OPERATION, "glPointSize called in begin/end");
		return;
	}

	FLUSH();

	if (size <= 0.0f) 
	{
		crStateError(__LINE__, __FILE__, GL_INVALID_VALUE, "glPointSize called with size <= 0.0: %f", size);
		return;
	}
		
	p->pointSize = size;
	DIRTY(pb->size, g->neg_bitid);
	DIRTY(pb->dirty, g->neg_bitid);
}
开发者ID:MadHacker217,项目名称:VirtualBox-OSE,代码行数:25,代码来源:state_point.c

示例8: gen6_draw_vf

void
gen6_draw_vf(struct ilo_render *r,
             const struct ilo_state_vector *vec,
             struct ilo_render_draw_session *session)
{
   if (ilo_dev_gen(r->dev) >= ILO_GEN(7.5)) {
      /* 3DSTATE_INDEX_BUFFER */
      if (DIRTY(IB) || r->batch_bo_changed) {
         gen6_3DSTATE_INDEX_BUFFER(r->builder,
               &vec->ib, false);
      }

      /* 3DSTATE_VF */
      if (session->primitive_restart_changed) {
         gen75_3DSTATE_VF(r->builder, vec->draw->primitive_restart,
               vec->draw->restart_index);
      }
   }
   else {
      /* 3DSTATE_INDEX_BUFFER */
      if (DIRTY(IB) || session->primitive_restart_changed ||
          r->batch_bo_changed) {
         gen6_3DSTATE_INDEX_BUFFER(r->builder,
               &vec->ib, vec->draw->primitive_restart);
      }
   }

   /* 3DSTATE_VERTEX_BUFFERS */
   if (DIRTY(VB) || DIRTY(VE) || r->batch_bo_changed)
      gen6_3DSTATE_VERTEX_BUFFERS(r->builder, vec->ve, &vec->vb);

   /* 3DSTATE_VERTEX_ELEMENTS */
   if (DIRTY(VE))
      gen6_3DSTATE_VERTEX_ELEMENTS(r->builder, vec->ve);
}
开发者ID:John-Gee,项目名称:Mesa-3D,代码行数:35,代码来源:ilo_render_gen6.c

示例9: crStateFrontFace

void STATE_APIENTRY crStateFrontFace (PCRStateTracker pState, GLenum mode) 
{
    CRContext *g = GetCurrentContext(pState);
    CRPolygonState *p = &(g->polygon);
        CRStateBits *sb = GetCurrentBits(pState);
    CRPolygonBits *pb = &(sb->polygon);

    if (g->current.inBeginEnd) 
    {
        crStateError(pState, __LINE__, __FILE__, GL_INVALID_OPERATION,
                "glFrontFace called in begin/end");
        return;
    }

    FLUSH();

    if (mode != GL_CW && mode != GL_CCW)
    {
        crStateError(pState, __LINE__, __FILE__, GL_INVALID_ENUM,
                "glFrontFace called with bogus mode: 0x%x", mode);
        return;
    }

    p->frontFace = mode;
    DIRTY(pb->mode, g->neg_bitid);
    DIRTY(pb->dirty, g->neg_bitid);
}
开发者ID:mdaniel,项目名称:virtualbox-org-svn-vbox-trunk,代码行数:27,代码来源:state_polygon.c

示例10: gen6_draw_clip

void
gen6_draw_clip(struct ilo_render *r,
               const struct ilo_state_vector *vec,
               struct ilo_render_draw_session *session)
{
   /* 3DSTATE_CLIP */
   if (DIRTY(RASTERIZER) || DIRTY(FS) || DIRTY(VIEWPORT) || DIRTY(FB)) {
      bool enable_guardband = true;
      unsigned i;

      /*
       * We do not do 2D clipping yet.  Guard band test should only be enabled
       * when the viewport is larger than the framebuffer.
       */
      for (i = 0; i < vec->viewport.count; i++) {
         const struct ilo_viewport_cso *vp = &vec->viewport.cso[i];

         if (vp->min_x > 0.0f || vp->max_x < vec->fb.state.width ||
             vp->min_y > 0.0f || vp->max_y < vec->fb.state.height) {
            enable_guardband = false;
            break;
         }
      }

      gen6_3DSTATE_CLIP(r->builder, vec->rasterizer,
            vec->fs, enable_guardband, 1);
   }
}
开发者ID:John-Gee,项目名称:Mesa-3D,代码行数:28,代码来源:ilo_render_gen6.c

示例11: crStateClearAccum

void STATE_APIENTRY crStateClearAccum (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) 
{
    CRContext *g = GetCurrentContext();
    CRBufferState *b = &(g->buffer);
    CRStateBits *sp = GetCurrentBits();
    CRBufferBits *bb = &(sp->buffer);

    if (g->current.inBeginEnd)
    {
        crStateError(__LINE__, __FILE__, GL_INVALID_OPERATION, "glClearAccum called in begin/end");
        return;
    }
    
    FLUSH();

    if (red < -1.0f) red = 0.0f;
    if (red > 1.0f) red = 1.0f;
    if (green < -1.0f) green = 0.0f;
    if (green > 1.0f) green = 1.0f;
    if (blue < -1.0f) blue = 0.0f;
    if (blue > 1.0f) blue = 1.0f;
    if (alpha < -1.0f) alpha = 0.0f;
    if (alpha > 1.0f) alpha = 1.0f;

    b->accumClearValue.r = red;
    b->accumClearValue.g = green;
    b->accumClearValue.b = blue;
    b->accumClearValue.a = alpha;
    DIRTY(bb->dirty, g->neg_bitid);
    DIRTY(bb->clearAccum, g->neg_bitid);
}
开发者ID:MadHacker217,项目名称:VirtualBox-OSE,代码行数:31,代码来源:state_buffer.c

示例12: gen6_draw_wm

static void
gen6_draw_wm(struct ilo_render *r,
             const struct ilo_state_vector *vec,
             struct ilo_render_draw_session *session)
{
   /* 3DSTATE_CONSTANT_PS */
   if (session->pcb_fs_changed) {
      gen6_3DSTATE_CONSTANT_PS(r->builder,
            &r->state.wm.PUSH_CONSTANT_BUFFER,
            &r->state.wm.PUSH_CONSTANT_BUFFER_size,
            1);
   }

   /* 3DSTATE_WM */
   if (DIRTY(FS) || DIRTY(BLEND) || DIRTY(DSA) ||
       DIRTY(RASTERIZER) || r->instruction_bo_changed) {
      const bool dual_blend = vec->blend->dual_blend;
      const bool cc_may_kill = (vec->dsa->dw_alpha ||
                                vec->blend->alpha_to_coverage);

      if (ilo_dev_gen(r->dev) == ILO_GEN(6) && r->hw_ctx_changed)
         gen6_wa_pre_3dstate_wm_max_threads(r);

      gen6_3DSTATE_WM(r->builder, vec->fs,
            vec->rasterizer, dual_blend, cc_may_kill);
   }
}
开发者ID:John-Gee,项目名称:Mesa-3D,代码行数:27,代码来源:ilo_render_gen6.c

示例13: gen6_draw_wm_multisample

static void
gen6_draw_wm_multisample(struct ilo_render *r,
                         const struct ilo_state_vector *vec,
                         struct ilo_render_draw_session *session)
{
   /* 3DSTATE_MULTISAMPLE and 3DSTATE_SAMPLE_MASK */
   if (DIRTY(SAMPLE_MASK) || DIRTY(FB)) {
      const uint32_t *packed_sample_pos;

      packed_sample_pos = (vec->fb.num_samples > 1) ?
         &r->packed_sample_position_4x : &r->packed_sample_position_1x;

      if (ilo_dev_gen(r->dev) == ILO_GEN(6)) {
         gen6_wa_pre_non_pipelined(r);
         gen6_wa_pre_3dstate_multisample(r);
      }

      gen6_3DSTATE_MULTISAMPLE(r->builder,
            vec->fb.num_samples, packed_sample_pos,
            vec->rasterizer->state.half_pixel_center);

      gen6_3DSTATE_SAMPLE_MASK(r->builder,
            (vec->fb.num_samples > 1) ? vec->sample_mask : 0x1);
   }
}
开发者ID:John-Gee,项目名称:Mesa-3D,代码行数:25,代码来源:ilo_render_gen6.c

示例14: gen6_draw_wm_raster

void
gen6_draw_wm_raster(struct ilo_render *r,
                    const struct ilo_state_vector *vec,
                    struct ilo_render_draw_session *session)
{
   /* 3DSTATE_POLY_STIPPLE_PATTERN and 3DSTATE_POLY_STIPPLE_OFFSET */
   if ((DIRTY(RASTERIZER) || DIRTY(POLY_STIPPLE)) &&
       vec->rasterizer->state.poly_stipple_enable) {
      if (ilo_dev_gen(r->dev) == ILO_GEN(6))
         gen6_wa_pre_non_pipelined(r);

      gen6_3DSTATE_POLY_STIPPLE_PATTERN(r->builder,
            &vec->poly_stipple);

      gen6_3DSTATE_POLY_STIPPLE_OFFSET(r->builder, 0, 0);
   }

   /* 3DSTATE_LINE_STIPPLE */
   if (DIRTY(RASTERIZER) && vec->rasterizer->state.line_stipple_enable) {
      if (ilo_dev_gen(r->dev) == ILO_GEN(6))
         gen6_wa_pre_non_pipelined(r);

      gen6_3DSTATE_LINE_STIPPLE(r->builder,
            vec->rasterizer->state.line_stipple_pattern,
            vec->rasterizer->state.line_stipple_factor + 1);
   }

   /* 3DSTATE_AA_LINE_PARAMETERS */
   if (DIRTY(RASTERIZER) && vec->rasterizer->state.line_smooth) {
      if (ilo_dev_gen(r->dev) == ILO_GEN(6))
         gen6_wa_pre_non_pipelined(r);

      gen6_3DSTATE_AA_LINE_PARAMETERS(r->builder);
   }
}
开发者ID:John-Gee,项目名称:Mesa-3D,代码行数:35,代码来源:ilo_render_gen6.c

示例15: crStateCullFace

void STATE_APIENTRY crStateCullFace(GLenum mode) 
{
	CRContext *g = GetCurrentContext();
	CRPolygonState *p = &(g->polygon);
        CRStateBits *sb = GetCurrentBits();
	CRPolygonBits *pb = &(sb->polygon);

	if (g->current.inBeginEnd) 
	{
		crStateError(__LINE__, __FILE__, GL_INVALID_OPERATION,
				"glCullFace called in begin/end");
		return;
	}

	FLUSH();

	if (mode != GL_FRONT && mode != GL_BACK && mode != GL_FRONT_AND_BACK)
	{
		crStateError(__LINE__, __FILE__, GL_INVALID_ENUM,
				"glCullFace called with bogus mode: 0x%x", mode);
		return;
	}

	p->cullFaceMode = mode;
	DIRTY(pb->mode, g->neg_bitid);
	DIRTY(pb->dirty, g->neg_bitid);
}
开发者ID:L3oV1nc3,项目名称:VMGL,代码行数:27,代码来源:state_polygon.c


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