diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2008-05-20 15:12:50 -0600 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2008-05-20 15:12:50 -0600 |
commit | 8f792a0707446a7b020e6d47a5fff310a36ca81d (patch) | |
tree | 8a051f4925d955be98a7d6a8fa4ac6a34c71d5bf | |
parent | cf1ae676ec7cbf3a8595d41fb6b5128ff142b402 (diff) | |
parent | 7899ecdd6502a323b052f9ad4acd23cbb9ba88db (diff) |
Merge branch 'gallium-0.1' into gallium-tex-surfaces
-rw-r--r-- | progs/demos/lodbias.c | 5 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_cb_bitmap.c | 4 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_gen_mipmap.c | 2 |
3 files changed, 8 insertions, 3 deletions
diff --git a/progs/demos/lodbias.c b/progs/demos/lodbias.c index c5a2a1b457..30b1ed13d5 100644 --- a/progs/demos/lodbias.c +++ b/progs/demos/lodbias.c @@ -42,7 +42,7 @@ static GLfloat Xrot = 0, Yrot = -30, Zrot = 0; static GLboolean Anim = GL_TRUE; static GLint Bias = 0, BiasStepSign = +1; /* ints avoid fp precision problem */ static GLint BiasMin = -400, BiasMax = 400; - +static int win = 0; static void @@ -172,6 +172,7 @@ static void Key( unsigned char key, int x, int y ) Bias = 100.0 * (key - '0'); break; case 27: + glutDestroyWindow(win); exit(0); break; } @@ -281,7 +282,7 @@ int main( int argc, char *argv[] ) glutInitWindowPosition( 0, 0 ); glutInitWindowSize( 350, 350 ); glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE ); - glutCreateWindow(argv[0]); + win = glutCreateWindow(argv[0]); glutReshapeFunc( Reshape ); glutKeyboardFunc( Key ); glutSpecialFunc( SpecialKey ); diff --git a/src/mesa/state_tracker/st_cb_bitmap.c b/src/mesa/state_tracker/st_cb_bitmap.c index c8e2d7d118..3a102df67f 100644 --- a/src/mesa/state_tracker/st_cb_bitmap.c +++ b/src/mesa/state_tracker/st_cb_bitmap.c @@ -198,6 +198,10 @@ combined_bitmap_fragment_program(GLcontext *ctx) _mesa_combine_programs(ctx, &bitmap_prog->Base.Base, &stfp->Base.Base); stfp->bitmap_program->bitmap_sampler = sampler; + + /* done with this after combining */ + st_reference_fragprog(st, &bitmap_prog, NULL); + #if 0 { struct gl_program *p = &stfp->bitmap_program->Base.Base; diff --git a/src/mesa/state_tracker/st_gen_mipmap.c b/src/mesa/state_tracker/st_gen_mipmap.c index cfacfdd04c..f51eff05dc 100644 --- a/src/mesa/state_tracker/st_gen_mipmap.c +++ b/src/mesa/state_tracker/st_gen_mipmap.c @@ -199,6 +199,6 @@ st_generate_mipmap(GLcontext *ctx, GLenum target, dstImage->TexFormat = srcImage->TexFormat; stImage = (struct st_texture_image *) dstImage; - stImage->pt = pt; + pipe_texture_reference(&stImage->pt, pt); } } |