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

2012-06-10 Thread Pauli Nieminen
tions don't know the actual address of the buffer object and only provide an offset, they can't ever guarantee that out-of-bounds offsets will fall on valid memory. So it's hard to do any better than this." Signed-off-by: Pauli Nieminen --- src/mesa/m

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

2012-06-11 Thread Pauli Nieminen
i965 (ILK), llvm pipe and r200. Nouveau changes would still need testing and check from Nouveau developers to verify that sampler state gets uploaded when when a new sampler object is bound. Piglit ARB_sampler_object test should be enough to verify that. Pauli Nieminen (21): mesa/format_unpack:

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

2012-06-11 Thread Pauli Nieminen
ff-by: Pauli Nieminen --- src/mesa/main/format_unpack.c | 102 ++--- 1 file changed, 66 insertions(+), 36 deletions(-) diff --git a/src/mesa/main/format_unpack.c b/src/mesa/main/format_unpack.c index c42bac1..feac558 100644 --- a/src/mesa/main/format_unpack.c

[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

[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

[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 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

[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

[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

[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 08/21] mesa/samplerobj: Avoid crash in sampler query if texture unit is disabled

2012-06-11 Thread Pauli Nieminen
the current texture. Signed-off-by: Pauli Nieminen --- src/mesa/main/samplerobj.h |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mesa/main/samplerobj.h b/src/mesa/main/samplerobj.h index 0bfda43..33da894 100644 --- a/src/mesa/main/samplerobj.h +++ b/src/mesa/main

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

2012-06-11 Thread Pauli Nieminen
: YES If ARB_sampler_objects exists in the implementation, the sampler objects should also include this parameter per sampler." Signed-off-by: Pauli Nieminen --- src/mesa/main/samplerobj.c | 56 1 file changed, 56 insertions(+) di

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

2012-06-11 Thread Pauli Nieminen
ure object." Same can be found from 3.3 compatibility specification. That makes me think that moving DepthMode from sampler state makes sense to avoid bugs if DepthMode happens to be used with sampler objects. Signed-off-by: Pauli Nieminen --- src/mesa/drivers/dri/i915/i915_texstate.c

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

2012-06-11 Thread Pauli Nieminen
tical. Since applications don't know the actual address of the buffer object and only provide an offset, they can't ever guarantee that out-of-bounds offsets will fall on valid memory. So it's hard to do any better than this." Signed-off-by: Pauli Nie

[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

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

2012-06-11 Thread Pauli Nieminen
: YES If ARB_sampler_objects exists in the implementation, the sampler objects should also include this parameter per sampler." Signed-off-by: Pauli Nieminen --- src/mesa/main/samplerobj.c | 56 1 file changed, 56 insertions(+) di

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

2012-06-11 Thread Pauli Nieminen
ure object." Same can be found from 3.3 compatibility specification. That makes me think that moving DepthMode from sampler state makes sense to avoid bugs if DepthMode happens to be used with sampler objects. Signed-off-by: Pauli Nieminen --- src/mesa/drivers/dri/i915/i915_texstate.c

[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

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

2012-06-11 Thread Pauli Nieminen
the current texture. Signed-off-by: Pauli Nieminen --- src/mesa/main/samplerobj.h |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mesa/main/samplerobj.h b/src/mesa/main/samplerobj.h index 0bfda43..33da894 100644 --- a/src/mesa/main/samplerobj.h +++ b/src/mesa/main

[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

[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

[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

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

2012-06-11 Thread Pauli Nieminen
could give a try that there is no regressions and ARB_sampler_object tests passes. Signed-off-by: Pauli Nieminen CC: nouv...@lists.freedesktop.org --- src/mesa/drivers/dri/nouveau/nv04_state_tex.c | 22 -- src/mesa/drivers/dri/nouveau/nv10_state_tex.c | 23

[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 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

[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

[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

[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/

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

2012-06-11 Thread Pauli Nieminen
could give a try that there is no regressions and ARB_sampler_object tests passes. Signed-off-by: Pauli Nieminen CC: nouv...@lists.freedesktop.org --- src/mesa/drivers/dri/nouveau/nv04_state_tex.c | 22 -- src/mesa/drivers/dri/nouveau/nv10_state_tex.c | 23

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

2012-06-11 Thread Pauli Nieminen
ff-by: Pauli Nieminen --- src/mesa/drivers/common/meta.c | 31 ++- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c index 83ae3d9..14e177b 100644 --- a/src/mesa/drivers/common/meta.c +++ b/src

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

2012-06-11 Thread Pauli Nieminen
elopers to verify that sampler state gets uploaded when when a new sampler object is bound. Piglit ARB_sampler_object test should be enough to verify that. Pauli Nieminen (21): mesa/format_unpack: Fix YCBCR unpack mesa: Remove unnecessary parameters from TexImage mesa: Remove unnecessary param

[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 ---

[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

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

2012-06-12 Thread Pauli Nieminen
tical. Since applications don't know the actual address of the buffer object and only provide an offset, they can't ever guarantee that out-of-bounds offsets will fall on valid memory. So it's hard to do any better than this." Signed-off-by: Pauli Nie

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

2012-06-12 Thread Pauli Nieminen
to the end of chroma pair * Unpack two RGB values in single iteration * Read next chroma pair (if available) to calculate average for second sample. * Refactor shared color space conversion code to separate function. Signed-off-by: Pauli Nieminen Reviewed-by: Brian Paul --- src/mesa/main

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

2012-06-12 Thread Pauli Nieminen
d for XGetImage call which is made to update front buffer. I don't know where we should make sure that window mapping has completed before accessing front buffer. I also made nouveau to revalidate all texture units if there is sampler bound to the unit if texture state is marked dirty. Paul

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

2012-06-12 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 Reviewed-by: Brian Paul --- src

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

2012-06-12 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 Reviewed-by: Brian Paul --- src/mesa/drivers/dri/intel/intel_tex.c

[Mesa-dev] [PATCH v2 09/21] mesa/samplerobj: Set state dirty in bind if state is shared

2012-06-12 Thread Pauli Nieminen
in the current context." Signed-off-by: Pauli Nieminen --- src/mesa/main/samplerobj.c | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/mesa/main/samplerobj.c b/src/mesa/main/samplerobj.c index f276296..fdd50ed 100644 --- a/src/mesa/main/samplerobj.c

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

2012-06-12 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 Reviewed-by: Brian Paul --- src/mesa/drivers/dri/nouveau/nouveau_texture.c |2 -- src/mesa/main/dd.h |3

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

2012-06-12 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 Reviewed-by: Brian Paul --- src/mesa/program/prog_statevars.c |5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/mesa/program

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

2012-06-12 Thread Pauli Nieminen
ure object." The list of states is in Table 6.24 "Textures (state per texture object)" instead of 6.25 mentioned in the specification text. Same can be found from 3.3 compatibility specification. Signed-off-by: Pauli Nieminen Reviewed-by: Brian Paul Reviewed-by: Eric Anholt ---

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

2012-06-12 Thread Pauli Nieminen
the current texture. Signed-off-by: Pauli Nieminen Reviewed-by: Brian Paul --- src/mesa/main/samplerobj.h |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mesa/main/samplerobj.h b/src/mesa/main/samplerobj.h index 0bfda43..33da894 100644 --- a/src/mesa/main

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

2012-06-12 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 Reviewed-by: Brian Paul --- src/mesa/drivers/dri/radeon/radeon_blit.c |4 ++-- 1 file

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

2012-06-12 Thread Pauli Nieminen
could give a try that there is no regressions and ARB_sampler_object tests passes. Signed-off-by: Pauli Nieminen --- src/mesa/drivers/dri/nouveau/nouveau_state.c |7 +++ src/mesa/drivers/dri/nouveau/nv04_state_tex.c | 22 -- src/mesa/drivers/dri/nouveau

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

2012-06-12 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 Reviewed-by: Brian Paul --- src/mesa/drivers/dri/r200/r200_tex.c

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

2012-06-12 Thread Pauli Nieminen
ff-by: Pauli Nieminen Reviewed-by: Brian Paul --- src/mesa/drivers/common/meta.c | 31 ++- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c index 83ae3d9..14e177b 100644 --- a/src/mesa/dr

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

2012-06-12 Thread Pauli Nieminen
To allow meta acceleration operations to use sampler objects the ARB_sampler_objects extension needs to be mandatory for all drivers. Because the extension doesn't have any hardware dependencies it is trivial to implement. Signed-off-by: Pauli Nieminen Reviewed-by: Brian Paul --- src

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

2012-06-12 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 Reviewed-by: Brian Paul --- src/mesa/drivers/common/meta.c |6 -- 1 file changed, 4

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

2012-06-12 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 Rev

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

2012-06-12 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 Reviewed-by: Brian Paul

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

2012-06-12 Thread Pauli Nieminen
: YES If ARB_sampler_objects exists in the implementation, the sampler objects should also include this parameter per sampler." Signed-off-by: Pauli Nieminen Reviewed-by: Brian Paul --- src/mesa/main/samplerobj.c | 56 1 file c

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

2012-06-12 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 Reviewed-by: Brian Paul --- src/mesa

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

2012-06-12 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 Reviewed-by: Brian Paul --- src/mesa/main/samplerobj.c |8 src/mesa/main/samplerobj.h | 11 +++ 2 files changed, 15 insertions

Re: [Mesa-dev] glean pointSprite test

2010-04-15 Thread Pauli Nieminen
On Wed, Apr 14, 2010 at 8:01 PM, Keith Whitwell wrote: > On Tue, 2010-04-13 at 23:27 -0700, Dave Airlie wrote: >> So I've finished the r300g point sprite code and this test fails, >> fglrx fails the exact same way. >> >> http://people.freedesktop.org/~airlied/piglit/fglrx/fglrxr500/test_glean__poi