diff options
author | Dave Airlie <airliedfreedesktop.org> | 2004-12-19 03:06:59 +0000 |
---|---|---|
committer | Dave Airlie <airliedfreedesktop.org> | 2004-12-19 03:06:59 +0000 |
commit | 7f752fed993e5e9423abac200dd59141edbada56 (patch) | |
tree | 06eba28f01c81dfbd8c4a9104206765f8731528c /src/mesa/swrast/s_span.c | |
parent | a803b0c891404dcd7c376e91f6a033cd4e42abc3 (diff) |
Implement software ATI_fragment_shader
no error detection, slow, may not be 100% correct but a good start
Diffstat (limited to 'src/mesa/swrast/s_span.c')
-rw-r--r-- | src/mesa/swrast/s_span.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mesa/swrast/s_span.c b/src/mesa/swrast/s_span.c index 84415309569..449ae837dcf 100644 --- a/src/mesa/swrast/s_span.c +++ b/src/mesa/swrast/s_span.c @@ -36,6 +36,7 @@ #include "macros.h" #include "imports.h" +#include "s_atifragshader.h" #include "s_alpha.h" #include "s_alphabuf.h" #include "s_blend.h" @@ -127,7 +128,7 @@ _swrast_span_default_texcoords( GLcontext *ctx, struct sw_span *span ) GLuint i; for (i = 0; i < ctx->Const.MaxTextureUnits; i++) { const GLfloat *tc = ctx->Current.RasterTexCoords[i]; - if (ctx->FragmentProgram._Enabled) { + if (ctx->FragmentProgram._Enabled || ctx->ATIFragmentShader._Enabled) { COPY_4V(span->tex[i], tc); } else if (tc[3] > 0.0F) { @@ -1153,6 +1154,8 @@ _swrast_write_rgba_span( GLcontext *ctx, struct sw_span *span) if (ctx->FragmentProgram._Enabled) /* XXX interpolate depth values here??? */ _swrast_exec_fragment_program( ctx, span ); + else if (ctx->ATIFragmentShader._Enabled) + _swrast_exec_fragment_shader( ctx, span ); else if (ctx->Texture._EnabledUnits) _swrast_texture_span( ctx, span ); @@ -1225,6 +1228,8 @@ _swrast_write_rgba_span( GLcontext *ctx, struct sw_span *span) if (ctx->FragmentProgram._Enabled) _swrast_exec_fragment_program( ctx, span ); + else if (ctx->ATIFragmentShader._Enabled) + _swrast_exec_fragment_shader( ctx, span ); else if (ctx->Texture._EnabledUnits) _swrast_texture_span( ctx, span ); } |