summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/enable.c
diff options
context:
space:
mode:
authorDave Airlie <airliedfreedesktop.org>2004-12-19 03:06:59 +0000
committerDave Airlie <airliedfreedesktop.org>2004-12-19 03:06:59 +0000
commit7f752fed993e5e9423abac200dd59141edbada56 (patch)
tree06eba28f01c81dfbd8c4a9104206765f8731528c /src/mesa/main/enable.c
parenta803b0c891404dcd7c376e91f6a033cd4e42abc3 (diff)
Implement software ATI_fragment_shader
no error detection, slow, may not be 100% correct but a good start
Diffstat (limited to 'src/mesa/main/enable.c')
-rw-r--r--src/mesa/main/enable.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c
index 8968c0aa838..f53ae05d171 100644
--- a/src/mesa/main/enable.c
+++ b/src/mesa/main/enable.c
@@ -993,6 +993,15 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state )
ctx->VertexProgram.CallbackEnabled = state;
break;
+#if FEATURE_ATI_fragment_shader
+ case GL_FRAGMENT_SHADER_ATI:
+ CHECK_EXTENSION(ATI_fragment_shader, cap);
+ if (ctx->ATIFragmentShader.Enabled == state)
+ return;
+ FLUSH_VERTICES(ctx, _NEW_PROGRAM);
+ ctx->ATIFragmentShader.Enabled = state;
+ break;
+#endif
default:
_mesa_error(ctx, GL_INVALID_ENUM,
"%s(0x%x)", state ? "glEnable" : "glDisable", cap);
@@ -1430,7 +1439,11 @@ _mesa_IsEnabled( GLenum cap )
case GL_VERTEX_PROGRAM_CALLBACK_MESA:
CHECK_EXTENSION(MESA_program_debug);
return ctx->VertexProgram.CallbackEnabled;
-
+#if FEATURE_ATI_fragment_shader
+ case GL_FRAGMENT_SHADER_ATI:
+ CHECK_EXTENSION(ATI_fragment_shader);
+ return ctx->ATIFragmentShader.Enabled;
+#endif /* FEATURE_ATI_fragment_shader */
default:
_mesa_error(ctx, GL_INVALID_ENUM, "glIsEnabled(0x%x)", (int) cap);
return GL_FALSE;