[Mesa-dev] [PATCH] [RFC] R600: rework handling of the constants

2012-12-20 Thread Vadim Girlin
Remove Cxxx registers, add new special register - "ALU_CONST" and new operand for each alu src - "sel". ALU_CONST is used to designate that the new operand contains the value to override src.sel, src.kc_bank, src.chan for constants in the driver. --- .../AMDGPU/MCTargetDesc/R600MCCodeEmitter.cpp

[Mesa-dev] [PATCH] [RFC] r600g: rework handling of the constants

2012-12-20 Thread Vadim Girlin
Pack kc_bank, const_index and chan into the load.const operand, unpack them in r600_alu_from_byte_stream and use to override sel, kc_bank and chan for the constants. Expected operand value is (((512 + (kc_bank << 12) + const_index) << 2) + chan). --- src/gallium/drivers/r600/r600_llvm.c | 6 ++

Re: [Mesa-dev] [PATCH] [RFC] R600: rework handling of the constants

2012-12-20 Thread Tom Stellard
On Thu, Dec 20, 2012 at 04:47:50PM +0400, Vadim Girlin wrote: > Remove Cxxx registers, add new special register - "ALU_CONST" and new > operand for each alu src - "sel". ALU_CONST is used to designate that the > new operand contains the value to override src.sel, src.kc_bank, src.chan > for constan

Re: [Mesa-dev] [PATCH] [RFC] r600g: rework handling of the constants

2012-12-20 Thread Tom Stellard
On Thu, Dec 20, 2012 at 04:47:51PM +0400, Vadim Girlin wrote: > Pack kc_bank, const_index and chan into the load.const operand, unpack > them in r600_alu_from_byte_stream and use to override sel, kc_bank and chan > for the constants. > > Expected operand value is (((512 + (kc_bank << 12) + const_i

Re: [Mesa-dev] [PATCH 6/8] egl/wayland: Pull color buffers from dri2_surf->color_buffers pool

2012-12-20 Thread Ander Conselvan de Oliveira
2012/12/14 Kristian Høgsberg > We used to keep the color buffers in the dri_buffers array and > swap __DRI_BUFFER_BACK_LEFT and __DRI_BUFFER_FRONT_LEFT around there > and swap third_buffer in in case we needed to triple buffer. That > gets a little fidgety with all the swaps, so lets use the > c

Re: [Mesa-dev] [PATCH] [RFC] R600: rework handling of the constants

2012-12-20 Thread Vadim Girlin
On Thu, 2012-12-20 at 07:32 -0800, Tom Stellard wrote: > On Thu, Dec 20, 2012 at 04:47:50PM +0400, Vadim Girlin wrote: > > Remove Cxxx registers, add new special register - "ALU_CONST" and new > > operand for each alu src - "sel". ALU_CONST is used to designate that the > > new operand contains the

Re: [Mesa-dev] [PATCH 7/8] egl/wayland: Implement EGL_EXT_buffer_age

2012-12-20 Thread Ander Conselvan de Oliveira
The age of the buffers is not reset on dri2_release_buffers() or anywhere else, so after a resize the buffer age is not zero. I think we should set age to zero on get_back_bo() when the new buffer is allocated. Same thing for the gbm backend, although there this would be only for clarity, since

[Mesa-dev] [PATCH 00/14] GetTexImage and CopyTexSubImage fixes and improvements

2012-12-20 Thread Marek Olšák
This series contains some fixes for rarely used OpenGL features. What's more interesting here is that it uses 2 features we could use in gallium more often: 3D blits and 3D texture tranfers. The interfaces have been in place already. The 3D blit can be done with pipe->blit by setting pipe_blit_i

[Mesa-dev] [PATCH 01/14] mesa: allow TEXTURE_CUBE_MAP_ARRAY in GetTexImage

2012-12-20 Thread Marek Olšák
--- src/mesa/main/texgetimage.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mesa/main/texgetimage.c b/src/mesa/main/texgetimage.c index 69067df..d435c82 100644 --- a/src/mesa/main/texgetimage.c +++ b/src/mesa/main/texgetimage.c @@ -683,6 +683,8 @@ legal_getteximage_target(struct g

[Mesa-dev] [PATCH 02/14] gallium/util: remove unused helper util_create_rgba_texture

2012-12-20 Thread Marek Olšák
--- src/gallium/auxiliary/util/u_surface.c | 55 src/gallium/auxiliary/util/u_surface.h |6 2 files changed, 61 deletions(-) diff --git a/src/gallium/auxiliary/util/u_surface.c b/src/gallium/auxiliary/util/u_surface.c index 5e771c9..37f4815 100644 ---

[Mesa-dev] [PATCH 03/14] gallium/util: complete implementation of util_dump_transfer

2012-12-20 Thread Marek Olšák
--- src/gallium/auxiliary/util/u_dump_state.c |9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/gallium/auxiliary/util/u_dump_state.c b/src/gallium/auxiliary/util/u_dump_state.c index 09faffe..d7df5b4 100644 --- a/src/gallium/auxiliary/util/u_dump_state.c +++ b/s

[Mesa-dev] [PATCH 04/14] gallium/u_blitter: remove useless parameter from blitter_default_dst_texture

2012-12-20 Thread Marek Olšák
--- src/gallium/auxiliary/util/u_blitter.c |9 - src/gallium/auxiliary/util/u_blitter.h |3 +-- src/gallium/drivers/r300/r300_blit.c |2 +- src/gallium/drivers/r600/r600_blit.c |2 +- 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/gallium/auxiliary/u

[Mesa-dev] [PATCH 05/14] gallium/u_blitter: unify some parameters into a dstbox parameter in blit_generic

2012-12-20 Thread Marek Olšák
--- src/gallium/auxiliary/util/u_blitter.c | 31 ++- src/gallium/auxiliary/util/u_blitter.h | 14 +++--- src/gallium/drivers/r300/r300_blit.c | 14 -- src/gallium/drivers/r600/r600_blit.c |8 +--- 4 files changed, 38 insertions(+),

[Mesa-dev] [PATCH 06/14] gallium/u_blitter: minor simplification

2012-12-20 Thread Marek Olšák
--- src/gallium/auxiliary/util/u_blitter.c | 21 +++-- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/gallium/auxiliary/util/u_blitter.c b/src/gallium/auxiliary/util/u_blitter.c index 8ce1e50..0948eab 100644 --- a/src/gallium/auxiliary/util/u_blitter.c +++ b

[Mesa-dev] [PATCH 07/14] gallium/u_blitter: fix blitting TEXTURE_CUBE_ARRAY with a non-zero cube index

2012-12-20 Thread Marek Olšák
--- src/gallium/auxiliary/util/u_blitter.c |5 + 1 file changed, 5 insertions(+) diff --git a/src/gallium/auxiliary/util/u_blitter.c b/src/gallium/auxiliary/util/u_blitter.c index 0948eab..0e4ce68 100644 --- a/src/gallium/auxiliary/util/u_blitter.c +++ b/src/gallium/auxiliary/util/u_blit

[Mesa-dev] [PATCH 08/14] gallium/u_blitter: implement 3D blitting

2012-12-20 Thread Marek Olšák
Scaling and flipping in the Z direction isn't allowed yet. --- src/gallium/auxiliary/util/u_blitter.c | 104 +++- src/gallium/auxiliary/util/u_blitter.h |9 +++ 2 files changed, 83 insertions(+), 30 deletions(-) diff --git a/src/gallium/auxiliary/util/u_blitter.c

[Mesa-dev] [PATCH 09/14] st/mesa: fix GetTexImage for compressed cubemaps

2012-12-20 Thread Marek Olšák
I'll deal with 2D arrays later. --- src/mesa/state_tracker/st_cb_texture.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c index bf13526..77d0650 100644 --- a/src/mesa/state_tracker/st_cb_textur

[Mesa-dev] [PATCH 10/14] st/mesa: try to find the format matching format+type in decompressed_with_blit

2012-12-20 Thread Marek Olšák
There was the fast path based on _mesa_format_matches_format_and_type for GetTexImage, but it never worked, because the Mesa format we were testing there was always compressed. Further testing showed that the fast path had been completely broken. In this commit, the somewhat limited helper util_cr

[Mesa-dev] [PATCH 11/14] st/mesa: fix GetTexImage for compressed 2D array textures

2012-12-20 Thread Marek Olšák
This uses a 3D blit to decompressed the texture and then a 3D transfer to read it. --- src/gallium/auxiliary/util/u_inlines.h | 18 +++ src/mesa/state_tracker/st_cb_texture.c | 55 +++- 2 files changed, 50 insertions(+), 23 deletions(-) diff --git a/src/gal

[Mesa-dev] [PATCH 12/14] st/mesa: fix CopyTexSubImage fallback for 1D array textures

2012-12-20 Thread Marek Olšák
- We should use a 3D transfer of size Width x 1 x NumLayers. - We should use layer_stride instead of stride. (even though they are likely to be equal with 1D array textures) --- src/mesa/state_tracker/st_cb_texture.c | 40 ++-- src/mesa/state_tracker/st_texture.c

[Mesa-dev] [PATCH 13/14] st/mesa: accelerate CopyTexSubImage for 1D array textures

2012-12-20 Thread Marek Olšák
--- src/mesa/state_tracker/st_cb_texture.c | 92 +++- 1 file changed, 66 insertions(+), 26 deletions(-) diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c index 01ed079..02fc675 100644 --- a/src/mesa/state_tracker/st_cb_text

[Mesa-dev] [PATCH 14/14] st/mesa: fix assertion failures with 2101010 vertex formats

2012-12-20 Thread Marek Olšák
--- src/mesa/state_tracker/st_atom_array.c |7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/mesa/state_tracker/st_atom_array.c b/src/mesa/state_tracker/st_atom_array.c index 15f5d1c..2437245 100644 --- a/src/mesa/state_tracker/st_atom_array.c +++ b/src/mesa/state_

Re: [Mesa-dev] [PATCH 1/4] i965: Add perf debug for texture relayout.

2012-12-20 Thread Eric Anholt
Ian Romanick writes: > Strong work. > > Series is > > Reviewed-by: Ian Romanick Note, this series is waiting on review for the other 3 patches sent out that day. pgpL7dzirTbXJ.pgp Description: PGP signature ___ mesa-dev mailing list mesa-dev@lists.f

[Mesa-dev] [PATCH] [WIP]radeon/llvm: Loads from globaladdr ptr turned into const buf read

2012-12-20 Thread Vincent Lejeune
--- lib/Target/AMDGPU/AMDGPUISelLowering.cpp | 1 + lib/Target/AMDGPU/AMDGPUISelLowering.h | 1 + lib/Target/AMDGPU/AMDGPUMCInstLower.cpp | 6 lib/Target/AMDGPU/AMDILISelDAGToDAG.cpp | 49 - lib/Target/AMDGPU/R600ISelLowering.cpp | 61 +

[Mesa-dev] [PATCH] r600g[WIP]: tgsi to llvm emits pointer to globaladdr load for constant buffer data

2012-12-20 Thread Vincent Lejeune
--- src/gallium/drivers/r600/r600_llvm.c | 23 +-- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/src/gallium/drivers/r600/r600_llvm.c b/src/gallium/drivers/r600/r600_llvm.c index 22f5f11..2b885c9 100644 --- a/src/gallium/drivers/r600/r600_llvm.c +++ b/src/gal

Re: [Mesa-dev] [PATCH] r600g[WIP]: tgsi to llvm emits pointer to globaladdr load for constant buffer data

2012-12-20 Thread Tom Stellard
On Thu, Dec 20, 2012 at 07:37:27PM +0100, Vincent Lejeune wrote: > --- > src/gallium/drivers/r600/r600_llvm.c | 23 +-- > 1 file changed, 13 insertions(+), 10 deletions(-) > > diff --git a/src/gallium/drivers/r600/r600_llvm.c > b/src/gallium/drivers/r600/r600_llvm.c > index 2

Re: [Mesa-dev] [PATCH] docs: Document spec quoting practices

2012-12-20 Thread Chad Versace
On 12/19/2012 09:56 PM, Paul Berry wrote: > On 19 December 2012 15:46, Ian Romanick wrote: > >> From: Ian Romanick >> >> Signed-off-by: Ian Romanick >> Cc: Paul Berry >> Cc: Brian Paul >> --- >> docs/devinfo.html | 42 ++ >> 1 file changed, 42 insertio

[Mesa-dev] [PATCH automake] Support LLVM >= 3.2 on radeonsi and opencl.

2012-12-20 Thread Johannes Obermayr
--- Because Tom's LLVM 3.2 git repository uses AMDGPU and LLVM 3.3 trunk uses R600 we must adapt Mesa a bit to support both. This patch works only for automake branch because it requires LLVM_VERSION_INT from: http://cgit.freedesktop.org/~mattst88/mesa/commit/?h=automake-gallium6&id=b772e110a2d7

Re: [Mesa-dev] [PATCH] docs: Document spec quoting practices

2012-12-20 Thread Chris Forbes
+ +Text quoted from the GLSL or GLSL ES ES specifications: + Probably only need one ES here? ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 4/6] intel: Fix framebuffer blitting to GL_COLOR_ATTACHMENTi when i!=0

2012-12-20 Thread Anuj Phogat
On Tue, Dec 18, 2012 at 11:26 AM, Kenneth Graunke wrote: > On 12/12/2012 03:25 PM, Anuj Phogat wrote: >> >> This patch fixes a case when blitting to a framebuffer with >> renderbuffers/textures attached to GL_COLOR_ATTACHMENT{1, 2, ...}. >> Earlier we were incorrectly blitting to GL_COLOR_ATTACHME

[Mesa-dev] Fix build for Android Jelly Bean

2012-12-20 Thread Chad Versace
The interface to ANativeWindow changed in Jelly Bean. This series updates the EGL sources to fix the build. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

[Mesa-dev] [PATCH 1/2] android: Define Make variables for Android version

2012-12-20 Thread Chad Versace
Define the following Make variables: MESA_ANDROID_MAJOR_VERSION MESA_ANDROID_MINOR_VERSION MESA_ANDROID_VERSION These variable will allow us to make version-dependent decisions on library dependencies. In particular, building Mesa against JellyBean will require libsync. CC: Tapani Päl

[Mesa-dev] [PATCH 2/2] egl/android: Fix build for Jelly Bean

2012-12-20 Thread Chad Versace
The interface to ANativeWindow changed in Jelly Bean. The change included adding fence file descriptor parameter to the queueBuffer and dequeueBuffer methods and removing the lockBuffer method. CC: Tapani Pälli Signed-off-by: Chad Versace --- src/egl/drivers/dri2/Android.mk | 5 +++ sr

Re: [Mesa-dev] [PATCH 1/2] android: Define Make variables for Android version

2012-12-20 Thread Chad Versace
Nevermind this series. Nak it. I thought this fixed the build, but it doesn't. The Android build system tricked me. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

[Mesa-dev] [PATCH 0/2] egl/android: Fix build for Jelly Bean

2012-12-20 Thread Chad Versace
In Jelly Bean, the interface to ANativeWindow changed. This series updates the EGL sources without breaking compatibility with older Android releases. Chad Versace (2): android: Define Make variables for Android version egl/android: Fix build for Jelly Bean Android.common.mk

[Mesa-dev] [PATCH 1/2] android: Define Make variables for Android version

2012-12-20 Thread Chad Versace
Define the following Make variables: MESA_ANDROID_MAJOR_VERSION MESA_ANDROID_MINOR_VERSION MESA_ANDROID_VERSION These variable will allow us to make version-dependent decisions on library dependencies. In particular, building Mesa against JellyBean will require libsync. Signed-off-by:

[Mesa-dev] [PATCH 2/2] egl/android: Fix build for Jelly Bean

2012-12-20 Thread Chad Versace
In Jelly Bean, the interface to ANativeWindow changed. The change included adding a new parameter the queueBuffer and dequeueBuffer methods and removing the lockBuffer method. Signed-off-by: Chad Versace --- src/egl/drivers/dri2/platform_android.c | 60 - src/egl/

[Mesa-dev] [PATCH] egl/android: Fix build for Jelly Bean (v2)

2012-12-20 Thread Chad Versace
In Jelly Bean, the interface to ANativeWindow changed. The change included adding a new parameter the queueBuffer and dequeueBuffer methods and removing the lockBuffer method. v2: - s/fence_fd == -1/fence_fd != -1/ - Fix leak. Close the fence_fd. CC: Tapani Pälli Signed-off-by: Chad Versace

[Mesa-dev] [PATCH] R600: rework handling of the constants

2012-12-20 Thread Vincent Lejeune
From: Vadim Girlin Remove Cxxx registers, add new special register - "ALU_CONST" and new operand for each alu src - "sel". ALU_CONST is used to designate that the new operand contains the value to override src.sel, src.kc_bank, src.chan for constants in the driver. v2[Vincent Lejeune]: -Parse l

[Mesa-dev] [PATCH] r600g: rework handling of the constants

2012-12-20 Thread Vincent Lejeune
>From Vadim Girlin patch --- src/gallium/drivers/r600/r600_llvm.c | 4 ++-- src/gallium/drivers/r600/r600_shader.c | 35 +- 2 files changed, 28 insertions(+), 11 deletions(-) diff --git a/src/gallium/drivers/r600/r600_llvm.c b/src/gallium/drivers/r600/r600_llvm

[Mesa-dev] [PATCH] r600g: rework handling of the constants

2012-12-20 Thread Vincent Lejeune
>From Vadim Girlin patch --- src/gallium/drivers/r600/r600_llvm.c | 19 ++ src/gallium/drivers/r600/r600_shader.c | 35 +- 2 files changed, 37 insertions(+), 17 deletions(-) diff --git a/src/gallium/drivers/r600/r600_llvm.c b/src/gallium/drivers/

[Mesa-dev] [PATCH] i965: Fix border color handling for deprecated SNORM formats.

2012-12-20 Thread Eric Anholt
We don't have native hardware support for these, so they get promoted to RGBA, in which case we don't have hardware dealing with the channel swizzling for us. Fixes piglit EXT_texture_snorm/texwrap formats bordercolor (-swizzled). --- src/mesa/drivers/dri/i965/brw_wm_sampler_state.c | 31 ++

Re: [Mesa-dev] [PATCH 03/11] mesa: Fix the naming of _mesa_ProgramParameteriARB

2012-12-20 Thread Eric Anholt
Ian Romanick writes: > From: Ian Romanick > > After recent changes in the XML, the dispatch generators will expect > this function to be named _mesa_ProgramParameteri. Isn't the build broken between this commit~1 and whatever produced that change? (was it the reordering in commit~1?) pgpYhv7

Re: [Mesa-dev] [PATCH 04/11] mesa: Add stub implementations of glGetProgramBinary and glProgramBinary

2012-12-20 Thread Eric Anholt
Ian Romanick writes: > From: Ian Romanick It looks to me like we really do have to support getting a binary with this extension/gles3: "Any program binary retrieved using GetProgramBinary and submitted us- ing ProgramBinary under the same configuration must be successful. Any programs loaded s

Re: [Mesa-dev] [PATCH 5/9] mesa: Add skeleton implementation of glGetInternalformativ

2012-12-20 Thread Eric Anholt
Ian Romanick writes: > + if (bufSize != 0 && params == NULL) { > + /* Emit a warning to aid application debugging, but go ahead and do the > + * memcpy (and probably crash) anyway. > + */ > + _mesa_warning(ctx, > +"glGetInternalformativ(bufSize = %d, but

Re: [Mesa-dev] [PATCH 6/9] mesa: Add extension tracking bit for GL_ARB_internalformat_query

2012-12-20 Thread Eric Anholt
Ian Romanick writes: > From: Ian Romanick > > Though, I'm tempted to always expose this extension when > GL_ARB_framebuffer_object is exposed. In that case, it would share the same > enable bit. > > Signed-off-by: Ian Romanick > --- > src/mesa/main/extensions.c | 1 + > src/mesa/main/mtypes.h

Re: [Mesa-dev] [PATCH 8/9] mesa: Add driver method to determine the possible sample counts

2012-12-20 Thread Eric Anholt
Ian Romanick writes: > From: Ian Romanick > > Use this method in _mesa_GetInternalformativ for both GL_SAMPLES and > GL_NUM_SAMPLE_COUNTS. > diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h > index 70c5324..3daf3da 100644 > --- a/src/mesa/main/dd.h > +++ b/src/mesa/main/dd.h > @@ -201,6 +20

Re: [Mesa-dev] [PATCH 9/9] intel: Enable GL_ARB_internalformat_query

2012-12-20 Thread Eric Anholt
Ian Romanick writes: > From: Ian Romanick > > Signed-off-by: Ian Romanick > --- > src/mesa/drivers/dri/i965/brw_context.c | 23 +++ > src/mesa/drivers/dri/intel/intel_extensions.c | 1 + > 2 files changed, 24 insertions(+) > > diff --git a/src/mesa/drivers/dri/i965/b

Re: [Mesa-dev] [PATCH 0/9] Implement GL_ARB_internalformat_query

2012-12-20 Thread Eric Anholt
Ian Romanick writes: > GL_ARB_internalformat_query is a required part of OpenGL ES 3.0, and this > series impelments it in core Mesa and the i965 driver. Implementation for > Gallium drivers should be trivial. > > With this series all of the GL_ARB_internalformat_query recently pushed to > pigli

[Mesa-dev] [PATCH 1/2] Make IsTransformFeedback() return false before BindTransformFeedback()

2012-12-20 Thread Matt Turner
The GL 4.3 an ES 3.0 specs say A transform feedback object is created by binding a name returned by GenTransformFeedbacks with the command void BindTransformFeedback( enum target, uint id ); Fixes arb_transform_feedback2-istransformfeedback and part of es3conform's CoverageES30.test.

[Mesa-dev] [PATCH 2/2] Make IsVertexArray() return false before BindVertexArray()

2012-12-20 Thread Matt Turner
Rename existing _Used flag to EverBound. The GL 4.3 and ES 3.0 specs say These names are marked as used, for the purposes of GenVertexArrays only, but they do not acquire array state until they are first bound. This also affects Apple VAOs, which is fine since the APPLE_vertex_array_object

Re: [Mesa-dev] [PATCH] egl/android: Fix build for Jelly Bean (v2)

2012-12-20 Thread Tapani Pälli
On 12/21/2012 01:11 AM, Chad Versace wrote: > In Jelly Bean, the interface to ANativeWindow changed. The change included > adding a new parameter the queueBuffer and dequeueBuffer methods and > removing the lockBuffer method. > > v2: > - s/fence_fd == -1/fence_fd != -1/ > - Fix leak. Close the

[Mesa-dev] [RFC] Merge automake branch

2012-12-20 Thread Johannes Obermayr
Maya calendar will reach its end soon and Mesa should be prepared to start in a new epoch ;-) Please pull the code from: git://github.com/jobermayr/mesa.git branch: master To view it online: https://github.com/jobermayr/mesa Following changes since automake-gallium6: - link shared libgallium a

Re: [Mesa-dev] [RFC] Merge automake branch

2012-12-20 Thread Matt Turner
On Thu, Dec 20, 2012 at 9:31 PM, Johannes Obermayr wrote: > Maya calendar will reach its end soon and Mesa should be prepared to start in > a new epoch ;-) > > Please pull the code from: > git://github.com/jobermayr/mesa.git branch: master > > To view it online: > https://github.com/jobermayr/me