Re: [Mesa-dev] [PATCH 1/5] mesa: Add a new helper function _mesa_regions_overlap()

2015-06-10 Thread Brian Paul
For 1-3, Reviewed-by: Brian Paul On 06/10/2015 04:34 PM, Anuj Phogat wrote: Signed-off-by: Anuj Phogat Cc: Ben Widawsky --- Jenkins showed no piglit regressions with this series. src/mesa/main/blit.c | 26 ++ src/mesa/main/blit.h | 6 ++ 2 files changed, 32

Re: [Mesa-dev] [PATCH 01/10] egl/haiku: use correct version variable

2015-06-11 Thread Brian Paul
On 06/11/2015 06:15 AM, Emil Velikov wrote: Earlier commitfolded the two separate variables into one, but forgot to "commit folded" and in patch 7/10: "incomplete copy". For the series, Acked-by: Brian Paul update the haiku driver. Fixes: 0e4b564ef28(egl: comb

Re: [Mesa-dev] [PATCH 2/7] tgsi/transform: add support for SVIEW decls

2015-06-11 Thread Brian Paul
On 06/10/2015 06:14 PM, Rob Clark wrote: From: Rob Clark Signed-off-by: Rob Clark --- src/gallium/auxiliary/tgsi/tgsi_transform.h | 24 1 file changed, 24 insertions(+) diff --git a/src/gallium/auxiliary/tgsi/tgsi_transform.h b/src/gallium/auxiliary/tgsi/tgsi_tran

Re: [Mesa-dev] [PATCH 5/7] util/blitter (and friends): generate appropriate SVIEW decls

2015-06-11 Thread Brian Paul
On 06/10/2015 06:14 PM, Rob Clark wrote: From: Rob Clark Some hardware needs to know the sampler type. Update the blit related shaders to include SVIEW decl. Signed-off-by: Rob Clark --- Possibly I should have refactored the existing code to pass around a return_type rather than doing the is

Re: [Mesa-dev] [PATCH 5/7] util/blitter (and friends): generate appropriate SVIEW decls

2015-06-11 Thread Brian Paul
On 06/11/2015 02:38 PM, Rob Clark wrote: From: Rob Clark Some hardware needs to know the sampler type. Update the blit related shaders to include SVIEW decl. Signed-off-by: Rob Clark --- src/gallium/auxiliary/util/u_blit.c | 35 +--- src/gallium/auxiliary/util/u_blitter.

Re: [Mesa-dev] [PATCH 5/7] util/blitter (and friends): generate appropriate SVIEW decls

2015-06-11 Thread Brian Paul
On 06/11/2015 06:02 PM, Rob Clark wrote: On Thu, Jun 11, 2015 at 5:47 PM, Brian Paul wrote: On 06/11/2015 02:38 PM, Rob Clark wrote: From: Rob Clark Some hardware needs to know the sampler type. Update the blit related shaders to include SVIEW decl. Signed-off-by: Rob Clark --- src

Re: [Mesa-dev] [PATCH 4/6] mesa: generalize sso stage interleaving check

2015-06-15 Thread Brian Paul
gl_pipeline_object *pipe) Could const-qualify that param. Otherwise, for the series, Reviewed-by: Brian Paul +{ + struct gl_shader_program *prev = NULL; + unsigned i, j; + + /* Look for programs bound to stages: A -> B -> A, with any intervening +* sequence of unrelated programs or empty

Re: [Mesa-dev] Fwd: [PATCHv2 6/9] gallium: rename DRM_API_HANDLE_TYPE* WINSYS_HANDLE_TYPE*

2015-06-16 Thread Brian Paul
On 06/16/2015 07:44 AM, Marc-André Lureau wrote: Hi On Tue, Jun 16, 2015 at 3:33 PM, Marek Olšák mailto:mar...@gmail.com>> wrote: On Tue, Jun 16, 2015 at 2:42 PM, Marc-André Lureau mailto:marcandre.lur...@gmail.com>> wrote: > Hi Marek > > On Mon, Jun 15, 2015 at 10:21 PM,

[Mesa-dev] [PATCH] u_vbuf: fix src_offset alignment in u_vbuf_create_vertex_elements()

2015-06-19 Thread Brian Paul
If the driver says PIPE_CAP_VERTEX_ELEMENT_SRC_OFFSET_4BYTE_ALIGNED_ONLY=1, the driver should never receive a pipe_vertex_element::src_offset value that's not a multiple of four. But the vbuf code wasn't actually adjusting the src_offset value when creating the vertex element state object. We jus

Re: [Mesa-dev] [PATCH 2/2] glsl: Fix counting of varyings.

2015-06-19 Thread Brian Paul
Both look good to me, but perhaps Ian should check too. Reviewed-by: Brian Paul On 06/19/2015 07:08 AM, Jose Fonseca wrote: When input and output varyings started to be counted separately (commit 42305fb5) the is_varying_var function wasn't updated to return true for output varyings or

[Mesa-dev] [PATCH] mesa: use _mesa_lookup_enum_by_nr() in print_array()

2015-06-22 Thread Brian Paul
Print GL_FLOAT, etc. instead of hex value. --- src/mesa/main/varray.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c index 7389037..ebdd9ea 100644 --- a/src/mesa/main/varray.c +++ b/src/mesa/main/varray.c @@ -2309,10 +230

Re: [Mesa-dev] [PATCH v3 11/18] mesa/macros: add power-of-two assertions for alignment macros

2015-06-22 Thread Brian Paul
On 06/22/2015 05:02 PM, Nanley Chery wrote: From: Nanley Chery ALIGN and ROUND_DOWN_TO both require that the alignment value passed into the macro be a power of two in the comments. Using software assertions verifies this to be the case. v2: use static inline functions instead of gcc-specific

[Mesa-dev] [PATCH] st/mesa: remove unneeded pipe_surface_release() in st_render_texture()

2015-06-23 Thread Brian Paul
This caused us to always free the pipe_surface for the renderbuffer. The subsequent call to st_update_renderbuffer_surface() would typically just recreate it. Remove the call to pipe_surface_release() and let st_update_renderbuffer_surface() take care of freeing the old surface if it needs to be r

[Mesa-dev] [PATCH] configure: use $target_cpu, not $host_cpu when setting asm_arch

2015-06-23 Thread Brian Paul
Otherwise, if we're trying to build a 32-bit Mesa on a 64-bit host we wind up with -DUSE_X86_64_ASM, which is incorrect. --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index ddc757e..b12f5f9 100644 --- a/configure.ac +++ b/configure

Re: [Mesa-dev] [PATCH] configure: use $target_cpu, not $host_cpu when setting asm_arch

2015-06-23 Thread Brian Paul
On 06/23/2015 04:25 PM, Matt Turner wrote: On Tue, Jun 23, 2015 at 3:04 PM, Brian Paul wrote: Otherwise, if we're trying to build a 32-bit Mesa on a 64-bit host we wind up with -DUSE_X86_64_ASM, which is incorrect. --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

Re: [Mesa-dev] [PATCH] configure: use $target_cpu, not $host_cpu when setting asm_arch

2015-06-23 Thread Brian Paul
On 06/23/2015 04:56 PM, Brian Paul wrote: On 06/23/2015 04:25 PM, Matt Turner wrote: On Tue, Jun 23, 2015 at 3:04 PM, Brian Paul wrote: Otherwise, if we're trying to build a 32-bit Mesa on a 64-bit host we wind up with -DUSE_X86_64_ASM, which is incorrect. --- configure.ac | 2 +- 1

Re: [Mesa-dev] [PATCH] u_vbuf: fix src_offset alignment in u_vbuf_create_vertex_elements()

2015-06-24 Thread Brian Paul
On 06/24/2015 06:49 AM, Emil Velikov wrote: Hello gents, On 19 June 2015 at 15:39, Brian Paul wrote: If the driver says PIPE_CAP_VERTEX_ELEMENT_SRC_OFFSET_4BYTE_ALIGNED_ONLY=1, the driver should never receive a pipe_vertex_element::src_offset value that's not a multiple of four. But the

Re: [Mesa-dev] [PATCH] softpipe, llvmpipe: fix PIPE_SHADER_CAP_MAX_INPUTS value

2015-06-24 Thread Brian Paul
Reviewed-by: Brian Paul Want to reference bug 91099 in the commit msg? On 06/24/2015 04:59 PM, Marek Olšák wrote: From: Marek Olšák PIPE_MAX_SHADER_INPUTS was recently bumped to 80 because of tessellation. --- src/gallium/auxiliary/gallivm/lp_bld_limits.h | 2 +- src/gallium/auxiliary

Re: [Mesa-dev] [PATCH] configure: use $target_cpu, not $host_cpu when setting asm_arch

2015-06-25 Thread Brian Paul
I've got 32-bit libs building on 64-bit Ubuntu and Fedora. But I've found a weird problem. On Fedora 22, for example, Mesa's make install creates a /usr/lib/libGL.la file which contains the line: dependency_libs=' -L/usr/lib -lexpat -L/usr/lib64 /usr/lib64/libglapi.la -lXext -lXdamage -lX

Re: [Mesa-dev] [PATCH] Allow setting GL_TEXTURE_COMPARE_MODE on a sampler object without ARB_shadow support.

2015-06-26 Thread Brian Paul
On 06/25/2015 05:11 PM, Matt Turner wrote: On Mon, Mar 23, 2015 at 12:25 PM, Stefan Dösinger wrote: This fixes a GL error warning on r200 in Wine. The GL_ARB_sampler_objects extension does not specify a dependency on GL_ARB_shadow or GL_ARB_depth_texture for this value. Just set the value and

Re: [Mesa-dev] Early calls to st_validate_state

2015-06-26 Thread Brian Paul
If we really do need to call _mesa_update_state() for this, I think the right place would be in _mesa_blit_framebuffer(), not in the state tracker. -Brian On 06/26/2015 09:17 AM, Ilia Mirkin wrote: So that obviously avoids the crash. I guess I was unsure if that was the right way forward. The

Re: [Mesa-dev] [PATCH v3 6/6] mesa/main: free locale at exit

2015-06-26 Thread Brian Paul
rwise, the series looks good to me. Nice to see patch 1. I remember writing that dumb code years ago. Reviewed-by: Brian Paul +{ + _mesa_destroy_shader_compiler(); + _mesa_locale_fini(); +} /** * Calls all the various one-time-init functions in Mesa. @@ -385,7 +395,7 @@ one_time

Re: [Mesa-dev] [PATCH 1/5] gallium/docs: remove out-of-date document about D3D11 features

2015-06-26 Thread Brian Paul
Series LGTM. Reviewed-by: Brian Paul On 06/26/2015 12:22 PM, Marek Olšák wrote: From: Marek Olšák --- src/gallium/docs/d3d11ddi.txt | 462 -- 1 file changed, 462 deletions(-) delete mode 100644 src/gallium/docs/d3d11ddi.txt diff --git a/src

Re: [Mesa-dev] [PATCH v3 6/6] mesa/main: free locale at exit

2015-06-27 Thread Brian Paul
On Sat, Jun 27, 2015 at 5:08 AM, Erik Faye-Lund wrote: > On Fri, Jun 26, 2015 at 9:05 PM, Brian Paul wrote: > > On 06/26/2015 12:06 PM, Erik Faye-Lund wrote: > >> > >> In order to save a small leak if mesa is continously loaded and > >> unloaded, let's

Re: [Mesa-dev] [PATCH 05/11] mesa: implement _mesa_GetTextureSubImage()

2015-07-02 Thread Brian Paul
, 2014 at 9:42 AM, Brian Paul wrote: One of the two new functions in GL_ARB_get_texture_sub_image. --- src/mesa/main/texgetimage.c | 305 ++-- src/mesa/main/texgetimage.h | 8 ++ 2 files changed, 277 insertions(+), 36 deletions(-) diff --git a/src/mesa

Re: [Mesa-dev] [PATCH 05/11] mesa: implement _mesa_GetTextureSubImage()

2015-07-02 Thread Brian Paul
On 7/2/15 1:00 PM, Eric Anholt wrote: Brian Paul writes: The main issue is I need to do additional work for cube and/or cube array textures. This is still on my to-do list. Do you need this? FWIW, I just wanted this extension in X yesterday. I'm on vacation this week. I could t

Re: [Mesa-dev] [PATCH 15/18] swrast: Defer _tnl_vertex_init until first use

2015-07-06 Thread Brian Paul
On 07/06/2015 01:11 PM, Matt Turner wrote: On Mon, Jul 6, 2015 at 3:33 AM, Chris Wilson wrote: The vertices require a large chunk of memory, currently allocated during context creation. However, this memory is not required until use so we can defer the allocation until the first swrast_Wakeup()

[Mesa-dev] [PATCH 2/2] gallium/hud: add PIPE_DRIVER_QUERY_TYPE_MICROSECONDS for HUD

2015-07-07 Thread Brian Paul
This allows drivers to report queries in units of microseconds and have the HUD display "us" (microseconds), "ms" (milliseconds) or "s" (seconds) on the graph. --- src/gallium/auxiliary/hud/hud_context.c | 25 - src/gallium/include/pipe/p_defines.h| 11 ++- 2 fi

[Mesa-dev] [PATCH 1/2] gallium/hud: replace byte units flag with pipe_driver_query_type

2015-07-07 Thread Brian Paul
Instead of using a boolean 'is bytes' value, use the pipe_driver_query_type enum type. This will let is add support for time values in the next patch. --- src/gallium/auxiliary/hud/hud_context.c | 20 src/gallium/auxiliary/hud/hud_driver_query.c | 9 +++-- src/galli

Re: [Mesa-dev] [PATCH] st/dri: don't set PIPE_BIND_SCANOUT for MSAA surfaces

2015-07-07 Thread Brian Paul
>textures[statt]->bind; +templ.bind = drawable->textures[statt]->bind & ~PIPE_BIND_SCANOUT; templ.nr_samples = drawable->stvis.samples; /* Try to reuse the resource. LGTM. Reviewed-by: Brian Paul

[Mesa-dev] [PATCH] gallium/hud: display percentages with % suffix

2015-07-07 Thread Brian Paul
--- src/gallium/auxiliary/hud/hud_context.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gallium/auxiliary/hud/hud_context.c b/src/gallium/auxiliary/hud/hud_context.c index cb55220..bd57190 100644 --- a/src/gallium/auxiliary/hud/hud_context.c +++ b/src/gallium/auxiliary/hud/hud_cont

[Mesa-dev] [PATCH 09/13] mesa: overhaul the glGetCompressedTexImage code

2015-07-13 Thread Brian Paul
Same idea as the previous patch. --- src/mesa/main/texgetimage.c | 345 +--- 1 file changed, 196 insertions(+), 149 deletions(-) diff --git a/src/mesa/main/texgetimage.c b/src/mesa/main/texgetimage.c index b74517a..bcdcfe8 100644 --- a/src/mesa/main/texgeti

[Mesa-dev] [PATCH 02/13] meta: add offset, width, height parameters to decompress_texture_image()

2015-07-13 Thread Brian Paul
In preparation for decompressing texture sub images. --- src/mesa/drivers/common/meta.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c index 54c3d5a..34a8e4b 100644 --- a/src/mesa/drivers/common/meta.c

[Mesa-dev] [PATCH 11/13] mesa: add API dispatch for GL_ARB_get_texture_sub_image

2015-07-13 Thread Brian Paul
This adds the new glGetTextureSubImage() and glGetCompressedTextureSubImage() functions. Also update the dispatch sanity test program. --- src/mapi/glapi/gen/ARB_get_texture_sub_image.xml | 42 src/mapi/glapi/gen/Makefile.am | 1 + src/mapi/glapi/gen/gl

[Mesa-dev] [PATCH 01/13] meta: handle subimages in _mesa_meta_setup_texture_coords()

2015-07-13 Thread Brian Paul
v2: fix depth, total_depth mix-up in meta.h, per Laura Ekstrand. --- src/mesa/drivers/common/meta.c | 88 +- src/mesa/drivers/common/meta.h | 6 +- src/mesa/drivers/common/meta_generate_mipmap.c | 4 +- 3 files changed, 65 insertions(+), 33

[Mesa-dev] [PATCH 10/13] mesa: add new _mesa_Get[Compressed]TextureSubImage() functions

2015-07-13 Thread Brian Paul
Simple implementations in terms of get_[compressed_]texture_image(). --- src/mesa/main/texgetimage.c | 38 ++ src/mesa/main/texgetimage.h | 15 +++ 2 files changed, 53 insertions(+) diff --git a/src/mesa/main/texgetimage.c b/src/mesa/main/texgetimag

[Mesa-dev] [PATCH 06/13] mesa: replace Driver.GetCompressedTexImage() w/ GetCompressedTexSubImage()

2015-07-13 Thread Brian Paul
For now, pass offsets of zero and width/height/depth equal to the whole image. --- src/mesa/drivers/common/driverfuncs.c | 2 +- src/mesa/main/dd.h | 9 ++--- src/mesa/main/texgetimage.c| 28 src/mesa/main/texgetimage.h

[Mesa-dev] [PATCH 03/13] mesa: replace Driver.GetTexImage with GetTexSubImage()

2015-07-13 Thread Brian Paul
The new driver hook has x/y/zoffset and width/height/depth parameters for the new glGetTextureSubImage() function. The meta code and gallium state tracker are updated to handle the new parameters. Callers to Driver.GetTexSubImage() pass in offsets=0 and sizes equal to the whole texture size. ---

[Mesa-dev] [PATCH 04/13] mesa: plumb offset/size parameters through GetTexSubImage code

2015-07-13 Thread Brian Paul
Needed for GL_ARB_get_texture_sub_image. But at this point, the offsets are always zero and the sizes match the whole texture image. v2: Fixes, suggestions from Laura Ekstrand: * Fix calls to ctx->Driver.UnmapTextureImage() to pass the correct slice value. * Added comments and assertions to che

[Mesa-dev] [PATCH 07/13] mesa: 80-column wrapping in texgetimage.c

2015-07-13 Thread Brian Paul
--- src/mesa/main/texgetimage.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/mesa/main/texgetimage.c b/src/mesa/main/texgetimage.c index fb3c2c8..e180a4c 100644 --- a/src/mesa/main/texgetimage.c +++ b/src/mesa/main/texgetimage.c @@ -449,7 +449,8 @@ get_tex_

[Mesa-dev] [PATCH 05/13] mesa: make _mesa_get_[compressed_]texture_image() static

2015-07-13 Thread Brian Paul
These functions are only called from teximage.c --- src/mesa/main/texgetimage.c | 24 src/mesa/main/texgetimage.h | 7 --- 2 files changed, 12 insertions(+), 19 deletions(-) diff --git a/src/mesa/main/texgetimage.c b/src/mesa/main/texgetimage.c index d17dd52..30a7d06

[Mesa-dev] [PATCH 12/13] mesa: enable GL_ARB_get_texture_sub_image for all drivers

2015-07-13 Thread Brian Paul
--- src/mesa/main/extensions.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c index 4176a69..d2df4fb 100644 --- a/src/mesa/main/extensions.c +++ b/src/mesa/main/extensions.c @@ -121,6 +121,7 @@ static const struct extension extension_tab

[Mesa-dev] [PATCH 08/13] mesa: overhaul the glGetTexImage code

2015-07-13 Thread Brian Paul
1. Reorganize the error checking code. 2. Lay groundwork for getting sub images. 3. Implement _mesa_GetnTexImageARB(), _mesa_GetTexImage() and _mesa_GetTextureImage() all in terms of get_texture_image(). --- src/mesa/main/texgetimage.c | 539 +--- 1 file

[Mesa-dev] [PATCH 13/13] docs: document that GL_ARB_get_texture_sub_image is completed

2015-07-13 Thread Brian Paul
DONE - Program Pipeline objectDONE - Query object DONE (will require changes when GL_ARB_query_buffer_object lands) - GL_ARB_get_texture_sub_image started (Brian Paul

Re: [Mesa-dev] [PATCH 11/13] mesa: add API dispatch for GL_ARB_get_texture_sub_image

2015-07-14 Thread Brian Paul
On 07/13/2015 10:39 PM, Ilia Mirkin wrote: On Jul 13, 2015 9:21 PM, "Brian Paul" mailto:bri...@vmware.com>> wrote: > > This adds the new glGetTextureSubImage() and > glGetCompressedTextureSubImage() functions. Also update the > dispatch sanity test program.

Re: [Mesa-dev] [PATCH 03/13] mesa: replace Driver.GetTexImage with GetTexSubImage()

2015-07-14 Thread Brian Paul
Yes. Missed that. I'll post an updated series later. Thanks for reviewing. -Brian On 07/14/2015 10:33 AM, Ilia Mirkin wrote: Don't you also have to update src/mesa/drivers/dri/i965/intel_tex_image.c:intel_get_tex_image ? On Mon, Jul 13, 2015 at 9:21 PM, Brian Paul wrote: The

[Mesa-dev] [PATCH] osmesa: fix OSMesaPixelsStore typo

2015-07-15 Thread Brian Paul
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91337 Cc: 10.6 --- src/gallium/state_trackers/osmesa/osmesa.c | 2 +- src/mesa/drivers/osmesa/osmesa.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gallium/state_trackers/osmesa/osmesa.c b/src/gallium/

Re: [Mesa-dev] [PATCH 08/13] mesa: overhaul the glGetTexImage code

2015-07-15 Thread Brian Paul
On 07/14/2015 03:54 PM, Ilia Mirkin wrote: On Mon, Jul 13, 2015 at 9:21 PM, Brian Paul wrote: 1. Reorganize the error checking code. 2. Lay groundwork for getting sub images. 3. Implement _mesa_GetnTexImageARB(), _mesa_GetTexImage() and _mesa_GetTextureImage() all in terms of

[Mesa-dev] [PATCH 05/14] mesa: make _mesa_get_[compressed_]texture_image() static

2015-07-15 Thread Brian Paul
These functions are only called from teximage.c Reviewed-by: Ilia Mirkin --- src/mesa/main/texgetimage.c | 24 src/mesa/main/texgetimage.h | 7 --- 2 files changed, 12 insertions(+), 19 deletions(-) diff --git a/src/mesa/main/texgetimage.c b/src/mesa/main/texgetima

[Mesa-dev] [PATCH 11/14] mesa: add API dispatch for GL_ARB_get_texture_sub_image

2015-07-15 Thread Brian Paul
This adds the new glGetTextureSubImage() and glGetCompressedTextureSubImage() functions. Also update the dispatch sanity test program. v2: remove stray brace, move xi:include line in gl_API.xml, fix extension number typo, s/program/texture/ in xml file. --- src/mapi/glapi/gen/ARB_get_texture_sub

[Mesa-dev] [PATCH 06/14] mesa: replace Driver.GetCompressedTexImage() w/ GetCompressedTexSubImage()

2015-07-15 Thread Brian Paul
For now, pass offsets of zero and width/height/depth equal to the whole image. Reviewed-by: Ilia Mirkin --- src/mesa/drivers/common/driverfuncs.c | 2 +- src/mesa/main/dd.h | 9 ++--- src/mesa/main/texgetimage.c| 28 src/mesa/ma

[Mesa-dev] [PATCH 14/14] mesa: s/GLint/GLsizei/ for consistency

2015-07-15 Thread Brian Paul
--- src/mesa/main/dd.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h index ae01770..87eb63e 100644 --- a/src/mesa/main/dd.h +++ b/src/mesa/main/dd.h @@ -328,7 +328,7 @@ struct dd_function_table { void (*CompressedTexSubImage)(struct

[Mesa-dev] [PATCH 03/14] mesa: replace Driver.GetTexImage with GetTexSubImage()

2015-07-15 Thread Brian Paul
The new driver hook has x/y/zoffset and width/height/depth parameters for the new glGetTextureSubImage() function. The meta code and gallium state tracker are updated to handle the new parameters. Callers to Driver.GetTexSubImage() pass in offsets=0 and sizes equal to the whole texture size. v2:

[Mesa-dev] [PATCH 10/14] mesa: add new _mesa_Get[Compressed]TextureSubImage() functions

2015-07-15 Thread Brian Paul
Simple implementations in terms of get_[compressed_]texture_image(). --- src/mesa/main/texgetimage.c | 62 - src/mesa/main/texgetimage.h | 15 +++ 2 files changed, 76 insertions(+), 1 deletion(-) diff --git a/src/mesa/main/texgetimage.c b/src/me

[Mesa-dev] [PATCH 08/14] mesa: overhaul the glGetTexImage code

2015-07-15 Thread Brian Paul
1. Reorganize the error checking code. 2. Lay groundwork for getting sub images by passing image offset and dimensions to the error checking code. 3. Implement _mesa_GetnTexImageARB(), _mesa_GetTexImage() and _mesa_GetTextureImage() all in terms of get_texture_image(). v2: pass offset/width/

[Mesa-dev] [PATCH 02/14] meta: add offset, width, height parameters to decompress_texture_image()

2015-07-15 Thread Brian Paul
In preparation for decompressing texture sub images. Reviewed-by: Ilia Mirkin --- src/mesa/drivers/common/meta.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c index 54c3d5a..34a8e4b 100644 --- a/src/

[Mesa-dev] [PATCH 09/14] mesa: overhaul the glGetCompressedTexImage code

2015-07-15 Thread Brian Paul
Same idea as the previous patch. --- src/mesa/main/texgetimage.c | 345 ++-- 1 file changed, 203 insertions(+), 142 deletions(-) diff --git a/src/mesa/main/texgetimage.c b/src/mesa/main/texgetimage.c index 49239e7..6ac1779 100644 --- a/src/mesa/main/texgeti

[Mesa-dev] [PATCH 07/14] mesa: 80-column wrapping in texgetimage.c

2015-07-15 Thread Brian Paul
Reviewed-by: Ilia Mirkin --- src/mesa/main/texgetimage.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/mesa/main/texgetimage.c b/src/mesa/main/texgetimage.c index fb3c2c8..e180a4c 100644 --- a/src/mesa/main/texgetimage.c +++ b/src/mesa/main/texgetimage.c @@

[Mesa-dev] [PATCH 13/14] docs: document that GL_ARB_get_texture_sub_image is completed

2015-07-15 Thread Brian Paul
DONE - Program Pipeline objectDONE - Query object DONE (will require changes when GL_ARB_query_buffer_object lands) - GL_ARB_get_texture_sub_image started (Brian Paul

[Mesa-dev] [PATCH 12/14] mesa: enable GL_ARB_get_texture_sub_image for all drivers

2015-07-15 Thread Brian Paul
--- src/mesa/main/extensions.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c index d753e5f..7deb823 100644 --- a/src/mesa/main/extensions.c +++ b/src/mesa/main/extensions.c @@ -121,6 +121,7 @@ static const struct extension extension_tab

[Mesa-dev] [PATCH 01/14] meta: handle subimages in _mesa_meta_setup_texture_coords()

2015-07-15 Thread Brian Paul
v2: fix depth, total_depth mix-up in meta.h, per Laura Ekstrand. --- src/mesa/drivers/common/meta.c | 88 +- src/mesa/drivers/common/meta.h | 6 +- src/mesa/drivers/common/meta_generate_mipmap.c | 4 +- 3 files changed, 65 insertions(+), 33

[Mesa-dev] [PATCH 04/14] mesa: plumb offset/size parameters through GetTexSubImage code

2015-07-15 Thread Brian Paul
Needed for GL_ARB_get_texture_sub_image. But at this point, the offsets are always zero and the sizes match the whole texture image. v2: Fixes, suggestions from Laura Ekstrand: * Fix calls to ctx->Driver.UnmapTextureImage() to pass the correct slice value. * Added comments and assertions to che

Re: [Mesa-dev] [PATCH 08/14] mesa: overhaul the glGetTexImage code

2015-07-16 Thread Brian Paul
On 07/15/2015 07:15 PM, Ilia Mirkin wrote: The reason why you chose to call select_tex_image() several times through a get_tex_image flow eludes me. Why not just get it once at the beginning and pass it around? The old APIs also used a gl_texture_image and not a gl_texture_object. (Obviously the

Re: [Mesa-dev] [PATCH] mesa: fix up some texture error checks

2015-07-16 Thread Brian Paul
} /* levels check */ Reviewed-by: Brian Paul ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH] mesa: fix up some texture error checks

2015-07-17 Thread Brian Paul
On 07/16/2015 03:15 PM, srol...@vmware.com wrote: From: Roland Scheidegger In particular, we were incorrectly accepting s3tc (and lots of others) for CompressedTexSubImage3D (but not CompressedTexImage3D) calls with 3d targets. At this time, the only allowed formats for these calls are the bptc

Re: [Mesa-dev] [PATCH] svga: scons: remove unused HAVE_SYS_TYPES_H define

2015-07-17 Thread Brian Paul
Can you elaborate in the commit message why this is being done or why the HAVE_SYS_TYPES_H definition is not needed? That saves me time having to research the issue myself. -Brian On 07/17/2015 11:18 AM, Emil Velikov wrote: Cc: Jose Fonseca Cc: Brian Paul Signed-off-by: Emil Velikov

Re: [Mesa-dev] [PATCH 08/14] mesa: overhaul the glGetTexImage code

2015-07-17 Thread Brian Paul
#x27;s a few more patches in the series which nobody has R-b'd yet though. -Brian On Wed, Jul 15, 2015 at 7:40 PM, Brian Paul wrote: 1. Reorganize the error checking code. 2. Lay groundwork for getting sub images by passing image offset and dimensions to the error checking code

[Mesa-dev] [PATCH 4/6] mesa: optimize _math_matrix_set_identity() and return a bool result

2015-07-17 Thread Brian Paul
Skip memcpy() calls, etc. if the matrix is already the identity. Return true/false to indicate if we're really changing the matrix or not. --- src/mesa/math/m_matrix.c | 23 +++ src/mesa/math/m_matrix.h | 2 +- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/s

[Mesa-dev] [PATCH 5/6] mesa: don't set dirty matrix flag if re-loading identity matrix

2015-07-17 Thread Brian Paul
--- src/mesa/main/matrix.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/mesa/main/matrix.c b/src/mesa/main/matrix.c index 80c8a24..5ac97f8 100644 --- a/src/mesa/main/matrix.c +++ b/src/mesa/main/matrix.c @@ -309,8 +309,10 @@ _mesa_LoadIdentity( void ) if (MESA_

[Mesa-dev] [PATCH 1/6] mesa: move check for no-op glFrontFace call earlier

2015-07-17 Thread Brian Paul
If the new mode matches the current mode, there can be no error. --- src/mesa/main/polygon.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mesa/main/polygon.c b/src/mesa/main/polygon.c index a1f0aa0..6be6f33 100644 --- a/src/mesa/main/polygon.c +++ b/src/mesa/main/p

[Mesa-dev] [PATCH 6/6] mesa: check for identity matrix in _mesa_LoadMatrixf()

2015-07-17 Thread Brian Paul
Google Earth often calls glLoadMatrixf() with an identity matrix instead of glLoadIdentity() to set the modelview and texture matrices. In many cases, the matrix is already the identity so the calls are redundant. By being a bit smarter in _mesa_LoadMatrixf() we can avoid quite a few matrix-relat

[Mesa-dev] [PATCH 3/6] mesa: move check for no-op glShadeModel call earlier

2015-07-17 Thread Brian Paul
--- src/mesa/main/light.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mesa/main/light.c b/src/mesa/main/light.c index 4021dbe..f215c93 100644 --- a/src/mesa/main/light.c +++ b/src/mesa/main/light.c @@ -44,14 +44,14 @@ _mesa_ShadeModel( GLenum mode ) if (MESA_V

[Mesa-dev] [PATCH 2/6] mesa: move check for no-op glAlphaFunc call earlier

2015-07-17 Thread Brian Paul
--- src/mesa/main/blend.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mesa/main/blend.c b/src/mesa/main/blend.c index d365305..ee6e7d3 100644 --- a/src/mesa/main/blend.c +++ b/src/mesa/main/blend.c @@ -569,6 +569,9 @@ _mesa_AlphaFunc( GLenum func, GLclampf ref )

Re: [Mesa-dev] [PATCH excerpt] mesa: Rename _mesa_lookup_enum_by_nr() to _mesa_enum_to_string().

2015-07-20 Thread Brian Paul
Looks OK to me. Thanks for doing this. Reviewed-by: Brian Paul On 07/18/2015 02:36 AM, Kenneth Graunke wrote: Generated by sed; no manual changes. Signed-off-by: Kenneth Graunke --- We talked about doing this back in 2013, but the patches never quite materialized. Here's the obviou

Re: [Mesa-dev] [PATCH] svga: scons: remove unused HAVE_SYS_TYPES_H define

2015-07-20 Thread Brian Paul
On 07/17/2015 02:14 PM, Emil Velikov wrote: On 17 July 2015 at 20:22, Brian Paul wrote: Can you elaborate in the commit message why this is being done or why the HAVE_SYS_TYPES_H definition is not needed? That saves me time having to research the issue myself. I'm not sure I can elab

[Mesa-dev] [PATCH] swrast: remove unneeded & operators in _swrast_choose_texture_sample_func()

2015-07-20 Thread Brian Paul
--- src/mesa/swrast/s_texfilter.c | 56 +-- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/src/mesa/swrast/s_texfilter.c b/src/mesa/swrast/s_texfilter.c index abc1727..cd6395f 100644 --- a/src/mesa/swrast/s_texfilter.c +++ b/src/mesa/swrast/

Re: [Mesa-dev] [PATCH 1/6] mesa: move check for no-op glFrontFace call earlier

2015-07-20 Thread Brian Paul
common and I'd expect the 64-byte memcmp() to be cheaper than the matrix-analyze code in m_matrix.c I'm not super attached to this change so if you're unconvinced I won't mind dropping it. -Brian On 07/17/2015 05:48 PM, Brian Paul wrote: If the new mode matches

Re: [Mesa-dev] ARB_copy_image support in Gallium

2015-07-20 Thread Brian Paul
On 07/20/2015 01:19 PM, Ilia Mirkin wrote: On Mon, Jul 20, 2015 at 2:44 PM, Ilia Mirkin wrote: Hi Brian, You marked off ARB_copy_image (and ARB_clear_texture) as in-progress by VMware some months ago -- has there been any movement on that? It appears that Bioshock Infinite requires ARB_copy_im

Re: [Mesa-dev] [PATCH] st/mesa: Silence GCC unused-variable warning.

2015-07-21 Thread Brian Paul
SK_X), t->systemValues[i]); Reviewed-by: Brian Paul ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 04/12] gallium/util: improve dump functions

2015-07-21 Thread Brian Paul
Just a couple minor nits... On 07/16/2015 10:54 AM, Marek Olšák wrote: From: Marek Olšák --- src/gallium/auxiliary/util/u_dump.h | 20 ++- src/gallium/auxiliary/util/u_dump_defines.c | 41 + src/gallium/auxiliary/util/u_dump_state.c | 233 ++-- 3 fi

Re: [Mesa-dev] [PATCH 04/12] gallium/util: improve dump functions

2015-07-21 Thread Brian Paul
On 07/21/2015 08:17 AM, Marek Olšák wrote: On Tue, Jul 21, 2015 at 3:56 PM, Brian Paul wrote: Just a couple minor nits... On 07/16/2015 10:54 AM, Marek Olšák wrote: From: Marek Olšák --- src/gallium/auxiliary/util/u_dump.h | 20 ++- src/gallium/auxiliary/util

[Mesa-dev] [PATCH] mesa: allow GL_TEXTURE_CUBE_MAP_ARRAY case for glCompressedTexSubImage3D()

2015-07-21 Thread Brian Paul
Since s3tc works for cube maps and 2D arrays, it should also work for cube arrays. NVIDIA's driver supports this too. This is a minor follow-on fix for the commit "mesa: fix up some texture error checks". --- src/mesa/main/teximage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --

[Mesa-dev] [PATCH] mesa: initialize variables to silence compiler warnings

2015-07-21 Thread Brian Paul
--- src/mesa/main/fbobject.c | 4 ++-- src/mesa/main/shaderapi.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c index f46554b..cc342c2 100644 --- a/src/mesa/main/fbobject.c +++ b/src/mesa/main/fbobject.c @@ -3304,7 +3304,

Re: [Mesa-dev] [PATCH] gallium/util: Stop bundling our snprintf implementation.

2015-07-22 Thread Brian Paul
/u_snprintf.c Looks OK to me. Reviewed-by: Brian Paul ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 1/2] mesa: adjust error message when there's a missing teximage

2015-07-22 Thread Brian Paul
*/ - _mesa_error(ctx, GL_INVALID_OPERATION, - "%s(zoffset = %d)", caller, zoffset); + _mesa_error(ctx, GL_INVALID_OPERATION, "%s(missing image)", caller); return true; } Reviewed-by: Brian Paul ___ m

Re: [Mesa-dev] [PATCH 2/2] mesa: rearrange texture error checking order

2015-07-22 Thread Brian Paul
On 07/22/2015 11:02 AM, Ilia Mirkin wrote: This moves the width/height/depth == 0 check to the front and avoids doing any other checking when that is the case. Also moves the dimensions check after the format/type checks so that we don't bail out with success on a width/height/depth == 0 request

Re: [Mesa-dev] [PATCH 2/2] mesa: rearrange texture error checking order

2015-07-22 Thread Brian Paul
On 07/22/2015 11:29 AM, Ilia Mirkin wrote: On Wed, Jul 22, 2015 at 1:20 PM, Brian Paul wrote: On 07/22/2015 11:02 AM, Ilia Mirkin wrote: This moves the width/height/depth == 0 check to the front and avoids doing any other checking when that is the case. Also moves the dimensions check after

[Mesa-dev] Using the right context in st_texture_release_all_sampler_views()

2015-07-22 Thread Brian Paul
Hi Marek, This is regarding your commit "st/mesa: use pipe_sampler_view_release for releasing sampler views" from last October. Basically, we have: void st_texture_release_all_sampler_views(struct st_context *st, struct st_texture_object *stObj) { GLuin

Re: [Mesa-dev] Using the right context in st_texture_release_all_sampler_views()

2015-07-22 Thread Brian Paul
On 07/22/2015 05:31 PM, Jose Fonseca wrote: On 22/07/15 23:32, Brian Paul wrote: Hi Marek, This is regarding your commit "st/mesa: use pipe_sampler_view_release for releasing sampler views" from last October. Basically, we have: void st_texture_release_all_sampler_views(struct st_c

Re: [Mesa-dev] [PATCH 1/2] doxygen: Correct grammatical typo in math/m_vector.h

2015-07-23 Thread Brian Paul
, and whether we need to clean columns out * because they contain non-(0,0,0,1) values. * For both, Reviewed-by: Brian Paul AFAIK you don't have a git account so I can commit these for you. ___ mesa-dev mailing list mes

[Mesa-dev] [PATCH 2/3] mesa: another target fix in compressed_subtexture_target_check()

2015-07-23 Thread Brian Paul
The previous fix added GL_TEXTURE_CUBE_MAP_ARRAY but we also need to support GL_TEXTURE_CUBE_MAP (via DSA). So in the end, GL_TEXTURE_3D is the only (legal) target for glCompressedTex*SubImage3D() which needs additional compression format checking. GL_TEXTURE_2D_ARRAY, GL_TEXTURE_CUBE_MAP_ARRAY a

[Mesa-dev] [PATCH 1/3] mesa: simplify format check in compressed_subtexture_target_check()

2015-07-23 Thread Brian Paul
Lose the invalidformat local variable. --- src/mesa/main/teximage.c | 21 + 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index 3b309ab..4fe6ee4 100644 --- a/src/mesa/main/teximage.c +++ b/src/mesa/main/texima

[Mesa-dev] [PATCH] st/mesa: remove unused 'samp' function parameters

2015-07-23 Thread Brian Paul
--- src/mesa/state_tracker/st_atom_texture.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/mesa/state_tracker/st_atom_texture.c b/src/mesa/state_tracker/st_atom_texture.c index ba3cf9b..1e31533 100644 --- a/src/mesa/state_tracker/st_atom_texture.c +++ b/src/mesa/

[Mesa-dev] [PATCH] mesa: fix _mesa_error() compiler warnings in shaderapi.c

2015-07-23 Thread Brian Paul
Fix many instances of: main/shaderapi.c: In function '_mesa_GetSubroutineUniformLocation': main/shaderapi.c:2176:7: warning: format not a string literal and no format arguments [-Wformat-security] _mesa_error(ctx, GL_INVALID_OPERATION, api_name); ^ Ideally, many of these error messa

[Mesa-dev] [PATCH 3/3] mesa: do more thorough target checking in compressed_subtexture_target_check()

2015-07-23 Thread Brian Paul
When we're error-checking the target, we also need to check if the corresponding extension is supported. --- src/mesa/main/teximage.c | 67 +--- 1 file changed, 41 insertions(+), 26 deletions(-) diff --git a/src/mesa/main/teximage.c b/src/mesa/main/texi

Re: [Mesa-dev] [PATCH 3/3] mesa: do more thorough target checking in compressed_subtexture_target_check()

2015-07-23 Thread Brian Paul
On 07/23/2015 08:26 AM, Roland Scheidegger wrote: Am 23.07.2015 um 15:57 schrieb Brian Paul: When we're error-checking the target, we also need to check if the corresponding extension is supported. --- src/mesa/main/teximage.c | 67 +--- 1

Re: [Mesa-dev] [PATCH 2/2] mesa: rearrange texture error checking order

2015-07-23 Thread Brian Paul
On 07/23/2015 04:24 PM, Ilia Mirkin wrote: On Wed, Jul 22, 2015 at 1:44 PM, Brian Paul wrote: On 07/22/2015 11:29 AM, Ilia Mirkin wrote: On Wed, Jul 22, 2015 at 1:20 PM, Brian Paul wrote: On 07/22/2015 11:02 AM, Ilia Mirkin wrote: This moves the width/height/depth == 0 check to the

Re: [Mesa-dev] [mesa-dev, mesa-demos][PATCH] sharedtex_mt: fix rendering thread hang

2015-10-12 Thread Brian Paul
On 10/12/2015 05:25 AM, Belal, Awais wrote: Hi, Is there are a reservation against the below patch? Looks OK, but one comment below. BR, Awais From: mesa-dev [mesa-dev-boun...@lists.freedesktop.org] on behalf of Belal, Awais Sent: Thursday, October

[Mesa-dev] [PATCH] mesa: pass caller name to create_textures()

2015-10-12 Thread Brian Paul
Simpler than the dsa flag approach. --- src/mesa/main/texobj.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c index 60c55ae..b571b1b 100644 --- a/src/mesa/main/texobj.c +++ b/src/mesa/main/texobj.c @@ -1205,17 +1205

[Mesa-dev] [PATCH] vbo: fix incorrect switch statement in init_mat_currval()

2015-10-12 Thread Brian Paul
The variable 'i' is a value in [0, MAT_ATTRIB_MAX-1] so subtracting VERT_ATTRIB_GENERIC0 gave a bogus value and we executed the default switch clause for all loop iterations. This doesn't fix any known issues but was clearly incorrect. Cc: mesa-sta...@lists.freedesktop.org --- src/mesa/vbo/vbo_c

  1   2   3   4   5   6   7   8   9   10   >