summaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast
diff options
context:
space:
mode:
authorMichal Krol <[email protected]>2006-08-01 20:07:31 +0000
committerMichal Krol <[email protected]>2006-08-01 20:07:31 +0000
commit365582dd6f632aafbc1c817aa57926d679bb2efc (patch)
tree75f3184e471793c06cd16ef1bdd3e10629f2a28a /src/mesa/swrast
parentcc738e004f083566f3e1723f72623ef9875f72ec (diff)
Clean-up FEATURE_ARB_shader_objects #ifdefs. Bug 7492.
Diffstat (limited to 'src/mesa/swrast')
-rw-r--r--src/mesa/swrast/s_arbshader.c5
-rw-r--r--src/mesa/swrast/s_arbshader.h4
-rw-r--r--src/mesa/swrast/s_span.c10
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 );