Merge branch 'mesa_7_7_branch'

Conflicts:
	src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c
	src/gallium/auxiliary/util/Makefile
	src/gallium/drivers/r300/r300_state_derived.c
This commit is contained in:
Jakob Bornecrantz
2010-01-14 22:31:04 +00:00
56 changed files with 182 additions and 233 deletions

View File

@@ -120,7 +120,11 @@ static Engine Engines[NUM_ENGINES] =
0.3, /* CrankJournalRadius */
0.4, /* CrankJournalLength */
1.5, /* ConnectingRodLength */
0.1 /* ConnectingRodThickness */
0.1, /* ConnectingRodThickness */
0, /* CrankList */
0, /* ConnRodList */
0, /* PistonList */
0 /* BlockList */
},
{
"Inline-4",
@@ -136,7 +140,11 @@ static Engine Engines[NUM_ENGINES] =
0.3, /* CrankJournalRadius */
0.4, /* CrankJournalLength */
1.5, /* ConnectingRodLength */
0.1 /* ConnectingRodThickness */
0.1, /* ConnectingRodThickness */
0, /* CrankList */
0, /* ConnRodList */
0, /* PistonList */
0 /* BlockList */
},
{
"Boxer-6",
@@ -152,7 +160,11 @@ static Engine Engines[NUM_ENGINES] =
0.3, /* CrankJournalRadius */
0.4, /* CrankJournalLength */
1.5, /* ConnectingRodLength */
0.1 /* ConnectingRodThickness */
0.1, /* ConnectingRodThickness */
0, /* CrankList */
0, /* ConnRodList */
0, /* PistonList */
0 /* BlockList */
}
};

View File

@@ -14,7 +14,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include "extfuncs.h"
/* For debug */

View File

@@ -726,8 +726,13 @@ main(int ac, char **av)
maxage = 1.0 / dt;
if (ac == 2)
if (ac == 2) {
np = atoi(av[1]);
if (np <= 0 || np > 1000000) {
fprintf(stderr, "Invalid input.\n");
exit(-1);
}
}
if (ac == 4) {
WIDTH = atoi(av[2]);
@@ -761,6 +766,7 @@ main(int ac, char **av)
assert(np > 0);
p = (part *) malloc(sizeof(part) * np);
assert(p);
for (i = 0; i < np; i++)
setnewpart(&p[i]);

View File

@@ -27,7 +27,6 @@
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#ifdef _WIN32
#include <windows.h>

View File

@@ -137,7 +137,6 @@ So the angle is:
#endif
#include <GL/glut.h>
#include <math.h>
#include <string.h>
#define Scale 0.3

View File

@@ -182,7 +182,7 @@ static void fillConvolution(GLint *k,
static void setupConvolution()
{
GLint *kernel = (GLint*)malloc(sizeof(GLint) * 9);
GLfloat scale;
GLfloat scale = 0.0;
GLfloat *vecKer = (GLfloat*)malloc(sizeof(GLfloat) * 9 * 4);
GLuint loc;
GLuint i;

View File

@@ -29,7 +29,6 @@
#include <assert.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

View File

@@ -45,7 +45,6 @@
#include <GL/glut.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
GLboolean polySmooth = GL_TRUE;

View File

@@ -660,8 +660,8 @@ exercise_CompressedTextures(GLenum dimension)
glGetTexLevelParameteriv(dimension, 0, GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB,
&queryCompressedSize);
if (queryCompressedSize != sizeof(compressedTexture)) {
fprintf(stderr, "%s: compressed 3D texture changed size: expected %d, actual %d\n",
__FUNCTION__, sizeof(compressedTexture), queryCompressedSize);
fprintf(stderr, "%s: compressed 3D texture changed size: expected %lu, actual %d\n",
__FUNCTION__, (unsigned long) sizeof(compressedTexture), queryCompressedSize);
return GL_FALSE;
}
(*GetCompressedTexImageARB)(dimension, 0, queryCompressedData);

View File

@@ -105,7 +105,7 @@ static const unsigned indicies[12] = {
1, 4, 2
};
#define NONE { NULL, 0, 0, 0 }
#define NONE { NULL, 0, 0, 0, sizeof( NULL ) }
#define V2F { v, 2, 2 * sizeof( GLfloat ), GL_FLOAT, sizeof( v[0] ) }
#define V3F { v, 3, 3 * sizeof( GLfloat ), GL_FLOAT, sizeof( v[0] ) }
#define V4F { v, 4, 4 * sizeof( GLfloat ), GL_FLOAT, sizeof( v[0] ) }

View File

@@ -71,7 +71,7 @@ static struct wrap_mode modes[] = {
WRAP_EXT ( GL_MIRROR_CLAMP_TO_EDGE_EXT, "GL_ATI_texture_mirror_once",
"GL_EXT_texture_mirror_clamp",
999.0 ),
{ 0 }
{ 0, NULL, GL_FALSE, 0.0, { NULL, NULL } }
};
static void

View File

@@ -8,7 +8,6 @@
#include <assert.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
@@ -183,7 +182,7 @@ static void init_program(void)
static const GLfloat bias[4] = {1.0, 1.0, 1.0, 0.0};
if (!glutExtensionSupported("GL_NV_vertex_program")) {
printf("Sorry, this program requires GL_NV_vertex_program");
printf("Sorry, this program requires GL_NV_vertex_program\n");
exit(1);
}

View File

@@ -6,7 +6,6 @@
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
/* For debug */

View File

@@ -6,8 +6,6 @@
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
/* For debug */

View File

@@ -20,7 +20,6 @@
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <X11/keysym.h>
#include <unistd.h>
#include "ipc.h"

View File

@@ -400,6 +400,8 @@ main(int argc, char *argv[])
}
if (n < 1)
n = 1;
if (n > MAX_HEADS)
n = MAX_HEADS;
printf("%d windows\n", n);
for (i = 0; i < n; i++) {

View File

@@ -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;
@@ -254,29 +229,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_buf = &fenced_buf->base;
pb_reference(&pb_buf, NULL);
_fenced_buffer_remove(fenced_list, fenced_buf);
curr = next;
next = curr->next;
@@ -290,25 +257,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);
}
@@ -319,23 +291,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
@@ -352,9 +325,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;
}
@@ -363,9 +333,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);
@@ -373,8 +340,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);
}
@@ -386,14 +351,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);
@@ -401,17 +363,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));
@@ -421,21 +380,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;
}
@@ -450,36 +405,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;
}
@@ -489,7 +437,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);
}
@@ -529,8 +476,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);
@@ -572,7 +517,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);
}
@@ -594,13 +539,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;
}
@@ -610,7 +553,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,
@@ -618,7 +560,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;
}
@@ -639,8 +580,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
@@ -648,7 +589,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);

View File

@@ -1041,11 +1041,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;
}
}

View File

@@ -40,6 +40,7 @@ static void r300_flush(struct pipe_context* pipe,
struct r300_atom *atom;
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.
*

View File

@@ -81,8 +81,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,

View File

@@ -71,7 +71,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) {
@@ -80,8 +80,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,

View File

@@ -180,6 +180,7 @@ dri_get_buffers(__DRIdrawable * 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;
@@ -372,6 +373,7 @@ dri_create_buffer(__DRIscreen * 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;

View File

@@ -486,8 +486,11 @@ 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 pipe_surface *dst_surf = xorg_gpu_surface(pPriv->r->pipe->screen, dst);
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);
@@ -497,6 +500,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,
@@ -516,7 +520,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--) {

View File

@@ -33,6 +33,7 @@
#ifndef _BEZIERPATCHMESH_H
#define _BEZIERPATCHMESH_H
#include <GL/gl.h>
#include "bezierPatch.h"
typedef struct bezierPatchMesh{

View File

@@ -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; }

View File

@@ -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
}

View File

@@ -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 ) {

View File

@@ -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

View File

@@ -38,6 +38,8 @@
/* simple inline routines */
#include "types.h"
inline int
max( int x, int y ) { return ( x < y ) ? y : x; }

View File

@@ -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;
}

View File

@@ -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"

View File

@@ -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 */

View File

@@ -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"

View File

@@ -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"

View File

@@ -33,7 +33,6 @@
#include "main/condrender.h"
#include "main/image.h"
#include "main/macros.h"
#include "main/pixel.h"
#include "s_context.h"
#include "s_span.h"

View File

@@ -28,11 +28,9 @@
#include "main/colormac.h"
#include "main/condrender.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"

View File

@@ -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"

View File

@@ -31,7 +31,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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -38,7 +38,6 @@
#include "tnl.h"
#include "t_context.h"
#include "t_pipeline.h"
#include "t_vp_build.h"
#include "vbo/vbo.h"

View File

@@ -29,15 +29,11 @@
#include "main/condrender.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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -35,7 +35,6 @@
#include "main/bufferobj.h"
#include "main/enums.h"
#include "main/macros.h"
#include "glapi/dispatch.h"
#include "vbo_context.h"

View File

@@ -30,7 +30,6 @@
#include "main/context.h"
#include "main/enums.h"
#include "main/state.h"
#include "main/macros.h"
#include "vbo_context.h"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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 = &copy->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;
}

View File

@@ -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"