From 05d67ae9117e5157fd1a5175dde6d7e48caf4653 Mon Sep 17 00:00:00 2001 From: marha Date: Tue, 28 Aug 2012 14:07:02 +0200 Subject: fontconfig mesa xserver git update 28 Aug 2012 --- mesalib/src/gallium/auxiliary/util/u_blitter.c | 46 ++++++++++++++++++++++++++ mesalib/src/gallium/auxiliary/util/u_blitter.h | 5 +++ mesalib/src/gallium/auxiliary/util/u_tile.c | 36 ++++++++++++++++++++ 3 files changed, 87 insertions(+) (limited to 'mesalib/src/gallium/auxiliary') diff --git a/mesalib/src/gallium/auxiliary/util/u_blitter.c b/mesalib/src/gallium/auxiliary/util/u_blitter.c index a95e1b535..ad4ccd9eb 100644 --- a/mesalib/src/gallium/auxiliary/util/u_blitter.c +++ b/mesalib/src/gallium/auxiliary/util/u_blitter.c @@ -1515,6 +1515,7 @@ void util_blitter_custom_resolve_color(struct blitter_context *blitter, pipe->bind_depth_stencil_alpha_state(pipe, ctx->dsa_keep_depth_stencil); pipe->bind_vertex_elements_state(pipe, ctx->velem_state); pipe->bind_fs_state(pipe, blitter_get_fs_col(ctx, 1, FALSE)); + pipe->set_sample_mask(pipe, (1ull << MAX2(1, src->nr_samples)) - 1); memset(&surf_tmpl, 0, sizeof(surf_tmpl)); surf_tmpl.format = dst->format; @@ -1552,3 +1553,48 @@ void util_blitter_custom_resolve_color(struct blitter_context *blitter, pipe_surface_reference(&srcsurf, NULL); pipe_surface_reference(&dstsurf, NULL); } + +void util_blitter_custom_color(struct blitter_context *blitter, + struct pipe_surface *dstsurf, + void *custom_blend) +{ + struct blitter_context_priv *ctx = (struct blitter_context_priv*)blitter; + struct pipe_context *pipe = ctx->base.pipe; + struct pipe_framebuffer_state fb_state; + + assert(dstsurf->texture); + if (!dstsurf->texture) + return; + + /* check the saved state */ + blitter_set_running_flag(ctx); + blitter_check_saved_vertex_states(ctx); + blitter_check_saved_fragment_states(ctx); + blitter_check_saved_fb_state(ctx); + + /* bind states */ + pipe->bind_blend_state(pipe, custom_blend); + pipe->bind_depth_stencil_alpha_state(pipe, ctx->dsa_keep_depth_stencil); + pipe->bind_fs_state(pipe, blitter_get_fs_col(ctx, 1, FALSE)); + pipe->bind_vertex_elements_state(pipe, ctx->velem_state); + pipe->set_sample_mask(pipe, (1ull << MAX2(1, dstsurf->texture->nr_samples)) - 1); + + /* set a framebuffer state */ + fb_state.width = dstsurf->width; + fb_state.height = dstsurf->height; + fb_state.nr_cbufs = 1; + fb_state.cbufs[0] = dstsurf; + fb_state.zsbuf = 0; + pipe->set_framebuffer_state(pipe, &fb_state); + pipe->set_sample_mask(pipe, ~0); + + blitter_set_common_draw_rect_state(ctx); + blitter_set_dst_dimensions(ctx, dstsurf->width, dstsurf->height); + blitter->draw_rectangle(blitter, 0, 0, dstsurf->width, dstsurf->height, + 0, 0, NULL); + + blitter_restore_vertex_states(ctx); + blitter_restore_fragment_states(ctx); + blitter_restore_fb_state(ctx); + blitter_unset_running_flag(ctx); +} diff --git a/mesalib/src/gallium/auxiliary/util/u_blitter.h b/mesalib/src/gallium/auxiliary/util/u_blitter.h index f227902c1..e06e8b12d 100644 --- a/mesalib/src/gallium/auxiliary/util/u_blitter.h +++ b/mesalib/src/gallium/auxiliary/util/u_blitter.h @@ -308,6 +308,11 @@ void util_blitter_custom_depth_stencil(struct blitter_context *blitter, unsigned sample_mask, void *dsa_stage, float depth); +/* Used by r600g for color decompression. */ +void util_blitter_custom_color(struct blitter_context *blitter, + struct pipe_surface *dstsurf, + void *custom_blend); + /* Used by r600g for MSAA color resolve. */ void util_blitter_custom_resolve_color(struct blitter_context *blitter, struct pipe_resource *dst, diff --git a/mesalib/src/gallium/auxiliary/util/u_tile.c b/mesalib/src/gallium/auxiliary/util/u_tile.c index ea4b91f95..48e73c40b 100644 --- a/mesalib/src/gallium/auxiliary/util/u_tile.c +++ b/mesalib/src/gallium/auxiliary/util/u_tile.c @@ -679,6 +679,28 @@ pipe_get_tile_z(struct pipe_context *pipe, } } break; + case PIPE_FORMAT_Z32_FLOAT: + { + const float *ptrc = (const float *)(map + y * pt->stride + x*4); + for (i = 0; i < h; i++) { + for (j = 0; j < w; j++) { + /* convert float Z to 32-bit Z */ + if (ptrc[j] <= 0.0) { + pDest[j] = 0; + } + else if (ptrc[j] >= 1.0) { + pDest[j] = 0xffffffff; + } + else { + double z = ptrc[j] * 0xffffffff; + pDest[j] = (uint) z; + } + } + pDest += dstStride; + ptrc += pt->stride/4; + } + } + break; default: assert(0); } @@ -786,6 +808,20 @@ pipe_put_tile_z(struct pipe_context *pipe, } } break; + case PIPE_FORMAT_Z32_FLOAT: + { + float *pDest = (float *) (map + y * pt->stride + x*2); + for (i = 0; i < h; i++) { + for (j = 0; j < w; j++) { + /* convert 32-bit integer Z to float Z */ + const double scale = 1.0 / 0xffffffffU; + pDest[j] = ptrc[j] * scale; + } + pDest += pt->stride/4; + ptrc += srcStride; + } + } + break; default: assert(0); } -- cgit v1.2.3 From 53192e17e55aa9ed3e3721bf4fdcb2b01a595202 Mon Sep 17 00:00:00 2001 From: marha Date: Fri, 31 Aug 2012 15:18:29 +0200 Subject: randrproto xwininfo fontconfig libxcb mesa xkeyboard-config pixman xserver git update 31 Aug 2012 --- mesalib/src/gallium/auxiliary/util/u_blitter.c | 24 +++++++++--------------- mesalib/src/gallium/auxiliary/util/u_blitter.h | 10 ++++++++++ mesalib/src/gallium/auxiliary/util/u_vbuf.c | 4 +++- 3 files changed, 22 insertions(+), 16 deletions(-) (limited to 'mesalib/src/gallium/auxiliary') diff --git a/mesalib/src/gallium/auxiliary/util/u_blitter.c b/mesalib/src/gallium/auxiliary/util/u_blitter.c index ad4ccd9eb..44295c136 100644 --- a/mesalib/src/gallium/auxiliary/util/u_blitter.c +++ b/mesalib/src/gallium/auxiliary/util/u_blitter.c @@ -123,13 +123,6 @@ struct blitter_context_priv boolean has_stencil_export; }; -static void blitter_draw_rectangle(struct blitter_context *blitter, - unsigned x, unsigned y, - unsigned width, unsigned height, - float depth, - enum blitter_attrib_type type, - const union pipe_color_union *attrib); - struct blitter_context *util_blitter_create(struct pipe_context *pipe) { @@ -146,7 +139,7 @@ struct blitter_context *util_blitter_create(struct pipe_context *pipe) return NULL; ctx->base.pipe = pipe; - ctx->base.draw_rectangle = blitter_draw_rectangle; + ctx->base.draw_rectangle = util_blitter_draw_rectangle; /* init state objects for them to be considered invalid */ ctx->base.saved_blend_state = INVALID_PTR; @@ -862,12 +855,12 @@ static void blitter_draw(struct blitter_context_priv *ctx, pipe_resource_reference(&buf, NULL); } -static void blitter_draw_rectangle(struct blitter_context *blitter, - unsigned x1, unsigned y1, - unsigned x2, unsigned y2, - float depth, - enum blitter_attrib_type type, - const union pipe_color_union *attrib) +void util_blitter_draw_rectangle(struct blitter_context *blitter, + unsigned x1, unsigned y1, + unsigned x2, unsigned y2, + float depth, + enum blitter_attrib_type type, + const union pipe_color_union *attrib) { struct blitter_context_priv *ctx = (struct blitter_context_priv*)blitter; @@ -1499,6 +1492,7 @@ void util_blitter_custom_resolve_color(struct blitter_context *blitter, unsigned dst_layer, struct pipe_resource *src, unsigned src_layer, + unsigned sample_mask, void *custom_blend) { struct blitter_context_priv *ctx = (struct blitter_context_priv*)blitter; @@ -1515,7 +1509,7 @@ void util_blitter_custom_resolve_color(struct blitter_context *blitter, pipe->bind_depth_stencil_alpha_state(pipe, ctx->dsa_keep_depth_stencil); pipe->bind_vertex_elements_state(pipe, ctx->velem_state); pipe->bind_fs_state(pipe, blitter_get_fs_col(ctx, 1, FALSE)); - pipe->set_sample_mask(pipe, (1ull << MAX2(1, src->nr_samples)) - 1); + pipe->set_sample_mask(pipe, sample_mask); memset(&surf_tmpl, 0, sizeof(surf_tmpl)); surf_tmpl.format = dst->format; diff --git a/mesalib/src/gallium/auxiliary/util/u_blitter.h b/mesalib/src/gallium/auxiliary/util/u_blitter.h index e06e8b12d..680407381 100644 --- a/mesalib/src/gallium/auxiliary/util/u_blitter.h +++ b/mesalib/src/gallium/auxiliary/util/u_blitter.h @@ -129,6 +129,15 @@ struct pipe_context *util_blitter_get_pipe(struct blitter_context *blitter) return blitter->pipe; } +/* The default function to draw a rectangle. This can only be used + * inside of the draw_rectangle callback if the driver overrides it. */ +void util_blitter_draw_rectangle(struct blitter_context *blitter, + unsigned x1, unsigned y1, + unsigned x2, unsigned y2, + float depth, + enum blitter_attrib_type type, + const union pipe_color_union *attrib); + /* * These states must be saved before any of the following functions are called: * - vertex buffers @@ -320,6 +329,7 @@ void util_blitter_custom_resolve_color(struct blitter_context *blitter, unsigned dst_layer, struct pipe_resource *src, unsigned src_layer, + unsigned sampled_mask, void *custom_blend); /* The functions below should be used to save currently bound constant state diff --git a/mesalib/src/gallium/auxiliary/util/u_vbuf.c b/mesalib/src/gallium/auxiliary/util/u_vbuf.c index 4141ba536..52db294cb 100644 --- a/mesalib/src/gallium/auxiliary/util/u_vbuf.c +++ b/mesalib/src/gallium/auxiliary/util/u_vbuf.c @@ -225,7 +225,9 @@ u_vbuf_set_vertex_elements_internal(struct u_vbuf *mgr, unsigned count, } assert(ve); - pipe->bind_vertex_elements_state(pipe, ve->driver_cso); + + if (ve != mgr->ve) + pipe->bind_vertex_elements_state(pipe, ve->driver_cso); return ve; } -- cgit v1.2.3 From b86e8562b1ddca2a8bc29f22a79451a041bf5293 Mon Sep 17 00:00:00 2001 From: marha Date: Mon, 3 Sep 2012 09:54:39 +0200 Subject: mesa xkeyboard-config git update 3 sep 2012 --- mesalib/src/gallium/auxiliary/util/u_format_yuv.c | 1 + mesalib/src/gallium/auxiliary/util/u_inlines.h | 4 ++-- mesalib/src/gallium/auxiliary/util/u_math.h | 1 - 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'mesalib/src/gallium/auxiliary') diff --git a/mesalib/src/gallium/auxiliary/util/u_format_yuv.c b/mesalib/src/gallium/auxiliary/util/u_format_yuv.c index c7fdaa04f..891d99cf6 100644 --- a/mesalib/src/gallium/auxiliary/util/u_format_yuv.c +++ b/mesalib/src/gallium/auxiliary/util/u_format_yuv.c @@ -34,6 +34,7 @@ */ +#include "util/u_debug.h" #include "util/u_format_yuv.h" diff --git a/mesalib/src/gallium/auxiliary/util/u_inlines.h b/mesalib/src/gallium/auxiliary/util/u_inlines.h index a1ece415f..033c100ed 100644 --- a/mesalib/src/gallium/auxiliary/util/u_inlines.h +++ b/mesalib/src/gallium/auxiliary/util/u_inlines.h @@ -301,8 +301,8 @@ pipe_buffer_flush_mapped_range(struct pipe_context *pipe, int transfer_offset; assert(length); - assert(transfer->box.x <= offset); - assert(offset + length <= transfer->box.x + transfer->box.width); + assert(transfer->box.x <= (int) offset); + assert((int) (offset + length) <= transfer->box.x + transfer->box.width); /* Match old screen->buffer_flush_mapped_range() behaviour, where * offset parameter is relative to the start of the buffer, not the diff --git a/mesalib/src/gallium/auxiliary/util/u_math.h b/mesalib/src/gallium/auxiliary/util/u_math.h index 90b421ed8..4047bd9b0 100644 --- a/mesalib/src/gallium/auxiliary/util/u_math.h +++ b/mesalib/src/gallium/auxiliary/util/u_math.h @@ -40,7 +40,6 @@ #include "pipe/p_compiler.h" -#include "util/u_debug.h" #ifdef __cplusplus -- cgit v1.2.3 From 67c4614f29188e4af86e1d88ee82759c896b70b5 Mon Sep 17 00:00:00 2001 From: marha Date: Tue, 4 Sep 2012 15:26:24 +0200 Subject: mesa git update 4 sep 2012 --- mesalib/src/gallium/auxiliary/util/u_cpu_detect.c | 9 +++++++-- mesalib/src/gallium/auxiliary/util/u_cpu_detect.h | 1 + 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'mesalib/src/gallium/auxiliary') diff --git a/mesalib/src/gallium/auxiliary/util/u_cpu_detect.c b/mesalib/src/gallium/auxiliary/util/u_cpu_detect.c index e0c8f73c7..d7f0be40e 100644 --- a/mesalib/src/gallium/auxiliary/util/u_cpu_detect.c +++ b/mesalib/src/gallium/auxiliary/util/u_cpu_detect.c @@ -182,7 +182,7 @@ static int has_cpuid(void) static INLINE void cpuid(uint32_t ax, uint32_t *p) { -#if defined(PIPE_CC_GCC) && defined(PIPE_ARCH_X86) +#if (defined(PIPE_CC_GCC) || defined(PIPE_CC_SUNPRO)) && defined(PIPE_ARCH_X86) __asm __volatile ( "xchgl %%ebx, %1\n\t" "cpuid\n\t" @@ -193,7 +193,7 @@ cpuid(uint32_t ax, uint32_t *p) "=d" (p[3]) : "0" (ax) ); -#elif defined(PIPE_CC_GCC) && defined(PIPE_ARCH_X86_64) +#elif (defined(PIPE_CC_GCC) || defined(PIPE_CC_SUNPRO)) && defined(PIPE_ARCH_X86_64) __asm __volatile ( "cpuid\n\t" : "=a" (p[0]), @@ -286,6 +286,11 @@ util_cpu_detect(void) util_cpu_caps.cacheline = cacheline; } + if (regs[1] == 0x756e6547 && regs[2] == 0x6c65746e && regs[3] == 0x49656e69) { + /* GenuineIntel */ + util_cpu_caps.has_intel = 1; + } + cpuid(0x80000000, regs); if (regs[0] >= 0x80000001) { diff --git a/mesalib/src/gallium/auxiliary/util/u_cpu_detect.h b/mesalib/src/gallium/auxiliary/util/u_cpu_detect.h index b44d9d9a0..acac68658 100644 --- a/mesalib/src/gallium/auxiliary/util/u_cpu_detect.h +++ b/mesalib/src/gallium/auxiliary/util/u_cpu_detect.h @@ -52,6 +52,7 @@ struct util_cpu_caps { int x86_cpu_type; unsigned cacheline; + unsigned has_intel:1; unsigned has_tsc:1; unsigned has_mmx:1; unsigned has_mmx2:1; -- cgit v1.2.3