Re: [Mesa-dev] [PATCH 2/4] glsl: Fix loop analysis of nested loops.

2013-11-29 Thread Paul Berry
On 28 November 2013 11:45, Chris Forbes wrote: > + /* The assignmnet to the variable in the loop must be unconditional > and > + * not inside a nested loop. > */ > > s/assignmnet/assignment/ > Fixed, thanks. ___ mesa-dev mailing list

[Mesa-dev] [PATCH 1/2] nouveau: avoid leaking fences while waiting

2013-11-29 Thread Ilia Mirkin
This fixes a memory leak in some situations. Also avoids emitting an extra fence if the kick handler does the call to nouveau_fence_next itself. Signed-off-by: Ilia Mirkin Cc: "9.2 10.0" --- TBH I'm pretty confused by the whole fence refcounting logic and its interaction with emits, updates, et

[Mesa-dev] [PATCH 2/2] nv50: wait on the buf's fence before sticking it into pushbuf

2013-11-29 Thread Ilia Mirkin
This resolves some rendering issues in source games. See https://bugs.freedesktop.org/show_bug.cgi?id=64323 Signed-off-by: Ilia Mirkin Cc: "9.2 10.0" --- Doing a nouveau_bo_wait works as well, but I got a slightly higher framerate from glretrace doing it this way. I tried to get an actual sourc

[Mesa-dev] [PATCH 2/6] i965/Gen7: Include bitfield in the sampler key for CMS layout

2013-11-29 Thread Chris Forbes
We need to emit extra shader code in this case to sample the MCS surface first; we can't just blindly do this all the time since IVB will sometimes try to access the MCS surface even if disabled. Signed-off-by: Chris Forbes --- src/mesa/drivers/dri/i965/brw_program.h | 5 + src/mesa/drivers/

[Mesa-dev] [PATCH 3/6] i965: Add shader opcode for sampling MCS surface

2013-11-29 Thread Chris Forbes
Signed-off-by: Chris Forbes --- src/mesa/drivers/dri/i965/brw_defines.h | 1 + src/mesa/drivers/dri/i965/brw_fs.cpp | 1 + src/mesa/drivers/dri/i965/brw_fs_generator.cpp | 5 + src/mesa/drivers/dri/i965/brw_shader.cpp | 3 +++ src/mesa/drivers/dri/i965/brw_vec4.

[Mesa-dev] [PATCH 4/6] i965/fs: Sample from MCS surface when required

2013-11-29 Thread Chris Forbes
Signed-off-by: Chris Forbes --- src/mesa/drivers/dri/i965/brw_fs.h | 3 +- src/mesa/drivers/dri/i965/brw_fs_fp.cpp | 2 +- src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 46 +++- 3 files changed, 41 insertions(+), 10 deletions(-) diff --git a/src/mesa/dri

[Mesa-dev] [PATCH 0/6] i965: Enable CMS layout for multisample textures

2013-11-29 Thread Chris Forbes
This series enables the compressed multisample layout for multisample textures. Previously we would only use CMS for renderbuffers, since our texelFetch() implementation didn't understand it. Known to break the sample-mask-execution -tex test, but not sure why yet -- it doesn't use texelFetch().

[Mesa-dev] [PATCH 5/6] i965/vs: Sample from MCS surface when required

2013-11-29 Thread Chris Forbes
Signed-off-by: Chris Forbes --- src/mesa/drivers/dri/i965/brw_vec4.h | 1 + src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 41 +- 2 files changed, 35 insertions(+), 7 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_vec4.h b/src/mesa/drivers/dri/i965/

[Mesa-dev] [PATCH 1/6] i965: make compute_msaa_layout() nonstatic, add intel_ prefix

2013-11-29 Thread Chris Forbes
We're about to need this in the computation of the sampler key. Signed-off-by: Chris Forbes --- src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 6 +++--- src/mesa/drivers/dri/i965/intel_mipmap_tree.h | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/mesa/drivers/dri/i96

[Mesa-dev] [PATCH 6/6] i965/Gen7: Allow CMS layout for multisample textures

2013-11-29 Thread Chris Forbes
Now that all the pieces are in place, this should provide a nice performance boost for apps using multisample textures. Signed-off-by: Chris Forbes --- src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 18 +- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/src/mesa/dr

[Mesa-dev] [PATCH 1/2 v2] nv50: fix a small leak on context destroy

2013-11-29 Thread Ilia Mirkin
Signed-off-by: Ilia Mirkin Cc: "9.2 10.0" --- v2: use FREE instead of free. src/gallium/drivers/nouveau/nv50/nv50_context.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gallium/drivers/nouveau/nv50/nv50_context.c b/src/gallium/drivers/nouveau/nv50/nv50_context.c index b6bdf79..11

Re: [Mesa-dev] [PATCH 01/10] radeon: move some functions to r600_buffer.c

2013-11-29 Thread Christoph Brill
Reviewed-by: Christoph Brill 2013/11/29 Marek Olšák > From: Marek Olšák > > --- > src/gallium/drivers/radeon/Makefile.sources | 1 + > src/gallium/drivers/radeon/r600_buffer.c | 133 > ++ > src/gallium/drivers/radeon/r600_pipe_common.c | 106 -

[Mesa-dev] [PATCH] winsys/radeon: set/get the scanout flag with the tiling ioctls

2013-11-29 Thread Marek Olšák
From: Marek Olšák If we assume that all buffers allocated by the DDX are scanout, a new flag that says "this is not scanout" has to be added to support the non-scanout buffers and maintain backward compatibility. This fixes bad rendering on Wayland. The flag is defined as: #define RADEON_TILI

Re: [Mesa-dev] [PATCH 04/10] radeon: squash with buffer.c

2013-11-29 Thread Marek Olšák
Sorry, I forgot to merge this patch with the first one (which is what the commit message says). I'll do so before committing. Marek On Fri, Nov 29, 2013 at 6:55 PM, Marek Olšák wrote: > From: Marek Olšák > > --- > src/gallium/drivers/radeon/r600_buffer.c | 14 ++ > src/gallium

Re: [Mesa-dev] [PATCH 00/10] Sharing r600g glMapBuffer optimizations with radeonsi

2013-11-29 Thread Marek Olšák
BTW the improvement only applies to the radeonsi driver. Marek On Fri, Nov 29, 2013 at 6:55 PM, Marek Olšák wrote: > This series moves the r600_buffer.c files from both drivers to the shared > directory gallium/drivers/radeon, and implements what's missing for radeonsi > to make sharing the co

[Mesa-dev] [PATCH 08/10] r600g, radeonsi: consolidate some debug flags

2013-11-29 Thread Marek Olšák
From: Marek Olšák --- src/gallium/drivers/r600/r600_pipe.c | 3 --- src/gallium/drivers/r600/r600_pipe.h | 1 - src/gallium/drivers/radeon/r600_pipe_common.c | 4 src/gallium/drivers/radeon/r600_pipe_common.h | 1 + 4 files changed, 5 insertions(+), 4 deletions(-) diff --

[Mesa-dev] [PATCH 09/10] r600g, radeonsi: add common interface for buffer invalidation

2013-11-29 Thread Marek Olšák
From: Marek Olšák This will be used by common code in the next commit. --- src/gallium/drivers/r600/r600_buffer.c| 2 +- src/gallium/drivers/r600/r600_pipe.h | 1 - src/gallium/drivers/r600/r600_state_common.c | 3 ++- src/gallium/drivers/radeon/r600_pipe_common.h | 4 src

[Mesa-dev] [PATCH 07/10] r600g: refactor out code for buffer invalidation

2013-11-29 Thread Marek Olšák
From: Marek Olšák --- src/gallium/drivers/r600/r600_buffer.c | 56 +--- src/gallium/drivers/r600/r600_pipe.h | 1 + src/gallium/drivers/r600/r600_state_common.c | 55 +++ 3 files changed, 57 insertions(+), 55 deletions(-) diff --git

[Mesa-dev] [PATCH 04/10] radeon: squash with buffer.c

2013-11-29 Thread Marek Olšák
From: Marek Olšák --- src/gallium/drivers/radeon/r600_buffer.c | 14 ++ src/gallium/drivers/radeon/r600_pipe_common.c | 14 -- src/gallium/drivers/radeon/r600_pipe_common.h | 22 -- 3 files changed, 26 insertions(+), 24 deletions(-) diff --git a/

[Mesa-dev] [PATCH 05/10] radeonsi: handle PIPE_TRANSFER_DISCARD_WHOLE_RESOURCE

2013-11-29 Thread Marek Olšák
From: Marek Olšák which can come from glBufferData and glMapBufferRange. --- src/gallium/drivers/radeonsi/r600_buffer.c| 11 +++ src/gallium/drivers/radeonsi/si_descriptors.c | 123 ++ src/gallium/drivers/radeonsi/si_state.h | 1 + 3 files changed, 135 insert

[Mesa-dev] [PATCH 02/10] r600g: use common interfaces in buffer_transfer_unmap

2013-11-29 Thread Marek Olšák
From: Marek Olšák i.e. dma_copy and resource_copy_region. --- src/gallium/drivers/r600/evergreen_state.c | 6 ++ src/gallium/drivers/r600/r600_blit.c | 4 ++-- src/gallium/drivers/r600/r600_buffer.c | 18 -- src/gallium/drivers/r600/r600_pipe.h | 2 -- src/

[Mesa-dev] [PATCH 01/10] radeon: move some functions to r600_buffer.c

2013-11-29 Thread Marek Olšák
From: Marek Olšák --- src/gallium/drivers/radeon/Makefile.sources | 1 + src/gallium/drivers/radeon/r600_buffer.c | 133 ++ src/gallium/drivers/radeon/r600_pipe_common.c | 106 3 files changed, 134 insertions(+), 106 deletions(-) create mode

[Mesa-dev] [PATCH 00/10] Sharing r600g glMapBuffer optimizations with radeonsi

2013-11-29 Thread Marek Olšák
This series moves the r600_buffer.c files from both drivers to the shared directory gallium/drivers/radeon, and implements what's missing for radeonsi to make sharing the code possible. This improves Valve's Team Fortress 2 performance by 75%. Before: 20 fps After: 35 fps Please review. Marek

[Mesa-dev] [PATCH 03/10] radeonsi: implement accelerated buffer copying

2013-11-29 Thread Marek Olšák
From: Marek Olšák --- src/gallium/drivers/radeonsi/r600_blit.c | 7 ++-- src/gallium/drivers/radeonsi/si_descriptors.c | 58 +++ src/gallium/drivers/radeonsi/si_state.h | 3 ++ 3 files changed, 64 insertions(+), 4 deletions(-) diff --git a/src/gallium/driver

[Mesa-dev] [PATCH 06/10] r600g, radeonsi: share flags has_cp_dma and has_streamout

2013-11-29 Thread Marek Olšák
From: Marek Olšák --- src/gallium/drivers/r600/evergreen_hw_context.c | 2 +- src/gallium/drivers/r600/evergreen_state.c | 4 ++-- src/gallium/drivers/r600/r600_blit.c| 8 src/gallium/drivers/r600/r600_buffer.c | 4 ++-- src/gallium/drivers/r600/r600_hw_con

[Mesa-dev] [PATCH 10/10] r600g, radeonsi: consolidate buffer code, add handling of DISCARD_RANGE for SI

2013-11-29 Thread Marek Olšák
From: Marek Olšák This adds 2 optimizations for radeonsi: - handling of DISCARD_RANGE - mapping an uninitialized buffer range is automatically UNSYNCHRONIZED --- src/gallium/drivers/r600/Makefile.sources | 1 - src/gallium/drivers/r600/r600_buffer.c| 202 --

[Mesa-dev] [PATCH][9.2] st/xorg: Handle new DamageUnregister API which has only one argument

2013-11-29 Thread Chí-Thanh Christopher Nguyễn
This fixes building against the new API in X server 1.15 Taken from xf86-video-modesetting beca4dfb0e4d11d3729214967a1fe56ee5669831 from Keith Packard --- src/gallium/state_trackers/xorg/xorg_driver.c | 4 1 file changed, 4 insertions(+) diff --git a/src/gallium/state_trackers/xorg/xorg_dri

Re: [Mesa-dev] Fw: Taking part in MESA development - Dissertation Project

2013-11-29 Thread Dragomir Ivanov
They are not a newbie task, too. On Fri, Nov 29, 2013 at 3:34 PM, Marek Olšák wrote: > The tesselation shaders and the compute shader are definitely not trivial. > > Marek > > On Fri, Nov 29, 2013 at 12:01 PM, Timothy Arceri > wrote: > > On Fri, 2013-11-29 at 09:36 +0200, Petri Latvala wrote: >

Re: [Mesa-dev] Fw: Taking part in MESA development - Dissertation Project

2013-11-29 Thread Marek Olšák
The tesselation shaders and the compute shader are definitely not trivial. Marek On Fri, Nov 29, 2013 at 12:01 PM, Timothy Arceri wrote: > On Fri, 2013-11-29 at 09:36 +0200, Petri Latvala wrote: >> On 11/28/2013 11:15 PM, Timothy Arceri wrote: >> > Hi guys, >> > >> > I received the following sub

[Mesa-dev] [PATCH] egl: add HAVE_LIBDRM define, fix EGL X11 platform

2013-11-29 Thread Tapani Pälli
Commit a594cec broke EGL X11 backend by adding dependency between X11 and DRM backends requiring HAVE_EGL_PLATFORM_DRM defined for X11. This patch fixes the issue by adding additional define for libdrm detection independent of which backend is being compiled. Tested by compiling Mesa with '--with-

Re: [Mesa-dev] Fw: Taking part in MESA development - Dissertation Project

2013-11-29 Thread Timothy Arceri
On Fri, 2013-11-29 at 09:36 +0200, Petri Latvala wrote: > On 11/28/2013 11:15 PM, Timothy Arceri wrote: > > Hi guys, > > > > I received the following submitted as an Issue on my github account. > > Maybe someone here has a project they can suggest. > > Is NewbieProjects too "newbie" for this? > >

[Mesa-dev] [PATCH 2/2] mesa: don't leak performance monitors on context destroy

2013-11-29 Thread Ilia Mirkin
Signed-off-by: Ilia Mirkin Cc: "10.0" --- Found with valgrind. Don't have the hardware to test a real implementation, but with nv50 it seemed to work in that valgrind was no longer marking the hash table as leaked. src/mesa/main/context.c | 1 + src/mesa/main/performance_monitor.c

[Mesa-dev] [PATCH 1/2] nv50: fix a small leak on context destroy

2013-11-29 Thread Ilia Mirkin
Signed-off-by: Ilia Mirkin Cc: "9.2 10.0" --- Found with valgrind. src/gallium/drivers/nouveau/nv50/nv50_context.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gallium/drivers/nouveau/nv50/nv50_context.c b/src/gallium/drivers/nouveau/nv50/nv50_context.c index b6bdf79..2b90bc2 100

[Mesa-dev] [PATCH] i965: Don't flag gather quirks for Gen8+

2013-11-29 Thread Chris Forbes
My understanding is that Broadwell retains the same SCS mechanism that Haswell has, so even if the underlying issue with this format is not fixed, the w/a will be applied in SCS rather than needing shader code. Signed-off-by: Chris Forbes Cc: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_wm

[Mesa-dev] [PATCH 2/6] glsl: Add ir support for `sample` qualifier; adjust compiler and linker

2013-11-29 Thread Chris Forbes
Signed-off-by: Chris Forbes --- src/glsl/ast_to_hir.cpp | 15 +++ src/glsl/builtin_variables.cpp| 2 ++ src/glsl/glsl_types.cpp | 5 + src/glsl/glsl_types.h | 6 ++ src/glsl/ir.cpp

[Mesa-dev] [PATCH 5/6] glsl: Populate gl_fragment_program::IsSample bitfield

2013-11-29 Thread Chris Forbes
Signed-off-by: Chris Forbes --- src/glsl/ir_set_program_inouts.cpp | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/glsl/ir_set_program_inouts.cpp b/src/glsl/ir_set_program_inouts.cpp index ab23538..1a36527 100644 --- a/src/glsl/ir_set_program_inouts.cpp +++ b/src/glsl

[Mesa-dev] [PATCH 1/6] glsl: Add frontend support for `sample` auxiliary storage qualifier

2013-11-29 Thread Chris Forbes
Signed-off-by: Chris Forbes --- src/glsl/ast.h | 1 + src/glsl/ast_type.cpp | 3 ++- src/glsl/glsl_lexer.ll | 2 +- src/glsl/glsl_parser.yy | 9 +++-- src/glsl/glsl_parser_extras.cpp | 2 ++ 5 files changed, 13 insertions(+), 4 deletions(-) diff --

[Mesa-dev] [PATCH 6/6] mesa: Require per-sample shading if the `sample` qualifier is used.

2013-11-29 Thread Chris Forbes
Signed-off-by: Chris Forbes --- src/mesa/program/program.c | 8 1 file changed, 8 insertions(+) diff --git a/src/mesa/program/program.c b/src/mesa/program/program.c index 01f8c6f..cdf1c03 100644 --- a/src/mesa/program/program.c +++ b/src/mesa/program/program.c @@ -1049,6 +1049,14 @@ _me

[Mesa-dev] [PATCH 4/6] mesa: add IsSample bitfield to gl_fragment_program

2013-11-29 Thread Chris Forbes
Drivers will need to look at this to decide if they need to do per-sample fragment shader dispatch. Signed-off-by: Chris Forbes --- src/mesa/main/mtypes.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index b4b432f..4698700 100644 --- a

[Mesa-dev] [PATCH 3/6] glsl: Put `sample`-qualified varyings in their own packing classes

2013-11-29 Thread Chris Forbes
Signed-off-by: Chris Forbes --- src/glsl/link_varyings.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/glsl/link_varyings.cpp b/src/glsl/link_varyings.cpp index d2a4fc8..097cee5 100644 --- a/src/glsl/link_varyings.cpp +++ b/src/glsl/link_varyings.cpp @@ -887,7 +887,7 @

[Mesa-dev] [PATCH 0/6] Add support for 'sample' qualifier

2013-11-29 Thread Chris Forbes
This series adds the mesa and glsl compiler support for the new 'sample in' and 'sample out' qualifiers from GLSL 4.0 / ARB_gpu_shader5. Driver support (beyond triggering per-sample fragment shader evaluation) is not yet implemented. ___ mesa-dev mailin

Re: [Mesa-dev] [PATCH 4/9] i965: remove unused members in blorp clear program

2013-11-29 Thread Pohjolainen, Topi
On Thu, Nov 28, 2013 at 11:50:24PM -0800, Kenneth Graunke wrote: > On 11/28/2013 11:44 PM, Kenneth Graunke wrote: > > On 11/27/2013 01:13 PM, Topi Pohjolainen wrote: > >> Documentation for R0 and R1 is taken from > >> fs_visitor::setup_payload_gen6(). > >> > >> Signed-off-by: Topi Pohjolainen > >>