[Mesa-dev] [PATCH] r600g: fixup AR handling (v4)

2012-01-19 Thread Dave Airlie
From: Dave Airlie So it appears R600s (except rv670) do AR handling different using a different opcode. This patch fixes up r600g to work properly on r600. This fixes ~100 piglit tests here (in GLSL1.30 mode) on rv610. v3: add index_mode as per the docs. This still fails any dst relative tests

[Mesa-dev] [PATCH] st/mesa: add fallback pipe formats for (compressed) R, RG formats

2012-01-19 Thread Brian Paul
If we don't find an exact PIPE_FORMAT_x for a GL_(COMPRESSED)_RED/RG format, try uncompressed formats. We were already doing this for the RGB(A) formats. Fixes piglit arb_texture_compression-internal-format-query test. NOTE: This is a candidate for the stable branches. --- configs/default

Re: [Mesa-dev] [PATCH] st/mesa: add fallback pipe formats for (compressed) R, RG formats

2012-01-19 Thread Marek Olšák
On Thu, Jan 19, 2012 at 4:54 PM, Brian Paul wrote: > If we don't find an exact PIPE_FORMAT_x for a GL_(COMPRESSED)_RED/RG format, > try uncompressed formats.  We were already doing this for the RGB(A) formats. > > Fixes piglit arb_texture_compression-internal-format-query test. > > NOTE: This is a

Re: [Mesa-dev] dd_function_table::Clear()

2012-01-19 Thread Dee Sharpe
On 1/18/2012 11:19 AM, Brian Paul wrote: On 01/18/2012 09:01 AM, Dee Sharpe wrote: While implementing Clear() for a platform, which buffers in GLContext need to be cleared out of the list of: DrawBuffer ReadBuffer WinSysDrawBuffer WinSysReadBuffer Or do they all need to be cleared? Clearing

Re: [Mesa-dev] [PATCH] st/mesa: add fallback pipe formats for (compressed) R, RG formats

2012-01-19 Thread Brian Paul
On 01/19/2012 09:55 AM, Marek Olšák wrote: On Thu, Jan 19, 2012 at 4:54 PM, Brian Paul wrote: If we don't find an exact PIPE_FORMAT_x for a GL_(COMPRESSED)_RED/RG format, try uncompressed formats. We were already doing this for the RGB(A) formats. Fixes piglit arb_texture_compression-internal

Re: [Mesa-dev] dd_function_table::Clear()

2012-01-19 Thread Brian Paul
On 01/19/2012 09:58 AM, Dee Sharpe wrote: On 1/18/2012 11:19 AM, Brian Paul wrote: On 01/18/2012 09:01 AM, Dee Sharpe wrote: While implementing Clear() for a platform, which buffers in GLContext need to be cleared out of the list of: DrawBuffer ReadBuffer WinSysDrawBuffer WinSysReadBuffer Or

Re: [Mesa-dev] [PATCH] i965: fix inverted point sprite origin when rendering to FBO

2012-01-19 Thread Ian Romanick
On 01/18/2012 06:30 PM, Yuanhan Liu wrote: When rendering to FBO, rendering is inverted. At the same time, we would also make sure the point sprite origin is inverted. Or, we will get an inverted result correspoinding to rendering to the default winsys FBO. Bugzilla: https://bugs.freedesktop.org

Re: [Mesa-dev] [PATCH] glsl: Fix isinf() for non-C99-compliant compilers.

2012-01-19 Thread Ian Romanick
On 01/18/2012 01:09 PM, Paul Berry wrote: On 18 January 2012 12:43, Jose Fonseca mailto:jfons...@vmware.com>> wrote: Looks good to me. Thanks Should there be a case for -INF while we are at it? I think you can make arguments both for and against. On the one hand, C99 requires strtod

[Mesa-dev] [PATCH] st/mesa: copy num_immediates field when copying the immediates array

2012-01-19 Thread Brian Paul
Two assignments to num_immediates were missing in get_pixel_transfer_visitor() and get_bitmap_visitor(). The uninitialized value led to valgrind errors and crashes in some cases. Added new assertions to catch future problems in this area. Also changed num_immediates to unsigned to avoid signed/un

Re: [Mesa-dev] [PATCH] i965: fix inverted point sprite origin when rendering to FBO

2012-01-19 Thread Brian Paul
On 01/19/2012 10:17 AM, Ian Romanick wrote: On 01/18/2012 06:30 PM, Yuanhan Liu wrote: When rendering to FBO, rendering is inverted. At the same time, we would also make sure the point sprite origin is inverted. Or, we will get an inverted result correspoinding to rendering to the default winsys

Re: [Mesa-dev] [PATCH] st/mesa: copy num_immediates field when copying the immediates array

2012-01-19 Thread Jose Fonseca
I'm not familiar with this code, but looks sensisble to me. Jose - Original Message - > Two assignments to num_immediates were missing in > get_pixel_transfer_visitor() and get_bitmap_visitor(). > The uninitialized value led to valgrind errors and crashes in some > cases. > > Added new a

Re: [Mesa-dev] [PATCH 1/4] glapi: remove non-existent parameter references

2012-01-19 Thread Ian Romanick
On 01/18/2012 09:54 AM, nobled wrote: On Tue, Jan 17, 2012 at 6:10 PM, Brian Paul wrote: On 01/16/2012 04:45 PM, nobled wrote: glGetTexImage, for example, has no width/height/depth parameters. Also, copy some missing parameter info from the original versions of certain functions over to thei

Re: [Mesa-dev] [PATCH 1/7] i965: use AM_CPPFLAGS instead of AM_CFLAGS/CXXFLAGS

2012-01-19 Thread Eric Anholt
On Wed, 18 Jan 2012 13:38:38 -0500, Gaetan Nadon wrote: > On 12-01-18 01:11 PM, Eric Anholt wrote: > > On Tue, 17 Jan 2012 15:58:11 -0500, Matt Turner wrote: > > > > As far as I can tell, the point of AM_CPPFLAGS existing is if you want > > to make a target that separately calls the preprocessor,

Re: [Mesa-dev] [PATCH] i965: fix inverted point sprite origin when rendering to FBO

2012-01-19 Thread Eric Anholt
On Thu, 19 Jan 2012 10:30:53 +0800, Yuanhan Liu wrote: > When rendering to FBO, rendering is inverted. At the same time, we would > also make sure the point sprite origin is inverted. Or, we will get an > inverted result correspoinding to rendering to the default winsys FBO. > > Bugzilla: https:

Re: [Mesa-dev] [PATCH] i965: fix inverted point sprite origin when rendering to FBO

2012-01-19 Thread Ian Romanick
On 01/19/2012 09:32 AM, Brian Paul wrote: On 01/19/2012 10:17 AM, Ian Romanick wrote: On 01/18/2012 06:30 PM, Yuanhan Liu wrote: When rendering to FBO, rendering is inverted. At the same time, we would also make sure the point sprite origin is inverted. Or, we will get an inverted result corres

[Mesa-dev] [PATCH] svga: move svga_texture() casts/calls in svga_surface_copy()

2012-01-19 Thread Brian Paul
To fix failed assertions when calling glCopyBufferSubData(). svga_texture() asserts that the resource is a texture. Simply move the calls to svga_texture() after the code that handles non-texture copies so that we don't call it with non-texture resources. Fixes glean bufferObject failure. NOTE:

Re: [Mesa-dev] [PATCH 4/4] glapi: add GL_ARB_texture_compression_rgtc

2012-01-19 Thread Eric Anholt
On Mon, 16 Jan 2012 18:50:44 -0500, nobled wrote: > Noticed this was missing when writing the "glapi: sort ARB extensions > by number" commit, which at least shows it was effective. > --- > .../glapi/gen/ARB_texture_compression_rgtc.xml | 15 +++ > src/mapi/glapi/gen/Makefile

Re: [Mesa-dev] [PATCH] mesa: Loosen glBlitFramebuffer restrictions on depthstencil buffers (v2)

2012-01-19 Thread Ian Romanick
On 01/18/2012 12:31 PM, Chad Versace wrote: --- snip Supporting Z32 -> Z32_FLOAT is a bad idea. So I've amended the patch to avoid that. --- end snip This loosens the format validation in glBlitFramebuffer. When blitting depth bits, don't require an exact match between the depth formats; onl

Re: [Mesa-dev] dd_function_table::Clear()

2012-01-19 Thread Dee Sharpe
On 1/19/2012 11:07 AM, Brian Paul wrote: No. The _ColorDrawBuffers[] array is indexed by an integer between 0 and _NumColorDrawBuffers-1. The contents of the array is updated by calls to glDrawBuffer() or glDrawBuffersARB(). If you specifically want the front-left buffer you'd use: ctx->Dra

Re: [Mesa-dev] [PATCH] mesa: Loosen glBlitFramebuffer restrictions on depthstencil buffers (v2)

2012-01-19 Thread Christoph Bumiller
On 19.01.2012 19:53, Ian Romanick wrote: > On 01/18/2012 12:31 PM, Chad Versace wrote: >> --- snip >> >> Supporting Z32 -> Z32_FLOAT is a bad idea. So I've amended the patch >> to avoid that. >> >> --- end snip >> >> >> This loosens the format validation in glBlitFramebuffer. When blitting >> dept

Re: [Mesa-dev] [PATCH] svga: move svga_texture() casts/calls in svga_surface_copy()

2012-01-19 Thread Jose Fonseca
Looks good Brian. Jose - Original Message - > To fix failed assertions when calling glCopyBufferSubData(). > > svga_texture() asserts that the resource is a texture. Simply move > the > calls to svga_texture() after the code that handles non-texture > copies > so that we don't call it w

[Mesa-dev] matypes.h

2012-01-19 Thread Dee Sharpe
Hello all, I'm having a problem with trying to create matypes.h. Is there a global enabling variable that needs to be set to ensure that this header is generated when porting to another OS on the X86 platform? -- Dee Sharpe The difference between what IS done & what COULD be done is relati

[Mesa-dev] [PATCH] intel/gen6: Some framebuffers having separate depthstencil should be unsupported

2012-01-19 Thread Chad Versace
When the framebuffer has separate depth and stencil buffers, and HiZ is not enabled on the depth buffer, mark the framebuffer as unsupported. This happens when trying to create a framebuffer with Z16/S8 because we haven't enabled HiZ on Z16 yet. Fixes gles2conform test stencil8. Bugzilla: https:/

Re: [Mesa-dev] [PATCH] i965: fix inverted point sprite origin when rendering to FBO

2012-01-19 Thread Yuanhan Liu
On Thu, Jan 19, 2012 at 09:51:32AM -0800, Eric Anholt wrote: > On Thu, 19 Jan 2012 10:30:53 +0800, Yuanhan Liu > wrote: > > When rendering to FBO, rendering is inverted. At the same time, we would > > also make sure the point sprite origin is inverted. Or, we will get an > > inverted result corre

Re: [Mesa-dev] [PATCH] i965: fix inverted point sprite origin when rendering to FBO

2012-01-19 Thread Yuanhan Liu
On Thu, Jan 19, 2012 at 10:32:30AM -0700, Brian Paul wrote: > On 01/19/2012 10:17 AM, Ian Romanick wrote: > >On 01/18/2012 06:30 PM, Yuanhan Liu wrote: > >>When rendering to FBO, rendering is inverted. At the same time, we > >>would > >>also make sure the point sprite origin is inverted. Or, we wil

[Mesa-dev] [PATCH] i965: fix inverted point sprite origin when rendering to FBO

2012-01-19 Thread Yuanhan Liu
When rendering to FBO, rendering is inverted. At the same time, we would also make sure the point sprite origin is inverted. Or, we will get an inverted result correspoinding to rendering to the default winsys FBO. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=44613 NOTE: This is a candi

[Mesa-dev] [PATCH 1/2] mesa: Make sure _TexEnvProgram points at the current ff fragment program

2012-01-19 Thread Ian Romanick
From: Ian Romanick At least one place, the _mesa_need_secondary_color function in state.h, uses this to make decisions. The next patch in this series will add another dependency. Ideally, this field would go away and be replace by a flag or something. NOTE: This is a candidate for the 8.0 bran

[Mesa-dev] [PATCH 2/2] swrast: Use fixed-function processing if the _TexEnvProgram is empty

2012-01-19 Thread Ian Romanick
From: Ian Romanick This is a hack to work around drivers such as i965 that: - Set _MaintainTexEnvProgram to generate GLSL IR for fixed-function fragment processing. - Don't call _mesa_ir_link_shader to generate Mesa IR from the GLSL IR. - May use swrast to handle glDrawPi

Re: [Mesa-dev] [PATCH] mesa: Loosen glBlitFramebuffer restrictions on depthstencil buffers (v2)

2012-01-19 Thread Ian Romanick
On 01/19/2012 12:12 PM, Christoph Bumiller wrote: On 19.01.2012 19:53, Ian Romanick wrote: On 01/18/2012 12:31 PM, Chad Versace wrote: --- snip Supporting Z32 -> Z32_FLOAT is a bad idea. So I've amended the patch to avoid that. --- end snip This loosens the format validation in glBlitFram

Re: [Mesa-dev] [PATCH] mesa: Loosen glBlitFramebuffer restrictions on depthstencil buffers (v2)

2012-01-19 Thread Eric Anholt
On Thu, 19 Jan 2012 21:12:31 +0100, Christoph Bumiller wrote: > On 19.01.2012 19:53, Ian Romanick wrote: > > On 01/18/2012 12:31 PM, Chad Versace wrote: > >> --- snip > >> > >> Supporting Z32 -> Z32_FLOAT is a bad idea. So I've amended the patch > >> to avoid that. > >> > >> --- end snip > >> >

Re: [Mesa-dev] [PATCH] i965: fix inverted point sprite origin when rendering to FBO

2012-01-19 Thread Ian Romanick
On 01/19/2012 03:48 PM, Yuanhan Liu wrote: When rendering to FBO, rendering is inverted. At the same time, we would also make sure the point sprite origin is inverted. Or, we will get an inverted result correspoinding to rendering to the default winsys FBO. Bugzilla: https://bugs.freedesktop.org

Re: [Mesa-dev] [PATCH] intel/gen6: Some framebuffers having separate depthstencil should be unsupported

2012-01-19 Thread Eric Anholt
On Thu, 19 Jan 2012 15:09:05 -0800, Chad Versace wrote: > When the framebuffer has separate depth and stencil buffers, and HiZ is > not enabled on the depth buffer, mark the framebuffer as unsupported. This > happens when trying to create a framebuffer with Z16/S8 because we haven't > enabled HiZ

[Mesa-dev] [PATCH] i965/vs: Fix bogus assertion in emit_block_move()

2012-01-19 Thread Paul Berry
i965 processes assignments of whole structures using vec4_visitor::emit_block_move, a recursive function which visits each element of a structure or array (to arbitrary nesting depth) and copies it from the source to the destination. Then it increments the source and destination register numbers s

Re: [Mesa-dev] [PATCH 2/2] swrast: Use fixed-function processing if the _TexEnvProgram is empty

2012-01-19 Thread Eric Anholt
On Thu, 19 Jan 2012 17:53:12 -0800, "Ian Romanick" wrote: > From: Ian Romanick > > This is a hack to work around drivers such as i965 that: > > - Set _MaintainTexEnvProgram to generate GLSL IR for > fixed-function fragment processing. > - Don't call _mesa_ir_link_shader to generat

Re: [Mesa-dev] [PATCH] intel/gen6: Some framebuffers having separate depthstencil should be unsupported

2012-01-19 Thread Ian Romanick
On 01/19/2012 03:09 PM, Chad Versace wrote: When the framebuffer has separate depth and stencil buffers, and HiZ is not enabled on the depth buffer, mark the framebuffer as unsupported. This happens when trying to create a framebuffer with Z16/S8 because we haven't enabled HiZ on Z16 yet. Fixes

Re: [Mesa-dev] [PATCH] i965/vs: Fix bogus assertion in emit_block_move()

2012-01-19 Thread Paul Berry
On 19 January 2012 18:28, Paul Berry wrote: > i965 processes assignments of whole structures using > vec4_visitor::emit_block_move, a recursive function which visits each > element of a structure or array (to arbitrary nesting depth) and > copies it from the source to the destination. Then it in

Re: [Mesa-dev] [PATCH] mesa: allocate transform_feedback_info::Outputs array dynamically

2012-01-19 Thread Paul Berry
On 17 January 2012 11:29, Christoph Bumiller wrote: > The nvc0 gallium driver is advertising 128 MAX_INTERLEAVED_COMPS > which made it always assert in the linker when TFB was used since > the Outputs array was smaller than that maximum. > > v2: added assertions > > NOTE: This is a candidate for t

Re: [Mesa-dev] [PATCH] i965: fix inverted point sprite origin when rendering to FBO

2012-01-19 Thread Liu Aleaxander
Thanks for the reviewed-by. Ian, would you please help me to push this patch? I'm on the way to home for chines new year, and I can't access the net(both at home). Thanks advance! -- Yuanhan Liu (Sent by my phone, please forgive the poor format) On Jan 20, 2012 10:25 AM, "Ian Romanick" wrote:

[Mesa-dev] [Bug 38970] [bisected]piglit glx/glx-pixmap-multi failed

2012-01-19 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=38970 fangxun changed: What|Removed |Added Blocks||42993 --- Comment #15 from fangxun 2012-01-19