diff options
author | Jesse Barnes <jbarnes@virtuousgeek.org> | 2010-04-19 09:56:49 -0700 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2010-04-19 09:56:49 -0700 |
commit | 64644ec3b21884d4a974fa29087fa98c4ed9e112 (patch) | |
tree | d5752ba82220f9ebe5d61d7e98ecc27f331aa65c /src/mesa | |
parent | 4df3e76949e1ca7b29f844ad9a715b442396a024 (diff) | |
parent | 385e2896ebf54ac0b016132fe513f21a5b67ba4f (diff) | |
download | external_mesa3d-64644ec3b21884d4a974fa29087fa98c4ed9e112.zip external_mesa3d-64644ec3b21884d4a974fa29087fa98c4ed9e112.tar.gz external_mesa3d-64644ec3b21884d4a974fa29087fa98c4ed9e112.tar.bz2 |
Merge branch '7.8'
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/common/xmlconfig.c | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/radeon/radeon_cs_legacy.c | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c | 8 | ||||
-rw-r--r-- | src/mesa/main/imports.c | 3 | ||||
-rw-r--r-- | src/mesa/main/imports.h | 6 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_atom_scissor.c | 13 |
6 files changed, 21 insertions, 13 deletions
diff --git a/src/mesa/drivers/dri/common/xmlconfig.c b/src/mesa/drivers/dri/common/xmlconfig.c index de4500a..738b1ae 100644 --- a/src/mesa/drivers/dri/common/xmlconfig.c +++ b/src/mesa/drivers/dri/common/xmlconfig.c @@ -65,7 +65,7 @@ extern char *program_invocation_name, *program_invocation_short_name; #endif #if !defined(GET_PROGRAM_NAME) -# if defined(OpenBSD) || defined(NetBSD) || defined(__UCLIBC__) +# if defined(__OpenBSD__) || defined(NetBSD) || defined(__UCLIBC__) /* This is a hack. It's said to work on OpenBSD, NetBSD and GNU. * Rogelio M.Serrano Jr. reported it's also working with UCLIBC. It's * used as a last resort, if there is no documented facility available. */ diff --git a/src/mesa/drivers/dri/radeon/radeon_cs_legacy.c b/src/mesa/drivers/dri/radeon/radeon_cs_legacy.c index cc951a1..c2722a4 100644 --- a/src/mesa/drivers/dri/radeon/radeon_cs_legacy.c +++ b/src/mesa/drivers/dri/radeon/radeon_cs_legacy.c @@ -326,7 +326,7 @@ static int cs_emit(struct radeon_cs_int *cs) (!IS_R600_CLASS(csm->ctx->radeonScreen))) { /* +r6/r7 : No irq for r6/r7 yet. */ drm_radeon_irq_emit_t emit_cmd; emit_cmd.irq_seq = (int*)&csm->pending_age; - r = drmCommandWrite(cs->csm->fd, DRM_RADEON_IRQ_EMIT, &emit_cmd, sizeof(emit_cmd)); + r = drmCommandWriteRead(cs->csm->fd, DRM_RADEON_IRQ_EMIT, &emit_cmd, sizeof(emit_cmd)); if (r) { return r; } diff --git a/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c b/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c index 7f5fb99..6cd1d87 100644 --- a/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c +++ b/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c @@ -526,8 +526,10 @@ static radeon_mipmap_tree * get_biggest_matching_miptree(radeonTexObj *texObj, unsigned mtCount = 0; unsigned maxMtIndex = 0; radeon_mipmap_tree *tmp; + unsigned int level; + int i; - for (unsigned level = firstLevel; level <= lastLevel; ++level) { + for (level = firstLevel; level <= lastLevel; ++level) { radeon_texture_image *img = get_radeon_texture_image(texObj->base.Image[0][level]); unsigned found = 0; // TODO: why this hack?? @@ -537,7 +539,7 @@ static radeon_mipmap_tree * get_biggest_matching_miptree(radeonTexObj *texObj, if (!img->mt) continue; - for (int i = 0; i < mtCount; ++i) { + for (i = 0; i < mtCount; ++i) { if (mts[i] == img->mt) { found = 1; mtSizes[i] += img->mt->levels[img->mtlevel].size; @@ -558,7 +560,7 @@ static radeon_mipmap_tree * get_biggest_matching_miptree(radeonTexObj *texObj, return NULL; } - for (int i = 1; i < mtCount; ++i) { + for (i = 1; i < mtCount; ++i) { if (mtSizes[i] > mtSizes[maxMtIndex]) { maxMtIndex = i; } diff --git a/src/mesa/main/imports.c b/src/mesa/main/imports.c index 1ae0853..b1389b2 100644 --- a/src/mesa/main/imports.c +++ b/src/mesa/main/imports.c @@ -564,7 +564,8 @@ _mesa_ffsll(int64_t val) unsigned int _mesa_bitcount(unsigned int n) { -#if defined(__GNUC__) +#if defined(__GNUC__) && \ + ((_GNUC__ == 3 && __GNUC_MINOR__ >= 4) || __GNUC__ >= 4) return __builtin_popcount(n); #else unsigned int bits; diff --git a/src/mesa/main/imports.h b/src/mesa/main/imports.h index d28f4ad..1c263aa 100644 --- a/src/mesa/main/imports.h +++ b/src/mesa/main/imports.h @@ -404,7 +404,8 @@ _mesa_is_pow_two(int x) static INLINE int32_t _mesa_next_pow_two_32(uint32_t x) { -#ifdef __GNUC__ +#if defined(__GNUC__) && \ + ((__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || __GNUC__ >= 4) uint32_t y = (x != 1); return (1 + y) << ((__builtin_clz(x - y) ^ 31) ); #else @@ -422,7 +423,8 @@ _mesa_next_pow_two_32(uint32_t x) static INLINE int64_t _mesa_next_pow_two_64(uint64_t x) { -#ifdef __GNUC__ +#if defined(__GNUC__) && \ + ((__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || __GNUC__ >= 4) uint64_t y = (x != 1); if (sizeof(x) == sizeof(long)) return (1 + y) << ((__builtin_clzl(x - y) ^ 63)); diff --git a/src/mesa/state_tracker/st_atom_scissor.c b/src/mesa/state_tracker/st_atom_scissor.c index 5e0c51c..56b1383 100644 --- a/src/mesa/state_tracker/st_atom_scissor.c +++ b/src/mesa/state_tracker/st_atom_scissor.c @@ -72,12 +72,15 @@ update_scissor( struct st_context *st ) scissor.minx = scissor.miny = scissor.maxx = scissor.maxy = 0; } - /* Now invert Y. Pipe drivers use the convention Y=0=top for surfaces + /* Now invert Y if needed. + * Gallium drivers use the convention Y=0=top for surfaces. */ - miny = fb->Height - scissor.maxy; - maxy = fb->Height - scissor.miny; - scissor.miny = miny; - scissor.maxy = maxy; + if (st_fb_orientation(fb) == Y_0_TOP) { + miny = fb->Height - scissor.maxy; + maxy = fb->Height - scissor.miny; + scissor.miny = miny; + scissor.maxy = maxy; + } if (memcmp(&scissor, &st->state.scissor, sizeof(scissor)) != 0) { /* state has changed */ |