summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2009-05-11 16:27:50 -0600
committerBrian Paul <[email protected]>2009-05-11 16:27:50 -0600
commite7cb125b2d9e9c7b1ad89b988fa3bf53ead9eb0c (patch)
treeb47a363853d2ed59184c3b9eb72ccb30d00cbebf
parent783e43064b64feb87e0457f96c2275160389f84c (diff)
parentf104e4d666dfccda6f5ad817693216733ddede44 (diff)
Merge branch 'mesa_7_5_branch'
Conflicts: Makefile src/mesa/main/version.h
-rw-r--r--Makefile8
-rw-r--r--progs/trivial/tri.c1
-rw-r--r--src/gallium/state_trackers/wgl/shared/stw_device.h2
-rw-r--r--src/gallium/winsys/drm/intel/dri/Makefile4
-rw-r--r--src/mesa/state_tracker/st_atom_framebuffer.c16
-rw-r--r--src/mesa/state_tracker/st_context.c7
6 files changed, 22 insertions, 16 deletions
diff --git a/Makefile b/Makefile
index ab41116795d..4796125f107 100644
--- a/Makefile
+++ b/Makefile
@@ -327,6 +327,7 @@ GALLIUM_FILES = \
$(DIRECTORY)/src/gallium/*/*/*/SConscript \
$(DIRECTORY)/src/gallium/*/*/*/*.[ch] \
$(DIRECTORY)/src/gallium/*/*/*/*.py \
+ $(DIRECTORY)/src/gallium/*/*/*/*/Makefile \
$(DIRECTORY)/src/gallium/*/*/*/*/*.[ch] \
@@ -402,7 +403,6 @@ DEMO_FILES = \
$(DIRECTORY)/progs/osdemos/Makefile \
$(DIRECTORY)/progs/osdemos/*.c \
$(DIRECTORY)/progs/xdemos/Makefile* \
- $(DIRECTORY)/progs/xdemos/descrip.mms \
$(DIRECTORY)/progs/xdemos/*.[chf] \
$(DIRECTORY)/progs/redbook/Makefile* \
$(DIRECTORY)/progs/redbook/README \
@@ -418,9 +418,6 @@ DEMO_FILES = \
$(DIRECTORY)/progs/windml/*.c \
$(DIRECTORY)/progs/windml/*.bmp \
$(DIRECTORY)/progs/ggi/*.c \
- $(DIRECTORY)/windows/VC6/progs/demos/*.dsp \
- $(DIRECTORY)/windows/VC6/progs/progs.dsw \
- $(DIRECTORY)/windows/VC7/progs/demos/*.vcproj \
$(DIRECTORY)/windows/VC7/progs/progs.sln
GLUT_FILES = \
@@ -430,14 +427,11 @@ GLUT_FILES = \
$(DIRECTORY)/src/glut/glx/depend \
$(DIRECTORY)/src/glut/glx/glut.pc.in \
$(DIRECTORY)/src/glut/glx/*def \
- $(DIRECTORY)/src/glut/glx/descrip.mms \
- $(DIRECTORY)/src/glut/glx/mms_depend \
$(DIRECTORY)/src/glut/glx/*.[ch] \
$(DIRECTORY)/src/glut/beos/*.[ch] \
$(DIRECTORY)/src/glut/beos/*.cpp \
$(DIRECTORY)/src/glut/beos/Makefile \
$(DIRECTORY)/src/glut/dos/*.[ch] \
- $(DIRECTORY)/src/glut/dos/Makefile.DJ \
$(DIRECTORY)/src/glut/dos/PC_HW/*.[chS] \
$(DIRECTORY)/src/glut/ggi/*.[ch] \
$(DIRECTORY)/src/glut/ggi/Makefile \
diff --git a/progs/trivial/tri.c b/progs/trivial/tri.c
index d44cb6a9fe3..cac3fcb7d9c 100644
--- a/progs/trivial/tri.c
+++ b/progs/trivial/tri.c
@@ -60,6 +60,7 @@ static void Key(unsigned char key, int x, int y)
{
switch (key) {
case 27:
+ glutDestroyWindow(win);
exit(0);
default:
glutPostRedisplay();
diff --git a/src/gallium/state_trackers/wgl/shared/stw_device.h b/src/gallium/state_trackers/wgl/shared/stw_device.h
index 969e3843e76..e097f1f71e0 100644
--- a/src/gallium/state_trackers/wgl/shared/stw_device.h
+++ b/src/gallium/state_trackers/wgl/shared/stw_device.h
@@ -37,7 +37,7 @@
#include "stw_pixelformat.h"
-#define STW_MAX_PIXELFORMATS 128
+#define STW_MAX_PIXELFORMATS 256
struct pipe_screen;
diff --git a/src/gallium/winsys/drm/intel/dri/Makefile b/src/gallium/winsys/drm/intel/dri/Makefile
index a4704bc0509..ac0891a6463 100644
--- a/src/gallium/winsys/drm/intel/dri/Makefile
+++ b/src/gallium/winsys/drm/intel/dri/Makefile
@@ -21,5 +21,5 @@ include ../../Makefile.template
DRI_LIB_DEPS += -ldrm_intel
symlinks: $(TOP)/$(LIB_DIR)/gallium
- @rm -f $(TOP)/lib/gallium/i965_dri.so
- ln -s i915_dri.so $(TOP)/lib/gallium/i965_dri.so
+ @rm -f $(TOP)/$(LIB_DIR)/gallium/i965_dri.so
+ ln -s i915_dri.so $(TOP)/$(LIB_DIR)/gallium/i965_dri.so
diff --git a/src/mesa/state_tracker/st_atom_framebuffer.c b/src/mesa/state_tracker/st_atom_framebuffer.c
index f23186c73de..4d897b677e0 100644
--- a/src/mesa/state_tracker/st_atom_framebuffer.c
+++ b/src/mesa/state_tracker/st_atom_framebuffer.c
@@ -98,8 +98,6 @@ update_framebuffer_state( struct st_context *st )
struct st_renderbuffer *strb;
GLuint i;
- memset(framebuffer, 0, sizeof(*framebuffer));
-
framebuffer->width = fb->Width;
framebuffer->height = fb->Height;
@@ -120,13 +118,20 @@ update_framebuffer_state( struct st_context *st )
}
if (strb->surface) {
- framebuffer->cbufs[framebuffer->nr_cbufs] = strb->surface;
+ pipe_surface_reference(&framebuffer->cbufs[framebuffer->nr_cbufs],
+ strb->surface);
framebuffer->nr_cbufs++;
}
strb->defined = GL_TRUE; /* we'll be drawing something */
}
}
+ for (i = framebuffer->nr_cbufs; i < PIPE_MAX_COLOR_BUFS; i++) {
+ pipe_surface_reference(&framebuffer->cbufs[i], NULL);
+ }
+ /*
+ * Depth/Stencil renderbuffer/surface.
+ */
strb = st_renderbuffer(fb->Attachment[BUFFER_DEPTH].Renderbuffer);
if (strb) {
strb = st_renderbuffer(strb->Base.Wrapped);
@@ -134,15 +139,14 @@ update_framebuffer_state( struct st_context *st )
/* rendering to a GL texture, may have to update surface */
update_renderbuffer_surface(st, strb);
}
-
- framebuffer->zsbuf = strb->surface;
+ pipe_surface_reference(&framebuffer->zsbuf, strb->surface);
}
else {
strb = st_renderbuffer(fb->Attachment[BUFFER_STENCIL].Renderbuffer);
if (strb) {
strb = st_renderbuffer(strb->Base.Wrapped);
assert(strb->surface);
- framebuffer->zsbuf = strb->surface;
+ pipe_surface_reference(&framebuffer->zsbuf, strb->surface);
}
}
diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c
index 2a1f21c51ca..e536029e86e 100644
--- a/src/mesa/state_tracker/st_context.c
+++ b/src/mesa/state_tracker/st_context.c
@@ -233,6 +233,7 @@ void st_destroy_context( struct st_context *st )
struct pipe_context *pipe = st->pipe;
struct cso_context *cso = st->cso_context;
GLcontext *ctx = st->ctx;
+ GLuint i;
/* need to unbind and destroy CSO objects before anything else */
cso_release_all(st->cso_context);
@@ -240,6 +241,12 @@ void st_destroy_context( struct st_context *st )
st_reference_fragprog(st, &st->fp, NULL);
st_reference_vertprog(st, &st->vp, NULL);
+ /* release framebuffer surfaces */
+ for (i = 0; i < PIPE_MAX_COLOR_BUFS; i++) {
+ pipe_surface_reference(&st->state.framebuffer.cbufs[i], NULL);
+ }
+ pipe_surface_reference(&st->state.framebuffer.zsbuf, NULL);
+
_mesa_delete_program_cache(st->ctx, st->pixel_xfer.cache);
_vbo_DestroyContext(st->ctx);