aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_cb_program.c
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-10-30 16:13:37 -0600
committerBrian <[email protected]>2007-10-30 16:13:37 -0600
commitd6a739f6b0658414a81715bf690159f7cfdb4961 (patch)
tree018a879a8a638972bf660d660a1762bd7f885bfb /src/mesa/state_tracker/st_cb_program.c
parentee70c02b62f7692de6293045928c47168652bd1c (diff)
Use program serial numbers to avoid re-generating fragment programs for glDrawPixels.
Diffstat (limited to 'src/mesa/state_tracker/st_cb_program.c')
-rw-r--r--src/mesa/state_tracker/st_cb_program.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mesa/state_tracker/st_cb_program.c b/src/mesa/state_tracker/st_cb_program.c
index a330c1c9227..aed6b1ee97d 100644
--- a/src/mesa/state_tracker/st_cb_program.c
+++ b/src/mesa/state_tracker/st_cb_program.c
@@ -44,6 +44,8 @@
#include "st_atom_shader.h"
+static GLuint SerialNo = 1;
+
/**
* Called via ctx->Driver.BindProgram() to bind an ARB vertex or
@@ -91,7 +93,7 @@ static struct gl_program *st_new_program( GLcontext *ctx,
case GL_VERTEX_PROGRAM_ARB: {
struct st_vertex_program *prog = CALLOC_STRUCT(st_vertex_program);
- prog->serialNo = 1;
+ prog->serialNo = SerialNo++;
return _mesa_init_vertex_program( ctx,
&prog->Base,
@@ -103,7 +105,7 @@ static struct gl_program *st_new_program( GLcontext *ctx,
case GL_FRAGMENT_PROGRAM_NV: {
struct st_fragment_program *prog = CALLOC_STRUCT(st_fragment_program);
- prog->serialNo = 1;
+ prog->serialNo = SerialNo++;
return _mesa_init_fragment_program( ctx,
&prog->Base,