Re: [Mesa-dev] [PATCH 1/2] mesa: Extract is_active_attrib() in shaderapi

2014-04-12 Thread Kenneth Graunke
On 04/12/2014 02:20 AM, Chris Forbes wrote: > The rules are about to get a bit more complex to account for > gl_InstanceID and gl_VertexID, which are system values. > > Extracting this first avoids introducing duplication. > > Signed-off-by: Chris Forbes > --- > src/mesa/main/shader_query.cpp |

Re: [Mesa-dev] [PATCH 8/9] meta: Add support for MSAA resolves from 2D_MS_ARRAY textures.

2014-04-12 Thread Kenneth Graunke
On 04/08/2014 02:03 PM, Eric Anholt wrote: > We don't have any piglit tests for this currently. I dug through oglconform and the Humus demos as well, and I couldn't find any programs that even hit this case. If someone wants to add some piglit tests for GL_TEXTURE_2D_ARRAY MSAA blits, that would

Re: [Mesa-dev] [PATCH 7/9] meta: Add an accelerated glCopyTexSubImage using glBlitFramebuffer.

2014-04-12 Thread Kenneth Graunke
On 04/08/2014 02:03 PM, Eric Anholt wrote: > You'll note from the previous commits that there's something of a loop > here: You call CTSI, which calls BlitFB, then if things go wrong that > falls back to CTSI. As a result, meta CTSI reaches over into blitfb to > tell it "no, don't try that fallbac

Re: [Mesa-dev] [PATCH 4/9] meta: Move bind_fbo_image() code back to meta.c, to reuse it elsewhere.

2014-04-12 Thread Kenneth Graunke
On 04/08/2014 02:03 PM, Eric Anholt wrote: > I need to do the same code again for CopyTexSubImage(). > --- > src/mesa/drivers/common/meta.c | 33 +++ > src/mesa/drivers/common/meta.h | 4 +++ > src/mesa/drivers/common/meta_generate_mipmap.c | 36

[Mesa-dev] [PATCH 2/2] glsl: Fix redeclaration rules for gl_FragDepth too.

2014-04-12 Thread Chris Forbes
Previously we disallowed any redeclarations after any use, and detected conflicting layout qualifiers based on what we know the default to be. Use ir_variable::data::how_declared instead to determine whether this has already been redeclared, and allow identical redeclarations after use, provided t

[Mesa-dev] [PATCH 1/2] glsl: Fix redeclaration rules for gl_FragCoord.

2014-04-12 Thread Chris Forbes
The ARB_fragment_coord_conventions spec, section 4.3.x (Input Layout Qualifiers) says: "All redeclarations of gl_FragCoord in all fragment shaders in a single program must have the same set of qualifiers. Within any shader, the first redeclarations of gl_FragCoord must appear before any us

[Mesa-dev] [PATCH 1/2] mesa: Track max enabled tex image unit

2014-04-12 Thread Chris Forbes
This gives us a better bound for some hot loops in the drivers than MAX_COMBINED_TEXTURE_IMAGE_UNITS, which is ridiculously large on modern hardware, and only getting worse as more shader stages are added. Signed-off-by: Chris Forbes --- src/mesa/main/mtypes.h | 3 +++ src/mesa/main/texstate.c

Re: [Mesa-dev] [PATCH] gallium/targets: #include radeon_winsys.h in a couple of more places

2014-04-12 Thread Marek Olšák
A similar fix from somebody else has already been pushed. Marek On Sat, Apr 12, 2014 at 7:39 AM, Michel Dänzer wrote: >> On 2014/04/11, at 19:43, Marek Olšák wrote: >> >> Thanks. >> >> Reviewed-by: Marek Olšák > > Thank you. Can you or someone push this please? I probably won't get to it > be

[Mesa-dev] [PATCH 2/2] i965: Use ctx->Texture._MaxEnabledTexImageUnit for upper bound

2014-04-12 Thread Chris Forbes
Avoid looping over 32/48/96 (!!) tex image units every draw, most of which we don't care about. Improves performance on everyone's favorite not-a-benchmark by 2.9% on Haswell. Signed-off-by: Chris Forbes --- src/mesa/drivers/dri/i965/brw_draw.c | 3 ++- src/mesa/drivers/dri/i965/brw_tex.c | 3

Re: [Mesa-dev] [PATCH] i965: Add comment to explain the weird-looking shadow compares.

2014-04-12 Thread Chris Forbes
Eek -- yes, I'll fix that! On Sun, Apr 13, 2014 at 8:04 AM, Kenneth Graunke wrote: > On 04/12/2014 03:34 AM, Chris Forbes wrote: >> This always looks crazy when I stumble across it, until I remember >> what the hardware is doing. Describing it ought to short-circuit >> that process next time :) >

Re: [Mesa-dev] [PATCH] i965: Add comment to explain the weird-looking shadow compares.

2014-04-12 Thread Kenneth Graunke
On 04/12/2014 03:34 AM, Chris Forbes wrote: > This always looks crazy when I stumble across it, until I remember > what the hardware is doing. Describing it ought to short-circuit > that process next time :) > > Signed-off-by: Chris Forbes > --- > src/mesa/drivers/dri/i965/intel_state.c | 17 +++

Re: [Mesa-dev] Mesa build instructions

2014-04-12 Thread Eric Anholt
Pekka Paalanen writes: > On Fri, 11 Apr 2014 11:50:50 -0700 > Eric Anholt wrote: > >> For anyone that's curious about how I work: >> >> My scripts setup looks a lot like Matt's. I don't do OOT builds, and >> instead I just have 6 main trees: >> >> ~/src/mesa (normal debug build) >> ~/src/mesa

[Mesa-dev] [PATCH 06/10] gallium/radeon: create and return a fence in the flush function

2014-04-12 Thread Marek Olšák
From: Marek Olšák All flush functions get a fence parameter. cs_create_fence is removed. --- src/gallium/drivers/r300/r300_context.c | 5 +++-- src/gallium/drivers/r300/r300_flush.c | 19 + src/gallium/drivers/r600/evergreen_compute.c| 4 ++-- src/gallium/

[Mesa-dev] [PATCH 07/10] radeonsi: merge si_flush with si_context_flush

2014-04-12 Thread Marek Olšák
From: Marek Olšák This also removes si_flush_gfx_ring. --- src/gallium/drivers/radeon/r600_pipe_common.h | 4 +++ src/gallium/drivers/radeonsi/si_hw_context.c | 26 +-- src/gallium/drivers/radeonsi/si_pipe.c| 37 +++ src/gallium/drivers/radeonsi/

[Mesa-dev] [PATCH 08/10] r600g: merge r600_flush with r600_context_flush

2014-04-12 Thread Marek Olšák
From: Marek Olšák --- src/gallium/drivers/r600/r600_hw_context.c | 31 +++-- src/gallium/drivers/r600/r600_pipe.c | 43 ++ src/gallium/drivers/r600/r600_pipe.h | 4 +-- 3 files changed, 33 insertions(+), 45 deletions(-) diff --git a/src/g

[Mesa-dev] [PATCH 05/10] r600g: remove redundant r600_flush_dma_from_winsys

2014-04-12 Thread Marek Olšák
From: Marek Olšák --- src/gallium/drivers/radeon/r600_pipe_common.c | 9 + 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/gallium/drivers/radeon/r600_pipe_common.c b/src/gallium/drivers/radeon/r600_pipe_common.c index efb78cf..92f43de 100644 --- a/src/gallium/drivers/r

[Mesa-dev] [PATCH 03/10] radeonsi: cleanup redundant computation of flush flags and rename a function

2014-04-12 Thread Marek Olšák
From: Marek Olšák --- src/gallium/drivers/radeonsi/si_pipe.c | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c index 03f73ac..ec03d6c 100644 --- a/src/gallium/drivers/radeonsi/si_

[Mesa-dev] [PATCH 02/10] r600g: remove redundant r600_flush_from_winsys

2014-04-12 Thread Marek Olšák
From: Marek Olšák --- src/gallium/drivers/r600/r600_pipe.c | 9 + 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/gallium/drivers/r600/r600_pipe.c b/src/gallium/drivers/r600/r600_pipe.c index c037662..6b2fcaf 100644 --- a/src/gallium/drivers/r600/r600_pipe.c +++ b/src/g

[Mesa-dev] [PATCH 09/10] r600g,radeonsi: share r600_flush_from_st

2014-04-12 Thread Marek Olšák
From: Marek Olšák --- src/gallium/drivers/r600/r600_pipe.c | 17 - src/gallium/drivers/radeon/r600_pipe_common.c | 17 + src/gallium/drivers/radeonsi/si_pipe.c| 17 - 3 files changed, 17 insertions(+), 34 deletions(-) diff --git a

[Mesa-dev] [PATCH 04/10] winsys/radeon: fold cs_set_flush_callback into cs_create

2014-04-12 Thread Marek Olšák
From: Marek Olšák --- src/gallium/drivers/r300/r300_context.c | 4 +--- src/gallium/drivers/r600/r600_pipe.c | 11 +-- src/gallium/drivers/radeon/r600_pipe_common.c | 5 +++-- src/gallium/drivers/radeon/radeon_uvd.c | 2 +- src/gallium/drivers/radeon/radeon_vce.c

[Mesa-dev] [PATCH 01/10] winsys/radeon: remove cs_write_reloc, add simpler cs_get_reloc

2014-04-12 Thread Marek Olšák
From: Marek Olšák The only difference is that it doesn't write to the CS and only returns the index. --- src/gallium/drivers/r300/r300_cs.h| 3 ++- src/gallium/drivers/r300/r300_emit.c | 4 ++-- src/gallium/winsys/radeon/drm/radeon_drm_cs.c | 26 +-

[Mesa-dev] [PATCH 10/10] r600g, radeonsi: share some of gfx flush code

2014-04-12 Thread Marek Olšák
From: Marek Olšák --- src/gallium/drivers/r600/r600_hw_context.c| 44 ++--- src/gallium/drivers/radeon/r600_pipe_common.c | 47 +++ src/gallium/drivers/radeon/r600_pipe_common.h | 2 ++ src/gallium/drivers/radeonsi/si_hw_context.c | 44 ++

[Mesa-dev] [PATCH 2/2] Add a new capabilities for drivers that can't share buffers

2014-04-12 Thread Giovanni Campagna
From: Giovanni Campagna The kms-dri swrast driver cannot share buffers using the GEM, so it must tell the loader to disable extensions relying on that, without disabling the image DRI extension altogheter (which would prevent the loader from working at all). This requires a new gallium capability

[Mesa-dev] [PATCH 1/2] Add a dumb drm/kms winsys for software rendering

2014-04-12 Thread Giovanni Campagna
From: Giovanni Campagna Add a new winsys and target that can be used with a dri2 state tracker and loader instead of drisw. This allows to use gbm as a dri2/image loader and avoid the extra copy from the backbuffer to the shadow frontbuffer. --- configure.ac

[Mesa-dev] [PATCH 0/2] Turning swrast into DRI2 drivers

2014-04-12 Thread Giovanni Campagna
Hi everyone, Some time ago I sent patches to enable the swrast driver on GBM/DRM, and I did them in the dumbest way possible (that is, having GBM implement the dri-swrast interface), to make sure it would work without kernel support. This patch series is a little smarter, in that it creates more t

Re: [Mesa-dev] [PATCH] winsys/radeon: consolidate hash table lookup

2014-04-12 Thread Christian König
Am 12.04.2014 12:52, schrieb Marek Olšák: Do you mean having bo->cs and bo->index? That would work, but there would have to be mutex_lock and mutex_unlock when accessing the variables. I'm not sure if locking a mutex is more expensive than the hash table lookup. OpenGL with GLX allows sharing buf

Re: [Mesa-dev] [PATCH] winsys/radeon: consolidate hash table lookup

2014-04-12 Thread Marek Olšák
Do you mean having bo->cs and bo->index? That would work, but there would have to be mutex_lock and mutex_unlock when accessing the variables. I'm not sure if locking a mutex is more expensive than the hash table lookup. OpenGL with GLX allows sharing buffers and textures between contexts, so we mu

[Mesa-dev] [PATCH] i965: Add comment to explain the weird-looking shadow compares.

2014-04-12 Thread Chris Forbes
This always looks crazy when I stumble across it, until I remember what the hardware is doing. Describing it ought to short-circuit that process next time :) Signed-off-by: Chris Forbes --- src/mesa/drivers/dri/i965/intel_state.c | 17 ++--- 1 file changed, 14 insertions(+), 3 deleti

[Mesa-dev] [PATCH 1/2] mesa: Extract is_active_attrib() in shaderapi

2014-04-12 Thread Chris Forbes
The rules are about to get a bit more complex to account for gl_InstanceID and gl_VertexID, which are system values. Extracting this first avoids introducing duplication. Signed-off-by: Chris Forbes --- src/mesa/main/shader_query.cpp | 26 ++ 1 file changed, 18 insertion

[Mesa-dev] [PATCH 2/2] mesa: Consider gl_VertexID and gl_InstanceID active attribs

2014-04-12 Thread Chris Forbes
Fixes piglit's spec/gl-3.2/get-active-attrib-returns-all-inputs. Signed-off-by: Chris Forbes --- src/mesa/main/shader_query.cpp | 9 + 1 file changed, 9 insertions(+) diff --git a/src/mesa/main/shader_query.cpp b/src/mesa/main/shader_query.cpp index c6e7342..2be84f2 100644 --- a/src/mes

Re: [Mesa-dev] Mesa build instructions

2014-04-12 Thread Pekka Paalanen
On Fri, 11 Apr 2014 11:50:50 -0700 Eric Anholt wrote: > For anyone that's curious about how I work: > > My scripts setup looks a lot like Matt's. I don't do OOT builds, and > instead I just have 6 main trees: > > ~/src/mesa (normal debug build) > ~/src/mesa-release (non-debug build) > ~/src/me

Re: [Mesa-dev] [PATCH] winsys/radeon: consolidate hash table lookup

2014-04-12 Thread Christian König
Am 11.04.2014 19:03, schrieb Marek Olšák: From: Marek Olšák Reviewed-by: Christian König BTW: I've always wondered if the custom hash table is the best approach here. Having a BO active in more than one command submission context at the same time sounds rather unlikely to me. Something

[Mesa-dev] [PATCH] glsl: Allow explicit binding on atomics again

2014-04-12 Thread Chris Forbes
As of 943b2d52bf5, layout(binding) on an atomic would fail the assertion here. Signed-off-by: Chris Forbes Cc: Ian Romanick --- src/glsl/link_uniform_initializers.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/glsl/link_uniform_initializers.cpp b/src/glsl/link_u