Re: [Mesa-dev] DRI2 pixmap swapping

2011-12-07 Thread Thomas Hellstrom
On 12/06/2011 07:58 PM, Eric Anholt wrote: On Tue, 6 Dec 2011 16:44:30 +, Dave Airlieairl...@gmail.com wrote: Hi, So GLX has a rule about not swapping pixmaps, and I've been trying to track down why with DRI2 my driver gets requests for swapping pixmaps (piglit glx-swap-pixmap test).

[Mesa-dev] [PATCH] st/dri: Use depth instead of bpp when communicating formats with the X server v3

2011-12-07 Thread Thomas Hellstrom
Some hardware can't reinterpret the format of hardware buffers and thus the X server needs to know the format when the buffer is created. Signed-off-by: Thomas Hellstrom thellst...@vmware.com --- src/gallium/state_trackers/dri/drm/dri2.c | 41 ++-- 1 files changed, 38

Re: [Mesa-dev] [PATCH] st/dri: Use depth instead of bpp when communicating formats with the X server v2

2011-12-07 Thread Thomas Hellstrom
On 12/06/2011 06:51 PM, Brian Paul wrote: Hi Thomas, Just a couple nit-picky things below: OK, sent out a v3. /Thomas On 12/06/2011 10:32 AM, Thomas Hellstrom wrote: Some hardware can't reinterpret the format of hardware buffers and thus the X server needs to know the format when the

Re: [Mesa-dev] [PATCH 08/10] i965 gs: Clean up dodgy register re-use, at the cost of a few MOVs.

2011-12-07 Thread Kenneth Graunke
On 12/05/2011 09:40 AM, Paul Berry wrote: Prior to this patch, in the Gen4 and Gen5 GS, we used GRF 0 (called R0 in the code) as a staging area to prepare the message header for the FF_SYNC and URB_WRITE messages. This cleverly avoided an unnecessary MOV operation (since the initial value of

Re: [Mesa-dev] [PATCH] st/dri: Use depth instead of bpp when communicating formats with the X server v3

2011-12-07 Thread Jakob Bornecrantz
- Original Message - Some hardware can't reinterpret the format of hardware buffers and thus the X server needs to know the format when the buffer is created. Reviewed-by: Jakob Bornecrantz ja...@vmware.com Signed-off-by: Thomas Hellstrom thellst...@vmware.com ---

Re: [Mesa-dev] i965 gen6: Pass-through GS program for future use by transform feedback

2011-12-07 Thread Kenneth Graunke
On 12/05/2011 09:40 AM, Paul Berry wrote: This patch series introduces a geometry shader program for i965 Gen6 (Sandy Bridge) that does nothing--it simply passes vertices through to later stages of the graphics pipeline. This is a preliminary step towards implementing transform feedback,

Re: [Mesa-dev] [PATCH] st/dri: Use depth instead of bpp when communicating formats with the X server v3

2011-12-07 Thread Michel Dänzer
On Mit, 2011-12-07 at 09:30 +0100, Thomas Hellstrom wrote: Some hardware can't reinterpret the format of hardware buffers and thus the X server needs to know the format when the buffer is created. Signed-off-by: Thomas Hellstrom thellst...@vmware.com Reviewed-by: Michel Dänzer

Re: [Mesa-dev] DRI2 pixmap swapping

2011-12-07 Thread Michel Dänzer
On Mit, 2011-12-07 at 08:40 +, Dave Airlie wrote: I have a feeling, since dri2 is not strictly restricted to GLX, whether this should really be implemented in the glx code before calling into dri2? Otoh that would mean the server side would need to be able to handle the case

Re: [Mesa-dev] DRI2 pixmap swapping

2011-12-07 Thread Dave Airlie
2011/12/7 Michel Dänzer mic...@daenzer.net: On Mit, 2011-12-07 at 08:40 +, Dave Airlie wrote: I have a feeling, since dri2 is not strictly restricted to GLX, whether this should really be implemented in the glx code before calling into dri2? Otoh that would mean the server side

Re: [Mesa-dev] DRI2 pixmap swapping

2011-12-07 Thread Michel Dänzer
On Mit, 2011-12-07 at 09:20 +, Dave Airlie wrote: 2011/12/7 Michel Dänzer mic...@daenzer.net: On Mit, 2011-12-07 at 08:40 +, Dave Airlie wrote: I have a feeling, since dri2 is not strictly restricted to GLX, whether this should really be implemented in the glx code

Re: [Mesa-dev] DRI2 pixmap swapping

2011-12-07 Thread Dave Airlie
2011/12/7 Michel Dänzer mic...@daenzer.net: On Mit, 2011-12-07 at 09:20 +, Dave Airlie wrote: 2011/12/7 Michel Dänzer mic...@daenzer.net: On Mit, 2011-12-07 at 08:40 +, Dave Airlie wrote: I have a feeling, since dri2 is not strictly restricted to GLX, whether this should

Re: [Mesa-dev] DRI2 pixmap swapping

2011-12-07 Thread Dave Airlie
Indeed, but fixing it without invasive protocol work may be messy, but I'm not really a GLX or DRI2 expert and its hard to fathom the intentions of DRI2 original authors wrt this GLX case. Also client side fixing is not in any way going to help broken clients that exist in the field now. i.e.

Re: [Mesa-dev] DRI2 pixmap swapping

2011-12-07 Thread Michel Dänzer
On Mit, 2011-12-07 at 09:44 +, Dave Airlie wrote: Indeed, but fixing it without invasive protocol work may be messy, but I'm not really a GLX or DRI2 expert and its hard to fathom the intentions of DRI2 original authors wrt this GLX case. Also client side fixing is not in any way

[Mesa-dev] [PATCH] glx: block attempt to swapbuffer on pixmap.

2011-12-07 Thread Dave Airlie
From: Dave Airlie airl...@redhat.com This keeps track of the creation process and stores a drawable type, it then blocks DRI2 from getting called if the drawable is a pixmap. Suggested by Michel Dänzer mic...@daenzer.net Signed-off-by: Dave Airlie airl...@redhat.com --- src/glx/glx_pbuffer.c |

[Mesa-dev] [PATCH] glx: block attempt to swapbuffer on pixmap. (v2)

2011-12-07 Thread Dave Airlie
From: Dave Airlie airl...@redhat.com This keeps track of the creation process and stores a drawable type, it then blocks DRI2 from getting called if the drawable is a pixmap. v2: check if we have a GLX drawable, which means we aren't a pbuffer, avoid doing flush at all since its meant to be a

Re: [Mesa-dev] [PATCH] glx: block attempt to swapbuffer on pixmap. (v2)

2011-12-07 Thread Michel Dänzer
On Mit, 2011-12-07 at 10:24 +, Dave Airlie wrote: From: Dave Airlie airl...@redhat.com This keeps track of the creation process and stores a drawable type, it then blocks DRI2 from getting called if the drawable is a pixmap. v2: check if we have a GLX drawable, which means we aren't a

[Mesa-dev] [PATCH 2/6 v2] g3dvl: Get rid of video_buffer.sampler_view_components

2011-12-07 Thread Maarten Lankhorst
No point in having it when just having sampler_view_planes is good enough. Signed-off-by: Maarten Lankhorst m.b.lankho...@gmail.com --- Changes since v1: - increase nouveau_video_buffer sampler_view_planes array size to 3, which is the only valid size, since all planes are tested against null

[Mesa-dev] Gallium DRI drivers default GL_READ/WRITE_BUFFER to GL_(BACK|FRONT)_LEFT instead of GL_(BACK|FRONT)

2011-12-07 Thread Jose Fonseca
I wrote a testsuite for apitrace, and one of the tests checks the default GL state against a reference, and it is failing on all Gallium DRI drivers because { parameters: { GL_DRAW_BUFFER: GL_BACK - GL_BACK_LEFT, GL_DRAW_BUFFER0: GL_BACK - GL_BACK_LEFT, GL_READ_BUFFER: GL_BACK -

Re: [Mesa-dev] Gallium DRI drivers default GL_READ/WRITE_BUFFER to GL_(BACK|FRONT)_LEFT instead of GL_(BACK|FRONT)

2011-12-07 Thread Jose Fonseca
- Original Message - I wrote a testsuite for apitrace, and one of the tests checks the default GL state against a reference, and it is failing on all Gallium DRI drivers because { parameters: { GL_DRAW_BUFFER: GL_BACK - GL_BACK_LEFT, GL_DRAW_BUFFER0: GL_BACK -

Re: [Mesa-dev] [PATCH 5/6] vl: Remove most members of pipe_video_decoder

2011-12-07 Thread Maarten Lankhorst
Hey Andy, On 12/06/2011 10:54 PM, Andy Furniss wrote: Maarten Lankhorst wrote: create_buffer, destroy_buffer and set_buffer are a curiosity of vl_mpeg12_decoder and shouldn't be part of the api. set_quant_matrix and set_reference_frames shouldn't be separate calls, but part of picparm,

[Mesa-dev] [PATCH] i965: Set Ivybridge's is_array SURFACE_STATE bit.

2011-12-07 Thread Kenneth Graunke
Fixes piglit tests fbo-array, fbo-depth-array, fbo-generatemipmap-array, and array-texture, as well as the array variants of my new textureSize and texelFetch tests. NOTE: This is a candidate for the 7.11 branch. Signed-off-by: Kenneth Graunke kenn...@whitecape.org ---

Re: [Mesa-dev] Gallium DRI drivers default GL_READ/WRITE_BUFFER to GL_(BACK|FRONT)_LEFT instead of GL_(BACK|FRONT)

2011-12-07 Thread Brian Paul
On 12/07/2011 04:31 AM, Jose Fonseca wrote: I wrote a testsuite for apitrace, and one of the tests checks the default GL state against a reference, and it is failing on all Gallium DRI drivers because { parameters: { GL_DRAW_BUFFER: GL_BACK - GL_BACK_LEFT, GL_DRAW_BUFFER0:

Re: [Mesa-dev] [PATCH 2/6] vl: Get rid of video_buffer.sampler_view_components

2011-12-07 Thread Andy Furniss
Maarten Lankhorst wrote: Hey Andy, On 12/06/2011 10:45 PM, Andy Furniss wrote: Maarten Lankhorst wrote: No point in having it when just having sampler_view_planes is good enough. :-) This patch causes R600 xvmc to render incorrect chroma for me. Thanks for testing! I plugged in my r600

Re: [Mesa-dev] DRI2 pixmap swapping

2011-12-07 Thread Adam Jackson
On 12/7/11 4:16 AM, Michel Dänzer wrote: On Mit, 2011-12-07 at 08:40 +, Dave Airlie wrote: I have a feeling, since dri2 is not strictly restricted to GLX, whether this should really be implemented in the glx code before calling into dri2? Otoh that would mean the server side would need to

Re: [Mesa-dev] [PATCH] i965: Set Ivybridge's is_array SURFACE_STATE bit.

2011-12-07 Thread Eric Anholt
On Wed, 7 Dec 2011 12:34:28 -0800, Kenneth Graunke kenn...@whitecape.org wrote: Fixes piglit tests fbo-array, fbo-depth-array, fbo-generatemipmap-array, and array-texture, as well as the array variants of my new textureSize and texelFetch tests. NOTE: This is a candidate for the 7.11

Re: [Mesa-dev] [PATCH] i965: Return BRW_DEPTHBUFFER_D32_FLOAT as the null-depthbuffer format.

2011-12-07 Thread Eric Anholt
On Wed, 7 Dec 2011 02:21:37 -0800, Kenneth Graunke kenn...@whitecape.org wrote: Fixes many crashes on Ivybridge due to upload_sf_state calling brw_depthbuffer_format without an actual depth buffer. This was a recent regression on master. +3992 piglits on Ivybridge. Signed-off-by:

Re: [Mesa-dev] [PATCH 09/10] i965: Clean up misleading defines for DWORD 2 of URB_WRITE header.

2011-12-07 Thread Paul Berry
On 6 December 2011 23:31, Kenneth Graunke kenn...@whitecape.org wrote: On 12/05/2011 09:40 AM, Paul Berry wrote: R02_PRIM_END and R02_PRIM_START don't actually refer to bits in DWORD 2 of R0 (as the name, and comments in the code, would seem to indicate). Actually they refer to bits in

Re: [Mesa-dev] [PATCH 2/6] vl: Get rid of video_buffer.sampler_view_components

2011-12-07 Thread Maarten Lankhorst
Hey Andy, On 12/07/2011 05:37 PM, Andy Furniss wrote: Maarten Lankhorst wrote: Hey Andy, On 12/06/2011 10:45 PM, Andy Furniss wrote: Maarten Lankhorst wrote: No point in having it when just having sampler_view_planes is good enough. :-) This patch causes R600 xvmc to render incorrect

Re: [Mesa-dev] [PATCH] glx: block attempt to swapbuffer on pixmap. (v2)

2011-12-07 Thread Eric Anholt
On Wed, 7 Dec 2011 10:24:09 +, Dave Airlie airl...@gmail.com wrote: From: Dave Airlie airl...@redhat.com This keeps track of the creation process and stores a drawable type, it then blocks DRI2 from getting called if the drawable is a pixmap. v2: check if we have a GLX drawable, which

Re: [Mesa-dev] [PATCH 10/10] i965 gen6: Implement pass-through GS for transform feedback.

2011-12-07 Thread Paul Berry
On 6 December 2011 23:54, Kenneth Graunke kenn...@whitecape.org wrote: + if (intel-gen == 6) { + /* On Gen6, GS is used for transform feedback. */ + key-need_gs_prog = ctx-TransformFeedback.CurrentObject-Active; + } else if (intel-gen = 7) { + /* On Gen7 and later, we

[Mesa-dev] [PATCH v2 0/8] i965 gen6: Pass-through GS program for future use by transform feedback

2011-12-07 Thread Paul Berry
Ok, I've cleaned up and made changes according to the suggestions made on the mailing list. I believe all that needs review now is patch 5/8 (Allocate URB space for GS). On Eric's suggestion, I changed this patch to only allocate URB space for the GS when the GS is actually in use. The PRM

[Mesa-dev] [PATCH v2 1/8] mesa: Track changes to transform feedback state.

2011-12-07 Thread Paul Berry
This patch adds a new bit to the ctx-NewState bitfield, _NEW_TRANSFORM_FEEDBACK, to track state changes that affect ctx-TransformFeedback. This bit can be used by driver back-ends to avoid expensive recomputations when transform feedback state has not been modified. Reviewed-by: Kenneth Graunke

[Mesa-dev] [PATCH v2 2/8] i965 gs: Remove unnecessary mapping of key-primitive.

2011-12-07 Thread Paul Berry
Previously, GS generation code contained a lookup table that mapped primitive types POLYGON, TRISTRIP, and TRIFAN to TRILIST, mapped LINESTRIP to LINELIST, and left all other primitives unchanged. This was silly, because we never generate a GS program for those primitive types anyhow. This patch

[Mesa-dev] [PATCH v2 3/8] i965: Only convert if/else to conditional adds prior to Gen6.

2011-12-07 Thread Paul Berry
Normally when outputting instructions in SPF (single program flow) mode, we convert IF and ELSE instructions to conditional ADD instructions applied to the IP register. On platforms prior to Gen6, flow control instructions cause an implied thread switch, so this is a significant savings.

[Mesa-dev] [PATCH v2 4/8] i965: Set the maximum number of GS URB entries on Sandybridge.

2011-12-07 Thread Paul Berry
From: Kenneth Graunke kenn...@whitecape.org We never filled this in before because we didn't care. I'm skeptical these are correct; my sources indicate that both the VS and GS # of entries are 256 on both GT1 and GT2. I'm also loathe to change it and break stuff. Reviewed-by: Paul Berry

[Mesa-dev] [PATCH v2 5/8] i965 gen6: Allocate URB space for GS

2011-12-07 Thread Paul Berry
When the GS is not in use, the entire URB space is available for the VS. When the GS is in use, we split the URB space 50/50. The 50/50 split is probably not optimal--we'll probably want tune this for performance in a future patch. For example, in most situations, it's probably worth allocating

[Mesa-dev] [PATCH v2 6/8] i965 gs: Clean up dodgy register re-use, at the cost of a few MOVs.

2011-12-07 Thread Paul Berry
Prior to this patch, in the Gen4 and Gen5 GS, we used GRF 0 (called R0 in the code) as a staging area to prepare the message header for the FF_SYNC and URB_WRITE messages. This cleverly avoided an unnecessary MOV operation (since the initial value of GRF 0 contains data that needs to be included

[Mesa-dev] [PATCH v2 7/8] i965: Clean up misleading defines for DWORD 2 of URB_WRITE header.

2011-12-07 Thread Paul Berry
R02_PRIM_END and R02_PRIM_START don't actually refer to bits in DWORD 2 of R0 (as the name, and comments in the code, would seem to indicate). Actually they refer to bits in DWORD 2 of the header for URB_WRITE messages. This patch renames the defines to reflect what they actually mean. It also

[Mesa-dev] [PATCH] softpipe: remove the 32bits limitation on depth(-stencil) formats

2011-12-07 Thread Morgan Armand
This patch remove the 32bits limitation. As a side effect, it bring the support for the GL_ARB_depth_buffer_float extension. No regression have been found on piglit, and all tests for GL_ARB_depth_buffer_float pass successfully. --- src/gallium/auxiliary/util/u_tile.c | 28

Re: [Mesa-dev] [PATCH v2 1/8] mesa: Track changes to transform feedback state.

2011-12-07 Thread Eric Anholt
On Wed, 7 Dec 2011 11:09:09 -0800, Paul Berry stereotype...@gmail.com wrote: This patch adds a new bit to the ctx-NewState bitfield, _NEW_TRANSFORM_FEEDBACK, to track state changes that affect ctx-TransformFeedback. This bit can be used by driver back-ends to avoid expensive recomputations

Re: [Mesa-dev] [PATCH v2 3/8] i965: Only convert if/else to conditional adds prior to Gen6.

2011-12-07 Thread Eric Anholt
On Wed, 7 Dec 2011 11:09:11 -0800, Paul Berry stereotype...@gmail.com wrote: - assert(!p-single_program_flow); + /* In principle, we shouldn't be patching IF and ELSE instructions in +* single program flow mode when gen 6, because in single program flow +* mode on those

Re: [Mesa-dev] [PATCH v2 3/8] i965: Only convert if/else to conditional adds prior to Gen6.

2011-12-07 Thread Paul Berry
On 7 December 2011 13:03, Eric Anholt e...@anholt.net wrote: On Wed, 7 Dec 2011 11:09:11 -0800, Paul Berry stereotype...@gmail.com wrote: - assert(!p-single_program_flow); + /* In principle, we shouldn't be patching IF and ELSE instructions in +* single program flow mode when gen

Re: [Mesa-dev] [PATCH 5/6] vl: Remove most members of pipe_video_decoder

2011-12-07 Thread Andy Furniss
Maarten Lankhorst wrote: You might want to check with valgrind to see if it tosses any warning, too. I tried valgrind and it does seem that r600 is leaking - below is from a vanilla mesa with a working test stream and vdpau, xvmc leaks half as much with the same stream. In the

Re: [Mesa-dev] [PATCH v2 4/8] i965: Set the maximum number of GS URB entries on Sandybridge.

2011-12-07 Thread Eric Anholt
On Wed, 7 Dec 2011 11:09:12 -0800, Paul Berry stereotype...@gmail.com wrote: From: Kenneth Graunke kenn...@whitecape.org We never filled this in before because we didn't care. I'm skeptical these are correct; my sources indicate that both the VS and GS # of entries are 256 on both GT1 and

Re: [Mesa-dev] [PATCH] i965: Set Ivybridge's is_array SURFACE_STATE bit.

2011-12-07 Thread Kenneth Graunke
On 12/07/2011 09:34 AM, Eric Anholt wrote: On Wed, 7 Dec 2011 12:34:28 -0800, Kenneth Graunke kenn...@whitecape.org wrote: Fixes piglit tests fbo-array, fbo-depth-array, fbo-generatemipmap-array, and array-texture, as well as the array variants of my new textureSize and texelFetch tests.

Re: [Mesa-dev] [PATCH v2 8/8] i965 gen6: Implement pass-through GS for transform feedback.

2011-12-07 Thread Paul Berry
On 7 December 2011 13:32, Eric Anholt e...@anholt.net wrote: On Wed, 7 Dec 2011 11:09:16 -0800, Paul Berry stereotype...@gmail.com wrote: In Gen6, transform feedback is accomplished by having the geometry shader send vertex data to the data port using Streamed Vertex Buffer Write

Re: [Mesa-dev] [PATCH v2] Fix indirect fallback when a non-Mesa GLX extension is present.

2011-12-07 Thread Ian Romanick
On 12/06/2011 10:20 AM, Aaron Plattner wrote: When driCreateScreen calls driConvertConfigs to try to convert the configs for swrast, it fails and returns NULL. Instead of checking, it just clobbers psc-base.configs. Then, when the application asks for the FBconfigs, there aren't any. Instead,

Re: [Mesa-dev] [PATCH] Fix samplerCubeShadow support in shader compiler

2011-12-07 Thread Ian Romanick
On 12/06/2011 11:11 AM, Anuj Phogat wrote: From: Anuj Phogatanuj@aphogat.(none) This patch fixes the samplerCubeShadow support in GLSL shader compiler. shader compiler was picking the 'r' texture coordinate for shadow comparison when the expected behaviour is to use 'q' texture coordinate in

Re: [Mesa-dev] [PATCH v2 4/8] i965: Set the maximum number of GS URB entries on Sandybridge.

2011-12-07 Thread Paul Berry
On 7 December 2011 13:16, Eric Anholt e...@anholt.net wrote: On Wed, 7 Dec 2011 11:09:12 -0800, Paul Berry stereotype...@gmail.com wrote: From: Kenneth Graunke kenn...@whitecape.org We never filled this in before because we didn't care. I'm skeptical these are correct; my sources

Re: [Mesa-dev] [PATCH v2 4/8] i965: Set the maximum number of GS URB entries on Sandybridge.

2011-12-07 Thread Paul Berry
On 7 December 2011 15:02, Paul Berry stereotype...@gmail.com wrote: On 7 December 2011 13:16, Eric Anholt e...@anholt.net wrote: On Wed, 7 Dec 2011 11:09:12 -0800, Paul Berry stereotype...@gmail.com wrote: From: Kenneth Graunke kenn...@whitecape.org We never filled this in before

[Mesa-dev] [Bug 39588] [bisected] mesa demo xeglgears draw nothing if surface type is a pixmap

2011-12-07 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=39588 Jin Yang jin.a.y...@intel.com changed: What|Removed |Added Status|NEW |RESOLVED