Lines Matching refs:swrast

57    SWcontext *swrast = SWRAST_CONTEXT(ctx);  in _swrast_update_rasterflags()  local
64 if (swrast->_FogEnabled) rasterMask |= FOG_BIT; in _swrast_update_rasterflags()
172 SWcontext *swrast = SWRAST_CONTEXT(ctx); in _swrast_update_fog_hint() local
173 swrast->_PreferPixelFog = (!swrast->AllowVertexFog || in _swrast_update_fog_hint()
176 swrast->AllowPixelFog)); in _swrast_update_fog_hint()
187 SWcontext *swrast = SWRAST_CONTEXT(ctx); in _swrast_update_texture_env() local
190 swrast->_TextureCombinePrimary = GL_FALSE; in _swrast_update_texture_env()
198 swrast->_TextureCombinePrimary = GL_TRUE; in _swrast_update_texture_env()
202 swrast->_TextureCombinePrimary = GL_TRUE; in _swrast_update_texture_env()
218 SWcontext *swrast = SWRAST_CONTEXT(ctx); in _swrast_update_deferred_texture() local
221 swrast->_DeferredTexture = GL_FALSE; in _swrast_update_deferred_texture()
229 swrast->_DeferredTexture = GL_FALSE; in _swrast_update_deferred_texture()
232 swrast->_DeferredTexture = GL_FALSE; in _swrast_update_deferred_texture()
236 swrast->_DeferredTexture = GL_FALSE; in _swrast_update_deferred_texture()
239 swrast->_DeferredTexture = GL_TRUE; in _swrast_update_deferred_texture()
251 SWcontext *swrast = SWRAST_CONTEXT(ctx); in _swrast_update_fog_state() local
259 swrast->_FogEnabled = (!_swrast_use_fragment_program(ctx) && in _swrast_update_fog_state()
286 SWcontext *swrast = SWRAST_CONTEXT(ctx); in _swrast_update_specular_vertex_add() local
291 swrast->SpecularVertexAdd = (separateSpecular in _swrast_update_specular_vertex_add()
353 SWcontext *swrast = SWRAST_CONTEXT(ctx); in _swrast_validate_triangle() local
356 swrast->choose_triangle( ctx ); in _swrast_validate_triangle()
357 ASSERT(swrast->Triangle); in _swrast_validate_triangle()
359 if (swrast->SpecularVertexAdd) { in _swrast_validate_triangle()
361 swrast->SpecTriangle = swrast->Triangle; in _swrast_validate_triangle()
362 swrast->Triangle = _swrast_add_spec_terms_triangle; in _swrast_validate_triangle()
365 swrast->Triangle( ctx, v0, v1, v2 ); in _swrast_validate_triangle()
375 SWcontext *swrast = SWRAST_CONTEXT(ctx); in _swrast_validate_line() local
378 swrast->choose_line( ctx ); in _swrast_validate_line()
379 ASSERT(swrast->Line); in _swrast_validate_line()
381 if (swrast->SpecularVertexAdd) { in _swrast_validate_line()
382 swrast->SpecLine = swrast->Line; in _swrast_validate_line()
383 swrast->Line = _swrast_add_spec_terms_line; in _swrast_validate_line()
386 swrast->Line( ctx, v0, v1 ); in _swrast_validate_line()
396 SWcontext *swrast = SWRAST_CONTEXT(ctx); in _swrast_validate_point() local
399 swrast->choose_point( ctx ); in _swrast_validate_point()
401 if (swrast->SpecularVertexAdd) { in _swrast_validate_point()
402 swrast->SpecPoint = swrast->Point; in _swrast_validate_point()
403 swrast->Point = _swrast_add_spec_terms_point; in _swrast_validate_point()
406 swrast->Point( ctx, v0 ); in _swrast_validate_point()
419 SWcontext *swrast = SWRAST_CONTEXT(ctx); in _swrast_validate_blend_func() local
424 swrast->BlendFunc( ctx, n, mask, src, dst, chanType ); in _swrast_validate_blend_func()
437 SWcontext *swrast = SWRAST_CONTEXT(ctx); in _swrast_invalidate_state() local
440 swrast->NewState |= new_state; in _swrast_invalidate_state()
445 if (++swrast->StateChanges > 10) { in _swrast_invalidate_state()
446 swrast->InvalidateState = _swrast_sleep; in _swrast_invalidate_state()
447 swrast->NewState = ~0; in _swrast_invalidate_state()
451 if (new_state & swrast->InvalidateTriangleMask) in _swrast_invalidate_state()
452 swrast->Triangle = _swrast_validate_triangle; in _swrast_invalidate_state()
454 if (new_state & swrast->InvalidateLineMask) in _swrast_invalidate_state()
455 swrast->Line = _swrast_validate_line; in _swrast_invalidate_state()
457 if (new_state & swrast->InvalidatePointMask) in _swrast_invalidate_state()
458 swrast->Point = _swrast_validate_point; in _swrast_invalidate_state()
461 swrast->BlendFunc = _swrast_validate_blend_func; in _swrast_invalidate_state()
465 swrast->TextureSample[i] = NULL; in _swrast_invalidate_state()
472 SWcontext *swrast = SWRAST_CONTEXT(ctx); in _swrast_update_texture_samplers() local
475 if (!swrast) in _swrast_update_texture_samplers()
484 swrast->TextureSample[u] = in _swrast_update_texture_samplers()
498 SWcontext *swrast = SWRAST_CONTEXT(ctx); in _swrast_update_active_attribs() local
526 if (swrast->_FogEnabled) in _swrast_update_active_attribs()
532 swrast->_ActiveAttribMask = attribsMask; in _swrast_update_active_attribs()
539 swrast->_ActiveAttribs[num++] = i; in _swrast_update_active_attribs()
542 swrast->_InterpMode[i] = ctx->Light.ShadeModel; in _swrast_update_active_attribs()
544 swrast->_InterpMode[i] = GL_SMOOTH; in _swrast_update_active_attribs()
547 swrast->_NumActiveAttribs = num; in _swrast_update_active_attribs()
555 SWcontext *swrast = SWRAST_CONTEXT(ctx); in _swrast_validate_derived() local
557 if (swrast->NewState) { in _swrast_validate_derived()
558 if (swrast->NewState & _NEW_POLYGON) in _swrast_validate_derived()
561 if (swrast->NewState & (_NEW_HINT | _NEW_PROGRAM)) in _swrast_validate_derived()
564 if (swrast->NewState & _SWRAST_NEW_TEXTURE_ENV_MODE) in _swrast_validate_derived()
567 if (swrast->NewState & (_NEW_FOG | _NEW_PROGRAM)) in _swrast_validate_derived()
570 if (swrast->NewState & (_NEW_PROGRAM_CONSTANTS | _NEW_PROGRAM)) in _swrast_validate_derived()
571 _swrast_update_fragment_program( ctx, swrast->NewState ); in _swrast_validate_derived()
573 if (swrast->NewState & (_NEW_TEXTURE | _NEW_PROGRAM)) { in _swrast_validate_derived()
577 if (swrast->NewState & (_NEW_COLOR | _NEW_PROGRAM)) in _swrast_validate_derived()
580 if (swrast->NewState & _SWRAST_NEW_RASTERMASK) in _swrast_validate_derived()
583 if (swrast->NewState & (_NEW_DEPTH | in _swrast_validate_derived()
590 if (swrast->NewState & (_NEW_FOG | in _swrast_validate_derived()
596 swrast->NewState = 0; in _swrast_validate_derived()
597 swrast->StateChanges = 0; in _swrast_validate_derived()
598 swrast->InvalidateState = _swrast_invalidate_state; in _swrast_validate_derived()
723 SWcontext *swrast = (SWcontext *)CALLOC(sizeof(SWcontext)); in _swrast_CreateContext() local
746 if (!swrast) in _swrast_CreateContext()
749 swrast->NewState = ~0; in _swrast_CreateContext()
751 swrast->choose_point = _swrast_choose_point; in _swrast_CreateContext()
752 swrast->choose_line = _swrast_choose_line; in _swrast_CreateContext()
753 swrast->choose_triangle = _swrast_choose_triangle; in _swrast_CreateContext()
755 swrast->InvalidatePointMask = _SWRAST_NEW_POINT; in _swrast_CreateContext()
756 swrast->InvalidateLineMask = _SWRAST_NEW_LINE; in _swrast_CreateContext()
757 swrast->InvalidateTriangleMask = _SWRAST_NEW_TRIANGLE; in _swrast_CreateContext()
759 swrast->Point = _swrast_validate_point; in _swrast_CreateContext()
760 swrast->Line = _swrast_validate_line; in _swrast_CreateContext()
761 swrast->Triangle = _swrast_validate_triangle; in _swrast_CreateContext()
762 swrast->InvalidateState = _swrast_sleep; in _swrast_CreateContext()
763 swrast->BlendFunc = _swrast_validate_blend_func; in _swrast_CreateContext()
765 swrast->AllowVertexFog = GL_TRUE; in _swrast_CreateContext()
766 swrast->AllowPixelFog = GL_TRUE; in _swrast_CreateContext()
768 swrast->Driver.SpanRenderStart = _swrast_span_render_start; in _swrast_CreateContext()
769 swrast->Driver.SpanRenderFinish = _swrast_span_render_finish; in _swrast_CreateContext()
772 swrast->TextureSample[i] = NULL; in _swrast_CreateContext()
778 swrast->SpanArrays = (SWspanarrays *) MALLOC(maxThreads * sizeof(SWspanarrays)); in _swrast_CreateContext()
779 if (!swrast->SpanArrays) { in _swrast_CreateContext()
780 FREE(swrast); in _swrast_CreateContext()
784 swrast->SpanArrays[i].ChanType = CHAN_TYPE; in _swrast_CreateContext()
786 swrast->SpanArrays[i].rgba = swrast->SpanArrays[i].rgba8; in _swrast_CreateContext()
788 swrast->SpanArrays[i].rgba = swrast->SpanArrays[i].rgba16; in _swrast_CreateContext()
790 swrast->SpanArrays[i].rgba = swrast->SpanArrays[i].attribs[FRAG_ATTRIB_COL0]; in _swrast_CreateContext()
795 swrast->PointSpan.primitive = GL_POINT; in _swrast_CreateContext()
796 swrast->PointSpan.end = 0; in _swrast_CreateContext()
797 swrast->PointSpan.facing = 0; in _swrast_CreateContext()
798 swrast->PointSpan.array = swrast->SpanArrays; in _swrast_CreateContext()
804 ctx->swrast_context = swrast; in _swrast_CreateContext()
806 swrast->stencil_temp.buf1 = (GLubyte *) malloc(SWRAST_MAX_WIDTH * sizeof(GLubyte)); in _swrast_CreateContext()
807 swrast->stencil_temp.buf2 = (GLubyte *) malloc(SWRAST_MAX_WIDTH * sizeof(GLubyte)); in _swrast_CreateContext()
808 swrast->stencil_temp.buf3 = (GLubyte *) malloc(SWRAST_MAX_WIDTH * sizeof(GLubyte)); in _swrast_CreateContext()
809 swrast->stencil_temp.buf4 = (GLubyte *) malloc(SWRAST_MAX_WIDTH * sizeof(GLubyte)); in _swrast_CreateContext()
811 if (!swrast->stencil_temp.buf1 || in _swrast_CreateContext()
812 !swrast->stencil_temp.buf2 || in _swrast_CreateContext()
813 !swrast->stencil_temp.buf3 || in _swrast_CreateContext()
814 !swrast->stencil_temp.buf4) { in _swrast_CreateContext()
825 SWcontext *swrast = SWRAST_CONTEXT(ctx); in _swrast_DestroyContext() local
831 FREE( swrast->SpanArrays ); in _swrast_DestroyContext()
832 if (swrast->ZoomedArrays) in _swrast_DestroyContext()
833 FREE( swrast->ZoomedArrays ); in _swrast_DestroyContext()
834 FREE( swrast->TexelBuffer ); in _swrast_DestroyContext()
836 free(swrast->stencil_temp.buf1); in _swrast_DestroyContext()
837 free(swrast->stencil_temp.buf2); in _swrast_DestroyContext()
838 free(swrast->stencil_temp.buf3); in _swrast_DestroyContext()
839 free(swrast->stencil_temp.buf4); in _swrast_DestroyContext()
841 FREE( swrast ); in _swrast_DestroyContext()
850 SWcontext *swrast = SWRAST_CONTEXT(ctx); in _swrast_GetDeviceDriverReference() local
851 return &swrast->Driver; in _swrast_GetDeviceDriverReference()
857 SWcontext *swrast = SWRAST_CONTEXT(ctx); in _swrast_flush() local
859 if (swrast->PointSpan.end > 0) { in _swrast_flush()
860 _swrast_write_rgba_span(ctx, &(swrast->PointSpan)); in _swrast_flush()
861 swrast->PointSpan.end = 0; in _swrast_flush()
868 SWcontext *swrast = SWRAST_CONTEXT(ctx); in _swrast_render_primitive() local
869 if (swrast->Primitive == GL_POINTS && prim != GL_POINTS) { in _swrast_render_primitive()
872 swrast->Primitive = prim; in _swrast_render_primitive()
897 SWcontext *swrast = SWRAST_CONTEXT(ctx); in _swrast_render_start() local
898 if (swrast->Driver.SpanRenderStart) in _swrast_render_start()
899 swrast->Driver.SpanRenderStart( ctx ); in _swrast_render_start()
900 swrast->PointSpan.end = 0; in _swrast_render_start()
906 SWcontext *swrast = SWRAST_CONTEXT(ctx); in _swrast_render_finish() local
910 if (swrast->Driver.SpanRenderFinish) in _swrast_render_finish()
911 swrast->Driver.SpanRenderFinish( ctx ); in _swrast_render_finish()