X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fmesa%2Fswrast%2Fs_context.h;h=cdd6fa5048d6df2b3968323e20ef29c26b21f6e9;hb=88f3656ea7ae57d22141225db0c5d90ceab420dd;hp=aebc80c2080ea10645943e465cda1688b7e6a956;hpb=fcd7c37fd3d0f61cf6ac81170bc0b3fca64ad9bb;p=mesa.git diff --git a/src/mesa/swrast/s_context.h b/src/mesa/swrast/s_context.h index aebc80c2080..cdd6fa5048d 100644 --- a/src/mesa/swrast/s_context.h +++ b/src/mesa/swrast/s_context.h @@ -136,10 +136,6 @@ typedef struct GLboolean _DeferredTexture; GLenum _FogMode; /* either GL_FOG_MODE or fragment program's fog mode */ - /** Multiple render targets */ - GLbitfield _ColorOutputsMask; - GLuint _NumColorOutputs; - /** List/array of the fragment attributes to interpolate */ GLuint _ActiveAttribs[FRAG_ATTRIB_MAX]; /** Same info, but as a bitmask */ @@ -210,6 +206,7 @@ typedef struct * on some systems. */ SWspanarrays *SpanArrays; + SWspanarrays *ZoomedArrays; /**< For pixel zooming */ /** * Used to buffer N GL_POINTS, instead of rendering one by one. @@ -241,21 +238,43 @@ extern void _swrast_update_texture_samplers(GLcontext *ctx); -#define SWRAST_CONTEXT(ctx) ((SWcontext *)ctx->swrast_context) +/** Return SWcontext for the given GLcontext */ +static INLINE SWcontext * +SWRAST_CONTEXT(GLcontext *ctx) +{ + return (SWcontext *) ctx->swrast_context; +} + +/** const version of above */ +static INLINE const SWcontext * +CONST_SWRAST_CONTEXT(const GLcontext *ctx) +{ + return (const SWcontext *) ctx->swrast_context; +} + + +/** + * Called prior to framebuffer reading/writing. + * For drivers that rely on swrast for fallback rendering, this is the + * driver's opportunity to map renderbuffers and textures. + */ +static INLINE void +swrast_render_start(GLcontext *ctx) +{ + SWcontext *swrast = SWRAST_CONTEXT(ctx); + if (swrast->Driver.SpanRenderStart) + swrast->Driver.SpanRenderStart(ctx); +} -#define RENDER_START(SWctx, GLctx) \ - do { \ - if ((SWctx)->Driver.SpanRenderStart) { \ - (*(SWctx)->Driver.SpanRenderStart)(GLctx); \ - } \ - } while (0) -#define RENDER_FINISH(SWctx, GLctx) \ - do { \ - if ((SWctx)->Driver.SpanRenderFinish) { \ - (*(SWctx)->Driver.SpanRenderFinish)(GLctx); \ - } \ - } while (0) +/** Called after framebuffer reading/writing */ +static INLINE void +swrast_render_finish(GLcontext *ctx) +{ + SWcontext *swrast = SWRAST_CONTEXT(ctx); + if (swrast->Driver.SpanRenderFinish) + swrast->Driver.SpanRenderFinish(ctx); +}