Re: [Mesa-dev] [PATCH] mesa: Build git_sha1.h before computing dependencies.

2012-06-11 Thread Jakob Bornecrantz
- Original Message - > Otherwise, version.c doesn't get a dependency on it in a clean build, > and then it doesn't necessarily get generated before version.c is > compiled. > > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=50976 Thanks for fixing this. Reviewed-by: Jakob Bornecr

[Mesa-dev] [PATCH] mesa: Build git_sha1.h before computing dependencies.

2012-06-11 Thread Eric Anholt
Otherwise, version.c doesn't get a dependency on it in a clean build, and then it doesn't necessarily get generated before version.c is compiled. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=50976 --- src/mesa/Makefile |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [Mesa-dev] [PATCH 10/21] nouveau: Add support for ARB_sampler_object

2012-06-11 Thread Francisco Jerez
Pauli Nieminen writes: > ARB_sampler_object is very simple software only extension to support. > I want to make it mandator extension for Mesa drivers to allow meta > module to use it. > > This patch add support for the extension to nouveau. It is completely > untested search and replace patch. I

Re: [Mesa-dev] Mesa (master): automake: Add a prefix variable for libglsl sources.

2012-06-11 Thread Kenneth Graunke
On 06/11/2012 01:14 PM, Eric Anholt wrote: > On Mon, 11 Jun 2012 10:02:34 -0700 (PDT), Jose Fonseca > wrote: >> This breaks the SCons build, which parses src/glsl/Makefile.sources, >> and can't understand "$(GLSL_SRCDIR)/" as it only supports a simple >> subset of Make syntax. >> >> Is there some

Re: [Mesa-dev] [PATCH] scons: Fix Haiku binary compatibility

2012-06-11 Thread Alexander von Gluck
On 11.06.2012 14:32, Alexander von Gluck wrote: On 11.06.2012 14:04, Jose Fonseca wrote: - Original Message - From 44fa55d3f49884c824306504943ca2a1382601f0 Mon Sep 17 00:00:00 2001 * Our binary compatibility is targeted to Pentimum or higher, these changes ensure we keep proper optim

[Mesa-dev] [Bug 50979] Request an fdo account

2012-06-11 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=50979 Brian Paul changed: What|Removed |Added AssignedTo|mesa-dev@lists.freedesktop. |sitewranglers@lists.freedes

Re: [Mesa-dev] [PATCH 01/21] mesa/format_unpack: Fix YCBCR unpack

2012-06-11 Thread Brian Paul
On 06/11/2012 03:15 PM, Ian Romanick wrote: On 06/11/2012 07:41 AM, Brian Paul wrote: On 06/11/2012 12:59 AM, Pauli Nieminen wrote: The YCBCR unpack was reading one RGBA value from 4 bytes of YCBCR texture. But single pixel is only 2 bytes in the format. After noticing that error Ville told me

Re: [Mesa-dev] [PATCH 01/21] mesa/format_unpack: Fix YCBCR unpack

2012-06-11 Thread Ian Romanick
On 06/11/2012 07:41 AM, Brian Paul wrote: On 06/11/2012 12:59 AM, Pauli Nieminen wrote: The YCBCR unpack was reading one RGBA value from 4 bytes of YCBCR texture. But single pixel is only 2 bytes in the format. After noticing that error Ville told me that second chroma sample has to be average t

Re: [Mesa-dev] [PATCH 06/21] mesa: Move DepthMode to texture object

2012-06-11 Thread Eric Anholt
On Mon, 11 Jun 2012 09:59:21 +0300, Pauli Nieminen wrote: > GL_DEPTH_TEXTURE_MODE isn't meant to be part of sampler state based on > compatibility profile specifications. > > OpenGL specification 4.1 compatibility 20100725 3.9.2: > "... The values accepted in the pname parameter > are TEXTURE_WR

Re: [Mesa-dev] [PATCH] configure.ac: Add --with-(gl|glu|osmesa)-lib-name options

2012-06-11 Thread Kenneth Graunke
On 06/11/2012 05:58 AM, Brad King wrote: > On 06/05/2012 02:03 PM, Kenneth Graunke wrote: >> On 06/05/2012 10:59 AM, Brad King wrote: ./autogen.sh --with-gl-lib-name=GL --with-glu-lib-name=GLU --with-osmesa-lib-name=OSMesa ... >>> >>> That looks cleaner to me. Here is a patch for it. >>

Re: [Mesa-dev] [PATCH 06/21] mesa/macros: Add ARRAY_SIZE helper macro core mesa

2012-06-11 Thread Eric Anholt
On Mon, 11 Jun 2012 09:07:19 -0600, Brian Paul wrote: > On 06/11/2012 12:59 AM, Pauli Nieminen wrote: > > diff --git a/src/mesa/main/macros.h b/src/mesa/main/macros.h > > index d1df2ce..e05fa14 100644 > > --- a/src/mesa/main/macros.h > > +++ b/src/mesa/main/macros.h > > @@ -679,5 +679,8 @@ do {

Re: [Mesa-dev] Mesa (master): automake: Add a prefix variable for libglsl sources.

2012-06-11 Thread Eric Anholt
On Mon, 11 Jun 2012 10:02:34 -0700 (PDT), Jose Fonseca wrote: > This breaks the SCons build, which parses src/glsl/Makefile.sources, > and can't understand "$(GLSL_SRCDIR)/" as it only supports a simple > subset of Make syntax. > > Is there some other way to achieve this effect, without changing

Re: [Mesa-dev] [PATCH] scons: Fix Haiku binary compatibility

2012-06-11 Thread Alexander von Gluck
On 11.06.2012 14:04, Jose Fonseca wrote: - Original Message - From 44fa55d3f49884c824306504943ca2a1382601f0 Mon Sep 17 00:00:00 2001 * Our binary compatibility is targeted to Pentimum or higher, these changes ensure we keep proper optimizations * Fixes strange if statement '! window

[Mesa-dev] [Bug 50979] Request an fdo account

2012-06-11 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=50979 --- Comment #3 from Alexander von Gluck 2012-06-11 12:19:31 PDT --- Little additional information: * xorg foundation member since Jan 2012 * frequent commiter to Haiku project (MIT licensed) http://cgit.haiku-os.org/haiku/log/?qt=author&q=

[Mesa-dev] [Bug 50979] Request an fdo account

2012-06-11 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=50979 --- Comment #2 from Alexander von Gluck 2012-06-11 12:15:04 PDT --- Created attachment 62900 --> https://bugs.freedesktop.org/attachment.cgi?id=62900 kallisti5 public gpg key -- Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?t

[Mesa-dev] [Bug 50979] Request an fdo account

2012-06-11 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=50979 --- Comment #1 from Alexander von Gluck 2012-06-11 12:07:58 PDT --- Created attachment 62898 --> https://bugs.freedesktop.org/attachment.cgi?id=62898 kallisti5 public ssh key -- Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?t

[Mesa-dev] [Bug 50979] New: Request an fdo account

2012-06-11 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=50979 Bug #: 50979 Summary: Request an fdo account Classification: Unclassified Product: Mesa Version: git Platform: All OS/Version: other Status: NEW Severity: no

Re: [Mesa-dev] [PATCH] scons: Fix Haiku binary compatibility

2012-06-11 Thread Jose Fonseca
- Original Message - > From 44fa55d3f49884c824306504943ca2a1382601f0 Mon Sep 17 00:00:00 > 2001 > > * Our binary compatibility is targeted to Pentimum or higher, > these changes ensure we keep proper optimizations > * Fixes strange if statement > '! windows or debug or True' > --- >

Re: [Mesa-dev] [PATCH] scons: Fix Haiku binary compatibility

2012-06-11 Thread Jakob Bornecrantz
On Thu, Jun 7, 2012 at 5:20 PM, Alexander von Gluck IV wrote: > From 44fa55d3f49884c824306504943ca2a1382601f0 Mon Sep 17 00:00:00 2001 > > * Our binary compatibility is targeted to Pentimum or higher, >  these changes ensure we keep proper optimizations > * Fixes strange if statement >  '! windows

[Mesa-dev] [Bug 50976] Fails to build with error: git_sha1.h: No such file or directory

2012-06-11 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=50976 U. Artie Eoff changed: What|Removed |Added CC||ullysses.a.e...@intel.com -- Configure

Re: [Mesa-dev] Mesa (master): automake: Add a prefix variable for libglsl sources.

2012-06-11 Thread Jose Fonseca
- Original Message - > - Original Message - > > This breaks the SCons build, which parses > > src/glsl/Makefile.sources, > > and can't understand "$(GLSL_SRCDIR)/" as it only supports a simple > > subset of Make syntax. > > > > Is there some other way to achieve this effect, withou

Re: [Mesa-dev] [PATCH 00/11] docs: html cleanup

2012-06-11 Thread Andreas Boll
2012/6/11 Brian Paul : > On 06/10/2012 04:57 AM, Andreas Boll wrote: >> >> Hi, >> >> the following patch series is the first part of cleaning up docs/. >> >> Please review and commit. > Please commit/push. I don't have commit access. > > I'm not an HTML expert but these look ok to me.  Can you co

[Mesa-dev] [Bug 50976] Fails to build with error: git_sha1.h: No such file or directory

2012-06-11 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=50976 Darxus changed: What|Removed |Added CC||dar...@chaosreigns.com -- Configure bugmail: h

[Mesa-dev] [Bug 50976] New: Fails to build with error: git_sha1.h: No such file or directory

2012-06-11 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=50976 Bug #: 50976 Summary: Fails to build with error: git_sha1.h: No such file or directory Classification: Unclassified Product: Mesa Version: git Platform: Other

Re: [Mesa-dev] Mesa (master): automake: Add a prefix variable for libglsl sources.

2012-06-11 Thread Jose Fonseca
- Original Message - > This breaks the SCons build, which parses src/glsl/Makefile.sources, > and can't understand "$(GLSL_SRCDIR)/" as it only supports a simple > subset of Make syntax. > > Is there some other way to achieve this effect, without changing > src/glsl/Makefile.sources? Actu

Re: [Mesa-dev] [PATCH] mesa: Check for a negative "size" parameter in glCopyBufferSubData().

2012-06-11 Thread Ian Romanick
On 06/08/2012 10:18 PM, Kenneth Graunke wrote: From the GL_ARB_copy_buffer spec: "An INVALID_VALUE error is generated if any of readoffset, writeoffset, or size are negative [...]" Fixes oglconform's copybuffer/negative.CNNegativeValues test. Signed-off-by: Kenneth Graunke Reviewed-by: Ian

Re: [Mesa-dev] Mesa (master): automake: Add a prefix variable for libglsl sources.

2012-06-11 Thread Jose Fonseca
This breaks the SCons build, which parses src/glsl/Makefile.sources, and can't understand "$(GLSL_SRCDIR)/" as it only supports a simple subset of Make syntax. Is there some other way to achieve this effect, without changing src/glsl/Makefile.sources? Jose - Original Message - > Module

Re: [Mesa-dev] [PATCH 00/11] docs: html cleanup

2012-06-11 Thread Brian Paul
On 06/10/2012 04:57 AM, Andreas Boll wrote: Hi, the following patch series is the first part of cleaning up docs/. Please review and commit. I'm not an HTML expert but these look ok to me. Can you commit/push or should I? Q: are lower-case html tags recommended or the usual convention or

Re: [Mesa-dev] [PATCH] mesa: implement glTexImage as glTexSubImage when possible

2012-06-11 Thread Brian Paul
On 06/10/2012 11:42 PM, Eric Anholt wrote: On Fri, 8 Jun 2012 14:31:52 -0600, Brian Paul wrote: I've now seen a couple apps that replace a whole texture image with a glTexImage() call instead of glTexSubImage(). The later is better because we can skip freeing/allocating texture memory. This

Re: [Mesa-dev] [PATCH 1/3] meta: Don't alter fragment color clamp in DrawPixels().

2012-06-11 Thread Eric Anholt
On Sat, 9 Jun 2012 02:33:20 -0700, Kenneth Graunke wrote: > DrawPixels uses the MESA_META_CLAMP_FRAGMENT_COLOR flag to save/restore > the fragment color clamp mode. This is unnecessary since it never > alters it. It's also harmful: when the clamp mode is GL_FIXED_ONLY, > setting this flag caus

Re: [Mesa-dev] [PATCH 17/21] mesa/samplerobj: Allow meta module to call sampler functions

2012-06-11 Thread Brian Paul
On 06/11/2012 12:59 AM, Pauli Nieminen wrote: To allow meta module to use sample objects mesa GL functions need to be visible and linkable for meta module. Signed-off-by: Pauli Nieminen --- src/mesa/main/samplerobj.c |8 src/mesa/main/samplerobj.h | 11 +++ 2 files cha

Re: [Mesa-dev] [PATCH 3/3] i965: Support MESA_FORMAT_SIGNED_RGBA_16.

2012-06-11 Thread Eric Anholt
On Sat, 9 Jun 2012 02:33:22 -0700, Kenneth Graunke wrote: > The hardware supports this format with no known quirks, so we may as > well enable it. > > Alpha blending is not supported until Sandybridge, but as far as I can > tell, OpenGL doesn't require alpha blending on SNORM formats. Plus, we

Re: [Mesa-dev] [PATCH 16/21] swrast: Support sampler object for texture fetching state

2012-06-11 Thread Brian Paul
On 06/11/2012 12:59 AM, Pauli Nieminen wrote: swrast needs to pass sampler object into all texture fetching functions to use correct sampling state when sampler object is bound to the unit. The changes were made using half manual regular expression replace. With the patch llvmpipe didn't get any

Re: [Mesa-dev] [PATCH 15/21] mesa: Make ARB_sampler_objects mandator

2012-06-11 Thread Brian Paul
s/mandator/mandatory/ Reviewed-by: Brian Paul On 06/11/2012 12:59 AM, Pauli Nieminen wrote: To allow meta acceleration operations to use sampler objects the ARB_sampler_objects extension needs to be mandator for all drivers. Because the extension doesn't have any hardware dependencies it is t

Re: [Mesa-dev] [PATCH] mesa: Unbind GL_TEXTURE_BUFFER on DeleteBuffers.

2012-06-11 Thread Eric Anholt
On Sat, 9 Jun 2012 21:48:26 -0700, Kenneth Graunke wrote: > Fixes oglconform's tbo/basic.buffer.delete test. Reviewed-by: Eric Anholt pgps5cX7D6pB5.pgp Description: PGP signature ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists

Re: [Mesa-dev] [PATCH 07/21] mesa/samplerobj: Support EXT_texture_sRGB_decode

2012-06-11 Thread Brian Paul
On 06/11/2012 12:59 AM, Pauli Nieminen wrote: sRGBDecode state is part of sampler object state but mesa was missing handlers to access the state. This patch adds the support for required state changes and queries. GL_EXT_texture_sRGB_decode issue 4: "4) Should we add forward-looking support for

Re: [Mesa-dev] [PATCH 14/21] mesa/program: Use sampler object state if present

2012-06-11 Thread Brian Paul
On 06/11/2012 12:59 AM, Pauli Nieminen wrote: CompareFailValue is part of Sampler state that needs to be read from bound sampler object if present. Signed-off-by: Pauli Nieminen --- src/mesa/program/prog_statevars.c |5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sr

Re: [Mesa-dev] [PATCH 13/21] mesa/ff_shader: Fix sampler state reading

2012-06-11 Thread Brian Paul
On 06/11/2012 12:59 AM, Pauli Nieminen wrote: Fixed function fragment shader generator was incorrectly read texture sampling state directly from texture object. To make sure that ARB_sampler_object works correctly shader generator has to use the bound sampler if one exist Signed-off-by: Pauli Ni

Re: [Mesa-dev] [PATCH 11/21] radeon&r200: Add support for ARB_shader_object

2012-06-11 Thread Brian Paul
On 06/11/2012 12:59 AM, Pauli Nieminen wrote: Preparation for the mandator support of ARB_shader_object. I have tested this patch with rv280 only. While only compile testing radeon changes. Signed-off-by: Pauli Nieminen --- src/mesa/drivers/dri/r200/r200_tex.c | 41 -

Re: [Mesa-dev] [PATCH] mesa: Make glPrimitiveRestartIndex execute immediately in display lists.

2012-06-11 Thread Eric Anholt
On Sat, 9 Jun 2012 18:12:34 -0700, Kenneth Graunke wrote: > From the GL_NV_primitive_restart spec: > "PrimitiveRestartIndexNV is not compiled into display lists, but is > executed immediately." > > Prior to this patch, calls to glPrimitiveRestartIndex would hit the noop > dispatch stub. Revie

Re: [Mesa-dev] [PATCH 10/21] radeon: Fix printf format not to warn in 64bit

2012-06-11 Thread Brian Paul
On 06/11/2012 12:59 AM, Pauli Nieminen wrote: When I build tested radeon changes I noticed two warnings about format size missmatch in 64bit. I decided to clean them to make relevant compiler warnings easier to spot. Signed-off-by: Pauli Nieminen --- src/mesa/drivers/dri/radeon/radeon_blit.c |

Re: [Mesa-dev] [PATCH 09/21] nouveau: Add support for ARB_sampler_object

2012-06-11 Thread Brian Paul
On 06/11/2012 12:59 AM, Pauli Nieminen wrote: ARB_sampler_object is very simple software only extension to support. I want to make it mandator extension for Mesa drivers to allow meta module to use it. This patch add support for the extension to nouveau. It is completely untested search and repl

Re: [Mesa-dev] [PATCH 08/21] mesa/samplerobj: Avoid crash in sampler query if texture unit is disabled

2012-06-11 Thread Brian Paul
On 06/11/2012 12:59 AM, Pauli Nieminen wrote: Sampler queries are so far made only for enabled texture unit. But if any code would query sampler before checking texture unit state that would result to NULL deference. Making the inline helper easier to use with NULL check makes a lot sense becaus

Re: [Mesa-dev] Mesa (master): mesa: Fix "glCopyBuffserSubData" typos in error messages and comments.

2012-06-11 Thread Brian Paul
On 06/08/2012 11:07 PM, Kenneth Graunke wrote: Module: Mesa Branch: master Commit: 306c9f0c5762ad75e340d22b2405ac11e74d3378 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=306c9f0c5762ad75e340d22b2405ac11e74d3378 Author: Kenneth Graunke Date: Fri Jun 8 22:03:50 2012 -0700 mesa: Fix

Re: [Mesa-dev] [PATCH] mesa: Unbind GL_TEXTURE_BUFFER on DeleteBuffers.

2012-06-11 Thread Brian Paul
On 06/09/2012 10:48 PM, Kenneth Graunke wrote: Fixes oglconform's tbo/basic.buffer.delete test. Signed-off-by: Kenneth Graunke --- src/mesa/main/bufferobj.c |4 1 file changed, 4 insertions(+) diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c index 846260d..332af3d

Re: [Mesa-dev] [PATCH] mesa: Make glPrimitiveRestartIndex execute immediately in display lists.

2012-06-11 Thread Brian Paul
On 06/09/2012 07:12 PM, Kenneth Graunke wrote: From the GL_NV_primitive_restart spec: "PrimitiveRestartIndexNV is not compiled into display lists, but is executed immediately." Prior to this patch, calls to glPrimitiveRestartIndex would hit the noop dispatch stub. +2 oglconforms. Signed-off

Re: [Mesa-dev] [PATCH 06/21] mesa/macros: Add ARRAY_SIZE helper macro core mesa

2012-06-11 Thread Brian Paul
On 06/11/2012 12:59 AM, Pauli Nieminen wrote: The ARRAY_SIZE macro is usefull helper that is used already in many parts of core. But mesa core was missing it. I decided to add it to the macros.h when I wanted to use it in following patch. Signed-off-by: Pauli Nieminen --- src/mesa/drivers/dri/

Re: [Mesa-dev] [PATCH 05/21] mesa: Move DepthMode to texture object

2012-06-11 Thread Brian Paul
One comment below. On 06/11/2012 12:59 AM, Pauli Nieminen wrote: GL_DEPTH_TEXTURE_MODE isn't meant to be part of sampler state based on compatibility profile specifications. OpenGL specification 4.1 compatibility 20100725 3.9.2: "... The values accepted in the pname parameter are TEXTURE_WRAP_S

Re: [Mesa-dev] [PATCH 02/21] mesa: Remove unnecessary parameters from TexImage

2012-06-11 Thread Brian Paul
On 06/11/2012 12:59 AM, Pauli Nieminen wrote: gl_texture_image structure always holds size and internal format before TexImage driver hook is called. Those passing same information in function parameters only duplicates information making the interface harder to understand. Signed-off-by: Pauli

Re: [Mesa-dev] [PATCH 02/21] mesa: Check index buffer offset in DrawElements

2012-06-11 Thread Brian Paul
On 06/11/2012 12:59 AM, Pauli Nieminen wrote: DrawElements checks for cound beeing larger than index buffer object. "count being" But application can specify offset to buffer leading to buffer overflow again. ARB_vertex_buffer_object leaves the case undefined but allows program termination.

Re: [Mesa-dev] [PATCH 01/21] mesa/format_unpack: Fix YCBCR unpack

2012-06-11 Thread Brian Paul
On 06/11/2012 12:59 AM, Pauli Nieminen wrote: The YCBCR unpack was reading one RGBA value from 4 bytes of YCBCR texture. But single pixel is only 2 bytes in the format. After noticing that error Ville told me that second chroma sample has to be average to match video requirements. Looking at pla

Re: [Mesa-dev] [PATCH 16/21] swrast: Support sampler object for texture fetching state

2012-06-11 Thread Marek Olšák
On Mon, Jun 11, 2012 at 8:59 AM, Pauli Nieminen wrote: > swrast needs to pass sampler object into all texture fetching functions > to use correct sampling state when sampler object is bound to the unit. > The changes were made using half manual regular expression replace. > > With the patch llvmpi

Re: [Mesa-dev] [PATCH] configure.ac: Add --with-(gl|glu|osmesa)-lib-name options

2012-06-11 Thread Brad King
On 06/05/2012 02:03 PM, Kenneth Graunke wrote: > On 06/05/2012 10:59 AM, Brad King wrote: >>> ./autogen.sh --with-gl-lib-name=GL --with-glu-lib-name=GLU >>> --with-osmesa-lib-name=OSMesa ... >> >> That looks cleaner to me. Here is a patch for it. > > Reviewed-by: Kenneth Graunke > > If there ar

Re: [Mesa-dev] [PATCH 0/2] Add vertex id to llvmpipe.

2012-06-11 Thread Jose Fonseca
- Original Message - > On Fri, Jun 08, 2012 at 09:01:42AM -0700, Jose Fonseca wrote: > > Oliver, > > > > There will be other system values in the future, so instead of > > passing every value as a different parameter, please define a > > structure in src/gallium/auxiliary/gallivm/lp_bld_

Re: [Mesa-dev] [PATCH] r600g: cache shader variants instead of rebuilding v2

2012-06-11 Thread Vadim Girlin
On Sun, 2012-06-10 at 21:45 +0400, Vadim Girlin wrote: > On Sun, 2012-06-10 at 10:27 +0200, Christian König wrote: > > On 10.06.2012 04:07, Vadim Girlin wrote: > > > Shader variants are stored in the list, the key for lookup is based on the > > > states that require different hw shaders - currently

[Mesa-dev] [PATCH 18/21] meta: Use sampler object for mipmap generation

2012-06-11 Thread Pauli Nieminen
Sampler objects are perfect for meta operations.Sampler object is separate state object that shadows the sampling state in texture object. With sampler object mipmap can maintain same sampling state for all subsequent generation requests. Signed-off-by: Pauli Nieminen --- src/mesa/drivers/common

[Mesa-dev] [PATCH 20/21] meta: Add sampler object to texture decompression

2012-06-11 Thread Pauli Nieminen
Sampler objects can be used to shadow texture object state without modifying original application state. Decompression path feels a bit like path where caching shouldn't happen. But as everything else is cached already I decided to cache sampler state too. Signed-off-by: Pauli Nieminen --- src/m

[Mesa-dev] [PATCH 00/21] ARB_sampler_object fixes and minor clean up

2012-06-11 Thread Pauli Nieminen
I noticed following issues when I was reading texture management code in mesa core. The first ycbcr unpack patch might be actually fixing deadcode. But I don't know yet enough about unpack code to know for sure. But at least glGetTexImage has special case get_tex_ycbcr. Following TexImage changes

[Mesa-dev] [PATCH 21/21] meta: Use sampler object in framebuffer blit

2012-06-11 Thread Pauli Nieminen
Framebuffer blit needs to setup texture sampling to match application requested blit operation. Sampler object can be used to avoid changes to texture object. But caching sampler object doesn't make much sense when we need to synamically change it based on filtering parameters. Signed-off-by: Paul

[Mesa-dev] [PATCH 09/21] nouveau: Add support for ARB_sampler_object

2012-06-11 Thread Pauli Nieminen
ARB_sampler_object is very simple software only extension to support. I want to make it mandator extension for Mesa drivers to allow meta module to use it. This patch add support for the extension to nouveau. It is completely untested search and replace patch. I hope someone with old NV hardware c

[Mesa-dev] [PATCH 15/21] mesa: Make ARB_sampler_objects mandator

2012-06-11 Thread Pauli Nieminen
To allow meta acceleration operations to use sampler objects the ARB_sampler_objects extension needs to be mandator for all drivers. Because the extension doesn't have any hardware dependencies it is trivial to implement. Signed-off-by: Pauli Nieminen --- src/mesa/drivers/dri/intel/intel_extensi

[Mesa-dev] [PATCH 17/21] mesa/samplerobj: Allow meta module to call sampler functions

2012-06-11 Thread Pauli Nieminen
To allow meta module to use sample objects mesa GL functions need to be visible and linkable for meta module. Signed-off-by: Pauli Nieminen --- src/mesa/main/samplerobj.c |8 src/mesa/main/samplerobj.h | 11 +++ 2 files changed, 15 insertions(+), 4 deletions(-) diff --git

[Mesa-dev] [PATCH 14/21] mesa/program: Use sampler object state if present

2012-06-11 Thread Pauli Nieminen
CompareFailValue is part of Sampler state that needs to be read from bound sampler object if present. Signed-off-by: Pauli Nieminen --- src/mesa/program/prog_statevars.c |5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/mesa/program/prog_statevars.c b/src/mesa/progr

[Mesa-dev] [PATCH 11/21] radeon: Fix printf format not to warn in 64bit

2012-06-11 Thread Pauli Nieminen
When I build tested radeon changes I noticed two warnings about format size missmatch in 64bit. I decided to clean them to make relevant compiler warnings easier to spot. Signed-off-by: Pauli Nieminen CC: xorg-driver-...@lists.x.org --- src/mesa/drivers/dri/radeon/radeon_blit.c |4 ++-- 1 fi

[Mesa-dev] [PATCH 11/21] radeon&r200: Add support for ARB_shader_object

2012-06-11 Thread Pauli Nieminen
Preparation for the mandator support of ARB_shader_object. I have tested this patch with rv280 only. While only compile testing radeon changes. Signed-off-by: Pauli Nieminen --- src/mesa/drivers/dri/r200/r200_tex.c | 41 -- src/mesa/drivers/dri/r200/r200_tex.h

[Mesa-dev] [PATCH 10/21] nouveau: Add support for ARB_sampler_object

2012-06-11 Thread Pauli Nieminen
ARB_sampler_object is very simple software only extension to support. I want to make it mandator extension for Mesa drivers to allow meta module to use it. This patch add support for the extension to nouveau. It is completely untested search and replace patch. I hope someone with old NV hardware c

[Mesa-dev] [PATCH 13/21] mesa/ff_shader: Fix sampler state reading

2012-06-11 Thread Pauli Nieminen
Fixed function fragment shader generator was incorrectly read texture sampling state directly from texture object. To make sure that ARB_sampler_object works correctly shader generator has to use the bound sampler if one exist Signed-off-by: Pauli Nieminen --- src/mesa/main/ff_fragment_shader.cp

[Mesa-dev] [PATCH 12/21] radeon&r200: Add support for ARB_shader_object

2012-06-11 Thread Pauli Nieminen
Preparation for the mandator support of ARB_shader_object. I have tested this patch with rv280 only. While only compile testing radeon changes. Does someone want to run piglit tests for radeon too? Signed-off-by: Pauli Nieminen CC: xorg-driver-...@lists.x.org --- src/mesa/drivers/dri/r200/r200_

[Mesa-dev] [PATCH 19/21] meta: texture rectangle textures may not have mipmaps

2012-06-11 Thread Pauli Nieminen
Avoid INVALID_OPERATION error if decompressing rectangle texture. Setting mipmap level limits for those textures is error that must not be hit by meta code to mislead user. Signed-off-by: Pauli Nieminen --- src/mesa/drivers/common/meta.c |6 -- 1 file changed, 4 insertions(+), 2 deletion

[Mesa-dev] [PATCH 09/21] mesa/samplerobj: Avoid crash in sampler query if texture unit is disabled

2012-06-11 Thread Pauli Nieminen
Sampler queries are so far made only for enabled texture unit. But if any code would query sampler before checking texture unit state that would result to NULL deference. Making the inline helper easier to use with NULL check makes a lot sense because compiler is likely to combine the checks for t

[Mesa-dev] [PATCH 10/21] radeon: Fix printf format not to warn in 64bit

2012-06-11 Thread Pauli Nieminen
When I build tested radeon changes I noticed two warnings about format size missmatch in 64bit. I decided to clean them to make relevant compiler warnings easier to spot. Signed-off-by: Pauli Nieminen --- src/mesa/drivers/dri/radeon/radeon_blit.c |4 ++-- 1 file changed, 2 insertions(+), 2 d

[Mesa-dev] [PATCH 05/21] mesa: Move DepthMode to texture object

2012-06-11 Thread Pauli Nieminen
GL_DEPTH_TEXTURE_MODE isn't meant to be part of sampler state based on compatibility profile specifications. OpenGL specification 4.1 compatibility 20100725 3.9.2: "... The values accepted in the pname parameter are TEXTURE_WRAP_S, TEXTURE_WRAP_T, TEXTURE_WRAP_R, TEXTURE_MIN_- FILTER, TEXTURE_MAG_

[Mesa-dev] [PATCH 08/21] mesa/samplerobj: Support EXT_texture_sRGB_decode

2012-06-11 Thread Pauli Nieminen
sRGBDecode state is part of sampler object state but mesa was missing handlers to access the state. This patch adds the support for required state changes and queries. GL_EXT_texture_sRGB_decode issue 4: "4) Should we add forward-looking support for ARB_sampler_objects? RESOLVED: YES

[Mesa-dev] [PATCH 04/21] mesa: Remove unnecessary parameters from AllocTextureImageBuffer

2012-06-11 Thread Pauli Nieminen
Size and format information is always stored in gl_texture_image structure. That makes it preferable to remove duplicate information from parameters to make interface easier to understand. Signed-off-by: Pauli Nieminen --- src/mesa/drivers/dri/intel/intel_tex.c | 10 +++ src/mesa/dri

[Mesa-dev] [PATCH 12/21] mesa: Check index buffer offset in DrawElements

2012-06-11 Thread Pauli Nieminen
DrawElements checks for cound beeing larger than index buffer object. But application can specify offset to buffer leading to buffer overflow again. ARB_vertex_buffer_object leaves the case undefined but allows program termination. But if we do check the index buffer size it makes sense to check i

[Mesa-dev] [PATCH 06/21] mesa: Move DepthMode to texture object

2012-06-11 Thread Pauli Nieminen
GL_DEPTH_TEXTURE_MODE isn't meant to be part of sampler state based on compatibility profile specifications. OpenGL specification 4.1 compatibility 20100725 3.9.2: "... The values accepted in the pname parameter are TEXTURE_WRAP_S, TEXTURE_WRAP_T, TEXTURE_WRAP_R, TEXTURE_MIN_- FILTER, TEXTURE_MAG_

[Mesa-dev] [PATCH 07/21] mesa/samplerobj: Support EXT_texture_sRGB_decode

2012-06-11 Thread Pauli Nieminen
sRGBDecode state is part of sampler object state but mesa was missing handlers to access the state. This patch adds the support for required state changes and queries. GL_EXT_texture_sRGB_decode issue 4: "4) Should we add forward-looking support for ARB_sampler_objects? RESOLVED: YES

[Mesa-dev] [PATCH 08/21] mesa/samplerobj: Avoid crash in sampler query if texture unit is disabled

2012-06-11 Thread Pauli Nieminen
Sampler queries are so far made only for enabled texture unit. But if any code would query sampler before checking texture unit state that would result to NULL deference. Making the inline helper easier to use with NULL check makes a lot sense because compiler is likely to combine the checks for t

[Mesa-dev] [PATCH 05/21] mesa: Remove unnecessary parameters CompressedTexImage

2012-06-11 Thread Pauli Nieminen
In tune with previous patches. Again there is duplication of information in function parameters that is good to remove. Signed-off-by: Pauli Nieminen --- src/mesa/drivers/dri/nouveau/nouveau_texture.c |2 -- src/mesa/main/dd.h |3 --- src/mesa/main/teximage.c

[Mesa-dev] [PATCH 06/21] mesa/macros: Add ARRAY_SIZE helper macro core mesa

2012-06-11 Thread Pauli Nieminen
The ARRAY_SIZE macro is usefull helper that is used already in many parts of core. But mesa core was missing it. I decided to add it to the macros.h when I wanted to use it in following patch. Signed-off-by: Pauli Nieminen --- src/mesa/drivers/dri/intel/intel_context.h |3 +-- src/mesa/driv

[Mesa-dev] [PATCH 03/21] mesa: Remove unnecessary parameters from TexImage

2012-06-11 Thread Pauli Nieminen
gl_texture_image structure always holds size and internal format before TexImage driver hook is called. Those passing same information in function parameters only duplicates information making the interface harder to understand. Signed-off-by: Pauli Nieminen --- src/mesa/drivers/dri/intel/intel_

[Mesa-dev] [PATCH 07/21] mesa/macros: Add ARRAY_SIZE helper macro core mesa

2012-06-11 Thread Pauli Nieminen
The ARRAY_SIZE macro is usefull helper that is used already in many parts of core. But mesa core was missing it. I decided to add it to the macros.h when I wanted to use it in following patch. Signed-off-by: Pauli Nieminen --- src/mesa/drivers/dri/intel/intel_context.h |3 +-- src/mesa/driv

[Mesa-dev] [PATCH 04/21] mesa: Remove unnecessary parameters CompressedTexImage

2012-06-11 Thread Pauli Nieminen
In tune with previous patches. Again there is duplication of information in function parameters that is good to remove. Signed-off-by: Pauli Nieminen --- src/mesa/drivers/dri/nouveau/nouveau_texture.c |2 -- src/mesa/main/dd.h |3 --- src/mesa/main/teximage.c

[Mesa-dev] [PATCH 03/21] mesa: Remove unnecessary parameters from AllocTextureImageBuffer

2012-06-11 Thread Pauli Nieminen
Size and format information is always stored in gl_texture_image structure. That makes it preferable to remove duplicate information from parameters to make interface easier to understand. Signed-off-by: Pauli Nieminen --- src/mesa/drivers/dri/intel/intel_tex.c | 10 +++ src/mesa/dri

[Mesa-dev] [PATCH 02/21] mesa: Remove unnecessary parameters from TexImage

2012-06-11 Thread Pauli Nieminen
gl_texture_image structure always holds size and internal format before TexImage driver hook is called. Those passing same information in function parameters only duplicates information making the interface harder to understand. Signed-off-by: Pauli Nieminen --- src/mesa/drivers/dri/intel/intel_

[Mesa-dev] [PATCH 01/21] mesa/format_unpack: Fix YCBCR unpack

2012-06-11 Thread Pauli Nieminen
The YCBCR unpack was reading one RGBA value from 4 bytes of YCBCR texture. But single pixel is only 2 bytes in the format. After noticing that error Ville told me that second chroma sample has to be average to match video requirements. Looking at places where unpack to rgba is called it is possibl

[Mesa-dev] [PATCH 00/21] ARB_sampler_object fixes and minor clean up

2012-06-11 Thread Pauli Nieminen
I noticed following issues when I was reading texture management code in mesa core. The first ycbcr unpack patch might be actually fixing deadcode. But I don't know yet enough about unpack code to know for sure. But at least glGetTexImage has special case get_tex_ycbcr. I also noticed size check