Re: [Mesa-dev] [PATCH 1/3] glx/dri3: Fix glXWaitForSbcOML() to handle targetSBC==0 correctly.

2014-12-14 Thread Keith Packard
pposed to *not* count regular glXSwapBuffers calls. We have no way to tell at this level which function the application called, so I suspect treating them all the same is about the best we can do... > This patch fixes the problem. Yup, looks great to me. Reviewed-by: Keith Packard -- keith.

Re: [Mesa-dev] [PATCH] glx/dri3: Implement LIBGL_SHOW_FPS=1 for DRI3/Present.

2014-10-29 Thread Keith Packard
Kenneth Graunke writes: > v2: Use the UST value provided in the PRESENT_COMPLETE_NOTIFY event > rather than gettimeofday(), which gives us the presentation time > instead of the time when SwapBuffers was called. Suggested by > Keith Packard. This relies on the fact tha

Re: [Mesa-dev] [PATCH] glx/dri3: Implement LIBGL_SHOW_FPS=1 for DRI3/Present.

2014-10-29 Thread Keith Packard
Kenneth Graunke writes: > v2: Use the UST value provided in the PRESENT_COMPLETE_NOTIFY event > rather than gettimeofday(), which gives us the presentation time > instead of the time when SwapBuffers was called. Suggested by > Keith Packard. This relies on the fac

Re: [Mesa-dev] [PATCH] glx/dri3: Port LIBGL_SHOW_FPS=1 code from DRI2 to DRI3.

2014-10-28 Thread Keith Packard
Kenneth Graunke writes: > Is UST expressed in a particular unit? I thought it was just "monotonically > increasing" but otherwise meaningless. At which point, our FPS would be > "frames per...something?" :) UST in GL's extension is not defined, but Present uses microseconds. As this is all h

Re: [Mesa-dev] [PATCH] glx/dri3: Port LIBGL_SHOW_FPS=1 code from DRI2 to DRI3.

2014-10-28 Thread Keith Packard
u'd get the presentation time, rather than the time of the swap? Otherwise, this all seems fine to me Reviewed-by: Keith Packard -- keith.pack...@intel.com pgpu01DhelnAs.pgp Description: PGP signature ___ mesa-dev mailing list mesa-dev@lists.free

Re: [Mesa-dev] [PATCH] glx/dri3: Provide error diagnostics when DRI3 allocation fails

2014-09-30 Thread Keith Packard
Matt Turner writes: > Reviewed-by: Matt Turner > > Should we add a Cc: for the stable branch? Also seems like a good plan. I've added that and pushed. -- keith.pack...@intel.com pgp3KeIMuqnda.pgp Description: PGP signature ___ mesa-dev mailing lis

[Mesa-dev] [PATCH] glx/dri3: Provide error diagnostics when DRI3 allocation fails

2014-09-30 Thread Keith Packard
18:10618:0930/200525:ERROR:webgraphicscontext3d_command_buffer_impl.cc(256)] Failed to initialize command buffer. This made it pretty easy to diagnose the problem in the referenced bug report. Bugzilla: https://code.google.com/p/chromium/issues/detail?id=415681 Signed-off-by: Keith Packard --- src

[Mesa-dev] [PATCH] glx/dri3: Use four buffers until X driver supports async flips

2014-07-02 Thread Keith Packard
is is because flips are always done from within the ring, and so the latency between the vblank event and the async flip happening can cause tearing at the top of the screen. That's why I'm keying the need for the extra buffer on the lack of 2D driver support for async flips. Signed-off-

Re: [Mesa-dev] [PATCH 1/3] dri: Require libudev-dev for building DRI on Linux.

2014-01-31 Thread Keith Packard
Lauri Kasanen writes: > Forgot to mention, this would appear to make 3d impossible without udev > (ie, static devices, mdev, or other solutions). No, DRI2 continues to fall back to using the driver provided by the X server if it can't find one locally. -- keith.pack...@intel.com pgppIx3XzY_4

Re: [Mesa-dev] [PATCH 7/7] dri: Reuse dri_message to implement our other message handlers.

2014-01-26 Thread Keith Packard
then I saw this one) Reviewed-by: Keith Packard -- keith.pack...@intel.com pgpMV6LIMX4sK.pgp Description: PGP signature ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 6/7] loader: Fix missing \n on a message string.

2014-01-26 Thread Keith Packard
Eric Anholt writes: > --- > src/loader/loader.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Keith Packard -- keith.pack...@intel.com pgp69RQVpsMzq.pgp Description: PGP signature ___ mesa-dev mailing list

Re: [Mesa-dev] [PATCH 5/7] dri: Fix the logger error message handling.

2014-01-26 Thread Keith Packard
ebased my dri3+gallium branch and needed this patch to avoid a segfault) Reviewed-by: Keith Packard Tested-by: Keith Packard -- keith.pack...@intel.com pgp7EiKVwTrj4.pgp Description: PGP signature ___ mesa-dev mailing list mesa-dev@list

Re: [Mesa-dev] [PATCH 4/7] dri2: Trust our own driver name lookup over the server's.

2014-01-26 Thread Keith Packard
Eric Anholt writes: > This allows Mesa to choose to rename driver .sos (or split drivers), > without needing a flag day with the corresponding 2D driver. Reviewed-by: Keith Packard -- keith.pack...@intel.com pgpcrXYj0vHR5.pgp Description: PGP sig

Re: [Mesa-dev] [PATCH 3/7] dri2: Open the fd before loading the driver.

2014-01-26 Thread Keith Packard
Eric Anholt writes: > I want to stop trusting the server for the driver name, and instead decide > on our own based on the fd, so I needed this code motion. Reviewed-by: Keith Packard -- keith.pack...@intel.com pgp0Q34HtVkgL.pgp Description: PGP sig

Re: [Mesa-dev] [PATCH 2/7] dri3: Fix two little memory leaks.

2014-01-26 Thread Keith Packard
Eric Anholt writes: > Noticed when valgrinding an unrelated bug. Reviewed-by: Keith Packard -- keith.pack...@intel.com pgpbTv2iprHuM.pgp Description: PGP signature ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org h

Re: [Mesa-dev] [PATCH 1/7] loader: Use dlsym to get our udev symbols instead of explicit linking.

2014-01-26 Thread Keith Packard
Eric Anholt writes: > By using a dlopen() with RTLD_LOCAL, we can explicitly look for the > symbols we want, while they get the symbols they want. This is way better than the patch I sent that open-coded some of this. Reviewed-by: Keith Packard -- keith.pack...@intel.com pgp2pcQjAic

Re: [Mesa-dev] [PATCH] Mark debug_print with __attribute__ ((format(__printf__, 1, 0)))

2014-01-13 Thread Keith Packard
Ian Romanick writes: > Reviewed-by: Ian Romanick Thanks. Pushed. 8279c8f..cb4bc8e master -> master -- keith.pack...@intel.com pgpkKf6zSEV5v.pgp Description: PGP signature ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.fr

Re: [Mesa-dev] [PATCH] Mark debug_print with __attribute__ ((format(__printf__, 1, 0)))

2014-01-13 Thread Keith Packard
Thierry Reding writes: > While at it, perhaps the drmMsg() and drmDebugPrint() functions should > be similarily annotated as well? I don't know; I'm just fixing X server warnings this week and this was the source of one of them. Additional warning fixes for drm would be a great idea! -- keith.

[Mesa-dev] [PATCH] Mark debug_print with __attribute__ ((format(__printf__, 1, 0)))

2014-01-12 Thread Keith Packard
the drmServerInfo member, debug_print, takes a printf format string and varargs list. Tell the compiler about it. Signed-off-by: Keith Packard --- xf86drm.h | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/xf86drm.h b/xf86drm.h index 1e763a3..5e170f8 100644 --- a

Re: [Mesa-dev] [PATCH 15/18] gallium: Add __DRIimageDriverExtension support to gallium

2013-12-27 Thread Keith Packard
Marek Olšák writes: > Some of the code seems to be copy-pasted from > dri2_drawable_process_buffers. The MSAA color and depth-stencil > texture allocation could be moved to a common function. It's either that or plan on moving DRI2 to the image interface as well at some point? As we'll have to k

Re: [Mesa-dev] [PATCH 04/18] dri3: Switch to libxshmfence version 1.1

2013-12-13 Thread Keith Packard
Kenneth Graunke writes: > Would be great to line these comments up. Fixed. > Patches 2 and 4-6 are: > Reviewed-by: Kenneth Graunke Review marked. Thanks much! -- keith.pack...@intel.com pgpkJlR4qfmew.pgp Description: PGP signature ___ mesa-dev m

Re: [Mesa-dev] [PATCH 01/18] Remove glBlendColor and glBlendEquations decls from glext.h

2013-12-13 Thread Keith Packard
Kenneth Graunke writes: > NAK. These headers come directly from Khronos; we need to somehow get > this fixed upstream and take their version. Until they're fixed upstream, we should fix them when incorporating them into the repository. Having broken headers in our code just because they're brok

[Mesa-dev] [PATCH 15/18] gallium: Add __DRIimageDriverExtension support to gallium

2013-12-13 Thread Keith Packard
Provide the hook to pull textures out of __DRIimage structures and use them as renderbuffers. Signed-off-by: Keith Packard --- src/gallium/state_trackers/dri/drm/dri2.c | 238 +- 1 file changed, 230 insertions(+), 8 deletions(-) diff --git a/src/gallium

[Mesa-dev] [PATCH 10/18] i965: Correct check for re-bound buffer in intel_update_image_buffer

2013-12-13 Thread Keith Packard
. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt --- src/mesa/drivers/dri/i965/brw_context.c | 19 +++ 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c index 688091f..78c06fc

[Mesa-dev] [PATCH 05/18] dri3: Free resources when drawable is destroyed.

2013-12-13 Thread Keith Packard
Always nice to clean up after ourselves. Signed-off-by: Keith Packard --- src/glx/dri3_glx.c | 17 - src/glx/dri3_priv.h | 5 - 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/src/glx/dri3_glx.c b/src/glx/dri3_glx.c index 1834c6d..4c0dc29 100644 --- a/src

[Mesa-dev] [PATCH 04/18] dri3: Switch to libxshmfence version 1.1

2013-12-13 Thread Keith Packard
libxshmfence v1.0 foolishly used 'int32_t *' for the fence type, which works when the fence is a linux futex. However, version 1.1 changes the exported datatype to 'struct xshmfence *' Require libxshmfence version 1.1 and switch the API around. Signed-off-by: Keith Packar

[Mesa-dev] [PATCH 14/18] dri3, i915, i965: Add __DRI_IMAGE_FOURCC_SARGB8888

2013-12-13 Thread Keith Packard
__IMAGE_FORMAT_SARGB8 in both the i915 and i965 drivers. I'll refrain from comments on whether I think having two separate sets of format defines in dri_interface.h is a good idea or not... Signed-off-by: Keith Packard Reviewed-by: Eric Anholt --- include/GL/internal/dri_interface.h | 1 +

[Mesa-dev] [PATCH 17/18] nvc0: fix segfault if nv50_miptree_from_handle() fails

2013-12-13 Thread Keith Packard
From: Ben Skeggs Signed-off-by: Ben Skeggs Signed-off-by: Keith Packard --- src/gallium/drivers/nouveau/nvc0/nvc0_resource.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_resource.c b/src/gallium/drivers/nouveau/nvc0

[Mesa-dev] [PATCH 16/18] gallium/dri: fix unsetting of format when encountering depth/stencil

2013-12-13 Thread Keith Packard
From: Ben Skeggs Signed-off-by: Ben Skeggs Signed-off-by: Keith Packard --- src/gallium/state_trackers/dri/drm/dri2.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/gallium/state_trackers/dri/drm/dri2.c b/src/gallium/state_trackers/dri/drm

[Mesa-dev] [PATCH 18/18] gallium: Use base.stamp for all drawable invalidation checks.

2013-12-13 Thread Keith Packard
ked will get updated by the XCB special event queue used by DRI3. Signed-off-by: Keith Packard Reviewed-by: Marek Olšák --- src/gallium/state_trackers/dri/common/dri_drawable.c | 4 ++-- src/gallium/state_trackers/dri/drm/dri2.c| 2 +- 2 files changed, 3 insertions(+), 3 deletions(

[Mesa-dev] [PATCH 08/18] dri3: Fix dri3_wait_for_sbc to wait for completion of requested SBC

2013-12-13 Thread Keith Packard
seen the specified SBC value come back in a PresentCompleteNotify event yet. The change is a bit larger than that as I've broken out a piece of common code to wait for and process a single Present event for the target drawable. Signed-off-by: Keith Packard --- src/glx/dri3_

[Mesa-dev] [PATCH 11/18] i965: Set fast color clear mcs_state on newly allocated image miptrees

2013-12-13 Thread Keith Packard
Just copying code from the dri2 path to set up the fast color clear state. This also removes a couple of bogus intel_region_reference calls. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt --- src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 10 +++--- 1 file changed, 7 insertions

[Mesa-dev] [PATCH 13/18] dri3: Flush XCB before blocking for special events

2013-12-13 Thread Keith Packard
XCB doesn't flush the output buffer automatically, so we have to call xcb_flush ourselves before waiting. Signed-off-by: Keith Packard --- src/glx/dri3_glx.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/glx/dri3_glx.c b/src/glx/dri3_glx.c index c26d6e5..7982f6b 100644 --- a/sr

[Mesa-dev] [PATCH 06/18] dri3: Clean up struct dri3_drawable

2013-12-13 Thread Keith Packard
Move the depth field up with width and height. Remove unused previous_time and frames fields. Signed-off-by: Keith Packard Reviewed-by: Kenneth Graunke --- src/glx/dri3_priv.h | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/glx/dri3_priv.h b/src/glx/dri3_priv.h

[Mesa-dev] [PATCH 07/18] dri3: Track full 64-bit SBC numbers, instead of just 32-bits

2013-12-13 Thread Keith Packard
Tracking the full 64-bit SBC values makes it clearer how those values are being used, and simplifies the wait_msc code. The only trick is in re-constructing the full 64-bit value from Present's 32-bit serial number that we use to pass the SBC value from request to event. Signed-off-by:

[Mesa-dev] [PATCH 03/18] Don't use libudev for glx/dri3

2013-12-13 Thread Keith Packard
libudev doesn't have a stable API/ABI, and if the application wants to use one version, we'd best not load another into libGL. Signed-off-by: Keith Packard --- configure.ac | 8 - src/glx/dri3_common.c | 85 ++- 2 files c

[Mesa-dev] [PATCH 01/18] Remove glBlendColor and glBlendEquations decls from glext.h

2013-12-13 Thread Keith Packard
These are duplicates from gl.h; I'm not sure which file they belong in, but you don't get to have them in both places. Signed-off-by: Keith Packard --- include/GL/glext.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/GL/glext.h b/include/GL/glext.h index 7d6033e..b432

[Mesa-dev] [PATCH 12/18] dri3: Rename DRI3_MAX_BACK to DRI3_NUM_BACK

2013-12-13 Thread Keith Packard
It is the maximum number of back buffers, but the name is confusing and is easily read as the maximum back buffer index. Chage to DRI3_NUM_BACK to make the intended usage a bit clearer. Signed-off-by: Keith Packard --- src/glx/dri3_glx.c | 4 ++-- src/glx/dri3_priv.h | 10 +- 2 files

[Mesa-dev] [PATCH 00/18] dri3+gallium patch series

2013-12-13 Thread Keith Packard
This series has a bunch of DRI3 cleanups and fixes followed by a few patches that finish up DRI3 support in gallium. The first two patches have nothing to do with DRI3, just some warning fixes: [PATCH 01/18] Remove glBlendColor and glBlendEquations decls from [PATCH 02/18] dri/swrast: Passing d

[Mesa-dev] [PATCH 09/18] dri3: Enable GLX_INTEL_swap_event

2013-12-13 Thread Keith Packard
Now that we're tracking SBC values correctly, and the X server has the ability to send the GLX swap events from a PresentPixmap request, enable this extension. Signed-off-by: Keith Packard --- src/glx/dri3_glx.c | 18 +- 1 file changed, 1 insertion(+), 17 deletions(-)

[Mesa-dev] [PATCH 02/18] dri/swrast: Passing dri_context * instead of gl_context* to driContextSetFlags

2013-12-13 Thread Keith Packard
These are the same address, but different types and driContextSetFlags wants a gl_context pointer. Signed-off-by: Keith Packard --- src/mesa/drivers/dri/swrast/swrast.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/swrast/swrast.c b/src/mesa/drivers

Re: [Mesa-dev] [PATCH] dri3, i915, i965: Add __DRI_IMAGE_FOURCC_SARGB8888

2013-12-13 Thread Keith Packard
Kenneth Graunke writes: > I see that Eric reviewed it, and that it has not landed. Are there any > objections to merging it? They're on top of a series of DRI3/Present patches, not all of which have seen review. I was hoping the rest of that series would get reviewed so that I could merge it al

Re: [Mesa-dev] [PATCH] Mark drmServerInfo.debug_print with printf attribute

2013-12-11 Thread Keith Packard
Alan Coopersmith writes: > You should drop that line - those comments are used for us to figure out which > xproto version to list in the pkg-config requirements when using newer _X_* > macros out of Xfuncproto.h, so doesn't make sense here. > > Also be warned that using a macro name starting wi

[Mesa-dev] [PATCH] Mark drmServerInfo.debug_print with printf attribute

2013-12-11 Thread Keith Packard
I stole the conditional for _X_ATTRIBUTE_PRINTF from xproto and changed the name to _DRM_ATTRIBUTE_PRINTF to avoid future conflicts. Signed-off-by: Keith Packard --- xf86drm.h | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/xf86drm.h b/xf86drm.h index 1e763a3

[Mesa-dev] [PATCH] Remove glBlendColor and glBlendEquations decls from glext.h

2013-12-11 Thread Keith Packard
These are duplicates from gl.h; I'm not sure which file they belong in, but you don't get to have them in both places. Signed-off-by: Keith Packard --- include/GL/glext.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/GL/glext.h b/include/GL/glext.h index fea9e1f..4c0a

Re: [Mesa-dev] [PATCH v3] dri megadriver_stub: add compatibility for older DRI loaders

2013-12-09 Thread Keith Packard
porate fixes and suggestions from Keith Reviewed-by: Keith Packard -- keith.pack...@intel.com pgp1rPNEULXgK.pgp Description: PGP signature ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [RFC PATCH] dri megadriver_stub: provide compatibility with older DRI loader

2013-12-06 Thread Keith Packard
Jordan Justen writes: >> We find the driver foo's name by using the dladdr function >> which gives the path of the dynamic library's name that >> was being loaded. That sounds like all kinds of win for existing X servers. Thanks for doing it up in style, so that a megadrivers build can actually

Re: [Mesa-dev] [PATCH] intel: Track known prime buffers for re-use

2013-11-26 Thread Keith Packard
Daniel Vetter writes: > The kernel actually doesn't bother with this, i.e. an open on an flink > name will always create a new handle. Given that it was a major pita to > get the prime reimporting going (due to a pile of funny lifetime issues > around reference loops and some assorted locking fun

[Mesa-dev] [PATCH 3/4] dri3: Fix dri3_wait_for_sbc to wait for completion of requested SBC

2013-11-25 Thread Keith Packard
seen the specified SBC value come back in a PresentCompleteNotify event yet. The change is a bit larger than that as I've broken out a piece of common code to wait for and process a single Present event for the target drawable. Signed-off-by: Keith Packard --- src/glx/dri3_

[Mesa-dev] [PATCH 0/4] Clean up dri3 SBC handling, enable GLX_INTEL_swap_event

2013-11-25 Thread Keith Packard
I've split the GLX_INTEL_swap_event enabling patch into four bits -- the first three just fix the existing code to track SBC values correctly and to fix wait_for_sbc. The fourth is the trivial patch to actually turn on the new extension; all of the hard work for that is actually dealt with in the X

[Mesa-dev] [PATCH 1/4] dri3: Clean up struct dri3_drawable

2013-11-25 Thread Keith Packard
Move the depth field up with width and height. Remove unused previous_time and frames fields. Signed-off-by: Keith Packard --- src/glx/dri3_priv.h | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/glx/dri3_priv.h b/src/glx/dri3_priv.h index 05f66cf..34c67a6 100644

[Mesa-dev] [PATCH 2/4] dri3: Track full 64-bit SBC numbers, instead of just 32-bits

2013-11-25 Thread Keith Packard
Tracking the full 64-bit SBC values makes it clearer how those values are being used, and simplifies the wait_msc code. The only trick is in re-constructing the full 64-bit value from Present's 32-bit serial number that we use to pass the SBC value from request to event. Signed-off-by:

[Mesa-dev] [PATCH 4/4] dri3: Enable GLX_INTEL_swap_event

2013-11-25 Thread Keith Packard
Now that we're tracking SBC values correctly, and the X server has the ability to send the GLX swap events from a PresentPixmap request, enable this extension. Signed-off-by: Keith Packard --- src/glx/dri3_glx.c | 18 +- 1 file changed, 1 insertion(+), 17 deletions(-)

Re: [Mesa-dev] [PATCH] present: Send GLX_BufferSwapComplete events from present extension

2013-11-25 Thread Keith Packard
Eric Anholt writes: > There's a minor behavior change that the event now gets sent to the > drawable owner rather than the caller of DRI2SwapBuffers. Yeah, probably not ideal, especially when the GLX drawable is created using the window XID (as is the case for some older GLX clients). I don't ha

Re: [Mesa-dev] [PATCH] dri3: Support GLX_INTEL_swap_event

2013-11-25 Thread Keith Packard
Eric Anholt writes: > I'd prefer to see sbc stay with its current name, since that's its name > in the specs we're trying to implement (GLX_OML_sync_control, > GLX_INTEL_swap_event). If you drop the rename from the patch, > > Reviewed-by: Eric Anholt Sounds good. > I read that as "SBC is incr

[Mesa-dev] [PATCH] intel: Track known prime buffers for re-use

2013-11-25 Thread Keith Packard
Also checks for prime buffers in the flink case. Signed-off-by: Keith Packard --- intel/intel_bufmgr_gem.c | 50 +--- 1 file changed, 43 insertions(+), 7 deletions(-) diff --git a/intel/intel_bufmgr_gem.c b/intel/intel_bufmgr_gem.c index df6fcec..2b7fe07 1

Re: [Mesa-dev] [PATCH] intel: Track known prime buffers for re-use

2013-11-25 Thread Keith Packard
Daniel Vetter writes: > Yeah, it unfortunately took a few rounds of kernel fixes and other > haggling to get the semantics right on this one. The kernel atm promises > to userspace (minus one big in a racy corner case no one should care > about, still need to fix that one) that it'll return the s

Re: [Mesa-dev] [Intel-gfx] [PATCH] dri3, i915, i965: Add __DRI_IMAGE_FOURCC_SARGB8888

2013-11-22 Thread Keith Packard
Ville Syrjälä writes: > What is this format anyway? -ENODOCS Same as MESA_FORMAT_SARGB8 and __DRI_IMAGE_FORMAT_SARGB8 :-) > If its just an srgb version of ARGB, then I wouldn't really want it > in drm_fourcc.h. I expect colorspacy stuff will be handled by various > crtc/plane properties in

Re: [Mesa-dev] [Intel-gfx] [PATCH] dri3, i915, i965: Add __DRI_IMAGE_FOURCC_SARGB8888

2013-11-22 Thread Keith Packard
Kristian Høgsberg writes: > I already explained to Keith why we use different sets of format codes > in the DRI interface, but it's always fun to slam other peoples code. As we discussed, my complaint isn't so much about __DRI_IMAGE_FOURCC, but the fact that the __DRIimage interfaces use *both*

[Mesa-dev] [PATCH 0/2] Minor __DRIimage fixes for i965

2013-11-22 Thread Keith Packard
While debugging the libdrm duplicate buffer object adventure, I managed to temporarily understand object lifetimes in the __DRIimage getBuffers path, and also to compare that to the DRI2 getBuffers path. Here are a couple of small fixes. I haven't looked at the i915 code, but I suspect the first o

[Mesa-dev] [PATCH 1/2] i965: Correct check for re-bound buffer in intel_update_image_buffer

2013-11-22 Thread Keith Packard
. Signed-off-by: Keith Packard --- src/mesa/drivers/dri/i965/brw_context.c | 19 +++ 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c index bee98e3..64ff855 100644 --- a/src/mesa/drivers

[Mesa-dev] [PATCH 2/2] i965: Set fast color clear mcs_state on newly allocated image miptrees

2013-11-22 Thread Keith Packard
Just copying code from the dri2 path to set up the fast color clear state. This also removes a couple of bogus intel_region_reference calls. Signed-off-by: Keith Packard --- src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff

[Mesa-dev] [PATCH] intel: Track known prime buffers for re-use

2013-11-22 Thread Keith Packard
igned-off-by: Keith Packard --- This one took a while to find -- multiple bo_gem structs pointing at the same gem handle would either cause the object to be destroyed before we were done using it, or we'd end up sending the same gem_handle for multiple buffers. This looks a lot like the na

Re: [Mesa-dev] [PATCH] dri3, i915, i965: Add __DRI_IMAGE_FOURCC_SARGB8888

2013-11-22 Thread Keith Packard
Daniel Vetter writes: > Hm, where do we have the canonical source for all these fourcc codes? I'm > asking since we have our own copy in the kernel as drm_fourcc.h, and that > one is part of the userspace ABI since we use it to pass around > framebuffer formats and format lists. I think it's the

[Mesa-dev] [PATCH] dri3: Support GLX_INTEL_swap_event

2013-11-21 Thread Keith Packard
sequence number that we send in the PresentPixmap requests, and that's done by using the same variable for both roles. Signed-off-by: Keith Packard --- This passes the piglet glx-swap-event test. src/glx/dri3_glx.c | 27 ++- src/glx/dri3_priv.h | 3 +-- 2 files c

[Mesa-dev] [PATCH] present: Send GLX_BufferSwapComplete events from present extension

2013-11-21 Thread Keith Packard
This allows GL to support the GLX_INTEL_swap_event extension Signed-off-by: Keith Packard --- This is the X server side; the mesa patch will be sent shortly (it's tiny) glx/Makefile.am | 3 ++- glx/glxcmds.c | 69 +

[Mesa-dev] [PATCH] v2: dri3: Free resources when drawable is destroyed.

2013-11-21 Thread Keith Packard
Always nice to clean up after ourselves. Signed-off-by: Keith Packard --- v2: Include changes to dri3_priv.h as well src/glx/dri3_glx.c | 17 - src/glx/dri3_priv.h | 5 - 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/src/glx/dri3_glx.c b/src/glx

[Mesa-dev] [PATCH] dri3: Free resources when drawable is destroyed.

2013-11-21 Thread Keith Packard
Always nice to clean up after ourselves. Signed-off-by: Keith Packard --- Ok, so not having this in the dri3 code led to a bit of extra memory usage in apps and the X server. src/glx/dri3_glx.c | 17 - 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/glx

[Mesa-dev] [PATCH] dri3: Prepare for API change in libxshmfence

2013-11-21 Thread Keith Packard
ing 'void *' in mesa, which works with both the int32_t* and struct xshmfence* versions. Signed-off-by: Keith Packard --- libxshmfence will also be providing a HAVE_STRUCT_XSHMFENCE define, so we could actually check for that and use struct xshmfence when available. Just using 'voi

[Mesa-dev] [PATCH] gallium: Use base.stamp for all drawable invalidation checks.

2013-11-21 Thread Keith Packard
ked will get updated by the XCB special event queue used by DRI3. Signed-off-by: Keith Packard --- This patch makes sure that drawables get invalidated when the window changes size or when SwapBuffers is called; dri3 has only a single location to smite when things change, so we need to make sure t

[Mesa-dev] [PATCH] dri3, i915, i965: Add __DRI_IMAGE_FOURCC_SARGB8888

2013-11-21 Thread Keith Packard
__IMAGE_FORMAT_SARGB8 in both the i915 and i965 drivers. I'll refrain from comments on whether I think having two separate sets of format defines in dri_interface.h is a good idea or not... Signed-off-by: Keith Packard --- This gets iceweasel running with the GL compositor enabled. inclu

Re: [Mesa-dev] [PATCH] Don't use libudev for glx/dri3

2013-11-19 Thread Keith Packard
Eric Anholt writes: > Keith Packard writes: > >> libudev doesn't have a stable API/ABI, and if the application wants to use >> one >> version, we'd best not load another into libGL. >> >> Signed-off-by: Keith Packard > > This looks so simp

Re: [Mesa-dev] [PATCH] Don't use libudev for glx/dri3

2013-11-18 Thread Keith Packard
Emil Velikov writes: > On 18/11/13 01:08, Keith Packard wrote: >> libudev doesn't have a stable API/ABI, and if the application wants to use >> one >> version, we'd best not load another into libGL. >> >> Signed-off-by: Keith Packard >> --- &

Re: [Mesa-dev] [PATCH] Don't use libudev for glx/dri3

2013-11-17 Thread Keith Packard
Kenneth Graunke writes: > For non-API facing stuff, you can just use stdbool.h's > bool/true/false. tnx. I pushed that to my dri3 branch. Btw, that branch also has some gallium support for __DRIimageDriverExtension. I don't have any hardware to test with, so it's surely broken in some major ways

Re: [Mesa-dev] [PATCH] Don't use libudev for glx/dri3

2013-11-17 Thread Keith Packard
Emil Velikov writes: > On 18/11/13 01:08, Keith Packard wrote: >> libudev doesn't have a stable API/ABI, and if the application wants to use >> one >> version, we'd best not load another into libGL. >> >> Signed-off-by: Keith Packard >>

[Mesa-dev] [PATCH] Don't use libudev for glx/dri3

2013-11-17 Thread Keith Packard
libudev doesn't have a stable API/ABI, and if the application wants to use one version, we'd best not load another into libGL. Signed-off-by: Keith Packard --- Sorry for the patch spam; I hadn't rebased in a while and there was a configure.ac conflict. Here's a versio

[Mesa-dev] [PATCH] Don't use libudev for glx/dri3

2013-11-17 Thread Keith Packard
libudev doesn't have a stable API/ABI, and if the application wants to use one version, we'd best not load another into libGL. Signed-off-by: Keith Packard --- configure.ac | 5 +-- src/glx/dri3_common.c | 106 +++--- 2 files c

Re: [Mesa-dev] [PATCH] Add DRM_MODE_PAGE_FLIP_ASYNC define

2013-11-06 Thread Keith Packard
Eric Anholt writes: > Keith Packard writes: > >> This exposes the kernel API for performing asynchronous flips >> >> Signed-off-by: Keith Packard > > Reviewed-by: Eric Anholt I've pushed this to master. -- keith.pack...@intel.com pgprKBc6E

[Mesa-dev] [PATCH] Add DRM_MODE_PAGE_FLIP_ASYNC define

2013-11-06 Thread Keith Packard
This exposes the kernel API for performing asynchronous flips Signed-off-by: Keith Packard --- include/drm/drm.h | 1 + include/drm/drm_mode.h | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/include/drm/drm.h b/include/drm/drm.h index 725bf51..f0b4c16 100644 --- a

Re: [Mesa-dev] [PATCH 0/8] Add DRIimage-based DRI3/Present loader

2013-11-05 Thread Keith Packard
Eric Anholt writes: > It seems like we could just stick these things in __DRI_CORE as opposed > to having another new extension to look up. Having the driver expose this new extension is how I tell that the driver is going to actually call the __DRIimage-based loader; the alternative to a new ex

Re: [Mesa-dev] [PATCH 0/8] Add DRIimage-based DRI3/Present loader

2013-11-05 Thread Keith Packard
Keith Packard writes: > This sequence first adds a a couple of new DRIimage extensions to the > dri/common, dri/i915 and dri/i965 directories which define a > loader-independent API for managing window system operations. > > The last patch adds a new DRI3000 loader using those

Re: [Mesa-dev] [PATCH 5/8] dri/common: Add functions mapping MESA_FORMAT_* <-> __DRI_IMAGE_FORMAT_*

2013-11-04 Thread Keith Packard
Jordan Justen writes: > After patch 6, this will add SARGB8, right? So, maybe add this to the > commit message, or separate out adding SARGB8 into a separate commit? I added the SARGB8 define in patch 4; is there some other separation you think would be warranted? Oh, just so everyone knows --

Re: [Mesa-dev] [PATCH 5/6] dri3: Add DRI3 support to GLX, DRI common and Intel driver

2013-11-03 Thread Keith Packard
Kristian Høgsberg writes: > I sent a reply to the sourceforge addresses in the original emails, > but I didn't see it show up in the archives. Trying again with the > freedesktop addresses. (sorry for having an ancient shell script with sourceforge addresses in it) >> +typedef uint32_t * >> +(

Re: [Mesa-dev] [PATCH] i965: Delete pre-DRI2.3 viewport hacks.

2013-06-30 Thread Keith Packard
Kenneth Graunke writes: > The __DRI_USE_INVALIDATE extension was added in May 11th, 2010 by commit > 4258e3a2e1c327. At this point, it's unlikely that anyone's using the > right mix of new and old components to hit this path. Deleting it > removes an untested code path and cleans up the driver

[Mesa-dev] XDC2013 - Call for Proposals

2013-06-13 Thread Keith Packard
# Call For Proposals **2013 X.Org Developers Conference (XDC 2013)** **23-25 September 2013** **Portland, Oregon USA** The [2013 X.Org Developers Conference] (http://www.x.org/wiki/Events/XDC2013) is the annual technical meeting for [X Window System](http://x.org) and [Free Desktop](http://freede

[Mesa-dev] XDC2013 - Announcement

2013-06-13 Thread Keith Packard
Now that we have everything in place we can finally make it official and announce it: XDC2013 will take place from September 23th to September 25th in Portland, Oregon at the University Place Hotel and Conference Center Ian Romanick, Bart Massey, and I will be orgainzing this event. The initial

Re: [Mesa-dev] [RFC PATCH] Add ability to use libXrandr for OML_sync_control

2012-01-06 Thread Keith Packard
On Tue, 20 Sep 2011 15:37:20 -0400, Matt Turner wrote: > - checking for the appropriate Xrandr version. > XRRGetScreenResourcesCurrent is a 1.3 function. It's not totally > clear to me what the difference between it and XRRGetScreenResources > is. (These aren't docum

Re: [Mesa-dev] FOSDEM 2012 DevRoom requested.

2011-10-03 Thread Keith Packard
On Mon, 3 Oct 2011 16:26:20 +0200, Luc Verhaegen wrote: > Keith, at XDC you mentioned filling half a day with wayland stuff. Do > solidify this ASAP so i can make sure that we get saturday as well. I'm working on this -- as you might imagine, getting funding for an event this far in advance is

Re: [Mesa-dev] [PATCH 6/6] glsl: Generate IR for switch statements

2011-06-27 Thread Keith Packard
On Mon, 27 Jun 2011 17:23:30 -0700, Dan McCabe wrote: > Since I am just about to start modifying the IR generation, I'm open to > suggestion. I'd write the simplest possible code that works now and then consider optimizing it later. This has the advantage that you can get a bunch of tests worki

Re: [Mesa-dev] [PATCH 0/6] glsl: Add support for switch statements

2011-06-18 Thread Keith Packard
On Fri, 17 Jun 2011 17:43:14 -0700, Dan McCabe wrote: > break; // implicit exit from loop at end of switch > } while (true); Seems like this could just be } while (false); as I don't see any way the loop could go around more than once. -- keith.pack...@intel.com

Re: [Mesa-dev] [PATCH] glxproto: make GLX swap event struct match spec

2011-05-03 Thread Keith Packard
On Tue, 3 May 2011 14:08:58 -0700, Jesse Barnes wrote: > Fixed version below. Reviewed-by: Keith Packard (assuming that the GLX protocol specification gets updated to match :-) -- keith.pack...@intel.com pgpmw6kAybqOk.pgp Description: PGP signat

Re: [Mesa-dev] [PATCH] glxproto: make GLX swap event struct match spec

2011-05-03 Thread Keith Packard
On Tue, 3 May 2011 12:21:24 -0700, Jesse Barnes wrote: > We only spec a 32 bit swap count, so drop the high sbc field. You're missing the explicit 16-bit padding field after 'event_type' The documented encoding http://www.opengl.org/registry/specs/INTEL/swap_event.txt needs to be fixed to mat

Re: [Mesa-dev] auto generated glx code in X server

2011-03-14 Thread Keith Packard
On Tue, 15 Mar 2011 13:52:40 +1000, Dave Airlie wrote: > a) undo ajax's cleanup, fix generator scripts to work again (not sure > how possible that is > since Olv's mapi changes), import latest GLX into server on a > semi-regular basis. The X server generator seems like it'll bit-rot if not used

Re: [Mesa-dev] [RFC] Convert mesa to automake/libtool

2010-05-04 Thread Keith Packard
On Tue, 4 May 2010 08:34:00 -0400, Ben Gamari wrote: > a standard non-recursive makefile structure, as is used > in, say, Keith Packard's notmuch[1] project. That's Carl Worth's notmuch project, and it was his idea to build using make alone. I'd have to say that while it makes the build system e

<    1   2   3