Mesa (master): i915g: Allocate tmp for KILP
Module: Mesa Branch: master Commit: 0e57b66fa1d7f4317f20571f19fd2ceb3593f04f URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=0e57b66fa1d7f4317f20571f19fd2ceb3593f04f Author: Stéphane Marchesin marc...@chromium.org Date: Fri Dec 30 01:33:26 2011 -0800 i915g: Allocate tmp for KILP This fixes https://bugs.freedesktop.org/show_bug.cgi?id=44297 --- src/gallium/drivers/i915/i915_fpc_translate.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/src/gallium/drivers/i915/i915_fpc_translate.c b/src/gallium/drivers/i915/i915_fpc_translate.c index beb0e0d..5bfbfa0 100644 --- a/src/gallium/drivers/i915/i915_fpc_translate.c +++ b/src/gallium/drivers/i915/i915_fpc_translate.c @@ -658,6 +658,8 @@ i915_translate_instruction(struct i915_fp_compile *p, /* We emit an unconditional kill; we may want to revisit * if we ever implement conditionals. */ + tmp = i915_get_utemp(p); + i915_emit_texld(p, tmp, /* dest reg: a dummy reg */ A0_DEST_CHANNEL_ALL, /* dest writemask */ ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit
Mesa (master): r600g: Manage fences per screen rather than per context.
Module: Mesa Branch: master Commit: 7dd2d29a560a53d42d15f9ac06ba2ee7cd312ed9 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=7dd2d29a560a53d42d15f9ac06ba2ee7cd312ed9 Author: Michel Dänzer michel.daen...@amd.com Date: Fri Dec 30 10:45:31 2011 +0100 r600g: Manage fences per screen rather than per context. A fence is a screen object and can outlive the context it was created from. The previous code would access freed memory in that case, resulting in various problems. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=44151 https://bugs.freedesktop.org/show_bug.cgi?id=44007 Probably fixes: https://bugs.freedesktop.org/show_bug.cgi?id=43993 NOTE: This is a candidate for the 7.11 branch. Signed-off-by: Michel Dänzer michel.daen...@amd.com Reviewed-by: Mathias Fröhlich mathias.froehl...@web.de --- src/gallium/drivers/r600/r600_pipe.c | 95 ++--- src/gallium/drivers/r600/r600_pipe.h | 26 +- 2 files changed, 65 insertions(+), 56 deletions(-) diff --git a/src/gallium/drivers/r600/r600_pipe.c b/src/gallium/drivers/r600/r600_pipe.c index 7f62e0e..9f09080 100644 --- a/src/gallium/drivers/r600/r600_pipe.c +++ b/src/gallium/drivers/r600/r600_pipe.c @@ -53,27 +53,31 @@ */ static struct r600_fence *r600_create_fence(struct r600_pipe_context *ctx) { + struct r600_screen *rscreen = ctx-screen; struct r600_fence *fence = NULL; - if (!ctx-fences.bo) { + pipe_mutex_lock(rscreen-fences.mutex); + + if (!rscreen-fences.bo) { /* Create the shared buffer object */ - ctx-fences.bo = (struct r600_resource*) - pipe_buffer_create(ctx-screen-screen, PIPE_BIND_CUSTOM, + rscreen-fences.bo = (struct r600_resource*) + pipe_buffer_create(rscreen-screen, PIPE_BIND_CUSTOM, PIPE_USAGE_STAGING, 4096); - if (!ctx-fences.bo) { + if (!rscreen-fences.bo) { R600_ERR(r600: failed to create bo for fence objects\n); - return NULL; + goto out; } - ctx-fences.data = ctx-ws-buffer_map(ctx-fences.bo-buf, ctx-ctx.cs, - PIPE_TRANSFER_WRITE); + rscreen-fences.data = ctx-ws-buffer_map(rscreen-fences.bo-buf, + ctx-ctx.cs, + PIPE_TRANSFER_READ_WRITE); } - if (!LIST_IS_EMPTY(ctx-fences.pool)) { + if (!LIST_IS_EMPTY(rscreen-fences.pool)) { struct r600_fence *entry; /* Try to find a freed fence that has been signalled */ - LIST_FOR_EACH_ENTRY(entry, ctx-fences.pool, head) { - if (ctx-fences.data[entry-index] != 0) { + LIST_FOR_EACH_ENTRY(entry, rscreen-fences.pool, head) { + if (rscreen-fences.data[entry-index] != 0) { LIST_DELINIT(entry-head); fence = entry; break; @@ -86,33 +90,34 @@ static struct r600_fence *r600_create_fence(struct r600_pipe_context *ctx) struct r600_fence_block *block; unsigned index; - if ((ctx-fences.next_index + 1) = 1024) { + if ((rscreen-fences.next_index + 1) = 1024) { R600_ERR(r600: too many concurrent fences\n); - return NULL; + goto out; } - index = ctx-fences.next_index++; + index = rscreen-fences.next_index++; if (!(index % FENCE_BLOCK_SIZE)) { /* Allocate a new block */ block = CALLOC_STRUCT(r600_fence_block); if (block == NULL) - return NULL; + goto out; - LIST_ADD(block-head, ctx-fences.blocks); + LIST_ADD(block-head, rscreen-fences.blocks); } else { - block = LIST_ENTRY(struct r600_fence_block, ctx-fences.blocks.next, head); + block = LIST_ENTRY(struct r600_fence_block, rscreen-fences.blocks.next, head); } fence = block-fences[index % FENCE_BLOCK_SIZE]; - fence-ctx = ctx; fence-index = index; } pipe_reference_init(fence-reference, 1); - ctx-fences.data[fence-index] = 0; - r600_context_emit_fence(ctx-ctx, ctx-fences.bo, fence-index, 1); + rscreen-fences.data[fence-index] = 0; + r600_context_emit_fence(ctx-ctx, rscreen-fences.bo, fence-index, 1); +out: + pipe_mutex_unlock(rscreen-fences.mutex); return fence; } @@
Mesa (master): u_format: fix inv_swizzles generation
Module: Mesa Branch: master Commit: 4ca624f8e09bff1a4f681c54486e327605b8274d URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=4ca624f8e09bff1a4f681c54486e327605b8274d Author: Dave Airlie airl...@gmail.com Date: Fri Dec 30 10:52:16 2011 + u_format: fix inv_swizzles generation inv_swizzles is used in lp_tile_soa.py to create lp_tile_soa.c, we overwrite swizzles if they are already set. This results in the i8 format getting alpha instead of red, and the l8 format getting blue instead of red. Fixes fbo-alphatest-formats, fbo-alphatest-formats ARB_texture_float, and fbo-alphatest-formats EXT_texture_snorm on llvmpipe. Signed-off-by: Dave Airlie airl...@redhat.com --- src/gallium/auxiliary/util/u_format_parse.py |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/src/gallium/auxiliary/util/u_format_parse.py b/src/gallium/auxiliary/util/u_format_parse.py index 73a4bcb..3a39e5b 100755 --- a/src/gallium/auxiliary/util/u_format_parse.py +++ b/src/gallium/auxiliary/util/u_format_parse.py @@ -196,10 +196,11 @@ class Format: def inv_swizzles(self): '''Return an array[4] of inverse swizzle terms''' +'''Only pick the first matching value to avoid l8 getting blue and i8 getting alpha''' inv_swizzle = [None]*4 for i in range(4): swizzle = self.swizzles[i] -if swizzle 4: +if swizzle 4 and inv_swizzle[swizzle] == None: inv_swizzle[swizzle] = i return inv_swizzle ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit
Mesa (master): st/mesa: remove TexSubImage code, use core mesa routines instead.
Module: Mesa Branch: master Commit: c22a95c4f2db64c61cb25f37acc38254f30850f1 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=c22a95c4f2db64c61cb25f37acc38254f30850f1 Author: Brian Paul bri...@vmware.com Date: Fri Dec 30 08:24:55 2011 -0700 st/mesa: remove TexSubImage code, use core mesa routines instead. Since the move to Map/UnmapTextureImage, the core mesa routines are equivalent to what the state tracker was doing. The TexImage functions can be replaced too, but there's a few differences that will need to be handled. --- src/mesa/state_tracker/st_cb_texture.c | 143 +--- 1 files changed, 3 insertions(+), 140 deletions(-) diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c index 289ad51..8d30d7a 100644 --- a/src/mesa/state_tracker/st_cb_texture.c +++ b/src/mesa/state_tracker/st_cb_texture.c @@ -930,143 +930,6 @@ st_GetTexImage(struct gl_context * ctx, static void -st_TexSubimage(struct gl_context *ctx, GLint dims, GLenum target, GLint level, - GLint xoffset, GLint yoffset, GLint zoffset, - GLint width, GLint height, GLint depth, - GLenum format, GLenum type, const void *pixels, - const struct gl_pixelstore_attrib *packing, - struct gl_texture_object *texObj, - struct gl_texture_image *texImage) -{ - struct st_context *st = st_context(ctx); - struct st_texture_image *stImage = st_texture_image(texImage); - GLuint dstRowStride; - const GLuint srcImageStride = - _mesa_image_image_stride(packing, width, height, format, type); - GLint i; - const GLubyte *src; - /* init to silence warning only: */ - enum pipe_transfer_usage transfer_usage = PIPE_TRANSFER_WRITE; - GLubyte *dstMap; - - DBG(%s target %s level %d offset %d,%d %dx%d\n, __FUNCTION__, - _mesa_lookup_enum_by_nr(target), - level, xoffset, yoffset, width, height); - - pixels = - _mesa_validate_pbo_teximage(ctx, dims, width, height, depth, format, - type, pixels, packing, glTexSubImage2D); - if (!pixels) - return; - - /* for a 1D array upload the image as a series of layer with height = 1 */ - if (target == GL_TEXTURE_1D_ARRAY) { - depth = height; - height = 1; - } - - /* Map buffer if necessary. Need to lock to prevent other contexts -* from uploading the buffer under us. -*/ - if (stImage-pt) { - if (format == GL_DEPTH_COMPONENT - util_format_is_depth_and_stencil(stImage-pt-format)) - transfer_usage = PIPE_TRANSFER_READ_WRITE; - else - transfer_usage = PIPE_TRANSFER_WRITE; - - dstMap = st_texture_image_map(st, stImage, zoffset, -transfer_usage, -xoffset, yoffset, -width, height); - } - - if (!dstMap) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, glTexSubImage); - goto done; - } - - src = (const GLubyte *) pixels; - dstRowStride = stImage-transfer-stride; - - for (i = 0; i depth; i++) { - if (!_mesa_texstore(ctx, dims, texImage-_BaseFormat, - texImage-TexFormat, - 0, 0, 0, - dstRowStride, - (GLubyte **) dstMap, - width, height, 1, - format, type, src, packing)) { -_mesa_error(ctx, GL_OUT_OF_MEMORY, glTexSubImage); - } - - if (stImage-pt i + 1 depth) { - /* unmap this slice */ -st_texture_image_unmap(st, stImage); - /* map next slice of 3D texture */ -dstMap = st_texture_image_map(st, stImage, - zoffset + i + 1, - transfer_usage, - xoffset, yoffset, - width, height); -src += srcImageStride; - } - } - -done: - _mesa_unmap_teximage_pbo(ctx, packing); - - if (stImage-pt stImage-transfer) { - st_texture_image_unmap(st, stImage); - } -} - - - -static void -st_TexSubImage3D(struct gl_context *ctx, GLenum target, GLint level, - GLint xoffset, GLint yoffset, GLint zoffset, - GLsizei width, GLsizei height, GLsizei depth, - GLenum format, GLenum type, const GLvoid *pixels, - const struct gl_pixelstore_attrib *packing, - struct gl_texture_object *texObj, - struct gl_texture_image *texImage) -{ - st_TexSubimage(ctx, 3, target, level, xoffset, yoffset, zoffset, - width, height, depth, format, type, - pixels, packing, texObj, texImage); -} - - -static void -st_TexSubImage2D(struct gl_context *ctx, GLenum target, GLint level, - GLint xoffset, GLint yoffset, - GLsizei width,
Mesa (master): mesa: simplify Driver.CompressedTex[Sub] Image function parameters
Module: Mesa Branch: master Commit: 94a0c518dc90a24cb4c44ce0a5e6abeba57cbb08 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=94a0c518dc90a24cb4c44ce0a5e6abeba57cbb08 Author: Brian Paul bri...@vmware.com Date: Fri Dec 30 08:24:56 2011 -0700 mesa: simplify Driver.CompressedTex[Sub]Image function parameters As with previous commits, the target, level and texObj info can be obtained through the texImage pointer. Reviewed-by: Chad Versace chad.vers...@linux.intel.com Reviewed-by: Eric Anholt e...@anholt.net --- src/mesa/main/dd.h | 95 +++- src/mesa/main/teximage.c | 30 -- src/mesa/main/texstore.c | 64 +++-- src/mesa/main/texstore.h | 51 +++-- src/mesa/state_tracker/st_cb_texture.c | 28 - 5 files changed, 98 insertions(+), 170 deletions(-) diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h index 05e6d35..5a306e3 100644 --- a/src/mesa/main/dd.h +++ b/src/mesa/main/dd.h @@ -336,96 +336,65 @@ struct dd_function_table { /** * Called by glCompressedTexImage1D(). -* -* \param target user specified. -* \param format user specified. -* \param type user specified. -* \param pixels user specified. -* \param packing indicates the image packing of pixels. -* \param texObj is the target texture object. -* \param texImage is the target texture image. It will have the texture \p -* width, \p height, \p depth, \p border and \p internalFormat information. -* -* \a retainInternalCopy is returned by this function and indicates whether -* core Mesa should keep an internal copy of the texture image. -*/ - void (*CompressedTexImage1D)( struct gl_context *ctx, GLenum target, - GLint level, GLint internalFormat, - GLsizei width, GLint border, - GLsizei imageSize, const GLvoid *data, - struct gl_texture_object *texObj, - struct gl_texture_image *texImage ); +* The parameters are the same as for glCompressedTexImage1D(), plus a +* pointer to the destination texure image. +*/ + void (*CompressedTexImage1D)(struct gl_context *ctx, +struct gl_texture_image *texImage, +GLint internalFormat, +GLsizei width, GLint border, +GLsizei imageSize, const GLvoid *data); /** * Called by glCompressedTexImage2D(). * * \sa dd_function_table::CompressedTexImage1D. */ - void (*CompressedTexImage2D)( struct gl_context *ctx, GLenum target, - GLint level, GLint internalFormat, - GLsizei width, GLsizei height, GLint border, - GLsizei imageSize, const GLvoid *data, - struct gl_texture_object *texObj, - struct gl_texture_image *texImage ); + void (*CompressedTexImage2D)(struct gl_context *ctx, +struct gl_texture_image *texImage, +GLint internalFormat, +GLsizei width, GLsizei height, GLint border, +GLsizei imageSize, const GLvoid *data); + /** * Called by glCompressedTexImage3D(). * * \sa dd_function_table::CompressedTexImage3D. */ - void (*CompressedTexImage3D)( struct gl_context *ctx, GLenum target, - GLint level, GLint internalFormat, - GLsizei width, GLsizei height, GLsizei depth, - GLint border, - GLsizei imageSize, const GLvoid *data, - struct gl_texture_object *texObj, - struct gl_texture_image *texImage ); + void (*CompressedTexImage3D)(struct gl_context *ctx, +struct gl_texture_image *texImage, +GLint internalFormat, +GLsizei width, GLsizei height, GLsizei depth, +GLint border, +GLsizei imageSize, const GLvoid *data); /** * Called by glCompressedTexSubImage1D(). -* -* \param target user specified. -* \param level user specified. -* \param xoffset user specified. -* \param yoffset user specified. -* \param zoffset user specified. -* \param width user specified. -* \param height user specified. -* \param depth user specified. -* \param imageSize user specified. -* \param data user specified. -* \param texObj is the target texture object. -* \param texImage is the target
Mesa (master): mesa: simplify Driver.TexImage() parameters
Module: Mesa Branch: master Commit: 92c64624cd7533cde466dbec8722f7f72f275fd8 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=92c64624cd7533cde466dbec8722f7f72f275fd8 Author: Brian Paul bri...@vmware.com Date: Fri Dec 30 08:24:55 2011 -0700 mesa: simplify Driver.TexImage() parameters As with TexSubImage(), the target, level and texObj values can be obtained through the texImage pointer. Reviewed-by: Chad Versace chad.vers...@linux.intel.com Reviewed-by: Eric Anholt e...@anholt.net --- src/mesa/drivers/dri/intel/intel_tex_image.c | 43 src/mesa/drivers/dri/nouveau/nouveau_texture.c | 42 +-- src/mesa/drivers/dri/radeon/radeon_texture.c | 50 +++ src/mesa/drivers/dri/radeon/radeon_texture.h | 23 +-- src/mesa/main/dd.h | 42 +--- src/mesa/main/teximage.c | 23 +-- src/mesa/main/texobj.c |4 +- src/mesa/main/texstore.c | 21 -- src/mesa/main/texstore.h | 21 -- src/mesa/state_tracker/st_cb_texture.c | 50 ++- 10 files changed, 134 insertions(+), 185 deletions(-) diff --git a/src/mesa/drivers/dri/intel/intel_tex_image.c b/src/mesa/drivers/dri/intel/intel_tex_image.c index 107d314..32f2e85 100644 --- a/src/mesa/drivers/dri/intel/intel_tex_image.c +++ b/src/mesa/drivers/dri/intel/intel_tex_image.c @@ -202,16 +202,16 @@ try_pbo_upload(struct gl_context *ctx, static void intelTexImage(struct gl_context * ctx, GLint dims, - GLenum target, GLint level, + struct gl_texture_image *texImage, GLint internalFormat, GLint width, GLint height, GLint depth, GLenum format, GLenum type, const void *pixels, const struct gl_pixelstore_attrib *unpack, - struct gl_texture_object *texObj, - struct gl_texture_image *texImage, GLsizei imageSize) + GLsizei imageSize) { DBG(%s target %s level %d %dx%dx%d\n, __FUNCTION__, - _mesa_lookup_enum_by_nr(target), level, width, height, depth); + _mesa_lookup_enum_by_nr(texImage-TexObject-Target), + texImage-Level, width, height, depth); /* Attempt to use the blitter for PBO image uploads. */ @@ -224,59 +224,52 @@ intelTexImage(struct gl_context * ctx, DBG(%s: upload image %dx%dx%d pixels %p\n, __FUNCTION__, width, height, depth, pixels); - _mesa_store_teximage3d(ctx, target, level, internalFormat, + _mesa_store_teximage3d(ctx, texImage, internalFormat, width, height, depth, 0, - format, type, pixels, - unpack, texObj, texImage); + format, type, pixels, unpack); } static void intelTexImage3D(struct gl_context * ctx, -GLenum target, GLint level, +struct gl_texture_image *texImage, GLint internalFormat, GLint width, GLint height, GLint depth, GLint border, GLenum format, GLenum type, const void *pixels, -const struct gl_pixelstore_attrib *unpack, -struct gl_texture_object *texObj, -struct gl_texture_image *texImage) +const struct gl_pixelstore_attrib *unpack) { - intelTexImage(ctx, 3, target, level, + intelTexImage(ctx, 3, texImage, internalFormat, width, height, depth, - format, type, pixels, unpack, texObj, texImage, 0); + format, type, pixels, unpack, 0); } static void intelTexImage2D(struct gl_context * ctx, -GLenum target, GLint level, +struct gl_texture_image *texImage, GLint internalFormat, GLint width, GLint height, GLint border, GLenum format, GLenum type, const void *pixels, -const struct gl_pixelstore_attrib *unpack, -struct gl_texture_object *texObj, -struct gl_texture_image *texImage) +const struct gl_pixelstore_attrib *unpack) { - intelTexImage(ctx, 2, target, level, + intelTexImage(ctx, 2, texImage, internalFormat, width, height, 1, - format, type, pixels, unpack, texObj, texImage, 0); + format, type, pixels, unpack, 0); } static void intelTexImage1D(struct gl_context * ctx, -GLenum target, GLint level, +struct gl_texture_image *texImage, GLint internalFormat, GLint width, GLint border, GLenum format, GLenum type, const void *pixels, -const struct gl_pixelstore_attrib *unpack, -struct gl_texture_object *texObj, -struct gl_texture_image
Mesa (master): mesa: simplify Driver.GetCompressedTexImage() parameters
Module: Mesa Branch: master Commit: bec2ea8ef4aaf0704d3315561da106cd994b1bc6 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=bec2ea8ef4aaf0704d3315561da106cd994b1bc6 Author: Brian Paul bri...@vmware.com Date: Fri Dec 30 08:24:56 2011 -0700 mesa: simplify Driver.GetCompressedTexImage() parameters Reviewed-by: Chad Versace chad.vers...@linux.intel.com Reviewed-by: Eric Anholt e...@anholt.net --- src/mesa/main/dd.h |7 +++ src/mesa/main/texgetimage.c | 10 -- src/mesa/main/texgetimage.h |7 +++ 3 files changed, 10 insertions(+), 14 deletions(-) diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h index 5a306e3..6707e78 100644 --- a/src/mesa/main/dd.h +++ b/src/mesa/main/dd.h @@ -400,10 +400,9 @@ struct dd_function_table { /** * Called by glGetCompressedTexImage. */ - void (*GetCompressedTexImage)(struct gl_context *ctx, GLenum target, GLint level, - GLvoid *img, - struct gl_texture_object *texObj, - struct gl_texture_image *texImage); + void (*GetCompressedTexImage)(struct gl_context *ctx, + struct gl_texture_image *texImage, + GLvoid *data); /*@}*/ diff --git a/src/mesa/main/texgetimage.c b/src/mesa/main/texgetimage.c index 738c181..f848aa8 100644 --- a/src/mesa/main/texgetimage.c +++ b/src/mesa/main/texgetimage.c @@ -603,10 +603,9 @@ _mesa_get_teximage(struct gl_context *ctx, * All error checking will have been done before this routine is called. */ void -_mesa_get_compressed_teximage(struct gl_context *ctx, GLenum target, GLint level, - GLvoid *img, - struct gl_texture_object *texObj, - struct gl_texture_image *texImage) +_mesa_get_compressed_teximage(struct gl_context *ctx, + struct gl_texture_image *texImage, + GLvoid *img) { const GLuint row_stride = _mesa_format_row_stride(texImage-TexFormat, texImage-Width); @@ -981,8 +980,7 @@ _mesa_GetnCompressedTexImageARB(GLenum target, GLint level, GLsizei bufSize, _mesa_lock_texture(ctx, texObj); { - ctx-Driver.GetCompressedTexImage(ctx, target, level, img, -texObj, texImage); + ctx-Driver.GetCompressedTexImage(ctx, texImage, img); } _mesa_unlock_texture(ctx, texObj); } diff --git a/src/mesa/main/texgetimage.h b/src/mesa/main/texgetimage.h index 02b1cf4..cd8e76e 100644 --- a/src/mesa/main/texgetimage.h +++ b/src/mesa/main/texgetimage.h @@ -40,10 +40,9 @@ _mesa_get_teximage(struct gl_context *ctx, extern void -_mesa_get_compressed_teximage(struct gl_context *ctx, GLenum target, GLint level, - GLvoid *img, - struct gl_texture_object *texObj, - struct gl_texture_image *texImage); +_mesa_get_compressed_teximage(struct gl_context *ctx, + struct gl_texture_image *texImage, + GLvoid *data); ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit
Mesa (master): st/glx/xlib: check for null attrib_list in glXCreateContextAttribsARB()
Module: Mesa Branch: master Commit: 797960dbeca675d8966752bc7a201f311123f3d5 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=797960dbeca675d8966752bc7a201f311123f3d5 Author: Brian Paul bri...@vmware.com Date: Fri Dec 30 08:38:49 2011 -0700 st/glx/xlib: check for null attrib_list in glXCreateContextAttribsARB() Fixes https://bugs.freedesktop.org/show_bug.cgi?id=44234 --- src/gallium/state_trackers/glx/xlib/glx_api.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/gallium/state_trackers/glx/xlib/glx_api.c b/src/gallium/state_trackers/glx/xlib/glx_api.c index d978286..b68882b 100644 --- a/src/gallium/state_trackers/glx/xlib/glx_api.c +++ b/src/gallium/state_trackers/glx/xlib/glx_api.c @@ -2665,7 +2665,7 @@ glXCreateContextAttribsARB(Display *dpy, GLXFBConfig config, GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB); /* parse attrib_list */ - for (i = 0; !done attrib_list[i]; i++) { + for (i = 0; !done attrib_list attrib_list[i]; i++) { switch (attrib_list[i]) { case GLX_CONTEXT_MAJOR_VERSION_ARB: majorVersion = attrib_list[++i]; ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit
Mesa (master): glsl: fix usage of potentially undefined data_end union
Module: Mesa Branch: master Commit: 141d961d847111b2596f9c3094d5ebf1639c8c24 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=141d961d847111b2596f9c3094d5ebf1639c8c24 Author: Alexander von Gluck kallis...@unixzen.com Date: Fri Dec 30 08:48:43 2011 -0700 glsl: fix usage of potentially undefined data_end union Reviewed-by: Ian Romanick ian.d.roman...@intel.com Signed-off-by: Brian Paul bri...@vmware.com --- src/glsl/link_uniforms.cpp |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/glsl/link_uniforms.cpp b/src/glsl/link_uniforms.cpp index c7de480..b331db7 100644 --- a/src/glsl/link_uniforms.cpp +++ b/src/glsl/link_uniforms.cpp @@ -365,9 +365,9 @@ link_assign_uniform_locations(struct gl_shader_program *prog) for (unsigned i = 0; i num_user_uniforms; i++) { assert(uniforms[i].storage != NULL); } -#endif assert(parcel.values == data_end); +#endif prog-NumUserUniformStorage = num_user_uniforms; prog-UniformStorage = uniforms; ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit
Mesa (master): u_format/rgtc: fix alpha values in returned texels.
Module: Mesa Branch: master Commit: 0c6ee788f225e978dab3c78e18b1cf26e37edfbd URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=0c6ee788f225e978dab3c78e18b1cf26e37edfbd Author: Dave Airlie airl...@gmail.com Date: Fri Dec 30 20:29:08 2011 + u_format/rgtc: fix alpha values in returned texels. This fixes fbo-generatemipmap-formats GL_EXT_texture_compression_rgtc on llvmpipe. Signed-off-by: Dave Airlie airl...@redhat.com --- src/gallium/auxiliary/util/u_format_rgtc.c | 11 ++- 1 files changed, 10 insertions(+), 1 deletions(-) diff --git a/src/gallium/auxiliary/util/u_format_rgtc.c b/src/gallium/auxiliary/util/u_format_rgtc.c index 2371bab..ff04e37 100644 --- a/src/gallium/auxiliary/util/u_format_rgtc.c +++ b/src/gallium/auxiliary/util/u_format_rgtc.c @@ -42,6 +42,9 @@ void util_format_rgtc1_unorm_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j) { u_format_unsigned_fetch_texel_rgtc(0, src, i, j, dst, 1); + dst[1] = 0; + dst[2] = 0; + dst[3] = 255; } void @@ -58,6 +61,9 @@ util_format_rgtc1_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride for(i = 0; i bw; ++i) { uint8_t *dst = dst_row + (y + j)*dst_stride/sizeof(*dst_row) + (x + i)*comps; u_format_unsigned_fetch_texel_rgtc(0, src, i, j, dst, 1); + dst[1] = 0; + dst[2] = 0; + dst[3] = 255; } } src += block_size; @@ -229,6 +235,8 @@ util_format_rgtc2_unorm_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsi { u_format_unsigned_fetch_texel_rgtc(0, src, i, j, dst, 2); u_format_unsigned_fetch_texel_rgtc(0, src + 8, i, j, dst + 1, 2); + dst[2] = 0; + dst[3] = 255; } void @@ -246,7 +254,8 @@ util_format_rgtc2_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride uint8_t *dst = dst_row + (y + j)*dst_stride/sizeof(*dst_row) + (x + i)*comps; u_format_unsigned_fetch_texel_rgtc(0, src, i, j, dst, 2); u_format_unsigned_fetch_texel_rgtc(0, src + 8, i, j, dst + 1, 2); - + dst[2] = 0; + dst[3] = 255; } } src += block_size; ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit
Mesa (master): u_format: fix latc fetches.
Module: Mesa Branch: master Commit: bed4c7ea5ea65ae4d591c5f9fb6d0ab24ba268ee URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=bed4c7ea5ea65ae4d591c5f9fb6d0ab24ba268ee Author: Dave Airlie airl...@gmail.com Date: Fri Dec 30 21:17:07 2011 + u_format: fix latc fetches. This fixes the latc fetches for llvmpipe, fixes fbo-generatemipmap-formats GL_ARB_texture_compression fbo-generatemipmap-formats GL_ATI_texture_compression_3dc fbo-generatemipmap-formats GL_EXT_texture_compression_latc Signed-off-by: Dave Airlie airl...@redhat.com Signed-off-by: Dave Airlie airl...@gmail.com --- src/gallium/auxiliary/util/u_format_latc.c |7 ++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/src/gallium/auxiliary/util/u_format_latc.c b/src/gallium/auxiliary/util/u_format_latc.c index 113a793..20feb24 100644 --- a/src/gallium/auxiliary/util/u_format_latc.c +++ b/src/gallium/auxiliary/util/u_format_latc.c @@ -47,6 +47,9 @@ util_format_latc1_unorm_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsi (void) u_format_signed_encode_rgtc_ubyte; u_format_unsigned_fetch_texel_rgtc(0, src, i, j, dst, 1); + dst[1] = dst[0]; + dst[2] = dst[0]; + dst[3] = 255; } void @@ -173,7 +176,9 @@ void util_format_latc2_unorm_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j) { u_format_unsigned_fetch_texel_rgtc(0, src, i, j, dst, 2); - u_format_unsigned_fetch_texel_rgtc(0, src + 8, i, j, dst + 1, 2); + dst[1] = dst[0]; + dst[2] = dst[0]; + u_format_unsigned_fetch_texel_rgtc(0, src + 8, i, j, dst + 3, 2); } void ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit
Mesa (master): st/mesa: remove stImage-base.Face/ Level assignments in st_TexImage()
Module: Mesa Branch: master Commit: 99fbf7ce341c346631d11395c792a0589c5035dd URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=99fbf7ce341c346631d11395c792a0589c5035dd Author: Brian Paul bri...@vmware.com Date: Fri Dec 30 16:39:24 2011 -0700 st/mesa: remove stImage-base.Face/Level assignments in st_TexImage() This fixes a regresssion (broken cube maps) caused by the ctx-Driver.TexImage parameter simplification commit. The target var is always GL_TEXTURE_CUBE_MAP at this point so the Face field was always getting set to zero. These field assignments aren't needed anyway since core Mesa sets them. --- src/mesa/state_tracker/st_cb_texture.c |3 --- 1 files changed, 0 insertions(+), 3 deletions(-) diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c index ecd21ad..cf9d068 100644 --- a/src/mesa/state_tracker/st_cb_texture.c +++ b/src/mesa/state_tracker/st_cb_texture.c @@ -544,9 +544,6 @@ st_TexImage(struct gl_context * ctx, assert(texImage-Height == height); assert(texImage-Depth == depth); - stImage-base.Face = _mesa_tex_target_to_face(target); - stImage-base.Level = level; - /* Release the reference to a potentially orphaned buffer. * Release any old malloced memory. */ ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit