Re: [Mesa-dev] [PATCH 09/10] i965/fs: Add a peephole pass to combine ADD with ADDC/SUBB.

2013-09-24 Thread Kenneth Graunke
On 09/24/2013 03:42 PM, Ian Romanick wrote: > On 09/24/2013 03:38 PM, Matt Turner wrote: >> On Tue, Sep 24, 2013 at 2:41 PM, Ian Romanick wrote: >>> For our own edification, we should add some feedback in the >>> INTEL_DEBUG=perf case. If there is any case that an ADDC (or SUBB) from >>> the fron

Re: [Mesa-dev] [PATCH 09/10] i965/fs: Add a peephole pass to combine ADD with ADDC/SUBB.

2013-09-24 Thread Ian Romanick
On 09/24/2013 03:38 PM, Matt Turner wrote: > On Tue, Sep 24, 2013 at 2:41 PM, Ian Romanick wrote: >> For our own edification, we should add some feedback in the >> INTEL_DEBUG=perf case. If there is any case that an ADDC (or SUBB) from >> the frontend doesn't get merged with an add, we should gen

Re: [Mesa-dev] [PATCH 09/10] i965/fs: Add a peephole pass to combine ADD with ADDC/SUBB.

2013-09-24 Thread Matt Turner
On Mon, Sep 23, 2013 at 4:13 PM, Matt Turner wrote: > void > fs_visitor::visit(ir_expression *ir) > { > + static bool emitted_addc_or_subb = false; static is probably wrong. emitted_addc_or_subb should be a member of fs_visitor? ___ mesa-dev mailin

Re: [Mesa-dev] [PATCH 09/10] i965/fs: Add a peephole pass to combine ADD with ADDC/SUBB.

2013-09-24 Thread Matt Turner
On Tue, Sep 24, 2013 at 2:41 PM, Ian Romanick wrote: > For our own edification, we should add some feedback in the > INTEL_DEBUG=perf case. If there is any case that an ADDC (or SUBB) from > the frontend doesn't get merged with an add, we should generate a perf > warning. This probably indicates

Re: [Mesa-dev] [PATCH 2/2] i965: Add support for GL_AMD_performance_monitor on Ironlake.

2013-09-24 Thread Kenneth Graunke
On 09/24/2013 02:17 PM, Ian Romanick wrote: > On 09/23/2013 08:56 PM, Kenneth Graunke wrote: >> Ironlake's counters are always enabled; userspace can simply send a >> MI_REPORT_PERF_COUNT packet to take a snapshot of them. This makes it >> easy to implement. >> >> The counters are documented in th

Re: [Mesa-dev] [PATCH] llvmpipe: we need to subdivide if fb is bigger in either direction

2013-09-24 Thread Roland Scheidegger
Am 24.09.2013 22:26, schrieb Zack Rusin: > We need to subdivide triangles if either of the dimensions is > larger than the max edge length, not when both of them are larger. > > Signed-off-by: Zack Rusin > --- > src/gallium/drivers/llvmpipe/lp_setup.c | 2 +- > 1 file changed, 1 insertion(+), 1

Re: [Mesa-dev] [PATCH 09/10] i965/fs: Add a peephole pass to combine ADD with ADDC/SUBB.

2013-09-24 Thread Ian Romanick
For our own edification, we should add some feedback in the INTEL_DEBUG=perf case. If there is any case that an ADDC (or SUBB) from the frontend doesn't get merged with an add, we should generate a perf warning. This probably indicates a failing of the optimization pass. That could probably be a

Re: [Mesa-dev] [PATCH 01/10] glsl: Add ir_binop_carry and ir_binop_borrow.

2013-09-24 Thread Ian Romanick
Patches 1, 2, and 3 are Reviewed-by: Ian Romanick I'll skim the others, but I may not have anything to say about them... On 09/23/2013 04:12 PM, Matt Turner wrote: > Calculates the carry out of the addition of two values and the > borrow from subtraction respectively. Will be used in uaddCarry(

Re: [Mesa-dev] [PATCH 2/2] i965: Add support for GL_AMD_performance_monitor on Ironlake.

2013-09-24 Thread Ian Romanick
On 09/23/2013 08:56 PM, Kenneth Graunke wrote: > Ironlake's counters are always enabled; userspace can simply send a > MI_REPORT_PERF_COUNT packet to take a snapshot of them. This makes it > easy to implement. > > The counters are documented in the source code for the intel-gpu-tools > intel_perf

Re: [Mesa-dev] [PATCH v4 1/2] mesa: Add core support for the GL_AMD_performance_monitor extension.

2013-09-24 Thread Ian Romanick
Series is Reviewed-by: Ian Romanick I had one comment (future work) on patch 2. On 09/23/2013 08:56 PM, Kenneth Graunke wrote: > This provides an interface for applications (and OpenGL-based tools) to > access GPU performance counters. Since the exact performance counters > available vary betw

Re: [Mesa-dev] [PATCH] mesa: Remove 'invalidate_state' parameter to _mesa_dirty_texobj().

2013-09-24 Thread Ian Romanick
On 09/23/2013 09:08 PM, Kenneth Graunke wrote: > Every caller passed true. > > Signed-off-by: Kenneth Graunke Reviewed-by: Ian Romanick > --- > src/mesa/main/teximage.c| 6 +++--- > src/mesa/main/texobj.c | 9 +++-- > src/mesa/main/texobj.h

[Mesa-dev] [PATCH] llvmpipe: we need to subdivide if fb is bigger in either direction

2013-09-24 Thread Zack Rusin
We need to subdivide triangles if either of the dimensions is larger than the max edge length, not when both of them are larger. Signed-off-by: Zack Rusin --- src/gallium/drivers/llvmpipe/lp_setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/llvmpipe/

Re: [Mesa-dev] [PATCH 01/11] glsl: Initialize all member variables of _mesa_glsl_parse_state on construction.

2013-09-24 Thread Francisco Jerez
Kenneth Graunke writes: > On 09/24/2013 11:22 AM, Ian Romanick wrote: >>[..] >> Related to my comment on Vinson's patch (see "glsl: Initialize >> assignment_generator member variables."), we need to come up with some >> coding conventions. >> >> - What things should use the initialization list,

Re: [Mesa-dev] [PATCH 01/11] glsl: Initialize all member variables of _mesa_glsl_parse_state on construction.

2013-09-24 Thread Francisco Jerez
Kenneth Graunke writes: > On 09/20/2013 09:51 PM, Francisco Jerez wrote: >> diff --git a/src/glsl/glsl_parser_extras.cpp >> b/src/glsl/glsl_parser_extras.cpp >> index cac5a18..772933f 100644 >> --- a/src/glsl/glsl_parser_extras.cpp >> +++ b/src/glsl/glsl_parser_extras.cpp >> @@ -55,7 +55,7 @@ st

Re: [Mesa-dev] [PATCH] glsl: Initialize lower_vector_visitor::dont_lower_swz.

2013-09-24 Thread Kenneth Graunke
On 09/23/2013 09:58 PM, Vinson Lee wrote: > Fixes "Uninitialized scalar field" defect reported by Coverity. > > Signed-off-by: Vinson Lee > --- > src/glsl/lower_vector.cpp | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/glsl/lower_vector.cpp b/src/glsl/lower_vector.

Re: [Mesa-dev] [PATCH] glsl: Initialize ir_lower_jumps_visitor member variables.

2013-09-24 Thread Kenneth Graunke
On 09/23/2013 10:16 PM, Vinson Lee wrote: > Fixes "Unintialized scalar field" defect reported by Coverity. > > Signed-off-by: Vinson Lee > --- > src/glsl/lower_jumps.cpp | 7 ++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/src/glsl/lower_jumps.cpp b/src/glsl/lower_jump

Re: [Mesa-dev] [PATCH] glsl: Initialize assignment_generator member variables.

2013-09-24 Thread Kenneth Graunke
On 09/23/2013 10:06 PM, Vinson Lee wrote: > Fixes "Uninitialized pointer field" defect reported by Coverity. > > Signed-off-by: Vinson Lee > --- > src/glsl/lower_variable_index_to_cond_assign.cpp | 6 ++ > 1 file changed, 6 insertions(+) > > diff --git a/src/glsl/lower_variable_index_to_con

Re: [Mesa-dev] [PATCH 01/11] glsl: Initialize all member variables of _mesa_glsl_parse_state on construction.

2013-09-24 Thread Kenneth Graunke
On 09/24/2013 11:22 AM, Ian Romanick wrote: > On 09/20/2013 09:51 PM, Francisco Jerez wrote: >> The _mesa_glsl_parse_state object relies on the memory allocator >> zeroing out its contents before it's initialized, which is quite an >> unusual practice in the C++ world because it ties objects to som

Re: [Mesa-dev] [PATCH 1/3] mesa: remove stale comment

2013-09-24 Thread Kenneth Graunke
On 09/20/2013 02:34 PM, Ian Romanick wrote: > How did you send these patches? They came formatted... strangely. > Saving the e-mail as a file an using git-am resulted in a commit message: > > commit 97351aa26b74c33a102af8bf1e6bcfcd706d7a10 > Author: Dylan Noblesmith > Date: Fri Sep 20 11:55:19

Re: [Mesa-dev] [PATCH 01/11] glsl: Initialize all member variables of _mesa_glsl_parse_state on construction.

2013-09-24 Thread Ian Romanick
On 09/20/2013 09:51 PM, Francisco Jerez wrote: > The _mesa_glsl_parse_state object relies on the memory allocator > zeroing out its contents before it's initialized, which is quite an > unusual practice in the C++ world because it ties objects to some > specific allocation scheme, and gives unpredi

Re: [Mesa-dev] [PATCH 10/11] i965: Switch vec4_live_variables to the non-zeroing allocator.

2013-09-24 Thread Kenneth Graunke
On 09/20/2013 09:51 PM, Francisco Jerez wrote: > All member variables of vec4_live_variables are already being > initialized from its constructor, it's not necessary to use rzalloc to > allocate its memory, and doing so makes it more likely that we will > start relying on the allocator to zero out

Re: [Mesa-dev] [PATCH] glsl: Initialize assignment_generator member variables.

2013-09-24 Thread Ian Romanick
On 09/23/2013 10:06 PM, Vinson Lee wrote: > Fixes "Uninitialized pointer field" defect reported by Coverity. > > Signed-off-by: Vinson Lee > --- > src/glsl/lower_variable_index_to_cond_assign.cpp | 6 ++ > 1 file changed, 6 insertions(+) > > diff --git a/src/glsl/lower_variable_index_to_con

Re: [Mesa-dev] [PATCH 1/3] st/mesa: fix GLSL mix(.., .., bvecN)

2013-09-24 Thread Ian Romanick
On 09/23/2013 05:37 PM, mar...@gmail.com wrote: > From: Marek Olšák > > --- > src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 8 +++- > 1 file changed, 7 insertions(+), 1 deletion(-) > > diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp > b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp > i

Re: [Mesa-dev] [PATCH 06/11] i965: Initialize all member variables of cfg_t on construction.

2013-09-24 Thread Kenneth Graunke
On 09/20/2013 09:51 PM, Francisco Jerez wrote: > The cfg_t object relies on the memory allocator zeroing out its > contents before it's initialized, which is quite an unusual practice > in the C++ world because it ties objects to some specific allocation > scheme, and gives unpredictable results wh

Re: [Mesa-dev] [PATCH 05/11] i965: Initialize all member variables of bblock_t on construction.

2013-09-24 Thread Kenneth Graunke
On 09/20/2013 09:51 PM, Francisco Jerez wrote: > The bblock_t object relies on the memory allocator zeroing out its > contents before it's initialized, which is quite an unusual practice > in the C++ world because it ties objects to some specific allocation > scheme, and gives unpredictable results

Re: [Mesa-dev] [PATCH] radeon/llvm: fix shadow cube texturing for GL3.0

2013-09-24 Thread Michel Dänzer
On Die, 2013-09-24 at 19:42 +0200, Marek Olšák wrote: > From: Marek Olšák > > The fix is at the end (TGSI_TEXTURE_SHADOWCUBE handling), but I also > restructured the code for it to be more readable. > > Fixes spec/!OpenGL 3.0/sampler-cube-shadow. Reviewed-by: Michel Dänzer -- Earthling Mich

Re: [Mesa-dev] [PATCH 02/11] i965: Initialize all member variables of vec4_instruction on construction.

2013-09-24 Thread Kenneth Graunke
On 09/20/2013 09:51 PM, Francisco Jerez wrote: > The vec4_instruction object relies on the memory allocator zeroing out > its contents before it's initialized, which is quite an unusual > practice in the C++ world because it ties objects to some specific > allocation scheme, and gives unpredictable

Re: [Mesa-dev] [PATCH 01/11] glsl: Initialize all member variables of _mesa_glsl_parse_state on construction.

2013-09-24 Thread Kenneth Graunke
On 09/20/2013 09:51 PM, Francisco Jerez wrote: > The _mesa_glsl_parse_state object relies on the memory allocator > zeroing out its contents before it's initialized, which is quite an > unusual practice in the C++ world because it ties objects to some > specific allocation scheme, and gives unpredi

[Mesa-dev] [PATCH] radeon/llvm: fix shadow cube texturing for GL3.0

2013-09-24 Thread Marek Olšák
From: Marek Olšák The fix is at the end (TGSI_TEXTURE_SHADOWCUBE handling), but I also restructured the code for it to be more readable. Fixes spec/!OpenGL 3.0/sampler-cube-shadow. --- .../drivers/radeon/radeon_setup_tgsi_llvm.c| 38 +- 1 file changed, 15 insertions(

Re: [Mesa-dev] [PATCH 2/3] radeonsi: bypass alpha-test for integer colorbuffers

2013-09-24 Thread Michel Dänzer
On Die, 2013-09-24 at 02:37 +0200, mar...@gmail.com wrote: > From: Marek Olšák > > Fixes spec/EXT_texture_integer/fbo-blending. Patches 2 & 3 are Reviewed-by: Michel Dänzer -- Earthling Michel Dänzer| http://www.amd.com Libre software enthusiast |

Re: [Mesa-dev] [PATCH 1/2] glsl: Create and use a has_explicit_attrib_location() helper.

2013-09-24 Thread Ian Romanick
On 09/23/2013 08:22 PM, Kenneth Graunke wrote: > Explicit attribute locations are supported with GLSL 3.30, GLSL ES 3.00, > or "#extension GL_ARB_explicit_attrib_location: enable". Using a helper > function makes it easy to check for this. > > This enables support in GLSL 3.30, which was previous

Re: [Mesa-dev] [PATCH] mesa: Remove 'invalidate_state' parameter to _mesa_dirty_texobj().

2013-09-24 Thread Eric Anholt
Kenneth Graunke writes: > Every caller passed true. Reviewed-by: Eric Anholt pgpDzrTPgTfh7.pgp Description: PGP signature ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH] glsl: Remove unused pointer value.

2013-09-24 Thread Eric Anholt
Vinson Lee writes: > Silences "Unused pointer value" defect reported by Coverity. > > Signed-off-by: Vinson Lee Reviewed-by: Eric Anholt pgpjFxliMWqpj.pgp Description: PGP signature ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://li

Re: [Mesa-dev] [PATCH] radeonsi: fix blitting the last 2 mipmap levels of compressed textures

2013-09-24 Thread Michel Dänzer
On Die, 2013-09-24 at 14:43 +0200, Marek Olšák wrote: > From: Marek Olšák > > This fixes compressedteximage piglit tests. > > +10 piglits > > Evergreen and Cayman have the same issue. R600 and R700 don't. Cc: mesa-sta...@lists.freedesktop.org ? Reviewed-by: Michel Dänzer -- Earthling Mich

[Mesa-dev] [PATCH] radeonsi: fix blitting the last 2 mipmap levels of compressed textures

2013-09-24 Thread Marek Olšák
From: Marek Olšák This fixes compressedteximage piglit tests. +10 piglits Evergreen and Cayman have the same issue. R600 and R700 don't. --- src/gallium/drivers/radeon/r600_pipe_common.h | 1 + src/gallium/drivers/radeonsi/r600_blit.c | 16 src/gallium/drivers/radeonsi/s

Re: [Mesa-dev] [PATCH 7/7] radeon/winsys: keep screen pointer in winsys

2013-09-24 Thread Emil Velikov
On 23/09/13 16:45, Christian König wrote: > All what we could do is to avoid the code dublication for each target. > For this I would like to arrange the target like this: > > r600 > |-dri > |-vdpau > |-xorg > |xvmc > ... > radeonsi > |-dri > |-vdpau > |-xorg > ... > I was pondering on the

Re: [Mesa-dev] [PATCH] R600/SI: fix MIMG writemask adjustement

2013-09-24 Thread Christian König
Sorry, I didn't investigate why. Maybe some pass is executed twice? Probably. Well when I wrote the function the idea was to figure out (once) if a result of MIMG is used or not and if it's not used to adjust the mask, but that doesn't seems to be the case any more. Whatever, the patch itself

Re: [Mesa-dev] [PATCH] R600/SI: fix MIMG writemask adjustement

2013-09-24 Thread Marek Olšák
Sorry, I didn't investigate why. Maybe some pass is executed twice? Marek On Tue, Sep 24, 2013 at 11:48 AM, Christian König wrote: > Sorry, my fault let me refine the question: Why the heck is the function > applied twice? > > Christian. > > Am 24.09.2013 11:44, schrieb Marek Olšák: > >> If the

[Mesa-dev] dri2 and vtSema

2013-09-24 Thread Thomas Hellstrom
Hi! I'm not completely sure what's the correct list for this nowadays, so forgive me for crossposting. I've got an interesting problem in that when any dri2 operations are carried out while the X server is switched away, they are pushed all the way down to the kernel graphics driver, which d

Re: [Mesa-dev] [PATCH] R600/SI: fix MIMG writemask adjustement

2013-09-24 Thread Christian König
Sorry, my fault let me refine the question: Why the heck is the function applied twice? Christian. Am 24.09.2013 11:44, schrieb Marek Olšák: If the TGSI writemask is .xzw and the initial dmask is 0xf, the first application of the function sees 4 VGPRs and correctly sets the dmask to 13 (xzw) b

Re: [Mesa-dev] [PATCH] R600/SI: fix MIMG writemask adjustement

2013-09-24 Thread Marek Olšák
If the TGSI writemask is .xzw and the initial dmask is 0xf, the first application of the function sees 4 VGPRs and correctly sets the dmask to 13 (xzw) because the second VGPR is unused, but the second application of the function now sees 3 VGPRs, ignores the fact that dmask is 13 meaning xzw, and

Re: [Mesa-dev] [PATCH 7/7] radeon/winsys: keep screen pointer in winsys

2013-09-24 Thread Christian König
Am 23.09.2013 16:52, schrieb Marek Olšák: This is kind of hard to read. I think it would be nicer to: 1) Move the pipe_reference variable from the winsys to the screen. 2) Have the screen create the winsys, instead of just receiving a pointer to it, so that the winsys doesn't have to be reference

Re: [Mesa-dev] [PATCH] R600/SI: fix MIMG writemask adjustement

2013-09-24 Thread Christian König
Why should that be necessary? Christian. Am 23.09.2013 21:09, schrieb mar...@gmail.com: From: Marek Olšák This fixes piglit: - shaders/glsl-fs-texture2d-masked - shaders/glsl-fs-texture2d-masked-4 Signed-off-by: Marek Olšák --- lib/Target/R600/SIISelLowering.cpp | 27 +