[Mesa-dev] [GSoC 13]Interested in the idea: Improved application of GLSL complier optimizations

2013-04-22 Thread pkucoin
Hi, My name is Sida Li and I am a senior student from Peking University in China. I am interested in the idea that improved application of GLSL complier optimizations. I have downloaded the source code and read some parts of the it. First let me talk about my understanding about the problem.

[Mesa-dev] GSOC 2013

2013-04-22 Thread Piyush Tiwari
Hello, I am really interested in doing the GSOC 2013 project Find common patterns in real GLSL shaders. Implementation: Algorithm:- Max-miner algorithm as it uses the same data structure as Apriori i.e. hash tree. The following implementation has been found faster than normal ways: Max-Miner

Re: [Mesa-dev] [PATCH] radeon/llvm: Use LLVM C API for compiling LLVM IR to ISA.

2013-04-22 Thread Tom Stellard
On Sat, Apr 20, 2013 at 02:20:23PM +0200, Christian König wrote: Am 20.04.2013 09:27, schrieb Mathias Fröhlich: Hi Tom, May be I need to tell where the problem really appears in real life. OpenSceneGraph has some nifty features regarding multi channel rendering. Assume a setup of

Re: [Mesa-dev] [PATCH] radeon/llvm: Use LLVM C API for compiling LLVM IR to ISA.

2013-04-22 Thread Mathias Fröhlich
Hi all, On Monday, April 22, 2013 00:39:57 Tom Stellard wrote: [...] The only pro for further investigating the dlopen flags is that I fear the distribution builders who invented dynamic linking in the drivers. That change destroyed symbol isolation in the drivers at that point. They will

[Mesa-dev] [PATCH 1/4] gallium/dri: Allow drivers to support DRI Image v7

2013-04-22 Thread christopher . halse . rogers
From: Christopher James Halse Rogers r...@ubuntu.com This is only exposed by drivers wich support the new PIPE_CAP_PRIME parameter, for PRIME import/export. --- This stubs out texture_from_renderbuffer, which I don't care about, but that looks like it wouldn't be terribly painful to implement if

[Mesa-dev] [PATCH 2/4] nouveau: Populate PIPE_CAP_PRIME, enabling DRI Image 7 support

2013-04-22 Thread christopher . halse . rogers
From: Christopher James Halse Rogers r...@ubuntu.com --- src/gallium/drivers/nouveau/nouveau_screen.c | 19 ++- src/gallium/drivers/nouveau/nouveau_screen.h | 2 ++ src/gallium/drivers/nv30/nv30_screen.c | 6 +- src/gallium/drivers/nv50/nv50_screen.c | 5 -

[Mesa-dev] [PATCH 3/4] radeon: Rename bo_handles hashtable to match its actual contents.

2013-04-22 Thread christopher . halse . rogers
From: Christopher James Halse Rogers r...@ubuntu.com It's a map of GEM name-bo, so identify it as such --- src/gallium/winsys/radeon/drm/radeon_drm_bo.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c

[Mesa-dev] [PATCH 4/4] radeon: Enable DRI Image 7 support

2013-04-22 Thread christopher . halse . rogers
From: Christopher James Halse Rogers r...@ubuntu.com --- src/gallium/drivers/r300/r300_screen.c| 8 ++- src/gallium/drivers/r300/r300_texture.c | 2 +- src/gallium/drivers/r600/r600_pipe.c | 7 ++- src/gallium/drivers/r600/r600_texture.c | 2 +-

[Mesa-dev] [PATCH] gallium/dri2: Set winsys_handle type to KMS for stride query.

2013-04-22 Thread christopher . halse . rogers
From: Christopher James Halse Rogers r...@ubuntu.com Otherwise the default is TYPE_SHARED, which will flink the bo. This seems unnecessary for a simple stride query. --- src/gallium/state_trackers/dri/drm/dri2.c | 1 + 1 file changed, 1 insertion(+) diff --git

[Mesa-dev] [PATCH] gallium/dri: Return failures from dri2_query_image.

2013-04-22 Thread christopher . halse . rogers
From: Christopher James Halse Rogers r...@ubuntu.com resource_get_handle can fail, so we might as well bubble that failure up to the client. --- src/gallium/state_trackers/dri/drm/dri2.c | 39 +++ 1 file changed, 24 insertions(+), 15 deletions(-) diff --git

[Mesa-dev] [PATCH] mesa/st: Don't copy propagate from swizzles.

2013-04-22 Thread Fabian Bieler
Do not propagate a copy if source and destination are identical. Otherwise code like MOV TEMP[0].xyzw, TEMP[0].wzyx mov TEMP[1].xyzw, TEMP[0].xyzw is changed to MOV TEMP[0].xyzw, TEMP[0].wzyx mov TEMP[1].xyzw, TEMP[0].wzyx --- src/mesa/state_tracker/st_glsl_to_tgsi.cpp |2 ++ 1 file

[Mesa-dev] [PATCH] mesa: fix bogus comment about PrimitiveRestart fields

2013-04-22 Thread Chris Forbes
Signed-off-by: Chris Forbes chr...@ijw.co.nz --- src/mesa/main/mtypes.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 6108a35..7b51ec8 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -1536,8

Re: [Mesa-dev] [PATCH 3/4] radeon: Rename bo_handles hashtable to match its actual contents.

2013-04-22 Thread Marek Olšák
Reviewed-by: Marek Olšák mar...@gmail.com Marek On Mon, Apr 22, 2013 at 8:38 AM, christopher.halse.rog...@canonical.com wrote: From: Christopher James Halse Rogers r...@ubuntu.com It's a map of GEM name-bo, so identify it as such --- src/gallium/winsys/radeon/drm/radeon_drm_bo.c | 16

Re: [Mesa-dev] [PATCH 2/2] gallium: Replaced gl_rasterization_rules with lower_left_origin and half_pixel_center.

2013-04-22 Thread Christoph Bumiller
On 21.04.2013 14:35, Jose Fonseca wrote: - Original Message - On 21.04.2013 13:18, Jose Fonseca wrote: I think that drivers can just report all 4 CAPs as supported and do the adjustment in the shader themselves (no need for recompilation, just use uniforms, the st already does it

Re: [Mesa-dev] [PATCH] radeonsi: cleanup disabling tiling for UVD

2013-04-22 Thread Michel Dänzer
On Sam, 2013-04-20 at 13:21 +0200, Christian König wrote: From: Christian König christian.koe...@amd.com Should fix: https://bugs.freedesktop.org/show_bug.cgi?id=63702 Signed-off-by: Christian König christian.koe...@amd.com --- src/gallium/drivers/radeonsi/radeonsi_uvd.c |6 +++---

Re: [Mesa-dev] [PATCH] radeonsi: cleanup disabling tiling for UVD

2013-04-22 Thread Christian König
Am 22.04.2013 09:35, schrieb Michel Dänzer: On Sam, 2013-04-20 at 13:21 +0200, Christian König wrote: From: Christian König christian.koe...@amd.com Should fix: https://bugs.freedesktop.org/show_bug.cgi?id=63702 Signed-off-by: Christian König christian.koe...@amd.com ---

Re: [Mesa-dev] [PATCH 1/3] gallivm: Emit vector selects.

2013-04-22 Thread Roland Scheidegger
Am 20.04.2013 10:57, schrieb jfons...@vmware.com: From: José Fonseca jfons...@vmware.com They are supported on LLVM 3.1, at least on x86. (I haven't tested on PPC though.) Actually lp_build_linear_mip_levels() already has been emitting them for some time. This avoids intrinsics, which

Re: [Mesa-dev] [PATCH 1/4] gallium/dri: Allow drivers to support DRI Image v7

2013-04-22 Thread Jose Fonseca
- Original Message - From: Christopher James Halse Rogers r...@ubuntu.com This is only exposed by drivers wich support the new PIPE_CAP_PRIME parameter, for PRIME import/export. What does exactly PIPE_CAP_PRIME entail? Please document it. Jose

Re: [Mesa-dev] [PATCH 4/4] radeon: Enable DRI Image 7 support

2013-04-22 Thread Marek Olšák
On Mon, Apr 22, 2013 at 8:38 AM, christopher.halse.rog...@canonical.com wrote: From: Christopher James Halse Rogers r...@ubuntu.com --- src/gallium/drivers/r300/r300_screen.c| 8 ++- src/gallium/drivers/r300/r300_texture.c | 2 +- src/gallium/drivers/r600/r600_pipe.c

Re: [Mesa-dev] [PATCH 4/4] radeon: Enable DRI Image 7 support

2013-04-22 Thread Christian König
Am 22.04.2013 13:21, schrieb Marek Olšák: On Mon, Apr 22, 2013 at 8:38 AM, christopher.halse.rog...@canonical.com wrote: From: Christopher James Halse Rogers r...@ubuntu.com --- src/gallium/drivers/r300/r300_screen.c| 8 ++- src/gallium/drivers/r300/r300_texture.c |

[Mesa-dev] [PATCH] r600g: disable hyperz by default on 9.1

2013-04-22 Thread alexdeucher
From: Alex Deucher alexander.deuc...@amd.com There are too many cases were we end up with lockups. Once we sort out the remaining issues on master, they can be backported and hyperz can be re-enabled on 9.1 Signed-off-by: Alex Deucher alexander.deuc...@amd.com ---

Re: [Mesa-dev] [PATCH 4/4] radeon: Enable DRI Image 7 support

2013-04-22 Thread Brian Paul
On 04/22/2013 12:38 AM, christopher.halse.rog...@canonical.com wrote: From: Christopher James Halse Rogersr...@ubuntu.com --- src/gallium/drivers/r300/r300_screen.c| 8 ++- src/gallium/drivers/r300/r300_texture.c | 2 +- src/gallium/drivers/r600/r600_pipe.c

Re: [Mesa-dev] [PATCH 1/2] gallium/u_blitter: implement buffer clearing

2013-04-22 Thread Brian Paul
On 04/21/2013 05:25 PM, Marek Olšák wrote: Although this might be useful for ARB_clear_buffer_object, I need it for initializating resources in r600g. --- src/gallium/auxiliary/util/u_blitter.c | 81 +--- src/gallium/auxiliary/util/u_blitter.h | 18 ++- 2

[Mesa-dev] [PATCH] gallivm: Fix assignment of unsigned values to OUT register.

2013-04-22 Thread jfonseca
From: José Fonseca jfons...@vmware.com TEMP is not the only register file that accept unsigned. OUT too. Actually, what determines the appropriate type of the destination value is not the opcode, but rather the register. Also cleanup/simplify code. Add a few more asserts, but also make code

Re: [Mesa-dev] License header tidying

2013-04-22 Thread Brian Paul
On 04/21/2013 03:09 PM, Kenneth Graunke wrote: I was reviewing some patches and saw more new files that said IN NO EVENT SHALL BRIAN PAUL BE LIABLE but were...not authored by Brian. People keep doing that by accident, and a lot of those files have been altered by other people by now anyway.

Re: [Mesa-dev] [PATCH 09/17] glsl_symbol_table: add interface block namespaces

2013-04-22 Thread Jordan Justen
On Sun, Apr 21, 2013 at 12:30 PM, Kenneth Graunke kenn...@whitecape.org wrote: On 04/19/2013 12:35 PM, Jordan Justen wrote: For interface blocks, there are three separate namespaces for uniform, input and output blocks. http://knowyourmeme.com/photos/2109 There are? Similarly, for your

Re: [Mesa-dev] [PATCH] r600g: disable hyperz by default on 9.1

2013-04-22 Thread Michel Dänzer
On Mon, 2013-04-22 at 10:20 -0400, alexdeuc...@gmail.com wrote: From: Alex Deucher alexander.deuc...@amd.com There are too many cases were we end up with lockups. Once we sort out the remaining issues on master, they can be backported and hyperz can be re-enabled on 9.1 Signed-off-by:

[Mesa-dev] [Bug 63404] [wayland egl] intel_do_flush_locked failed: invalid argument, crash

2013-04-22 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=63404 Joe Konno joe.ko...@linux.intel.com changed: What|Removed |Added Depends on||54111, 59299 ---

[Mesa-dev] swrast MapTextureImage fetches

2013-04-22 Thread Eric Anholt
34 files changed, 311 insertions(+), 889 deletions(-) Also, swrast_dri.so now passes two FXT1 tests that failed before, and i915's vertex shader texturing works. I haven't tested the radeon/nouveau code, nor have I been as invasive as I could be, because I don't have any AGP systems left.

[Mesa-dev] [PATCH 01/17] radeon: Add missing swrast field initialization.

2013-04-22 Thread Eric Anholt
This is the equivalent of intel's 80513ec8b4c812b9c6249cc5824337a5f04ab34c. --- src/mesa/drivers/dri/radeon/radeon_texture.c |3 +++ 1 file changed, 3 insertions(+) diff --git a/src/mesa/drivers/dri/radeon/radeon_texture.c b/src/mesa/drivers/dri/radeon/radeon_texture.c index

[Mesa-dev] [PATCH 03/17] swrast: Factor out texture slice counting.

2013-04-22 Thread Eric Anholt
This function going to get used a lot more in upcoming patches. --- src/mesa/swrast/s_texture.c | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/mesa/swrast/s_texture.c b/src/mesa/swrast/s_texture.c index 51048be..36a90dd 100644 ---

[Mesa-dev] [PATCH 04/17] swrast: Clean up and explain the mapping process.

2013-04-22 Thread Eric Anholt
--- src/mesa/swrast/s_texture.c | 17 - 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/mesa/swrast/s_texture.c b/src/mesa/swrast/s_texture.c index 36a90dd..b6dd8cb 100644 --- a/src/mesa/swrast/s_texture.c +++ b/src/mesa/swrast/s_texture.c @@ -218,18 +218,17 @@

[Mesa-dev] [PATCH 10/17] nouveau: Just use MapTextureImage instead of duplicating the logic.

2013-04-22 Thread Eric Anholt
MapTextureImage has the exact same logic, except it can also handle swrast-allocated buffers. --- src/mesa/drivers/dri/nouveau/nouveau_texture.c | 99 +--- 1 file changed, 18 insertions(+), 81 deletions(-) diff --git a/src/mesa/drivers/dri/nouveau/nouveau_texture.c

[Mesa-dev] [PATCH 06/17] swrast: Reuse _swrast_free_texture_image_buffer from drivers.

2013-04-22 Thread Eric Anholt
--- src/mesa/drivers/dri/intel/intel_tex.c |8 +--- src/mesa/drivers/dri/radeon/radeon_texture.c |9 + 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/src/mesa/drivers/dri/intel/intel_tex.c b/src/mesa/drivers/dri/intel/intel_tex.c index 2fbd5c4..24f13df

[Mesa-dev] [PATCH 05/17] swrast: Move ImageOffsets allocation to shared code.

2013-04-22 Thread Eric Anholt
--- src/mesa/drivers/dri/intel/intel_tex.c | 20 ++-- src/mesa/drivers/dri/radeon/radeon_texture.c | 15 ++- src/mesa/swrast/s_texture.c | 24 src/mesa/swrast/swrast.h |2 +- 4 files changed,

[Mesa-dev] [PATCH 13/17] mesa: Remove the Map field from texture images.

2013-04-22 Thread Eric Anholt
--- src/mesa/swrast/s_context.h |1 - 1 file changed, 1 deletion(-) diff --git a/src/mesa/swrast/s_context.h b/src/mesa/swrast/s_context.h index 509759e..3e007b0 100644 --- a/src/mesa/swrast/s_context.h +++ b/src/mesa/swrast/s_context.h @@ -149,7 +149,6 @@ struct swrast_texture_image

[Mesa-dev] [PATCH 09/17] swrast: Make a teximage's stored RowStride be in terms of bytes per row.

2013-04-22 Thread Eric Anholt
For hardware drivers with pitch alignment requirements, a non-power-of-two-sized texture format won't end up being an integer number of pixels per row. Also, avoids having to change our units between MapTextureImage's rowStride and swrast's RowStride. This doesn't fully convert the compressed

[Mesa-dev] [PATCH 08/17] swrast: Replace use of teximage Map in 1D/2D paths with ImageSlices[0].

2013-04-22 Thread Eric Anholt
This gets us ready for the Map field to die. --- src/mesa/swrast/s_texfetch_tmp.h |4 ++-- src/mesa/swrast/s_texfilter.c|4 ++-- src/mesa/swrast/s_triangle.c |8 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/mesa/swrast/s_texfetch_tmp.h

[Mesa-dev] [PATCH 11/17] nouveau: Replace swrast_texture_image-Map usage with -Buffer.

2013-04-22 Thread Eric Anholt
This code is trying to deal with providing a map in the case that AllocTexImageBuffer was called, which is hooked up to the swrast variant. --- src/mesa/drivers/dri/nouveau/nouveau_texture.c |4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git

[Mesa-dev] [PATCH 07/17] swrast: Replace ImageOffsets with an ImageSlices pointer.

2013-04-22 Thread Eric Anholt
This is a step toward allowing drivers to use their normal mapping paths, instead of requiring that all slice mappings come from an aligned offset from the first slice's map. This incidentally fixes missing slice handling in FXT1 swrast. --- src/mesa/drivers/dri/intel/intel_tex_validate.c | 37

[Mesa-dev] [PATCH 12/17] swrast: Always use MapTextureImage for mapping textures for swrast.

2013-04-22 Thread Eric Anholt
Now that everything goes through ImageSlices[], we can rely on the driver's existing texture mapping function. A big block of code goes away on Radeon that looks like it was to deal with the validate that happened at SpanRenderStart, which no longer occurs since we don't need validation for the

[Mesa-dev] [PATCH 14/17] mesa: Add a clarifying comment about rowStride of compressed textures.

2013-04-22 Thread Eric Anholt
I always forget how we do this for compressed textures. --- src/mesa/main/dd.h |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h index 8f3cd3d..471d963 100644 --- a/src/mesa/main/dd.h +++ b/src/mesa/main/dd.h @@ -354,7 +354,9 @@

[Mesa-dev] [PATCH 15/17] intel: Ensure renderbuffers are current when mapping them.

2013-04-22 Thread Eric Anholt
In the case of renering to windows in X, we would render to stale buffers (or not render at all!) if you hit a MapRenderbuffer as the first thing done to your window after new buffers are ready to be collected in DRI2. I think this also covers the weird comment about irb-mt being missing

[Mesa-dev] [PATCH 16/17] intel: Move the S8 offset calc function near its remaining usage.

2013-04-22 Thread Eric Anholt
It's not really span code ever since we stopped using spans for S8. --- src/mesa/drivers/dri/intel/intel_mipmap_tree.c | 56 src/mesa/drivers/dri/intel/intel_span.c| 56 src/mesa/drivers/dri/intel/intel_span.h|2 - 3 files

Re: [Mesa-dev] [PATCH] i965: Fix a mistake in the comments for software counters.

2013-04-22 Thread Eric Anholt
Kenneth Graunke kenn...@whitecape.org writes: The code doesn't set brw-query.obj to NULL, it sets query-bo to NULL. Reviewed-by: Eric Anholt e...@anholt.net pgpHt7PZ8akua.pgp Description: PGP signature ___ mesa-dev mailing list

Re: [Mesa-dev] [PATCH 03/14] mesa: move _NEW_BUFFER_OBJECT flagging from BufferData to drivers

2013-04-22 Thread Eric Anholt
Marek Olšák mar...@gmail.com writes: A driver doesn't have to set _NEW_BUFFER_OBJECT if it doesn't reallocate the buffer from core Mesa's point of view, which avoids unnecessary state validation. Gallium drivers can be asked to reallocate a buffer privately by setting

Re: [Mesa-dev] [PATCH 04/14] mesa: remove redundant _NEW_BUFFERS setting in ReadPixels

2013-04-22 Thread Eric Anholt
Marek Olšák mar...@gmail.com writes: already set by _mesa_readbuffer --- src/mesa/main/buffers.c |1 - 1 file changed, 1 deletion(-) diff --git a/src/mesa/main/buffers.c b/src/mesa/main/buffers.c index 3f5cbcd..36b0312 100644 --- a/src/mesa/main/buffers.c +++

Re: [Mesa-dev] [PATCH 03/17] swrast: Factor out texture slice counting.

2013-04-22 Thread Patrick Baggett
On Mon, Apr 22, 2013 at 11:14 AM, Eric Anholt e...@anholt.net wrote: This function going to get used a lot more in upcoming patches. --- src/mesa/swrast/s_texture.c | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/mesa/swrast/s_texture.c

[Mesa-dev] [PATCH] mesa: fix MapBufferRange/MapBuffer typo in create_beginend_table()

2013-04-22 Thread Brian Paul
MapBufferRange was present twice. MapBuffer was missing. Note: This is a candidate for the stable branches. --- src/mesa/main/context.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index ce76243..0fb57ad 100644 ---

Re: [Mesa-dev] [PATCH] mesa: fix bogus comment about PrimitiveRestart fields

2013-04-22 Thread Eric Anholt
Chris Forbes chr...@ijw.co.nz writes: Signed-off-by: Chris Forbes chr...@ijw.co.nz --- src/mesa/main/mtypes.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 6108a35..7b51ec8 100644 --- a/src/mesa/main/mtypes.h

Re: [Mesa-dev] [PATCH 4/8] intel: prepare for dri images having more than plane

2013-04-22 Thread Eric Anholt
Pohjolainen, Topi topi.pohjolai...@intel.com writes: On Tue, Apr 16, 2013 at 04:57:49PM -0700, Eric Anholt wrote: Topi Pohjolainen topi.pohjolai...@intel.com writes: + if (image-regions[i]-bo) + intel_region_release(image-regions[i]); Why are you looking at the BO for

Re: [Mesa-dev] [PATCH] mesa: fix MapBufferRange/MapBuffer typo in create_beginend_table()

2013-04-22 Thread Brian Paul
On 04/22/2013 11:38 AM, Brian Paul wrote: MapBufferRange was present twice. MapBuffer was missing. Note: This is a candidate for the stable branches. --- src/mesa/main/context.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/mesa/main/context.c

[Mesa-dev] [PATCH] mesa: Remove extra MapBufferRange in create_beginend_table()

2013-04-22 Thread Brian Paul
Looks like a copypaste typo. --- src/mesa/main/context.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index ce76243..9d915b6 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -923,7 +923,6 @@

Re: [Mesa-dev] [PATCH] mesa: Remove extra MapBufferRange in create_beginend_table()

2013-04-22 Thread Jose Fonseca
- Original Message - Looks like a copypaste typo. --- src/mesa/main/context.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index ce76243..9d915b6 100644 --- a/src/mesa/main/context.c +++

Re: [Mesa-dev] [PATCH] mesa: fix MapBufferRange/MapBuffer typo in create_beginend_table()

2013-04-22 Thread Ferry Huberts
On 22/04/13 19:38, Brian Paul wrote: MapBufferRange was present twice. MapBuffer was missing. Note: This is a candidate for the stable branches. --- src/mesa/main/context.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/mesa/main/context.c

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

2013-04-22 Thread Kenneth Graunke
On 04/12/2013 11:21 AM, Eric Anholt wrote: Kenneth Graunke kenn...@whitecape.org writes: Ironlake's counters are always enabled; userspace can simply send a MI_REPROT_PERF_COUNT packet to take a snapshot of them. This makes it easy to implement. The counters are documented in the source code

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

2013-04-22 Thread Kenneth Graunke
On 04/12/2013 01:16 PM, Eric Anholt wrote: Kenneth Graunke kenn...@whitecape.org writes: Ironlake's counters are always enabled; userspace can simply send a MI_REPROT_PERF_COUNT packet to take a snapshot of them. This makes it easy to implement. The counters are documented in the source code

Re: [Mesa-dev] [PATCH 03/17] swrast: Factor out texture slice counting.

2013-04-22 Thread Eric Anholt
Patrick Baggett baggett.patr...@gmail.com writes: On Mon, Apr 22, 2013 at 11:14 AM, Eric Anholt e...@anholt.net wrote: This function going to get used a lot more in upcoming patches. --- src/mesa/swrast/s_texture.c | 16 1 file changed, 12 insertions(+), 4 deletions(-)

Re: [Mesa-dev] [PATCH resend] mesa: Add core support for the GL_AMD_performance_monitor extension.

2013-04-22 Thread Kenneth Graunke
On 04/13/2013 11:07 AM, Christoph Bumiller wrote: On 12.04.2013 21:14, 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 between vendors and hardware generations,

Re: [Mesa-dev] [PATCH] mesa: fix MapBufferRange/MapBuffer typo in create_beginend_table()

2013-04-22 Thread Brian Paul
On 04/22/2013 12:17 PM, Ferry Huberts wrote: On 22/04/13 19:38, Brian Paul wrote: MapBufferRange was present twice. MapBuffer was missing. Note: This is a candidate for the stable branches. --- src/mesa/main/context.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff

Re: [Mesa-dev] [PATCH] mesa: fix MapBufferRange/MapBuffer typo in create_beginend_table()

2013-04-22 Thread Ferry Huberts
On 22/04/13 21:03, Brian Paul wrote: On 04/22/2013 12:17 PM, Ferry Huberts wrote: On 22/04/13 19:38, Brian Paul wrote: MapBufferRange was present twice. MapBuffer was missing. Note: This is a candidate for the stable branches. --- src/mesa/main/context.c |2 +- 1 files changed,

[Mesa-dev] [PATCH 2/3] draw: add code to reset instance dependent data

2013-04-22 Thread Zack Rusin
We want to be able to reset certain parts of the pipeline, in particular the input primitive index, but only either with seperate invocations of the draw_vbo or new instances. In all other cases (e.g. new invocations due to primitive restart) that data needs to be preserved. Add a function through

Re: [Mesa-dev] [PATCH 3/3] tgsi/scan: set correct input limits for geometry shader

2013-04-22 Thread Roland Scheidegger
Am 20.04.2013 09:04, schrieb Zack Rusin: TGSI geometry shader input declerations are of the IN[][2] format and the dimensions of the array have to be deduced from the input primitive property. Signed-off-by: Zack Rusin za...@vmware.com --- src/gallium/auxiliary/tgsi/tgsi_scan.c | 17

Re: [Mesa-dev] [PATCH 3/3] tgsi/scan: set correct input limits for geometry shader

2013-04-22 Thread Zack Rusin
Can you even have that property in in a non-geometry shader? No, not in well formed shaders at least. One could of course force it through graw. I thought about an assert there but I figured that a conditional there won't matter much. In any case, series looks good to me, though your patches

[Mesa-dev] [PATCH 01/16] mesa: Add infrastructure for ARB_gpu_shader5.

2013-04-22 Thread Matt Turner
--- src/glsl/builtins/tools/generate_builtins.py |1 + src/glsl/glcpp/glcpp-parse.y |3 +++ src/glsl/glsl_parser_extras.cpp |1 + src/glsl/glsl_parser_extras.h|2 ++ src/glsl/standalone_scaffolding.cpp |1 +

[Mesa-dev] [PATCH 03/16] glsl: Add new bit built-ins IR and prototypes from ARB_gpu_shader5.

2013-04-22 Thread Matt Turner
--- src/glsl/builtins/ir/bitCount.ir| 41 ++ src/glsl/builtins/ir/bitfieldExtract.ir | 57 src/glsl/builtins/ir/bitfieldInsert.ir | 65 +++ src/glsl/builtins/ir/bitfieldReverse.ir | 41

[Mesa-dev] [PATCH 04/16] glsl: Add support for new bit built-ins in ARB_gpu_shader5.

2013-04-22 Thread Matt Turner
--- src/glsl/ir.cpp|8 +++- src/glsl/ir.h | 21 - src/glsl/ir_validate.cpp | 26 ++ src/glsl/opt_algebraic.cpp |6 +++---

[Mesa-dev] [PATCH 00/16] Bit built-ins for ARB_gpu_shader5

2013-04-22 Thread Matt Turner
This series, available at git://people.freedesktop.org/~mattst88/mesa arb_gpu_shader5 adds support for the bit built-ins for ARB_gpu_shader5 to the GLSL compiler and the i965 driver. Interesting parts of the series - - New IR operations for each built-in, plus two operations that match i965

[Mesa-dev] [PATCH 05/16] glsl: Add constant evaluation of bit built-ins.

2013-04-22 Thread Matt Turner
--- src/glsl/ir_constant_expression.cpp | 123 +++ 1 files changed, 123 insertions(+), 0 deletions(-) diff --git a/src/glsl/ir_constant_expression.cpp b/src/glsl/ir_constant_expression.cpp index c09e56a..119fe59 100644 --- a/src/glsl/ir_constant_expression.cpp

[Mesa-dev] [PATCH 06/16] glsl: Add a pass to lower bitfield-insert into bfm+bfi.

2013-04-22 Thread Matt Turner
i965/Gen7+ and Radeon/Evergreen+ have bfm/bfi instructions to implement bitfieldInsert() from ARB_gpu_shader5. --- src/glsl/ir.cpp |2 + src/glsl/ir.h | 18 src/glsl/ir_optimization.h |1 + src/glsl/ir_validate.cpp| 12

[Mesa-dev] [PATCH 07/16] glsl: Add bitfieldInsert-to-bfm/bitops lowering pass.

2013-04-22 Thread Matt Turner
--- src/glsl/ir_optimization.h |1 + src/glsl/lower_instructions.cpp | 61 +++ 2 files changed, 62 insertions(+), 0 deletions(-) diff --git a/src/glsl/ir_optimization.h b/src/glsl/ir_optimization.h index 49b1475..445dc49 100644 ---

[Mesa-dev] [PATCH 08/16] glsl: Add BFE-to-bitops lowering pass.

2013-04-22 Thread Matt Turner
--- src/glsl/ir_optimization.h |1 + src/glsl/lower_instructions.cpp | 82 +++ 2 files changed, 83 insertions(+), 0 deletions(-) diff --git a/src/glsl/ir_optimization.h b/src/glsl/ir_optimization.h index 445dc49..c5405e5 100644 ---

[Mesa-dev] [PATCH 09/16] i965: Add Gen7+ fields to brw_instruction and add comments.

2013-04-22 Thread Matt Turner
--- src/mesa/drivers/dri/i965/brw_structs.h | 31 +++ 1 files changed, 19 insertions(+), 12 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_structs.h b/src/mesa/drivers/dri/i965/brw_structs.h index 75365e0..c322edf 100644 ---

[Mesa-dev] [PATCH 10/16] i965: Add 3-src destination and shared-source type macros.

2013-04-22 Thread Matt Turner
--- src/mesa/drivers/dri/i965/brw_defines.h | 11 +++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_defines.h b/src/mesa/drivers/dri/i965/brw_defines.h index 38f0356..a5d9452 100644 --- a/src/mesa/drivers/dri/i965/brw_defines.h +++

[Mesa-dev] [PATCH 11/16] i965/gen7: Set src/dst types for 3-src instructions.

2013-04-22 Thread Matt Turner
Also update asserts to allow BFE and BFI2, which take (unsigned) doubleword arguments. --- src/mesa/drivers/dri/i965/brw_eu_emit.c | 34 +++--- 1 files changed, 30 insertions(+), 4 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_eu_emit.c

[Mesa-dev] [PATCH 12/16] i965: Add support for emitting and disassembling bit instructions.

2013-04-22 Thread Matt Turner
Specifically bfe - for bitfieldExtract() bfi1 and bfi2 - for bitfieldInsert() bfrev - for bitfieldReverse() cbit - for bitCount() fbh - for findMSB() fbl - for findLSB() --- src/mesa/drivers/dri/i965/brw_defines.h |7 +++ src/mesa/drivers/dri/i965/brw_disasm.c |7

[Mesa-dev] [PATCH 13/16] i965/fs: Add support for bit instructions.

2013-04-22 Thread Matt Turner
Don't bother scalarizing ir_binop_bfm, since its results are identical for all channels. --- src/mesa/drivers/dri/i965/brw_fs.cpp |7 +++ src/mesa/drivers/dri/i965/brw_fs.h |7 +++ .../dri/i965/brw_fs_channel_expressions.cpp| 37 +++

[Mesa-dev] [PATCH 14/16] i965/vs: Add support for bit instructions.

2013-04-22 Thread Matt Turner
--- src/mesa/drivers/dri/i965/brw_vec4.h |7 +++ src/mesa/drivers/dri/i965/brw_vec4_emit.cpp| 29 ++ src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 48 3 files changed, 84 insertions(+), 0 deletions(-) diff --git

[Mesa-dev] [PATCH 15/16] i965: Lower bitfieldExtract and bitfieldInsert.

2013-04-22 Thread Matt Turner
--- src/mesa/drivers/dri/i965/brw_shader.cpp | 14 ++ 1 files changed, 14 insertions(+), 0 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_shader.cpp b/src/mesa/drivers/dri/i965/brw_shader.cpp index b3bd1b9..15a0440 100644 --- a/src/mesa/drivers/dri/i965/brw_shader.cpp +++

[Mesa-dev] [PATCH 16/16] i965: Print the correct dst and shared-src types for 3-src instructions.

2013-04-22 Thread Matt Turner
--- src/mesa/drivers/dri/i965/brw_disasm.c | 26 ++ 1 files changed, 22 insertions(+), 4 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_disasm.c b/src/mesa/drivers/dri/i965/brw_disasm.c index 0b881b7..556e63a 100644 --- a/src/mesa/drivers/dri/i965/brw_disasm.c

[Mesa-dev] [PATCH] mesa: Allow custom text to be inserted in version string at buildtime

2013-04-22 Thread Chad Versace
This allows maintainers/packagers/testers to tag the build with information that will be reported by GL_VERSION. If the environemt variable or make variable MESA_VERSION_STRING_EXTRA is set, then its values will appear in the GL_VERSION string immediately after Mesa X.Y and before (git-xxx).

Re: [Mesa-dev] [PATCH 04/16] glsl: Add support for new bit built-ins in ARB_gpu_shader5.

2013-04-22 Thread Chris Forbes
In the last hunk: + case ir_binop_bfm: + case ir_triop_bfi: These look like leftovers? -- Chris ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 1/4] gallium/dri: Allow drivers to support DRI Image v7

2013-04-22 Thread Christopher James Halse Rogers
On Mon, 2013-04-22 at 21:38 +1000, Dave Airlie wrote: On Mon, Apr 22, 2013 at 9:09 PM, Jose Fonseca jfons...@vmware.com wrote: - Original Message - From: Christopher James Halse Rogers r...@ubuntu.com This is only exposed by drivers wich support the new PIPE_CAP_PRIME parameter,

Re: [Mesa-dev] [PATCH 05/16] glsl: Add constant evaluation of bit built-ins.

2013-04-22 Thread Chris Forbes
+ case ir_unop_find_msb: + for (unsigned c = 0; c components; c++) { + int v = op[0]-value.i[c]; + + if (v == 0 || (op[0]-type-base_type == GLSL_TYPE_INT v == -1)) +data.i[c] = -1; + else { +int count = 0; +int top_bit =

Re: [Mesa-dev] [PATCH 04/16] glsl: Add support for new bit built-ins in ARB_gpu_shader5.

2013-04-22 Thread Chris Forbes
Scratch that -- I see what they're for. They seem to be missing from enum ir_expression_operation though. -- Chris On Tue, Apr 23, 2013 at 1:33 PM, Chris Forbes chr...@ijw.co.nz wrote: In the last hunk: + case ir_binop_bfm: + case ir_triop_bfi: These look like leftovers? -- Chris

[Mesa-dev] [Bug 62142] Mesa/demo mipmap_limits upside down with running by SOFTWARE

2013-04-22 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=62142 Gordon Jin gordon@intel.com changed: What|Removed |Added Status|RESOLVED|REOPENED

[Mesa-dev] [PATCH 2/5] r600g/compute: Don't use radeon_winsys::buffer_wait() after dispatching a kernel

2013-04-22 Thread Tom Stellard
From: Tom Stellard thomas.stell...@amd.com The state tracker should be responsible for waiting for the kernel to finish. --- src/gallium/drivers/r600/evergreen_compute.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/src/gallium/drivers/r600/evergreen_compute.c

[Mesa-dev] [PATCH 4/5] r600g/compute: Use a constant buffer to store kernel parameters

2013-04-22 Thread Tom Stellard
From: Tom Stellard thomas.stell...@amd.com --- src/gallium/drivers/r600/evergreen_compute.c | 47 +++--- .../drivers/r600/evergreen_compute_internal.h | 2 +- 2 files changed, 33 insertions(+), 16 deletions(-) diff --git a/src/gallium/drivers/r600/evergreen_compute.c

[Mesa-dev] [PATCH 5/5] r600g/compute: Removed unused and untested code

2013-04-22 Thread Tom Stellard
From: Tom Stellard thomas.stell...@amd.com There was a lot of code in evergreen_compute_internal.c that was not being used at all and most of it was duplicating code from other parts of the driver. --- src/gallium/drivers/r600/Makefile.sources | 1 -

[Mesa-dev] [PATCH 2/2] i965: Remove strange comments about math functions.

2013-04-22 Thread Matt Turner
--- Do these comments make sense to anyone else? src/mesa/drivers/dri/i965/brw_defines.h |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_defines.h b/src/mesa/drivers/dri/i965/brw_defines.h index ea5d2af..6517f24 100644 ---

Re: [Mesa-dev] [PATCH 1/4] gallium/dri: Allow drivers to support DRI Image v7

2013-04-22 Thread Christopher James Halse Rogers
On Mon, 22 Apr, 2013 at 4:38 PM, christopher.halse.rog...@canonical.com wrote: From: Christopher James Halse Rogers r...@ubuntu.com This is only exposed by drivers wich support the new PIPE_CAP_PRIME parameter, for PRIME import/export. --- This stubs out texture_from_renderbuffer, which I