summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/context.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2005-11-19 16:43:04 +0000
committerBrian Paul <[email protected]>2005-11-19 16:43:04 +0000
commit63d683091fe3a9600b65ae7ef3b554168b805406 (patch)
tree67d3aca6d541ef1a205e201ac7b2a6dda76898bf /src/mesa/main/context.c
parent430c469c5b5edd33fd29db9ab59ac1dccc02af21 (diff)
No longer derive 'ati_fragment_shader' from 'program' class. Only the
program->Id and program->RefCount fields were used and ATI fragment shaders didn't have too much in common with ARB/NV vertex/fragment programs anyway.
Diffstat (limited to 'src/mesa/main/context.c')
-rw-r--r--src/mesa/main/context.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index b25300a0b0e..8fd9af760ef 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -100,6 +100,7 @@
#include "histogram.h"
#include "hint.h"
#include "hash.h"
+#include "atifragshader.h"
#include "light.h"
#include "lines.h"
#include "macros.h"
@@ -692,7 +693,8 @@ alloc_shared_state( GLcontext *ctx )
goto cleanup;
#endif
#if FEATURE_ATI_fragment_shader
- ss->DefaultFragmentShader = ctx->Driver.NewProgram(ctx, GL_FRAGMENT_SHADER_ATI, 0);
+ ss->ATIShaders = _mesa_NewHashTable();
+ ss->DefaultFragmentShader = _mesa_new_ati_fragment_shader(ctx, 0);
if (!ss->DefaultFragmentShader)
goto cleanup;
#endif
@@ -760,7 +762,7 @@ alloc_shared_state( GLcontext *ctx )
#endif
#if FEATURE_ATI_fragment_shader
if (ss->DefaultFragmentShader)
- ctx->Driver.DeleteProgram(ctx, ss->DefaultFragmentShader);
+ _mesa_delete_ati_fragment_shader(ctx, ss->DefaultFragmentShader);
#endif
#if FEATURE_ARB_vertex_buffer_object
if (ss->BufferObjects)
@@ -867,7 +869,7 @@ free_shared_state( GLcontext *ctx, struct gl_shared_state *ss )
_mesa_delete_program(ctx, ss->DefaultFragmentProgram);
#endif
#if FEATURE_ATI_fragment_shader
- _mesa_delete_program(ctx, ss->DefaultFragmentShader);
+ _mesa_free(ss->DefaultFragmentShader);
#endif
#if FEATURE_ARB_vertex_buffer_object