diff options
author | Marek Olšák <[email protected]> | 2017-06-09 23:27:41 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2017-06-22 01:51:02 +0200 |
commit | 68a0e15f44cf351eab97a734b1cffeade1873fdf (patch) | |
tree | 99162f29dc09f7f0c11e89d5508d9f7c337f6892 /src/mesa/swrast/s_span.c | |
parent | 585c5cf8a514783d9ed31dba3aa432797dd5f0e8 (diff) |
mesa: replace VP/FP/ATIfs _Enabled flags with helper functions
These are only used in the GL compatibility profile.
Reviewed-by: Nicolai Hähnle <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/mesa/swrast/s_span.c')
-rw-r--r-- | src/mesa/swrast/s_span.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/mesa/swrast/s_span.c b/src/mesa/swrast/s_span.c index 81835636a57..47a73e99f3d 100644 --- a/src/mesa/swrast/s_span.c +++ b/src/mesa/swrast/s_span.c @@ -39,6 +39,7 @@ #include "main/imports.h" #include "main/image.h" #include "main/samplerobj.h" +#include "main/state.h" #include "main/stencil.h" #include "main/teximage.h" @@ -143,7 +144,7 @@ _swrast_span_default_attribs(struct gl_context *ctx, SWspan *span) const GLuint attr = VARYING_SLOT_TEX0 + i; const GLfloat *tc = ctx->Current.RasterTexCoords[i]; if (_swrast_use_fragment_program(ctx) || - ctx->ATIFragmentShader._Enabled) { + _mesa_ati_fragment_shader_enabled(ctx)) { COPY_4V(span->attrStart[attr], tc); } else if (tc[3] > 0.0F) { @@ -524,7 +525,7 @@ interpolate_texcoords(struct gl_context *ctx, SWspan *span) if (needLambda) { GLuint i; if (_swrast_use_fragment_program(ctx) - || ctx->ATIFragmentShader._Enabled) { + || _mesa_ati_fragment_shader_enabled(ctx)) { /* do perspective correction but don't divide s, t, r by q */ const GLfloat dwdx = span->attrStepX[VARYING_SLOT_POS][3]; GLfloat w = span->attrStart[VARYING_SLOT_POS][3] + span->leftClip * dwdx; @@ -565,7 +566,7 @@ interpolate_texcoords(struct gl_context *ctx, SWspan *span) else { GLuint i; if (_swrast_use_fragment_program(ctx) || - ctx->ATIFragmentShader._Enabled) { + _mesa_ati_fragment_shader_enabled(ctx)) { /* do perspective correction but don't divide s, t, r by q */ const GLfloat dwdx = span->attrStepX[VARYING_SLOT_POS][3]; GLfloat w = span->attrStart[VARYING_SLOT_POS][3] + span->leftClip * dwdx; @@ -977,7 +978,7 @@ static inline void shade_texture_span(struct gl_context *ctx, SWspan *span) { if (_swrast_use_fragment_program(ctx) || - ctx->ATIFragmentShader._Enabled) { + _mesa_ati_fragment_shader_enabled(ctx)) { /* programmable shading */ if (span->primitive == GL_BITMAP && span->array->ChanType != GL_FLOAT) { convert_color_type(span, span->array->ChanType, GL_FLOAT, 0); @@ -1009,7 +1010,7 @@ shade_texture_span(struct gl_context *ctx, SWspan *span) _swrast_exec_fragment_program(ctx, span); } else { - assert(ctx->ATIFragmentShader._Enabled); + assert(_mesa_ati_fragment_shader_enabled(ctx)); _swrast_exec_fragment_shader(ctx, span); } } @@ -1139,7 +1140,7 @@ _swrast_write_rgba_span( struct gl_context *ctx, SWspan *span) const GLenum origChanType = span->array->ChanType; void * const origRgba = span->array->rgba; const GLboolean shader = (_swrast_use_fragment_program(ctx) - || ctx->ATIFragmentShader._Enabled); + || _mesa_ati_fragment_shader_enabled(ctx)); const GLboolean shaderOrTexture = shader || ctx->Texture._EnabledCoordUnits; struct gl_framebuffer *fb = ctx->DrawBuffer; |