summaryrefslogtreecommitdiffstats
path: root/src/mesa/shader/atifragshader.c
diff options
context:
space:
mode:
authorChia-I Wu <[email protected]>2010-05-12 13:26:14 +0800
committerChia-I Wu <[email protected]>2010-05-12 13:46:53 +0800
commiteb5100accc888b9a9cfc24bc3d3452ea62a84c09 (patch)
treeeafafda093057cc3cc345c10e3b3566dcaa0d79c /src/mesa/shader/atifragshader.c
parent82c6c31f55cfa8db63361b174137b2a371aa4900 (diff)
mesa: Make FEATURE_ATI_fragment_shader more modular.
This allows atifragshader.h to be used without knowing if FEATURE_ATI_fragment_shader is enabled. As a result, atifragshader.c is removed from the omit list in ES overlay.
Diffstat (limited to 'src/mesa/shader/atifragshader.c')
-rw-r--r--src/mesa/shader/atifragshader.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/mesa/shader/atifragshader.c b/src/mesa/shader/atifragshader.c
index 870f77e30dc..21bb9589cb0 100644
--- a/src/mesa/shader/atifragshader.c
+++ b/src/mesa/shader/atifragshader.c
@@ -28,13 +28,36 @@
#include "main/macros.h"
#include "main/enums.h"
#include "main/mtypes.h"
+#include "main/dispatch.h"
#include "atifragshader.h"
+#if FEATURE_ATI_fragment_shader
+
#define MESA_DEBUG_ATI_FS 0
static struct ati_fragment_shader DummyShader;
+void
+_mesa_init_ati_fragment_shader_dispatch(struct _glapi_table *disp)
+{
+ SET_GenFragmentShadersATI(disp, _mesa_GenFragmentShadersATI);
+ SET_BindFragmentShaderATI(disp, _mesa_BindFragmentShaderATI);
+ SET_DeleteFragmentShaderATI(disp, _mesa_DeleteFragmentShaderATI);
+ SET_BeginFragmentShaderATI(disp, _mesa_BeginFragmentShaderATI);
+ SET_EndFragmentShaderATI(disp, _mesa_EndFragmentShaderATI);
+ SET_PassTexCoordATI(disp, _mesa_PassTexCoordATI);
+ SET_SampleMapATI(disp, _mesa_SampleMapATI);
+ SET_ColorFragmentOp1ATI(disp, _mesa_ColorFragmentOp1ATI);
+ SET_ColorFragmentOp2ATI(disp, _mesa_ColorFragmentOp2ATI);
+ SET_ColorFragmentOp3ATI(disp, _mesa_ColorFragmentOp3ATI);
+ SET_AlphaFragmentOp1ATI(disp, _mesa_AlphaFragmentOp1ATI);
+ SET_AlphaFragmentOp2ATI(disp, _mesa_AlphaFragmentOp2ATI);
+ SET_AlphaFragmentOp3ATI(disp, _mesa_AlphaFragmentOp3ATI);
+ SET_SetFragmentShaderConstantATI(disp, _mesa_SetFragmentShaderConstantATI);
+}
+
+
/**
* Allocate and initialize a new ATI fragment shader object.
*/
@@ -767,3 +790,5 @@ _mesa_SetFragmentShaderConstantATI(GLuint dst, const GLfloat * value)
COPY_4V(ctx->ATIFragmentShader.GlobalConstants[dstindex], value);
}
}
+
+#endif /* FEATURE_ATI_fragment_shader */