From de37a00d271fc4ab919c3c715322018c0b76369f Mon Sep 17 00:00:00 2001 From: Jakob Bornecrantz Date: Tue, 5 Jan 2010 17:51:02 +0100 Subject: util: Add u_bitmask to make build --- src/gallium/auxiliary/util/Makefile | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/gallium/auxiliary/util/Makefile b/src/gallium/auxiliary/util/Makefile index 1d8bb55bbd..7e47ec6d3b 100644 --- a/src/gallium/auxiliary/util/Makefile +++ b/src/gallium/auxiliary/util/Makefile @@ -9,6 +9,7 @@ C_SOURCES = \ u_debug_symbol.c \ u_debug_stack.c \ u_blit.c \ + u_bitmask.c \ u_cache.c \ u_cpu_detect.c \ u_draw_quad.c \ -- cgit v1.2.3 From 20d6360db7ca8610e5958cd7f851e664d77684fc Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Fri, 8 Jan 2010 20:22:17 -0800 Subject: tgsi: Silence uninitialized variable warnings. --- src/gallium/auxiliary/tgsi/tgsi_exec.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src') diff --git a/src/gallium/auxiliary/tgsi/tgsi_exec.c b/src/gallium/auxiliary/tgsi/tgsi_exec.c index b7569e74d4..146000adeb 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_exec.c +++ b/src/gallium/auxiliary/tgsi/tgsi_exec.c @@ -1209,11 +1209,19 @@ fetch_src_file_channel( default: assert( 0 ); + chan->u[0] = 0; + chan->u[1] = 0; + chan->u[2] = 0; + chan->u[3] = 0; } break; default: assert( 0 ); + chan->u[0] = 0; + chan->u[1] = 0; + chan->u[2] = 0; + chan->u[3] = 0; } } -- cgit v1.2.3 From 4775723d2f641dcd82e8c9cd39ba52f8d86158c7 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Fri, 8 Jan 2010 21:43:54 -0800 Subject: r300g: Silence unused variable warnings. --- src/gallium/drivers/r300/r300_flush.c | 1 + src/gallium/drivers/r300/r300_state_derived.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/gallium/drivers/r300/r300_flush.c b/src/gallium/drivers/r300/r300_flush.c index 14a08241fc..4282357521 100644 --- a/src/gallium/drivers/r300/r300_flush.c +++ b/src/gallium/drivers/r300/r300_flush.c @@ -39,6 +39,7 @@ static void r300_flush(struct pipe_context* pipe, struct r300_query *query; CS_LOCALS(r300); + (void) cs_count; /* We probably need to flush Draw, but we may have been called from * within Draw. This feels kludgy, but it might be the best thing. * diff --git a/src/gallium/drivers/r300/r300_state_derived.c b/src/gallium/drivers/r300/r300_state_derived.c index 7166694edf..55430a9ad6 100644 --- a/src/gallium/drivers/r300/r300_state_derived.c +++ b/src/gallium/drivers/r300/r300_state_derived.c @@ -464,7 +464,7 @@ static void r300_update_rs_block(struct r300_context* r300, /* Update the vertex format. */ static void r300_update_derived_shader_state(struct r300_context* r300) { - struct r300_screen* r300screen = r300_screen(r300->context.screen); + /* struct r300_screen* r300screen = r300_screen(r300->context.screen); */ struct r300_vertex_info* vformat; struct r300_rs_block* rs_block; int i; -- cgit v1.2.3 From f8737bda37510672415269f205ca5b0c69454edf Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Sat, 9 Jan 2010 23:25:49 -0800 Subject: glu/sgi: Initialize member of class O_pwlcurve. --- src/glu/sgi/libnurbs/internals/reader.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/glu/sgi/libnurbs/internals/reader.cc b/src/glu/sgi/libnurbs/internals/reader.cc index 6135eef60e..c59240d26a 100644 --- a/src/glu/sgi/libnurbs/internals/reader.cc +++ b/src/glu/sgi/libnurbs/internals/reader.cc @@ -64,6 +64,7 @@ O_pwlcurve::O_pwlcurve( long _type, long count, INREAL *array, long byte_stride, owner = 0; pts = trimpts; npts = (int) count; + save = 0; int i; /* copy user data into internal trimming data structures */ @@ -115,6 +116,7 @@ O_pwlcurve::O_pwlcurve( long _type, long count, INREAL *array, long byte_stride, owner = 0; pts = trimpts; npts = (int) count; + save = 0; /* copy user data into internal trimming data structures */ switch( _type ) { -- cgit v1.2.3 From 61afd1158fb7d0577effd817a8f9cba7fb2a2bbd Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Sat, 9 Jan 2010 23:53:54 -0800 Subject: glu/sgi: Include missing header file. --- src/glu/sgi/libnurbs/interface/bezierPatchMesh.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/glu/sgi/libnurbs/interface/bezierPatchMesh.h b/src/glu/sgi/libnurbs/interface/bezierPatchMesh.h index 449329665c..ba6868a306 100644 --- a/src/glu/sgi/libnurbs/interface/bezierPatchMesh.h +++ b/src/glu/sgi/libnurbs/interface/bezierPatchMesh.h @@ -33,6 +33,7 @@ #ifndef _BEZIERPATCHMESH_H #define _BEZIERPATCHMESH_H +#include #include "bezierPatch.h" typedef struct bezierPatchMesh{ -- cgit v1.2.3 From a5815c36f77d150e4a9915a8b289df2aa942c23c Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Sat, 9 Jan 2010 23:55:05 -0800 Subject: glu/sgi: Initialize members of class StoredVertex. --- src/glu/sgi/libnurbs/interface/glsurfeval.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/glu/sgi/libnurbs/interface/glsurfeval.h b/src/glu/sgi/libnurbs/interface/glsurfeval.h index 1567c6b098..621e59391a 100644 --- a/src/glu/sgi/libnurbs/interface/glsurfeval.h +++ b/src/glu/sgi/libnurbs/interface/glsurfeval.h @@ -83,7 +83,7 @@ typedef struct surfEvalMachine{ class StoredVertex { public: - StoredVertex() { type = 0; } + StoredVertex() { type = 0; coord[0] = 0; coord[1] = 0; point[0] = 0; point[1] = 0; } ~StoredVertex(void) {} void saveEvalCoord(REAL x, REAL y) {coord[0] = x; coord[1] = y; type = TYPECOORD; } -- cgit v1.2.3 From 9e98c1fbf6fef97e017c7b308d0772604ea7a614 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Sun, 10 Jan 2010 00:14:33 -0800 Subject: glu/sgi: Initialize members of class Renderhints. --- src/glu/sgi/libnurbs/internals/renderhints.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/glu/sgi/libnurbs/internals/renderhints.cc b/src/glu/sgi/libnurbs/internals/renderhints.cc index a3aa62d42c..7025f74f5b 100644 --- a/src/glu/sgi/libnurbs/internals/renderhints.cc +++ b/src/glu/sgi/libnurbs/internals/renderhints.cc @@ -54,6 +54,10 @@ Renderhints::Renderhints() errorchecking = N_MSG; subdivisions = 6.0; tmp1 = 0.0; + displaydomain = 0; + maxsubdivisions = (int) subdivisions; + wiretris = 0; + wirequads = 0; } void -- cgit v1.2.3 From b9bd96608c88c0b3decddc80f0d49f670fc90466 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Sun, 10 Jan 2010 03:03:14 -0800 Subject: glu/sgi: Include missing header file. --- src/glu/sgi/libnurbs/internals/simplemath.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/glu/sgi/libnurbs/internals/simplemath.h b/src/glu/sgi/libnurbs/internals/simplemath.h index 0a060c57ea..d00062dc70 100644 --- a/src/glu/sgi/libnurbs/internals/simplemath.h +++ b/src/glu/sgi/libnurbs/internals/simplemath.h @@ -38,6 +38,8 @@ /* simple inline routines */ +#include "types.h" + inline int max( int x, int y ) { return ( x < y ) ? y : x; } -- cgit v1.2.3 From 1111b38a1b903e9d99aace14a675a684a3f4732a Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Sun, 10 Jan 2010 15:55:52 -0800 Subject: glu/sgi: Initialize members of class Slicer. --- src/glu/sgi/libnurbs/internals/slicer.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/glu/sgi/libnurbs/internals/slicer.cc b/src/glu/sgi/libnurbs/internals/slicer.cc index 27d2a650d1..1b18d73c17 100644 --- a/src/glu/sgi/libnurbs/internals/slicer.cc +++ b/src/glu/sgi/libnurbs/internals/slicer.cc @@ -1181,6 +1181,10 @@ void Slicer::slice(Arc_ptr loop) Slicer::Slicer( Backend &b ) : CoveAndTiler( b ), Mesher( b ), backend( b ) { + oneOverDu = 0; + du = 0; + dv = 0; + isolines = 0; ulinear = 0; vlinear = 0; } -- cgit v1.2.3 From 4fe51c7447fb260c32754df95a54b62f513cdd6b Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Sun, 10 Jan 2010 16:09:41 -0800 Subject: glu/sgi: Initialize members of class Mesher. --- src/glu/sgi/libnurbs/internals/mesher.cc | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/glu/sgi/libnurbs/internals/mesher.cc b/src/glu/sgi/libnurbs/internals/mesher.cc index 9cc436adbf..b2d83f4128 100644 --- a/src/glu/sgi/libnurbs/internals/mesher.cc +++ b/src/glu/sgi/libnurbs/internals/mesher.cc @@ -58,6 +58,9 @@ Mesher::Mesher( Backend& b ) { stacksize = 0; vdata = 0; + last[0] = 0; + last[1] = 0; + itop = 0; lastedge = 0; //needed to prevent purify UMR } -- cgit v1.2.3 From 1294df9ca4ec39f00de3f9d923316f6641c1fb4a Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Mon, 11 Jan 2010 13:21:02 +1000 Subject: radeon: fix bug in realloc code. This bug was fixed in libdrm ages ago, port to non-kms --- src/mesa/drivers/dri/radeon/radeon_cs_legacy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/mesa/drivers/dri/radeon/radeon_cs_legacy.c b/src/mesa/drivers/dri/radeon/radeon_cs_legacy.c index 45b608a1b9..bf46eb8aab 100644 --- a/src/mesa/drivers/dri/radeon/radeon_cs_legacy.c +++ b/src/mesa/drivers/dri/radeon/radeon_cs_legacy.c @@ -182,7 +182,7 @@ static int cs_begin(struct radeon_cs_int *cs, uint32_t tmp, *ptr; int num = (ndw > 0x3FF) ? ndw : 0x3FF; - tmp = (cs->cdw + 1 + num) & (~num); + tmp = (cs->cdw + ndw + 0x3ff) & (~0x3ff); ptr = (uint32_t*)realloc(cs->packets, 4 * tmp); if (ptr == NULL) { return -ENOMEM; -- cgit v1.2.3 From efaba97eaaf47ffecf1577777df1e8a700ada8de Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Mon, 11 Jan 2010 13:21:47 +1000 Subject: radeon: fix prediction for r100 inline vert/elt emits. On r100 we emit the indices inline so we need to account for that in the emission size. --- src/mesa/drivers/dri/radeon/radeon_tcl.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/mesa/drivers/dri/radeon/radeon_tcl.c b/src/mesa/drivers/dri/radeon/radeon_tcl.c index b334ea05e5..cd02bfbcf5 100644 --- a/src/mesa/drivers/dri/radeon/radeon_tcl.c +++ b/src/mesa/drivers/dri/radeon/radeon_tcl.c @@ -412,6 +412,7 @@ static GLuint radeonEnsureEmitSize( GLcontext * ctx , GLuint inputs ) space_required += vbuf; else space_required += index + elts; + space_required += VB->Primitive[i].count * 3; space_required += AOS_BUFSZ(nr_aos); } space_required += SCISSOR_BUFSZ; -- cgit v1.2.3 From 01eff0e6d23f90650de7c563f74a1aec3de112a6 Mon Sep 17 00:00:00 2001 From: Thomas Hellstrom Date: Mon, 11 Jan 2010 21:00:59 +0100 Subject: util: Build u_bitmask.o when using make. Signed-off-by: Thomas Hellstrom --- src/gallium/auxiliary/util/Makefile | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/gallium/auxiliary/util/Makefile b/src/gallium/auxiliary/util/Makefile index 7e47ec6d3b..5599048192 100644 --- a/src/gallium/auxiliary/util/Makefile +++ b/src/gallium/auxiliary/util/Makefile @@ -4,6 +4,7 @@ include $(TOP)/configs/current LIBNAME = util C_SOURCES = \ + u_bitmask.c \ u_debug.c \ u_debug_dump.c \ u_debug_symbol.c \ -- cgit v1.2.3 From cb51f0267853dad419d169587aecbecf1800e8c3 Mon Sep 17 00:00:00 2001 From: Thomas Hellstrom Date: Mon, 11 Jan 2010 21:32:13 +0100 Subject: Revert "st/dri: no need to request fake front buffer, only handle it being returned" This reverts commit 1336989ec60fff7bd590fefd28945a0e5dc536e3. The commit breaks frontbuffer rendering and the possibility to do on-demand frontbuffer requests on all Xservers prior to 1.7. The commit should be conditioned on a dri2 version check. I've submitted a patch to Xserver to bump dri2 minor, and it's acked by Ian. To be able to check the version from within the state tracker, we will probably need another dri2 extension function that returns the server version. The protocol has support for it. Signed-off-by: Thomas Hellstrom --- src/gallium/state_trackers/dri/dri_drawable.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/gallium/state_trackers/dri/dri_drawable.c b/src/gallium/state_trackers/dri/dri_drawable.c index 5625ff53cf..c4dfb0c41f 100644 --- a/src/gallium/state_trackers/dri/dri_drawable.c +++ b/src/gallium/state_trackers/dri/dri_drawable.c @@ -180,6 +180,7 @@ dri_get_buffers(__DRIdrawablePrivate * dPriv) switch (buffers[i].attachment) { case __DRI_BUFFER_FRONT_LEFT: + continue; case __DRI_BUFFER_FAKE_FRONT_LEFT: index = ST_SURFACE_FRONT_LEFT; format = drawable->color_format; @@ -367,6 +368,8 @@ dri_create_buffer(__DRIscreenPrivate * sPriv, if (visual->doubleBufferMode) drawable->attachments[i++] = __DRI_BUFFER_BACK_LEFT; + else + drawable->attachments[i++] = __DRI_BUFFER_FAKE_FRONT_LEFT; if (visual->depthBits && visual->stencilBits) drawable->attachments[i++] = __DRI_BUFFER_DEPTH_STENCIL; else if (visual->depthBits) -- cgit v1.2.3 From 61f7252448af24942ba9fffe6d792abc1f7d9f84 Mon Sep 17 00:00:00 2001 From: Jakob Bornecrantz Date: Wed, 6 Jan 2010 17:31:46 +0100 Subject: Revert "pipebuffer: Multi-threading fixes for fencing." This reverts commit 5b64d94390e4805e1634f0c8b5e3156e12b8b872. --- .../auxiliary/pipebuffer/pb_buffer_fenced.c | 281 ++++++++------------- 1 file changed, 111 insertions(+), 170 deletions(-) (limited to 'src') diff --git a/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c b/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c index 1ee2bf9b7c..2ef4293d4d 100644 --- a/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c +++ b/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c @@ -80,27 +80,11 @@ struct fenced_buffer_list */ struct fenced_buffer { - /* - * Immutable members. - */ - struct pb_buffer base; + struct pb_buffer *buffer; - struct fenced_buffer_list *list; - - /** - * Protected by fenced_buffer_list::mutex - */ - struct list_head head; - /** - * Following members are mutable and protected by this mutex. - * - * You may lock this mutex alone, or lock it with fenced_buffer_list::mutex - * held, but in order to prevent deadlocks you must never lock - * fenced_buffer_list::mutex with this mutex held. - */ - pipe_mutex mutex; + /* FIXME: protect access with mutex */ /** * A bitmask of PIPE_BUFFER_USAGE_CPU/GPU_READ/WRITE describing the current @@ -112,6 +96,9 @@ struct fenced_buffer struct pb_validate *vl; unsigned validation_flags; struct pipe_fence_handle *fence; + + struct list_head head; + struct fenced_buffer_list *list; }; @@ -123,24 +110,15 @@ fenced_buffer(struct pb_buffer *buf) } -/** - * Add the buffer to the fenced list. - * - * fenced_buffer_list::mutex and fenced_buffer::mutex must be held, in this - * order, before calling this function. - * - * Reference count should be incremented before calling this function. - */ static INLINE void -fenced_buffer_add_locked(struct fenced_buffer_list *fenced_list, - struct fenced_buffer *fenced_buf) +_fenced_buffer_add(struct fenced_buffer *fenced_buf) { + struct fenced_buffer_list *fenced_list = fenced_buf->list; + assert(pipe_is_referenced(&fenced_buf->base.base.reference)); assert(fenced_buf->flags & PIPE_BUFFER_USAGE_GPU_READ_WRITE); assert(fenced_buf->fence); - /* TODO: Move the reference count increment here */ - #ifdef DEBUG LIST_DEL(&fenced_buf->head); assert(fenced_list->numUnfenced); @@ -152,16 +130,32 @@ fenced_buffer_add_locked(struct fenced_buffer_list *fenced_list, /** - * Remove the buffer from the fenced list. - * - * fenced_buffer_list::mutex and fenced_buffer::mutex must be held, in this - * order before calling this function. - * - * Reference count should be decremented after calling this function. + * Actually destroy the buffer. */ static INLINE void -fenced_buffer_remove_locked(struct fenced_buffer_list *fenced_list, - struct fenced_buffer *fenced_buf) +_fenced_buffer_destroy(struct fenced_buffer *fenced_buf) +{ + struct fenced_buffer_list *fenced_list = fenced_buf->list; + + assert(!pipe_is_referenced(&fenced_buf->base.base.reference)); + assert(!fenced_buf->fence); +#ifdef DEBUG + assert(fenced_buf->head.prev); + assert(fenced_buf->head.next); + LIST_DEL(&fenced_buf->head); + assert(fenced_list->numUnfenced); + --fenced_list->numUnfenced; +#else + (void)fenced_list; +#endif + pb_reference(&fenced_buf->buffer, NULL); + FREE(fenced_buf); +} + + +static INLINE void +_fenced_buffer_remove(struct fenced_buffer_list *fenced_list, + struct fenced_buffer *fenced_buf) { struct pb_fence_ops *ops = fenced_list->ops; @@ -183,56 +177,37 @@ fenced_buffer_remove_locked(struct fenced_buffer_list *fenced_list, ++fenced_list->numUnfenced; #endif - /* TODO: Move the reference count decrement and destruction here */ + /** + * FIXME!!! + */ + + if(!pipe_is_referenced(&fenced_buf->base.base.reference)) + _fenced_buffer_destroy(fenced_buf); } -/** - * Wait for the fence to expire, and remove it from the fenced list. - * - * fenced_buffer::mutex must be held. fenced_buffer_list::mutex must not be - * held -- it will be acquired internally. - */ static INLINE enum pipe_error -fenced_buffer_finish_locked(struct fenced_buffer_list *fenced_list, - struct fenced_buffer *fenced_buf) +_fenced_buffer_finish(struct fenced_buffer *fenced_buf) { + struct fenced_buffer_list *fenced_list = fenced_buf->list; struct pb_fence_ops *ops = fenced_list->ops; - enum pipe_error ret = PIPE_ERROR; #if 0 debug_warning("waiting for GPU"); #endif - assert(pipe_is_referenced(&fenced_buf->base.base.reference)); assert(fenced_buf->fence); - - /* - * Acquire the global lock. Must release buffer mutex first to preserve - * lock order. - */ - pipe_mutex_unlock(fenced_buf->mutex); - pipe_mutex_lock(fenced_list->mutex); - pipe_mutex_lock(fenced_buf->mutex); - if(fenced_buf->fence) { - if(ops->fence_finish(ops, fenced_buf->fence, 0) == 0) { - /* Remove from the fenced list */ - /* TODO: remove consequents */ - fenced_buffer_remove_locked(fenced_list, fenced_buf); - - p_atomic_dec(&fenced_buf->base.base.reference.count); - assert(pipe_is_referenced(&fenced_buf->base.base.reference)); - - fenced_buf->flags &= ~PIPE_BUFFER_USAGE_GPU_READ_WRITE; - - ret = PIPE_OK; + if(ops->fence_finish(ops, fenced_buf->fence, 0) != 0) { + return PIPE_ERROR; } + /* Remove from the fenced list */ + /* TODO: remove consequents */ + _fenced_buffer_remove(fenced_list, fenced_buf); } - pipe_mutex_unlock(fenced_list->mutex); - - return ret; + fenced_buf->flags &= ~PIPE_BUFFER_USAGE_GPU_READ_WRITE; + return PIPE_OK; } @@ -240,8 +215,8 @@ fenced_buffer_finish_locked(struct fenced_buffer_list *fenced_list, * Free as many fenced buffers from the list head as possible. */ static void -fenced_buffer_list_check_free_locked(struct fenced_buffer_list *fenced_list, - int wait) +_fenced_buffer_list_check_free(struct fenced_buffer_list *fenced_list, + int wait) { struct pb_fence_ops *ops = fenced_list->ops; struct list_head *curr, *next; @@ -253,28 +228,21 @@ fenced_buffer_list_check_free_locked(struct fenced_buffer_list *fenced_list, while(curr != &fenced_list->delayed) { fenced_buf = LIST_ENTRY(struct fenced_buffer, curr, head); - pipe_mutex_lock(fenced_buf->mutex); - if(fenced_buf->fence != prev_fence) { int signaled; if (wait) signaled = ops->fence_finish(ops, fenced_buf->fence, 0); else signaled = ops->fence_signalled(ops, fenced_buf->fence, 0); - if (signaled != 0) { - pipe_mutex_unlock(fenced_buf->mutex); + if (signaled != 0) break; - } prev_fence = fenced_buf->fence; } else { assert(ops->fence_signalled(ops, fenced_buf->fence, 0) == 0); } - fenced_buffer_remove_locked(fenced_list, fenced_buf); - pipe_mutex_unlock(fenced_buf->mutex); - - pb_reference((struct pb_buffer **)&fenced_buf, NULL); + _fenced_buffer_remove(fenced_list, fenced_buf); curr = next; next = curr->next; @@ -288,25 +256,30 @@ fenced_buffer_destroy(struct pb_buffer *buf) struct fenced_buffer *fenced_buf = fenced_buffer(buf); struct fenced_buffer_list *fenced_list = fenced_buf->list; - assert(!pipe_is_referenced(&fenced_buf->base.base.reference)); - assert(!fenced_buf->fence); - -#ifdef DEBUG pipe_mutex_lock(fenced_list->mutex); - assert(fenced_buf->head.prev); - assert(fenced_buf->head.next); - LIST_DEL(&fenced_buf->head); - assert(fenced_list->numUnfenced); - --fenced_list->numUnfenced; + assert(!pipe_is_referenced(&fenced_buf->base.base.reference)); + if (fenced_buf->fence) { + struct pb_fence_ops *ops = fenced_list->ops; + if(ops->fence_signalled(ops, fenced_buf->fence, 0) == 0) { + struct list_head *curr, *prev; + curr = &fenced_buf->head; + prev = curr->prev; + do { + fenced_buf = LIST_ENTRY(struct fenced_buffer, curr, head); + assert(ops->fence_signalled(ops, fenced_buf->fence, 0) == 0); + _fenced_buffer_remove(fenced_list, fenced_buf); + curr = prev; + prev = curr->prev; + } while (curr != &fenced_list->delayed); + } + else { + /* delay destruction */ + } + } + else { + _fenced_buffer_destroy(fenced_buf); + } pipe_mutex_unlock(fenced_list->mutex); -#else - (void)fenced_list; -#endif - - pb_reference(&fenced_buf->buffer, NULL); - - pipe_mutex_destroy(fenced_buf->mutex); - FREE(fenced_buf); } @@ -317,23 +290,24 @@ fenced_buffer_map(struct pb_buffer *buf, struct fenced_buffer *fenced_buf = fenced_buffer(buf); struct fenced_buffer_list *fenced_list = fenced_buf->list; struct pb_fence_ops *ops = fenced_list->ops; - void *map = NULL; - - pipe_mutex_lock(fenced_buf->mutex); + void *map; assert(!(flags & PIPE_BUFFER_USAGE_GPU_READ_WRITE)); /* Serialize writes */ if((fenced_buf->flags & PIPE_BUFFER_USAGE_GPU_WRITE) || ((fenced_buf->flags & PIPE_BUFFER_USAGE_GPU_READ) && (flags & PIPE_BUFFER_USAGE_CPU_WRITE))) { - if((flags & PIPE_BUFFER_USAGE_DONTBLOCK) && - ops->fence_signalled(ops, fenced_buf->fence, 0) == 0) { + if(flags & PIPE_BUFFER_USAGE_DONTBLOCK) { /* Don't wait for the GPU to finish writing */ - goto done; + if(ops->fence_signalled(ops, fenced_buf->fence, 0) == 0) + _fenced_buffer_remove(fenced_list, fenced_buf); + else + return NULL; + } + else { + /* Wait for the GPU to finish writing */ + _fenced_buffer_finish(fenced_buf); } - - /* Wait for the GPU to finish writing */ - fenced_buffer_finish_locked(fenced_list, fenced_buf); } #if 0 @@ -350,9 +324,6 @@ fenced_buffer_map(struct pb_buffer *buf, fenced_buf->flags |= flags & PIPE_BUFFER_USAGE_CPU_READ_WRITE; } -done: - pipe_mutex_unlock(fenced_buf->mutex); - return map; } @@ -361,9 +332,6 @@ static void fenced_buffer_unmap(struct pb_buffer *buf) { struct fenced_buffer *fenced_buf = fenced_buffer(buf); - - pipe_mutex_lock(fenced_buf->mutex); - assert(fenced_buf->mapcount); if(fenced_buf->mapcount) { pb_unmap(fenced_buf->buffer); @@ -371,8 +339,6 @@ fenced_buffer_unmap(struct pb_buffer *buf) if(!fenced_buf->mapcount) fenced_buf->flags &= ~PIPE_BUFFER_USAGE_CPU_READ_WRITE; } - - pipe_mutex_unlock(fenced_buf->mutex); } @@ -384,14 +350,11 @@ fenced_buffer_validate(struct pb_buffer *buf, struct fenced_buffer *fenced_buf = fenced_buffer(buf); enum pipe_error ret; - pipe_mutex_lock(fenced_buf->mutex); - if(!vl) { /* invalidate */ fenced_buf->vl = NULL; fenced_buf->validation_flags = 0; - ret = PIPE_OK; - goto done; + return PIPE_OK; } assert(flags & PIPE_BUFFER_USAGE_GPU_READ_WRITE); @@ -399,17 +362,14 @@ fenced_buffer_validate(struct pb_buffer *buf, flags &= PIPE_BUFFER_USAGE_GPU_READ_WRITE; /* Buffer cannot be validated in two different lists */ - if(fenced_buf->vl && fenced_buf->vl != vl) { - ret = PIPE_ERROR_RETRY; - goto done; - } + if(fenced_buf->vl && fenced_buf->vl != vl) + return PIPE_ERROR_RETRY; #if 0 /* Do not validate if buffer is still mapped */ if(fenced_buf->flags & PIPE_BUFFER_USAGE_CPU_READ_WRITE) { /* TODO: wait for the thread that mapped the buffer to unmap it */ - ret = PIPE_ERROR_RETRY; - goto done; + return PIPE_ERROR_RETRY; } /* Final sanity checking */ assert(!(fenced_buf->flags & PIPE_BUFFER_USAGE_CPU_READ_WRITE)); @@ -419,21 +379,17 @@ fenced_buffer_validate(struct pb_buffer *buf, if(fenced_buf->vl == vl && (fenced_buf->validation_flags & flags) == flags) { /* Nothing to do -- buffer already validated */ - ret = PIPE_OK; - goto done; + return PIPE_OK; } ret = pb_validate(fenced_buf->buffer, vl, flags); if (ret != PIPE_OK) - goto done; + return ret; fenced_buf->vl = vl; fenced_buf->validation_flags |= flags; -done: - pipe_mutex_unlock(fenced_buf->mutex); - - return ret; + return PIPE_OK; } @@ -448,36 +404,29 @@ fenced_buffer_fence(struct pb_buffer *buf, fenced_buf = fenced_buffer(buf); fenced_list = fenced_buf->list; ops = fenced_list->ops; - - pipe_mutex_lock(fenced_list->mutex); - pipe_mutex_lock(fenced_buf->mutex); - - assert(pipe_is_referenced(&fenced_buf->base.base.reference)); - - if(fence != fenced_buf->fence) { - assert(fenced_buf->vl); - assert(fenced_buf->validation_flags); - - if (fenced_buf->fence) { - fenced_buffer_remove_locked(fenced_list, fenced_buf); - p_atomic_dec(&fenced_buf->base.base.reference.count); - assert(pipe_is_referenced(&fenced_buf->base.base.reference)); - } - if (fence) { - ops->fence_reference(ops, &fenced_buf->fence, fence); - fenced_buf->flags |= fenced_buf->validation_flags; - p_atomic_inc(&fenced_buf->base.base.reference.count); - fenced_buffer_add_locked(fenced_list, fenced_buf); - } - - pb_fence(fenced_buf->buffer, fence); - fenced_buf->vl = NULL; - fenced_buf->validation_flags = 0; + if(fence == fenced_buf->fence) { + /* Nothing to do */ + return; } - pipe_mutex_unlock(fenced_buf->mutex); + assert(fenced_buf->vl); + assert(fenced_buf->validation_flags); + + pipe_mutex_lock(fenced_list->mutex); + if (fenced_buf->fence) + _fenced_buffer_remove(fenced_list, fenced_buf); + if (fence) { + ops->fence_reference(ops, &fenced_buf->fence, fence); + fenced_buf->flags |= fenced_buf->validation_flags; + _fenced_buffer_add(fenced_buf); + } pipe_mutex_unlock(fenced_list->mutex); + + pb_fence(fenced_buf->buffer, fence); + + fenced_buf->vl = NULL; + fenced_buf->validation_flags = 0; } @@ -487,7 +436,6 @@ fenced_buffer_get_base_buffer(struct pb_buffer *buf, pb_size *offset) { struct fenced_buffer *fenced_buf = fenced_buffer(buf); - /* NOTE: accesses immutable members only -- mutex not necessary */ pb_get_base_buffer(fenced_buf->buffer, base_buf, offset); } @@ -527,8 +475,6 @@ fenced_buffer_create(struct fenced_buffer_list *fenced_list, buf->buffer = buffer; buf->list = fenced_list; - pipe_mutex_init(buf->mutex); - #ifdef DEBUG pipe_mutex_lock(fenced_list->mutex); LIST_ADDTAIL(&buf->head, &fenced_list->unfenced); @@ -570,7 +516,7 @@ fenced_buffer_list_check_free(struct fenced_buffer_list *fenced_list, int wait) { pipe_mutex_lock(fenced_list->mutex); - fenced_buffer_list_check_free_locked(fenced_list, wait); + _fenced_buffer_list_check_free(fenced_list, wait); pipe_mutex_unlock(fenced_list->mutex); } @@ -592,13 +538,11 @@ fenced_buffer_list_dump(struct fenced_buffer_list *fenced_list) next = curr->next; while(curr != &fenced_list->unfenced) { fenced_buf = LIST_ENTRY(struct fenced_buffer, curr, head); - pipe_mutex_lock(fenced_buf->mutex); assert(!fenced_buf->fence); debug_printf("%10p %7u %7u\n", (void *) fenced_buf, fenced_buf->base.base.size, p_atomic_read(&fenced_buf->base.base.reference.count)); - pipe_mutex_unlock(fenced_buf->mutex); curr = next; next = curr->next; } @@ -608,7 +552,6 @@ fenced_buffer_list_dump(struct fenced_buffer_list *fenced_list) while(curr != &fenced_list->delayed) { int signaled; fenced_buf = LIST_ENTRY(struct fenced_buffer, curr, head); - pipe_mutex_lock(fenced_buf->mutex); signaled = ops->fence_signalled(ops, fenced_buf->fence, 0); debug_printf("%10p %7u %7u %10p %s\n", (void *) fenced_buf, @@ -616,7 +559,6 @@ fenced_buffer_list_dump(struct fenced_buffer_list *fenced_list) p_atomic_read(&fenced_buf->base.base.reference.count), (void *) fenced_buf->fence, signaled == 0 ? "y" : "n"); - pipe_mutex_unlock(fenced_buf->mutex); curr = next; next = curr->next; } @@ -637,8 +579,8 @@ fenced_buffer_list_destroy(struct fenced_buffer_list *fenced_list) #if defined(PIPE_OS_LINUX) || defined(PIPE_OS_BSD) || defined(PIPE_OS_SOLARIS) sched_yield(); #endif + _fenced_buffer_list_check_free(fenced_list, 1); pipe_mutex_lock(fenced_list->mutex); - fenced_buffer_list_check_free_locked(fenced_list, 1); } #ifdef DEBUG @@ -646,7 +588,6 @@ fenced_buffer_list_destroy(struct fenced_buffer_list *fenced_list) #endif pipe_mutex_unlock(fenced_list->mutex); - pipe_mutex_destroy(fenced_list->mutex); fenced_list->ops->destroy(fenced_list->ops); -- cgit v1.2.3 From 3447d545d99c450c6a13d8a37e9cb9f5463a40eb Mon Sep 17 00:00:00 2001 From: Zack Rusin Date: Mon, 11 Jan 2010 18:03:49 -0500 Subject: st/xorg: fix a rare video crash sometimes dst isn't present if a window is in a middle of a resize, stop crashing in those cases and just ignore a frame. --- src/gallium/state_trackers/xorg/xorg_xv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/gallium/state_trackers/xorg/xorg_xv.c b/src/gallium/state_trackers/xorg/xorg_xv.c index 19c50051a8..666ff104b9 100644 --- a/src/gallium/state_trackers/xorg/xorg_xv.c +++ b/src/gallium/state_trackers/xorg/xorg_xv.c @@ -486,7 +486,7 @@ display_video(ScrnInfoPtr pScrn, struct xorg_xv_port_priv *pPriv, int id, Bool hdtv; int x, y, w, h; struct exa_pixmap_priv *dst = exaGetPixmapDriverPrivate(pPixmap); - struct pipe_surface *dst_surf = xorg_gpu_surface(pPriv->r->pipe->screen, dst); + struct pipe_surface *dst_surf = NULL; if (dst && !dst->tex) { xorg_exa_set_shared_usage(pPixmap); @@ -496,6 +496,7 @@ display_video(ScrnInfoPtr pScrn, struct xorg_xv_port_priv *pPriv, int id, if (!dst || !dst->tex) XORG_FALLBACK("Xv destination %s", !dst ? "!dst" : "!dst->tex"); + dst_surf = xorg_gpu_surface(pPriv->r->pipe->screen, dst); hdtv = ((src_w >= RES_720P_X) && (src_h >= RES_720P_Y)); REGION_TRANSLATE(pScrn->pScreen, dstRegion, -pPixmap->screen_x, -- cgit v1.2.3 From d880b64423d9eab7e6cbe3ad93dfefd6a9613cce Mon Sep 17 00:00:00 2001 From: Zack Rusin Date: Mon, 11 Jan 2010 18:27:59 -0500 Subject: st/xorg: move exaMoveInPixmap before trying to fetch it as Michel suggested, this is a cleaner way of fixing crashes caused by exaGetPixmapDriverPrivate returning null since the data hasn't been moved yet. --- src/gallium/state_trackers/xorg/xorg_xv.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/gallium/state_trackers/xorg/xorg_xv.c b/src/gallium/state_trackers/xorg/xorg_xv.c index 666ff104b9..a437370525 100644 --- a/src/gallium/state_trackers/xorg/xorg_xv.c +++ b/src/gallium/state_trackers/xorg/xorg_xv.c @@ -485,9 +485,12 @@ display_video(ScrnInfoPtr pScrn, struct xorg_xv_port_priv *pPriv, int id, int dxo, dyo; Bool hdtv; int x, y, w, h; - struct exa_pixmap_priv *dst = exaGetPixmapDriverPrivate(pPixmap); + struct exa_pixmap_priv *dst; struct pipe_surface *dst_surf = NULL; + exaMoveInPixmap(pPixmap); + dst = exaGetPixmapDriverPrivate(pPixmap); + if (dst && !dst->tex) { xorg_exa_set_shared_usage(pPixmap); pScrn->pScreen->ModifyPixmapHeader(pPixmap, 0, 0, 0, 0, 0, NULL); @@ -516,7 +519,6 @@ display_video(ScrnInfoPtr pScrn, struct xorg_xv_port_priv *pPriv, int id, bind_samplers(pPriv); setup_fs_video_constants(pPriv->r, hdtv); - exaMoveInPixmap(pPixmap); DamageDamageRegion(&pPixmap->drawable, dstRegion); while (nbox--) { -- cgit v1.2.3 From 3fce8ad2de9500add86ca1e75c0c79361ee1b524 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 11 Jan 2010 20:18:50 -0700 Subject: Revert "util: Build u_bitmask.o when using make." This reverts commit 01eff0e6d23f90650de7c563f74a1aec3de112a6. u_bitmask.c was already in the C_SOURCES list. --- src/gallium/auxiliary/util/Makefile | 1 - 1 file changed, 1 deletion(-) (limited to 'src') diff --git a/src/gallium/auxiliary/util/Makefile b/src/gallium/auxiliary/util/Makefile index 5599048192..7e47ec6d3b 100644 --- a/src/gallium/auxiliary/util/Makefile +++ b/src/gallium/auxiliary/util/Makefile @@ -4,7 +4,6 @@ include $(TOP)/configs/current LIBNAME = util C_SOURCES = \ - u_bitmask.c \ u_debug.c \ u_debug_dump.c \ u_debug_symbol.c \ -- cgit v1.2.3 From 0d65a68f516ac38f5dad87041423f0891350b83a Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Mon, 11 Jan 2010 21:04:16 -0800 Subject: x86: Remove unnecessary header from x86_xform.c. --- src/mesa/x86/x86_xform.c | 1 - 1 file changed, 1 deletion(-) (limited to 'src') diff --git a/src/mesa/x86/x86_xform.c b/src/mesa/x86/x86_xform.c index 52f6b25d81..c834e2b468 100644 --- a/src/mesa/x86/x86_xform.c +++ b/src/mesa/x86/x86_xform.c @@ -30,7 +30,6 @@ #include "main/glheader.h" #include "main/context.h" #include "math/m_xform.h" -#include "tnl/t_context.h" #include "x86_xform.h" #include "common_x86_asm.h" -- cgit v1.2.3 From 083dae14bd2d456515374449019afb164ae26655 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Mon, 11 Jan 2010 22:46:30 -0800 Subject: vbo: Remove unnecessary header from vbo_split_copy.c. --- src/mesa/vbo/vbo_split_copy.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'src') diff --git a/src/mesa/vbo/vbo_split_copy.c b/src/mesa/vbo/vbo_split_copy.c index c45190b9dd..2ca111217c 100644 --- a/src/mesa/vbo/vbo_split_copy.c +++ b/src/mesa/vbo/vbo_split_copy.c @@ -34,7 +34,6 @@ #include "main/imports.h" #include "main/image.h" #include "main/macros.h" -#include "main/enums.h" #include "main/mtypes.h" #include "vbo_split.h" @@ -221,8 +220,6 @@ begin( struct copy_context *copy, GLenum mode, GLboolean begin_flag ) { struct _mesa_prim *prim = ©->dstprim[copy->dstprim_nr]; -/* _mesa_printf("begin %s (%d)\n", _mesa_lookup_prim_by_nr(mode), begin_flag); */ - prim->mode = mode; prim->begin = begin_flag; } -- cgit v1.2.3 From d2271d8a3940be30521cdebd6b711c6d9cfcd4e2 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Mon, 11 Jan 2010 23:53:13 -0800 Subject: vbo: Remove unnecessary header from vbo_save_loopback.c. --- src/mesa/vbo/vbo_save_loopback.c | 1 - 1 file changed, 1 deletion(-) (limited to 'src') diff --git a/src/mesa/vbo/vbo_save_loopback.c b/src/mesa/vbo/vbo_save_loopback.c index b7a74e4535..f13a16e3b5 100644 --- a/src/mesa/vbo/vbo_save_loopback.c +++ b/src/mesa/vbo/vbo_save_loopback.c @@ -29,7 +29,6 @@ #include "main/glheader.h" #include "main/enums.h" #include "main/imports.h" -#include "main/macros.h" #include "main/mtypes.h" #include "glapi/dispatch.h" #include "glapi/glapi.h" -- cgit v1.2.3 From aee9a6f4e1bc4893f09c1f2b8d723c179c47b34a Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Tue, 12 Jan 2010 00:50:05 -0800 Subject: vbo: Remove unnecessary headers from vbo_save.c. --- src/mesa/vbo/vbo_save.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'src') diff --git a/src/mesa/vbo/vbo_save.c b/src/mesa/vbo/vbo_save.c index 9757c3d9f6..10f705cf84 100644 --- a/src/mesa/vbo/vbo_save.c +++ b/src/mesa/vbo/vbo_save.c @@ -28,8 +28,6 @@ #include "main/mtypes.h" #include "main/bufferobj.h" -#include "main/dlist.h" -#include "main/vtxfmt.h" #include "main/imports.h" #include "vbo_context.h" -- cgit v1.2.3 From 37d326503dcd6c779e90c3f8f4626beba28dc449 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Tue, 12 Jan 2010 16:37:30 -0800 Subject: vbo: Remove unnecessary header from vbo_exec_draw.c. --- src/mesa/vbo/vbo_exec_draw.c | 1 - 1 file changed, 1 deletion(-) (limited to 'src') diff --git a/src/mesa/vbo/vbo_exec_draw.c b/src/mesa/vbo/vbo_exec_draw.c index 4f43856016..d7dbbceb1b 100644 --- a/src/mesa/vbo/vbo_exec_draw.c +++ b/src/mesa/vbo/vbo_exec_draw.c @@ -30,7 +30,6 @@ #include "main/context.h" #include "main/enums.h" #include "main/state.h" -#include "main/macros.h" #include "vbo_context.h" -- cgit v1.2.3 From 94d238e7571413cb0be8a4fe6e231b739644d588 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Tue, 12 Jan 2010 16:55:36 -0800 Subject: vbo: Remove unnecessary header from vbo_exec_array.c. --- src/mesa/vbo/vbo_exec_array.c | 1 - 1 file changed, 1 deletion(-) (limited to 'src') diff --git a/src/mesa/vbo/vbo_exec_array.c b/src/mesa/vbo/vbo_exec_array.c index 6de8f059b7..2c82f7c9c5 100644 --- a/src/mesa/vbo/vbo_exec_array.c +++ b/src/mesa/vbo/vbo_exec_array.c @@ -35,7 +35,6 @@ #include "main/bufferobj.h" #include "main/enums.h" #include "main/macros.h" -#include "glapi/dispatch.h" #include "vbo_context.h" -- cgit v1.2.3 From c63150100301ef524223df430271760b606784c3 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Tue, 12 Jan 2010 17:07:24 -0800 Subject: vbo: Remove unnecessary headers from vbo_exec.c. --- src/mesa/vbo/vbo_exec.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'src') diff --git a/src/mesa/vbo/vbo_exec.c b/src/mesa/vbo/vbo_exec.c index e168a89ea5..a057befed0 100644 --- a/src/mesa/vbo/vbo_exec.c +++ b/src/mesa/vbo/vbo_exec.c @@ -28,9 +28,6 @@ #include "main/api_arrayelt.h" #include "main/glheader.h" -#include "main/imports.h" -#include "main/context.h" -#include "main/macros.h" #include "main/mtypes.h" #include "main/vtxfmt.h" -- cgit v1.2.3 From 264f4101cd52ad5b22a85f8f4709bd7b38b8d8e2 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Tue, 12 Jan 2010 19:45:25 -0800 Subject: tnl: Remove unnecessary header from t_vb_program.c. --- src/mesa/tnl/t_vb_program.c | 1 - 1 file changed, 1 deletion(-) (limited to 'src') diff --git a/src/mesa/tnl/t_vb_program.c b/src/mesa/tnl/t_vb_program.c index a9dae7d2e7..f3de6b6caa 100644 --- a/src/mesa/tnl/t_vb_program.c +++ b/src/mesa/tnl/t_vb_program.c @@ -40,7 +40,6 @@ #include "shader/prog_statevars.h" #include "shader/prog_execute.h" #include "swrast/s_context.h" -#include "swrast/s_texfilter.h" #include "tnl/tnl.h" #include "tnl/t_context.h" -- cgit v1.2.3 From a24d852630a39be1b9a062f17976e8ff8db1df8b Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Tue, 12 Jan 2010 19:49:19 -0800 Subject: tnl: Remove unnecessary header from t_rasterpos.c. --- src/mesa/tnl/t_rasterpos.c | 1 - 1 file changed, 1 deletion(-) (limited to 'src') diff --git a/src/mesa/tnl/t_rasterpos.c b/src/mesa/tnl/t_rasterpos.c index 99b6787455..13b84a7d77 100644 --- a/src/mesa/tnl/t_rasterpos.c +++ b/src/mesa/tnl/t_rasterpos.c @@ -29,7 +29,6 @@ #include "main/feedback.h" #include "main/light.h" #include "main/macros.h" -#include "main/rastpos.h" #include "main/simple_list.h" #include "main/mtypes.h" -- cgit v1.2.3 From dffcbee8e72398e1492a1c957de788e1e87850ac Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Tue, 12 Jan 2010 19:55:24 -0800 Subject: tnl: Remove unnecessary header from t_pipeline.c. --- src/mesa/tnl/t_pipeline.c | 1 - 1 file changed, 1 deletion(-) (limited to 'src') diff --git a/src/mesa/tnl/t_pipeline.c b/src/mesa/tnl/t_pipeline.c index 357ef1e24b..2cc677e5bf 100644 --- a/src/mesa/tnl/t_pipeline.c +++ b/src/mesa/tnl/t_pipeline.c @@ -28,7 +28,6 @@ #include "main/glheader.h" #include "main/context.h" #include "main/imports.h" -#include "main/state.h" #include "main/mtypes.h" #include "t_context.h" -- cgit v1.2.3 From 2c7cf3f9c95098ef08966d19cd1990d3825fd9eb Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Tue, 12 Jan 2010 20:02:44 -0800 Subject: tnl: Remove unnecessary headers from t_draw.c. --- src/mesa/tnl/t_draw.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'src') diff --git a/src/mesa/tnl/t_draw.c b/src/mesa/tnl/t_draw.c index 04fa106300..9a888ce19f 100644 --- a/src/mesa/tnl/t_draw.c +++ b/src/mesa/tnl/t_draw.c @@ -28,15 +28,11 @@ #include "main/glheader.h" #include "main/context.h" #include "main/imports.h" -#include "main/state.h" #include "main/mtypes.h" #include "main/macros.h" #include "main/enums.h" #include "t_context.h" -#include "t_pipeline.h" -#include "t_vp_build.h" -#include "t_vertex.h" #include "tnl.h" -- cgit v1.2.3 From c239f387091da9f81bbd315234a19d9b3e3ac694 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Tue, 12 Jan 2010 20:14:36 -0800 Subject: tnl: Remove unnecessary header from t_context.c. --- src/mesa/tnl/t_context.c | 1 - 1 file changed, 1 deletion(-) (limited to 'src') diff --git a/src/mesa/tnl/t_context.c b/src/mesa/tnl/t_context.c index db21b4589d..5a14e595a0 100644 --- a/src/mesa/tnl/t_context.c +++ b/src/mesa/tnl/t_context.c @@ -38,7 +38,6 @@ #include "tnl.h" #include "t_context.h" #include "t_pipeline.h" -#include "t_vp_build.h" #include "vbo/vbo.h" -- cgit v1.2.3 From a01b9eac0458eabf07b68bb52afe7026dd8bdfb2 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Tue, 12 Jan 2010 20:36:33 -0800 Subject: swrast: Remove unnecessary header from s_texcombine.c. --- src/mesa/swrast/s_texcombine.c | 1 - 1 file changed, 1 deletion(-) (limited to 'src') diff --git a/src/mesa/swrast/s_texcombine.c b/src/mesa/swrast/s_texcombine.c index 889164b986..594b71a03c 100644 --- a/src/mesa/swrast/s_texcombine.c +++ b/src/mesa/swrast/s_texcombine.c @@ -29,7 +29,6 @@ #include "main/colormac.h" #include "main/image.h" #include "main/imports.h" -#include "main/pixel.h" #include "shader/prog_instruction.h" #include "s_context.h" -- cgit v1.2.3 From 11034bfa97d5991a2d8cd973ddfbb21935b53924 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Tue, 12 Jan 2010 21:41:09 -0800 Subject: swrast: Remove unnecessary header from s_readpix.c. --- src/mesa/swrast/s_readpix.c | 1 - 1 file changed, 1 deletion(-) (limited to 'src') diff --git a/src/mesa/swrast/s_readpix.c b/src/mesa/swrast/s_readpix.c index 44a11cd6dd..94fb974eab 100644 --- a/src/mesa/swrast/s_readpix.c +++ b/src/mesa/swrast/s_readpix.c @@ -33,7 +33,6 @@ #include "main/image.h" #include "main/macros.h" #include "main/imports.h" -#include "main/pixel.h" #include "main/state.h" #include "s_context.h" -- cgit v1.2.3 From 7debc532d50cacc83fb63b7bd36a80bbe432e792 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Tue, 12 Jan 2010 21:51:19 -0800 Subject: swrast: Remove unnecessary header from s_points.c. --- src/mesa/swrast/s_points.c | 1 - 1 file changed, 1 deletion(-) (limited to 'src') diff --git a/src/mesa/swrast/s_points.c b/src/mesa/swrast/s_points.c index 50ec2063a5..6b955429e9 100644 --- a/src/mesa/swrast/s_points.c +++ b/src/mesa/swrast/s_points.c @@ -27,7 +27,6 @@ #include "main/colormac.h" #include "main/context.h" #include "main/macros.h" -#include "main/texstate.h" #include "s_context.h" #include "s_feedback.h" #include "s_points.h" -- cgit v1.2.3 From d6588a937293c88674e8c83ba5c34114d12180b1 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Tue, 12 Jan 2010 21:59:58 -0800 Subject: swrast: Remove unnecessary header in s_lines.c. --- src/mesa/swrast/s_lines.c | 1 - 1 file changed, 1 deletion(-) (limited to 'src') diff --git a/src/mesa/swrast/s_lines.c b/src/mesa/swrast/s_lines.c index 23cb9b57ef..5411229d70 100644 --- a/src/mesa/swrast/s_lines.c +++ b/src/mesa/swrast/s_lines.c @@ -29,7 +29,6 @@ #include "main/macros.h" #include "s_aaline.h" #include "s_context.h" -#include "s_depth.h" #include "s_feedback.h" #include "s_lines.h" #include "s_span.h" -- cgit v1.2.3 From 831764fa75b9a2ea5b42c2df35c6dcfcedcd9611 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Tue, 12 Jan 2010 23:54:15 -0800 Subject: swrast: Remove unnecessary header from s_fragprog.c. --- src/mesa/swrast/s_fragprog.c | 1 - 1 file changed, 1 deletion(-) (limited to 'src') diff --git a/src/mesa/swrast/s_fragprog.c b/src/mesa/swrast/s_fragprog.c index a22d34415d..9ac33a26a6 100644 --- a/src/mesa/swrast/s_fragprog.c +++ b/src/mesa/swrast/s_fragprog.c @@ -25,7 +25,6 @@ #include "main/glheader.h" #include "main/colormac.h" #include "main/context.h" -#include "main/texstate.h" #include "shader/prog_instruction.h" #include "s_fragprog.h" -- cgit v1.2.3 From 1b333453e4998d5db76952aed6caa34d98dfdc7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Fonseca?= Date: Wed, 13 Jan 2010 13:40:09 +0000 Subject: svga: Fix compile_vs error code. It could erroneously return PIPE_OK in some circumstances. Make compile_fs code identical. --- src/gallium/drivers/svga/svga_state_fs.c | 4 +++- src/gallium/drivers/svga/svga_state_vs.c | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/gallium/drivers/svga/svga_state_fs.c b/src/gallium/drivers/svga/svga_state_fs.c index 44bb58c900..4fe9141677 100644 --- a/src/gallium/drivers/svga/svga_state_fs.c +++ b/src/gallium/drivers/svga/svga_state_fs.c @@ -76,8 +76,10 @@ static enum pipe_error compile_fs( struct svga_context *svga, } result->id = util_bitmask_add(svga->fs_bm); - if(result->id == UTIL_BITMASK_INVALID_INDEX) + if(result->id == UTIL_BITMASK_INVALID_INDEX) { + ret = PIPE_ERROR_OUT_OF_MEMORY; goto fail; + } ret = SVGA3D_DefineShader(svga->swc, result->id, diff --git a/src/gallium/drivers/svga/svga_state_vs.c b/src/gallium/drivers/svga/svga_state_vs.c index db30f2735f..5e33c127d9 100644 --- a/src/gallium/drivers/svga/svga_state_vs.c +++ b/src/gallium/drivers/svga/svga_state_vs.c @@ -70,7 +70,7 @@ static enum pipe_error compile_vs( struct svga_context *svga, struct svga_shader_result **out_result ) { struct svga_shader_result *result; - enum pipe_error ret = PIPE_OK; + enum pipe_error ret = PIPE_ERROR; result = svga_translate_vertex_program( vs, key ); if (result == NULL) { @@ -79,8 +79,10 @@ static enum pipe_error compile_vs( struct svga_context *svga, } result->id = util_bitmask_add(svga->vs_bm); - if(result->id == UTIL_BITMASK_INVALID_INDEX) + if(result->id == UTIL_BITMASK_INVALID_INDEX) { + ret = PIPE_ERROR_OUT_OF_MEMORY; goto fail; + } ret = SVGA3D_DefineShader(svga->swc, result->id, -- cgit v1.2.3 From a9086f2d17a58bd2597d34a6cc886dc111997e4e Mon Sep 17 00:00:00 2001 From: Thomas Hellstrom Date: Wed, 13 Jan 2010 17:40:41 +0100 Subject: st/dri: Make sure we always request a fake front. This should be the correct, but sub-optimal way to handle things on pre-1.7 servers. For servers that automatically adds a fake front we should never request the fake front and handle the reply differently. Signed-off-by: Thomas Hellstrom --- src/gallium/state_trackers/dri/dri_drawable.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src') diff --git a/src/gallium/state_trackers/dri/dri_drawable.c b/src/gallium/state_trackers/dri/dri_drawable.c index c4dfb0c41f..3c17ccde0a 100644 --- a/src/gallium/state_trackers/dri/dri_drawable.c +++ b/src/gallium/state_trackers/dri/dri_drawable.c @@ -365,11 +365,10 @@ dri_create_buffer(__DRIscreenPrivate * sPriv, /* TODO incase of double buffer visual, delay fake creation */ i = 0; drawable->attachments[i++] = __DRI_BUFFER_FRONT_LEFT; + drawable->attachments[i++] = __DRI_BUFFER_FAKE_FRONT_LEFT; if (visual->doubleBufferMode) drawable->attachments[i++] = __DRI_BUFFER_BACK_LEFT; - else - drawable->attachments[i++] = __DRI_BUFFER_FAKE_FRONT_LEFT; if (visual->depthBits && visual->stencilBits) drawable->attachments[i++] = __DRI_BUFFER_DEPTH_STENCIL; else if (visual->depthBits) -- cgit v1.2.3 From f649870c9bc0f7e0660af7131bf418830f6a34ae Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Wed, 13 Jan 2010 22:20:44 -0800 Subject: swrast: Remove unnecessary header from s_feedback.c. --- src/mesa/swrast/s_feedback.c | 1 - 1 file changed, 1 deletion(-) (limited to 'src') diff --git a/src/mesa/swrast/s_feedback.c b/src/mesa/swrast/s_feedback.c index 47ed25ee10..2e6066983d 100644 --- a/src/mesa/swrast/s_feedback.c +++ b/src/mesa/swrast/s_feedback.c @@ -25,7 +25,6 @@ #include "main/glheader.h" #include "main/colormac.h" #include "main/context.h" -#include "main/enums.h" #include "main/feedback.h" #include "main/macros.h" -- cgit v1.2.3 From d1631f734a6f7d052e347e0f5eb878e156d1afa6 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Wed, 13 Jan 2010 22:30:04 -0800 Subject: swrast: Remove unnecessary header from s_drawpix.c. --- src/mesa/swrast/s_drawpix.c | 1 - 1 file changed, 1 deletion(-) (limited to 'src') diff --git a/src/mesa/swrast/s_drawpix.c b/src/mesa/swrast/s_drawpix.c index 6970b2e9cb..59dfd65488 100644 --- a/src/mesa/swrast/s_drawpix.c +++ b/src/mesa/swrast/s_drawpix.c @@ -30,7 +30,6 @@ #include "main/image.h" #include "main/macros.h" #include "main/imports.h" -#include "main/pixel.h" #include "main/state.h" #include "s_context.h" -- cgit v1.2.3 From cf061c24e041878368946fbcffa2906cfffd8b08 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Wed, 13 Jan 2010 22:36:01 -0800 Subject: swrast: Remove unnecessary header from s_depth.c. --- src/mesa/swrast/s_depth.c | 1 - 1 file changed, 1 deletion(-) (limited to 'src') diff --git a/src/mesa/swrast/s_depth.c b/src/mesa/swrast/s_depth.c index c37a54eb3e..0b6bb7e3ec 100644 --- a/src/mesa/swrast/s_depth.c +++ b/src/mesa/swrast/s_depth.c @@ -28,7 +28,6 @@ #include "main/formats.h" #include "main/macros.h" #include "main/imports.h" -#include "main/fbobject.h" #include "s_depth.h" #include "s_context.h" -- cgit v1.2.3 From 886cffb44e92dcdaeb5396a01745e78598e86a3f Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Wed, 13 Jan 2010 22:43:16 -0800 Subject: swrast: Remove unnecessary headers from s_copypix.c. --- src/mesa/swrast/s_copypix.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'src') diff --git a/src/mesa/swrast/s_copypix.c b/src/mesa/swrast/s_copypix.c index 5ecfb1e90a..da98730c38 100644 --- a/src/mesa/swrast/s_copypix.c +++ b/src/mesa/swrast/s_copypix.c @@ -27,11 +27,9 @@ #include "main/context.h" #include "main/colormac.h" #include "main/convolve.h" -#include "main/histogram.h" #include "main/image.h" #include "main/macros.h" #include "main/imports.h" -#include "main/pixel.h" #include "s_context.h" #include "s_depth.h" -- cgit v1.2.3 From 0a708681310d03f3456b6f89bf7915b376f75fd1 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Wed, 13 Jan 2010 22:45:54 -0800 Subject: swrast: Remove unnecessary header from s_bitmap.c. --- src/mesa/swrast/s_bitmap.c | 1 - 1 file changed, 1 deletion(-) (limited to 'src') diff --git a/src/mesa/swrast/s_bitmap.c b/src/mesa/swrast/s_bitmap.c index 3dbdf2a61a..57a42b3f5d 100644 --- a/src/mesa/swrast/s_bitmap.c +++ b/src/mesa/swrast/s_bitmap.c @@ -32,7 +32,6 @@ #include "main/bufferobj.h" #include "main/image.h" #include "main/macros.h" -#include "main/pixel.h" #include "s_context.h" #include "s_span.h" -- cgit v1.2.3 From 78411881d344b4e2d7243b6f9bebc2d692e3d943 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Wed, 13 Jan 2010 22:58:07 -0800 Subject: swrast: Remove unnecessary header from s_atifragshader.c. --- src/mesa/swrast/s_atifragshader.c | 1 - 1 file changed, 1 deletion(-) (limited to 'src') diff --git a/src/mesa/swrast/s_atifragshader.c b/src/mesa/swrast/s_atifragshader.c index e88ff19123..353e9999d6 100644 --- a/src/mesa/swrast/s_atifragshader.c +++ b/src/mesa/swrast/s_atifragshader.c @@ -23,7 +23,6 @@ #include "main/colormac.h" #include "main/context.h" #include "main/macros.h" -#include "shader/program.h" #include "shader/atifragshader.h" #include "swrast/s_atifragshader.h" -- cgit v1.2.3 From 6b39e8aeb033085c2685f541eca721a6c5639c91 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Wed, 13 Jan 2010 23:01:03 -0800 Subject: swrast: Remove unnecessary header from s_accum.c. --- src/mesa/swrast/s_accum.c | 1 - 1 file changed, 1 deletion(-) (limited to 'src') diff --git a/src/mesa/swrast/s_accum.c b/src/mesa/swrast/s_accum.c index c6c7dbf5cf..6accdc53af 100644 --- a/src/mesa/swrast/s_accum.c +++ b/src/mesa/swrast/s_accum.c @@ -27,7 +27,6 @@ #include "main/context.h" #include "main/macros.h" #include "main/imports.h" -#include "main/fbobject.h" #include "s_accum.h" #include "s_context.h" -- cgit v1.2.3 From c109ca9c492c8956ee32f17c16aa69b0ac0a855d Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Wed, 13 Jan 2010 23:16:05 -0800 Subject: st/mesa: Remove unnecessary header from st_texture.c. --- src/mesa/state_tracker/st_texture.c | 1 - 1 file changed, 1 deletion(-) (limited to 'src') diff --git a/src/mesa/state_tracker/st_texture.c b/src/mesa/state_tracker/st_texture.c index 10f1351283..cda3791c0f 100644 --- a/src/mesa/state_tracker/st_texture.c +++ b/src/mesa/state_tracker/st_texture.c @@ -35,7 +35,6 @@ #include "main/texfetch.h" #include "main/teximage.h" #include "main/texobj.h" -#include "main/texstore.h" #undef Elements /* fix re-defined macro warning */ -- cgit v1.2.3 From 252812bf15c3479d921157b9a432c7e42d3b9446 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Wed, 13 Jan 2010 23:28:00 -0800 Subject: st/mesa: Remove unnecessary header from st_program.c. --- src/mesa/state_tracker/st_program.c | 1 - 1 file changed, 1 deletion(-) (limited to 'src') diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c index cf19f8f1a8..07a06b98f7 100644 --- a/src/mesa/state_tracker/st_program.c +++ b/src/mesa/state_tracker/st_program.c @@ -44,7 +44,6 @@ #include "st_debug.h" #include "st_context.h" -#include "st_atom.h" #include "st_program.h" #include "st_mesa_to_tgsi.h" #include "cso_cache/cso_context.h" -- cgit v1.2.3