Lines Matching refs:swrast
58 SWcontext *swrast = SWRAST_CONTEXT(ctx); in _swrast_update_rasterflags() local
65 if (swrast->_FogEnabled) rasterMask |= FOG_BIT; in _swrast_update_rasterflags()
167 SWcontext *swrast = SWRAST_CONTEXT(ctx); in _swrast_update_fog_hint() local
168 swrast->_PreferPixelFog = (!swrast->AllowVertexFog || in _swrast_update_fog_hint()
171 swrast->AllowPixelFog)); in _swrast_update_fog_hint()
182 SWcontext *swrast = SWRAST_CONTEXT(ctx); in _swrast_update_texture_env() local
185 swrast->_TextureCombinePrimary = GL_FALSE; in _swrast_update_texture_env()
193 swrast->_TextureCombinePrimary = GL_TRUE; in _swrast_update_texture_env()
197 swrast->_TextureCombinePrimary = GL_TRUE; in _swrast_update_texture_env()
213 SWcontext *swrast = SWRAST_CONTEXT(ctx); in _swrast_update_deferred_texture() local
216 swrast->_DeferredTexture = GL_FALSE; in _swrast_update_deferred_texture()
224 swrast->_DeferredTexture = GL_FALSE; in _swrast_update_deferred_texture()
227 swrast->_DeferredTexture = GL_FALSE; in _swrast_update_deferred_texture()
231 swrast->_DeferredTexture = GL_FALSE; in _swrast_update_deferred_texture()
234 swrast->_DeferredTexture = GL_TRUE; in _swrast_update_deferred_texture()
246 SWcontext *swrast = SWRAST_CONTEXT(ctx); in _swrast_update_fog_state() local
253 swrast->_FogEnabled = (!_swrast_use_fragment_program(ctx) && in _swrast_update_fog_state()
280 SWcontext *swrast = SWRAST_CONTEXT(ctx); in _swrast_update_specular_vertex_add() local
285 swrast->SpecularVertexAdd = (separateSpecular in _swrast_update_specular_vertex_add()
347 SWcontext *swrast = SWRAST_CONTEXT(ctx); in _swrast_validate_triangle() local
350 swrast->choose_triangle( ctx ); in _swrast_validate_triangle()
351 assert(swrast->Triangle); in _swrast_validate_triangle()
353 if (swrast->SpecularVertexAdd) { in _swrast_validate_triangle()
355 swrast->SpecTriangle = swrast->Triangle; in _swrast_validate_triangle()
356 swrast->Triangle = _swrast_add_spec_terms_triangle; in _swrast_validate_triangle()
359 swrast->Triangle( ctx, v0, v1, v2 ); in _swrast_validate_triangle()
369 SWcontext *swrast = SWRAST_CONTEXT(ctx); in _swrast_validate_line() local
372 swrast->choose_line( ctx ); in _swrast_validate_line()
373 assert(swrast->Line); in _swrast_validate_line()
375 if (swrast->SpecularVertexAdd) { in _swrast_validate_line()
376 swrast->SpecLine = swrast->Line; in _swrast_validate_line()
377 swrast->Line = _swrast_add_spec_terms_line; in _swrast_validate_line()
380 swrast->Line( ctx, v0, v1 ); in _swrast_validate_line()
390 SWcontext *swrast = SWRAST_CONTEXT(ctx); in _swrast_validate_point() local
393 swrast->choose_point( ctx ); in _swrast_validate_point()
395 if (swrast->SpecularVertexAdd) { in _swrast_validate_point()
396 swrast->SpecPoint = swrast->Point; in _swrast_validate_point()
397 swrast->Point = _swrast_add_spec_terms_point; in _swrast_validate_point()
400 swrast->Point( ctx, v0 ); in _swrast_validate_point()
413 SWcontext *swrast = SWRAST_CONTEXT(ctx); in _swrast_validate_blend_func() local
418 swrast->BlendFunc( ctx, n, mask, src, dst, chanType ); in _swrast_validate_blend_func()
431 SWcontext *swrast = SWRAST_CONTEXT(ctx); in _swrast_invalidate_state() local
434 swrast->NewState |= new_state; in _swrast_invalidate_state()
439 if (++swrast->StateChanges > 10) { in _swrast_invalidate_state()
440 swrast->InvalidateState = _swrast_sleep; in _swrast_invalidate_state()
441 swrast->NewState = ~0; in _swrast_invalidate_state()
445 if (new_state & swrast->InvalidateTriangleMask) in _swrast_invalidate_state()
446 swrast->Triangle = _swrast_validate_triangle; in _swrast_invalidate_state()
448 if (new_state & swrast->InvalidateLineMask) in _swrast_invalidate_state()
449 swrast->Line = _swrast_validate_line; in _swrast_invalidate_state()
451 if (new_state & swrast->InvalidatePointMask) in _swrast_invalidate_state()
452 swrast->Point = _swrast_validate_point; in _swrast_invalidate_state()
455 swrast->BlendFunc = _swrast_validate_blend_func; in _swrast_invalidate_state()
458 for (i = 0 ; i < ARRAY_SIZE(swrast->TextureSample); i++) in _swrast_invalidate_state()
459 swrast->TextureSample[i] = NULL; in _swrast_invalidate_state()
466 SWcontext *swrast = SWRAST_CONTEXT(ctx); in _swrast_update_texture_samplers() local
469 if (!swrast) in _swrast_update_texture_samplers()
472 for (u = 0; u < ARRAY_SIZE(swrast->TextureSample); u++) { in _swrast_update_texture_samplers()
478 swrast->TextureSample[u] = in _swrast_update_texture_samplers()
492 SWcontext *swrast = SWRAST_CONTEXT(ctx); in _swrast_update_active_attribs() local
521 if (swrast->_FogEnabled) in _swrast_update_active_attribs()
527 swrast->_ActiveAttribMask = attribsMask; in _swrast_update_active_attribs()
534 swrast->_ActiveAttribs[num++] = i; in _swrast_update_active_attribs()
537 swrast->_InterpMode[i] = ctx->Light.ShadeModel; in _swrast_update_active_attribs()
539 swrast->_InterpMode[i] = GL_SMOOTH; in _swrast_update_active_attribs()
542 swrast->_NumActiveAttribs = num; in _swrast_update_active_attribs()
550 SWcontext *swrast = SWRAST_CONTEXT(ctx); in _swrast_validate_derived() local
552 if (swrast->NewState) { in _swrast_validate_derived()
553 if (swrast->NewState & _NEW_POLYGON) in _swrast_validate_derived()
556 if (swrast->NewState & (_NEW_HINT | _NEW_PROGRAM)) in _swrast_validate_derived()
559 if (swrast->NewState & _SWRAST_NEW_TEXTURE_ENV_MODE) in _swrast_validate_derived()
562 if (swrast->NewState & (_NEW_FOG | _NEW_PROGRAM)) in _swrast_validate_derived()
565 if (swrast->NewState & (_NEW_PROGRAM_CONSTANTS | _NEW_PROGRAM)) in _swrast_validate_derived()
566 _swrast_update_fragment_program( ctx, swrast->NewState ); in _swrast_validate_derived()
568 if (swrast->NewState & (_NEW_TEXTURE | _NEW_PROGRAM)) { in _swrast_validate_derived()
572 if (swrast->NewState & (_NEW_COLOR | _NEW_PROGRAM)) in _swrast_validate_derived()
575 if (swrast->NewState & _SWRAST_NEW_RASTERMASK) in _swrast_validate_derived()
578 if (swrast->NewState & (_NEW_DEPTH | in _swrast_validate_derived()
585 if (swrast->NewState & (_NEW_FOG | in _swrast_validate_derived()
591 swrast->NewState = 0; in _swrast_validate_derived()
592 swrast->StateChanges = 0; in _swrast_validate_derived()
593 swrast->InvalidateState = _swrast_invalidate_state; in _swrast_validate_derived()
718 SWcontext *swrast = calloc(1, sizeof(SWcontext)); in _swrast_CreateContext() local
741 if (!swrast) in _swrast_CreateContext()
744 swrast->NewState = ~0; in _swrast_CreateContext()
746 swrast->choose_point = _swrast_choose_point; in _swrast_CreateContext()
747 swrast->choose_line = _swrast_choose_line; in _swrast_CreateContext()
748 swrast->choose_triangle = _swrast_choose_triangle; in _swrast_CreateContext()
750 swrast->InvalidatePointMask = _SWRAST_NEW_POINT; in _swrast_CreateContext()
751 swrast->InvalidateLineMask = _SWRAST_NEW_LINE; in _swrast_CreateContext()
752 swrast->InvalidateTriangleMask = _SWRAST_NEW_TRIANGLE; in _swrast_CreateContext()
754 swrast->Point = _swrast_validate_point; in _swrast_CreateContext()
755 swrast->Line = _swrast_validate_line; in _swrast_CreateContext()
756 swrast->Triangle = _swrast_validate_triangle; in _swrast_CreateContext()
757 swrast->InvalidateState = _swrast_sleep; in _swrast_CreateContext()
758 swrast->BlendFunc = _swrast_validate_blend_func; in _swrast_CreateContext()
760 swrast->AllowVertexFog = GL_TRUE; in _swrast_CreateContext()
761 swrast->AllowPixelFog = GL_TRUE; in _swrast_CreateContext()
763 swrast->Driver.SpanRenderStart = _swrast_span_render_start; in _swrast_CreateContext()
764 swrast->Driver.SpanRenderFinish = _swrast_span_render_finish; in _swrast_CreateContext()
766 for (i = 0; i < ARRAY_SIZE(swrast->TextureSample); i++) in _swrast_CreateContext()
767 swrast->TextureSample[i] = NULL; in _swrast_CreateContext()
773 swrast->SpanArrays = malloc(maxThreads * sizeof(SWspanarrays)); in _swrast_CreateContext()
774 if (!swrast->SpanArrays) { in _swrast_CreateContext()
775 free(swrast); in _swrast_CreateContext()
779 swrast->SpanArrays[i].ChanType = CHAN_TYPE; in _swrast_CreateContext()
781 swrast->SpanArrays[i].rgba = swrast->SpanArrays[i].rgba8; in _swrast_CreateContext()
783 swrast->SpanArrays[i].rgba = swrast->SpanArrays[i].rgba16; in _swrast_CreateContext()
785 swrast->SpanArrays[i].rgba = swrast->SpanArrays[i].attribs[VARYING_SLOT_COL0]; in _swrast_CreateContext()
790 swrast->PointSpan.primitive = GL_POINT; in _swrast_CreateContext()
791 swrast->PointSpan.end = 0; in _swrast_CreateContext()
792 swrast->PointSpan.facing = 0; in _swrast_CreateContext()
793 swrast->PointSpan.array = swrast->SpanArrays; in _swrast_CreateContext()
799 ctx->swrast_context = swrast; in _swrast_CreateContext()
801 swrast->stencil_temp.buf1 = malloc(SWRAST_MAX_WIDTH * sizeof(GLubyte)); in _swrast_CreateContext()
802 swrast->stencil_temp.buf2 = malloc(SWRAST_MAX_WIDTH * sizeof(GLubyte)); in _swrast_CreateContext()
803 swrast->stencil_temp.buf3 = malloc(SWRAST_MAX_WIDTH * sizeof(GLubyte)); in _swrast_CreateContext()
804 swrast->stencil_temp.buf4 = malloc(SWRAST_MAX_WIDTH * sizeof(GLubyte)); in _swrast_CreateContext()
806 if (!swrast->stencil_temp.buf1 || in _swrast_CreateContext()
807 !swrast->stencil_temp.buf2 || in _swrast_CreateContext()
808 !swrast->stencil_temp.buf3 || in _swrast_CreateContext()
809 !swrast->stencil_temp.buf4) { in _swrast_CreateContext()
820 SWcontext *swrast = SWRAST_CONTEXT(ctx); in _swrast_DestroyContext() local
826 free( swrast->SpanArrays ); in _swrast_DestroyContext()
827 free( swrast->ZoomedArrays ); in _swrast_DestroyContext()
828 free( swrast->TexelBuffer ); in _swrast_DestroyContext()
830 free(swrast->stencil_temp.buf1); in _swrast_DestroyContext()
831 free(swrast->stencil_temp.buf2); in _swrast_DestroyContext()
832 free(swrast->stencil_temp.buf3); in _swrast_DestroyContext()
833 free(swrast->stencil_temp.buf4); in _swrast_DestroyContext()
835 free( swrast ); in _swrast_DestroyContext()
844 SWcontext *swrast = SWRAST_CONTEXT(ctx); in _swrast_GetDeviceDriverReference() local
845 return &swrast->Driver; in _swrast_GetDeviceDriverReference()
851 SWcontext *swrast = SWRAST_CONTEXT(ctx); in _swrast_flush() local
853 if (swrast->PointSpan.end > 0) { in _swrast_flush()
854 _swrast_write_rgba_span(ctx, &(swrast->PointSpan)); in _swrast_flush()
855 swrast->PointSpan.end = 0; in _swrast_flush()
862 SWcontext *swrast = SWRAST_CONTEXT(ctx); in _swrast_render_primitive() local
863 if (swrast->Primitive == GL_POINTS && prim != GL_POINTS) { in _swrast_render_primitive()
866 swrast->Primitive = prim; in _swrast_render_primitive()
891 SWcontext *swrast = SWRAST_CONTEXT(ctx); in _swrast_render_start() local
892 if (swrast->Driver.SpanRenderStart) in _swrast_render_start()
893 swrast->Driver.SpanRenderStart( ctx ); in _swrast_render_start()
894 swrast->PointSpan.end = 0; in _swrast_render_start()
900 SWcontext *swrast = SWRAST_CONTEXT(ctx); in _swrast_render_finish() local
905 if (swrast->Driver.SpanRenderFinish) in _swrast_render_finish()
906 swrast->Driver.SpanRenderFinish( ctx ); in _swrast_render_finish()