diff options
Diffstat (limited to 'src/mesa/swrast')
-rw-r--r-- | src/mesa/swrast/s_arbshader.c | 5 | ||||
-rw-r--r-- | src/mesa/swrast/s_arbshader.h | 4 | ||||
-rw-r--r-- | src/mesa/swrast/s_span.c | 10 |
3 files changed, 17 insertions, 2 deletions
diff --git a/src/mesa/swrast/s_arbshader.c b/src/mesa/swrast/s_arbshader.c index a2dc1353f04..c3f85ee1574 100644 --- a/src/mesa/swrast/s_arbshader.c +++ b/src/mesa/swrast/s_arbshader.c @@ -35,6 +35,8 @@ #include "slang_utility.h" #include "slang_link.h" +#if FEATURE_ARB_fragment_shader + void _swrast_exec_arbshader(GLcontext *ctx, struct sw_span *span) { @@ -113,3 +115,6 @@ _swrast_exec_arbshader(GLcontext *ctx, struct sw_span *span) } } } + +#endif /* FEATURE_ARB_fragment_shader */ + diff --git a/src/mesa/swrast/s_arbshader.h b/src/mesa/swrast/s_arbshader.h index 7cce6f83625..805cd4da38f 100644 --- a/src/mesa/swrast/s_arbshader.h +++ b/src/mesa/swrast/s_arbshader.h @@ -28,7 +28,11 @@ #include "s_context.h" +#if FEATURE_ARB_fragment_shader + extern void _swrast_exec_arbshader (GLcontext *ctx, struct sw_span *span); +#endif /* FEATURE_ARB_fragment_shader */ + #endif diff --git a/src/mesa/swrast/s_span.c b/src/mesa/swrast/s_span.c index ff3ed420c4b..d1431054162 100644 --- a/src/mesa/swrast/s_span.c +++ b/src/mesa/swrast/s_span.c @@ -1197,12 +1197,15 @@ _swrast_write_rgba_span( GLcontext *ctx, struct sw_span *span) interpolate_fog(ctx, span); /* Compute fragment colors with fragment program or texture lookups */ +#if FEATURE_ARB_fragment_shader if (ctx->ShaderObjects._FragmentShaderPresent) { if (span->interpMask & SPAN_Z) _swrast_span_interpolate_z (ctx, span); _swrast_exec_arbshader (ctx, span); } - else if (ctx->FragmentProgram._Active) { + else +#endif + if (ctx->FragmentProgram._Active) { /* frag prog may need Z values */ if (span->interpMask & SPAN_Z) _swrast_span_interpolate_z(ctx, span); @@ -1281,12 +1284,15 @@ _swrast_write_rgba_span( GLcontext *ctx, struct sw_span *span) if (span->interpMask & SPAN_FOG) interpolate_fog(ctx, span); +#if FEATURE_ARB_fragment_shader if (ctx->ShaderObjects._FragmentShaderPresent) { if (span->interpMask & SPAN_Z) _swrast_span_interpolate_z (ctx, span); _swrast_exec_arbshader (ctx, span); } - else if (ctx->FragmentProgram._Active) + else +#endif + if (ctx->FragmentProgram._Active) _swrast_exec_fragment_program( ctx, span ); else if (ctx->ATIFragmentShader._Enabled) _swrast_exec_fragment_shader( ctx, span ); |