[Mesa-dev] [PATCH] svga: Remove unnecessary check for the pre flush bit for setting vertex buffers

2019-05-29 Thread Thomas Hellstrom
From: Charmaine Lee This fixes the missing rebind when the can_pre_flush bit is not set and the vertex buffers are the same as what have been sent. Cc: mesa-sta...@lists.freedesktop.org Reviewed-by: Neha Bhende Signed-off-by: Charmaine Lee Signed-off-by: Thomas Hellstrom --- src/gallium

[Mesa-dev] [PATCH] winsys/svga/drm: Fix 32-bit RPCI send message

2019-05-29 Thread Thomas Hellstrom
to vmx running out of channels. Cc: mesa-sta...@lists.freedesktop.org Signed-off-by: Deepak Rawat Reviewed-by: Sinclair Yeh Reviewed-by: Thomas Hellstrom Signed-off-by: Thomas Hellstrom --- src/gallium/winsys/svga/drm/vmw_msg.c | 35 ++- 1 file changed, 23 insertions

[Mesa-dev] [PATCH 1/5] svga: Remove the surface_invalidate winsys function

2019-05-16 Thread Thomas Hellstrom
Instead unconditionally call SVGA3D_InvalidateGBSurface() since it's needed also for Linux for dirty buffers and operation without SurfaceDMA. For non-guest-backed operation, remove the surface cache surface invalidation altogether. Signed-off-by: Thomas Hellstrom Reviewed-by: Brian Paul

[Mesa-dev] [PATCH 3/5] svga: Set the rendered-to flag for dma transfers to surfaces

2019-05-16 Thread Thomas Hellstrom
The rendered-to flag indicates that the HW surface content is more recent than the content of the mob. That's the case after a SurfaceDMA transfer to the surface. Signed-off-by: Thomas Hellstrom Reviewed-by: Brian Paul Reviewed-by: Charmaine Lee --- src/gallium/drivers/svga

[Mesa-dev] [PATCH 5/5] svga: Add an environment variable to force coherent surface memory

2019-05-16 Thread Thomas Hellstrom
The vmwgfx driver supports emulated coherent surface memory as of version 2.16. Add en environtment variable to enable this functionality for texture- and buffer maps: SVGA_FORCE_COHERENT. This environment variable should be used for testing only. Signed-off-by: Thomas Hellstrom Reviewed

[Mesa-dev] [PATCH 4/5] pipebuffer, winsys/svga: Add functionality to update pb_validate_entry flags

2019-05-16 Thread Thomas Hellstrom
In order to be able to add access modes to a pb_validate_entry, update the pb_validate_add_buffer function to take a pointer hash table and also to return whether the buffer was already on the validate list. Update the svga winsys accordingly. Signed-off-by: Thomas Hellstrom Reviewed

[Mesa-dev] [PATCH 2/5] winsys/svga: Fix RELOC_INTERNAL mob GPU access

2019-05-16 Thread Thomas Hellstrom
will not synchronize a subsequent map to the readback. Fix this by inverting the mob access mode in a surface relocation with SVGA_RELOC_INTERNAL set. Signed-off-by: Thomas Hellstrom Reviewed-by: Brian Paul Reviewed-by: Charmaine Lee --- src/gallium/winsys/svga/drm/vmw_context.c | 10 +- 1 file

[Mesa-dev] [PATCH 3/5] svga: Avoid bouncing buffer data in malloced buffers

2019-04-30 Thread Thomas Hellstrom
for reading when copying out of buffers that need modification before being passed to hardware. In this case we avoid data bouncing for upload manager buffers but make sure buffers that we read out from stay in malloced memory. Signed-off-by: Thomas Hellstrom Reviewed-by: Brian Paul --- src/gallium

[Mesa-dev] [PATCH 4/5] winsys/svga: Update the drm interface file

2019-04-30 Thread Thomas Hellstrom
The file vmwgfx_drm.h was a bit outdated. Update to a recent version, including defines supporting coherent memory. Signed-off-by: Thomas Hellstrom Reviewed-by: Brian Paul --- .../winsys/svga/drm/vmw_screen_ioctl.c| 4 +- src/gallium/winsys/svga/drm/vmwgfx_drm.h | 358

[Mesa-dev] [PATCH 2/5] winsys/svga: Enable the transfer_from_buffer GPU command for vgpu10

2019-04-30 Thread Thomas Hellstrom
We didn't have the path using this command enabled as typically we take an alternate path using DMA uploads. Emable it so that we can exercise that code-path by turning off the DMA path. Signed-off-by: Thomas Hellstrom Reviewed-by: Brian Paul --- src/gallium/winsys/svga/drm/vmw_screen.c | 1

[Mesa-dev] [PATCH 1/5] winsys/svga: Add an environment variable to force host-backed operation

2019-04-30 Thread Thomas Hellstrom
operation. Signed-off-by: Thomas Hellstrom Reviewed-by: Deepak Rawat --- src/gallium/winsys/svga/drm/vmw_screen_ioctl.c | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/gallium/winsys/svga/drm/vmw_screen_ioctl.c b/src/gallium/winsys/svga/drm

[Mesa-dev] [PATCH 5/5] winsys/svga: Don't abort on EBUSY errors from execbuffer

2019-04-30 Thread Thomas Hellstrom
This error code typically indicated that a buffer object that was referenced by the command stream was being used for CPU access by another client. The correct action here is to retry after a while. Use usleep() until we have proper kernel support for this wait. Signed-off-by: Thomas Hellstrom

Re: [Mesa-dev] [PATCH 1/3] pipebuffer: use new pb_usage_flags enum type

2019-04-23 Thread Thomas Hellstrom
Hi, Brian, Did this series get reviewed? I don't see any replies? /Thomas On Tue, 2019-03-05 at 20:48 -0700, Brian Paul wrote: > Use a new enum type instead of 'unsigned' to make things a bit more > understandable. > --- > src/gallium/auxiliary/pipebuffer/pb_buffer.h | 34 >

Re: [Mesa-dev] [PATCH 3/3] winsys/svga: use new pb_usage_flags enum type

2019-03-07 Thread Thomas Hellstrom
On Tue, 2019-03-05 at 20:48 -0700, Brian Paul wrote: > And add a comment that we're implicitly converting PIPE_TRANSFER_ > flags to PB_USAGE_ flags in one place. And statically assert that > the enum values match. LGTM. Thanks for fixing this! Reviewed-by: Thomas Hellstrom >

Re: [Mesa-dev] [PATCH] svga: remove SVGA_RELOC_READ flag in SVGA3D_BindGBSurface()

2019-03-07 Thread Thomas Hellstrom
On Thu, 2019-03-07 at 19:45 -0700, Brian Paul wrote: > This fixes a rendering issue where UBO updates aren't always picked > up by drawing calls. This issue effected the Webots robotics > simulator. VMware bug 2175527. > > Testing Done: Webots replay, piglit, misc Linux games > --- >

[Mesa-dev] [PATCH] winsys/svga: Fix a memory leak

2018-11-28 Thread Thomas Hellstrom
The ioctl.cap_3d member was never freed. Signed-off-by: Thomas Hellstrom Reviewed-by: Sinclair Yeh --- src/gallium/winsys/svga/drm/vmw_screen_ioctl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gallium/winsys/svga/drm/vmw_screen_ioctl.c b/src/gallium/winsys/svga/drm

[Mesa-dev] [PATCH] st/xa: Fix a memory leak

2018-11-28 Thread Thomas Hellstrom
Free the context after destruction. Signed-off-by: Thomas Hellstrom Reviewed-by: Sinclair Yeh --- src/gallium/state_trackers/xa/xa_context.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gallium/state_trackers/xa/xa_context.c b/src/gallium/state_trackers/xa/xa_context.c index

[Mesa-dev] [PATCH 3/3] st/xa: Support Component Alpha with trivial blending

2018-11-13 Thread Thomas Hellstrom
Support Component Alpha for those composite operations that do not require per-channel alpha blending. Signed-off-by: Thomas Hellstrom Reviewed-by: Brian Paul --- src/gallium/state_trackers/xa/xa_composite.c | 33 src/gallium/state_trackers/xa/xa_priv.h | 1 + src

[Mesa-dev] [PATCH 1/3] st/xa: Fix transformations when we have both source and mask samplers

2018-11-13 Thread Thomas Hellstrom
In the case when we had both source and mask samplers, transformations were typically not applied correctly. Signed-off-by: Thomas Hellstrom Reviewed-by: Brian Paul --- src/gallium/state_trackers/xa/xa_renderer.c | 117 1 file changed, 49 insertions(+), 68 deletions

[Mesa-dev] [PATCH 2/3] st/xa: Minor renderer cleanups

2018-11-13 Thread Thomas Hellstrom
constify function arguments to clean up the code a bit. Reported-by: Brian Paul Signed-off-by: Thomas Hellstrom Reviewed-by: Brian Paul --- src/gallium/state_trackers/xa/xa_renderer.c | 24 ++--- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/gallium

[Mesa-dev] [PATCH 2/4] st/xa: Support higher color precision for solid pictures

2018-11-12 Thread Thomas Hellstrom
The only solid fill picture type we supported only had 8 bit color channels. Add a new solid picture type that supports float channels. Signed-off-by: Thomas Hellstrom Reviewed-by: Brian Paul --- src/gallium/state_trackers/xa/xa_composite.c | 106 ++- src/gallium/state_trackers

[Mesa-dev] [PATCH 1/4] st/xa: Render update. Better support for solid pictures

2018-11-12 Thread Thomas Hellstrom
Remove unused and obsolete code for gradients and component-alpha Support solid source- and mask pictures using a variable number of samplers in the composite pipeline rather than the fixed number we used before. Tested using rendercheck for XA. Signed-off-by: Thomas Hellstrom Reviewed

[Mesa-dev] [PATCH 3/4] st/xa: Support a couple of new formats

2018-11-12 Thread Thomas Hellstrom
Signed-off-by: Thomas Hellstrom Reviewed-by: Brian Paul --- src/gallium/state_trackers/xa/xa_tracker.c| 33 ++- src/gallium/state_trackers/xa/xa_tracker.h.in | 5 +++ 2 files changed, 29 insertions(+), 9 deletions(-) diff --git a/src/gallium/state_trackers/xa/xa_tracker.c

[Mesa-dev] [PATCH 4/4] st/xa: Bump minor

2018-11-12 Thread Thomas Hellstrom
Bump minor to signal support for new formats and higher precision solid pictures. Signed-off-by: Thomas Hellstrom Reviewed-by: Brian Paul --- configure.ac | 2 +- src/gallium/state_trackers/xa/meson.build | 2 +- 2 files changed, 2 insertions(+), 2 deletions

Re: [Mesa-dev] [PATCH 1/2] loader/dri3: Only wait for back buffer fences in dri3_get_buffer

2018-09-11 Thread Thomas Hellstrom
On 09/11/2018 02:41 PM, Michel Dänzer wrote: Any feedback on this patch? Without negative feedback, I'll push it later this week. Hi, Michel, This looks ok to me. Reviewed-by: Thomas Hellstrom /Thomas On 2018-09-04 6:22 p.m., Michel Dänzer wrote: From: Michel Dänzer We don't need

Re: [Mesa-dev] [PATCH 0/9] dri2: Swapbuffer update v3.

2018-09-05 Thread Thomas Hellstrom
On 09/05/2018 04:30 PM, Timothy Arceri wrote: On 05/09/18 23:36, Thomas Hellstrom wrote: On 09/05/2018 02:36 PM, Timothy Arceri wrote: On 05/09/18 22:09, Thomas Hellstrom wrote: On 09/05/2018 01:45 PM, Timothy Arceri wrote: On 16/08/17 04:31, Thomas Hellstrom wrote: Implement back-to-fake

Re: [Mesa-dev] [PATCH 0/9] dri2: Swapbuffer update v3.

2018-09-05 Thread Thomas Hellstrom
On 09/05/2018 02:36 PM, Timothy Arceri wrote: On 05/09/18 22:09, Thomas Hellstrom wrote: On 09/05/2018 01:45 PM, Timothy Arceri wrote: On 16/08/17 04:31, Thomas Hellstrom wrote: Implement back-to-fake-front flips, Fix EGL_BUFFER_PRESERVED path. Implement dri3 support

Re: [Mesa-dev] [PATCH 0/9] dri2: Swapbuffer update v3.

2018-09-05 Thread Thomas Hellstrom
On 09/05/2018 01:45 PM, Timothy Arceri wrote: On 16/08/17 04:31, Thomas Hellstrom wrote: Implement back-to-fake-front flips, Fix EGL_BUFFER_PRESERVED path. Implement dri3 support for GLX_SWAP_EXCHANGE_OML and GLX_SWAP_COPY_OML. The back-to-fake-front flips will save a full buffer copy

Re: [Mesa-dev] [PATCH 2/2] pipe-loader: move dup(fd) within pipe_loader_drm_probe_fd

2018-08-29 Thread Thomas Hellstrom
passing it to the pipe-loader. Move the dup() within pipe-loader, explicitly document that and document all the cases through the codebase. A trivial git grep -2 pipe_loader_release makes things as obvious as it gets ;-) Cc: Leo Liu Cc: Thomas Hellstrom Cc: Axel Davy Cc: Patrick Rudolph Signed

Re: [Mesa-dev] [PATCH rfc 0/3] Be able to disable EGL/GLX_EXT_buffer_age

2018-07-05 Thread Thomas Hellstrom
On 07/05/2018 03:54 PM, Emil Velikov wrote: On 5 July 2018 at 14:31, Emil Velikov wrote: Hi Qiang Yu On 5 July 2018 at 03:31, Qiang Yu wrote: For GPU like ARM mali Utgard EGL/GLX_EXT_buffer_age will make performace worse. But mesa has no way to disable it. This patch series make driver be

[Mesa-dev] [PATCH] st/xa: Bump minor

2018-05-14 Thread Thomas Hellstrom
and common desktop usage latency. However, the xf86-video-vmware driver has no other way to tell but inspecting the xa version. Signed-off-by: Thomas Hellstrom <thellst...@vmware.com> Reviewed-by: Brian Paul <bri...@vmware.com> --- configure.ac | 2 +-

Re: [Mesa-dev] [PATCH] egl/x11: Send invalidate to the driver on dri2_copy_region

2018-04-26 Thread Thomas Hellstrom
On 04/26/2018 11:56 AM, Michel Dänzer wrote: On 2018-04-26 11:33 AM, Thomas Hellstrom wrote: On 04/26/2018 10:30 AM, Michel Dänzer wrote: On 2018-04-25 07:49 PM, Deepak Rawat wrote: Similar to what is done in dri2_x11_swap_buffers_msc send invalidate to the driver because egl/X11

Re: [Mesa-dev] [PATCH] egl/x11: Send invalidate to the driver on dri2_copy_region

2018-04-26 Thread Thomas Hellstrom
supports DRI2 version minor 1. Tested with piglit egl tests for regression. Cc: <mesa-sta...@lists.freedesktop.org> Signed-off-by: Deepak Rawat <dra...@vmware.com> Reviewed-by: Thomas Hellstrom <thellst...@vmware.com> --- src/egl/drivers/dri2/platform_x11.c | 7 +++ 1 file cha

[Mesa-dev] [PATCH] svga: Fix incorrect advertizing of EGL_KHR_gl_colorspace

2018-04-19 Thread Thomas Hellstrom
return the correct value for PIPE_BIND_DISPLAY_TARGET. The inconsistency causes EGL to crash at surface initialization if sRGB is not supported. Fix this by supporting both bind flags. Testing done: piglit egl_gl_colorspace srgb Cc: <mesa-sta...@lists.freedesktop.org> Signed-off-by: Thomas Hel

Re: [Mesa-dev] [PATCH] dri3: Prevent multiple freeing of buffers.

2018-04-06 Thread Thomas Hellstrom
Hi, On 04/06/2018 04:51 PM, Daniel Stone wrote: Hi Sergii, On 6 April 2018 at 09:12, Sergii Romantsov wrote: Commit 3160cb86aa92 adds optimization with flag 'reallocate'. Processing of flag causes buffers freeing while pointer is still hold in caller stack and

[Mesa-dev] [PATCH 1/3] glx/dri: Add a driconf option to disable GLX_SGI_video_sync

2018-03-05 Thread Thomas Hellstrom
Drivers on virtual hardware don't want to expose this extension to GLX compositors, similarly to GLX_OML_sync_control, since that significantly increases latency. Signed-off-by: Thomas Hellstrom <thellst...@vmware.com> Reviewed-by: Brian Paul <bri...@vmware.com> Reviewed-by: Sin

[Mesa-dev] [PATCH 3/3] drirc: Disable the GLX_SGI_video_sync extension for gnome-shell on vmware

2018-03-05 Thread Thomas Hellstrom
With this extension enabled and a server GLX implementation that actually honors it, Window movement lags considerably on gnome-shell/vmware, so disable it by default. Signed-off-by: Thomas Hellstrom <thellst...@vmware.com> Reviewed-by: Brian Paul <bri...@vmware.com> Reviewed-by: Sin

[Mesa-dev] [PATCH 0/3] Fix vmware dri3 latency on gnome-shell

2018-03-05 Thread Thomas Hellstrom
Similarly to what we previously did for GLX_OML_sync_control, we want to disable the GLX_SGI_video_sync extension for gnome-shell on vmware. With either of these extensions enabled, window movement lag increases significantly. The reason this hits with dri3 and not with dri2 is that with dri2 on

[Mesa-dev] [PATCH 2/3] gallium/st_dri: Honor the glx_disable_sgi_video_sync config option

2018-03-05 Thread Thomas Hellstrom
This option is disabled by default. Primarily intended for drivers on virtual hardware. Signed-off-by: Thomas Hellstrom <thellst...@vmware.com> Reviewed-by: Brian Paul <bri...@vmware.com> Reviewed-by: Sinclair Yeh <s...@vmware.com> Reviewed-by: Deepak Rawat <dra...@vmware.

Re: [Mesa-dev] [PATCH] loader_dri3/glx/egl: Reinstate the loader_dri3_vtable get_dri_screen callback

2018-02-12 Thread Thomas Hellstrom
Hi! It would be good if somebody could review this so we can get the fix in. Thanks, Thomas On 02/09/2018 09:37 AM, Thomas Hellstrom wrote: Removing this callback caused rendering corruption in some multi-screen cases, so it is reinstated but without the drawable argument which was never

[Mesa-dev] [PATCH] loader_dri3/glx/egl: Reinstate the loader_dri3_vtable get_dri_screen callback

2018-02-09 Thread Thomas Hellstrom
; mesa-sta...@lists.freedesktop.org Fixes: 5198e48a0d (loader_dri3/glx/egl: Remove the loader_dri3_vtable get_dri_screen callback) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105013 Reported-by: Daniel van Vugt <daniel.van.v...@canonical.com> Signed-off-by: Thomas Hellstrom <thellst...@vmware.com>

[Mesa-dev] [PATCH v2] loader/dri3: Avoid freeing renderbuffers in use

2018-01-12 Thread Thomas Hellstrom
allogic.com> Tested-by: Vadym Shovkoplias <vadym.shovkopl...@globallogic.com> Reviewed-by: Michel Dänzer <michel.daen...@amd.com> Signed-off-by: Thomas Hellstrom <thellst...@vmware.com> --- src/loader/loader_dri3_helper.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)

Re: [Mesa-dev] [PATCH] loader/dri3: Avoid freeing renderbuffers in use

2018-01-11 Thread Thomas Hellstrom
On 01/11/2018 04:32 PM, Michel Dänzer wrote: On 2018-01-11 10:53 AM, Thomas Hellstrom wrote: Upon reception of an event that lowered the number of active back buffers, the code would immediately try to free all back buffers with an id equal to or higher than the new number of active back

[Mesa-dev] [PATCH] loader/dri3: Avoid freeing renderbuffers in use

2018-01-11 Thread Thomas Hellstrom
a new back buffer. Fixes: 15e208c4cc ("loader/dri3: Don't accidently free buffer holding new back content") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104214 Cc: "17.3" <mesa-sta...@lists.freedesktop.org> Signed-off-by: Thomas Hellstrom <thellst..

Re: [Mesa-dev] [PATCH] loader/dri3: Improve dri3 thread-safety

2017-11-21 Thread Thomas Hellstrom
Hi, Nicolai, On 11/21/2017 11:50 AM, Nicolai Hähnle wrote: Hi Thomas, On 20.11.2017 18:19, Thomas Hellstrom wrote: Is this a multithreaded test? Do you see the error with Ubuntu 17.10 + Xorg? The dEQP-GLES31 tests are all single-threaded. I could finally test with the Ubuntu 17.10 on Xorg

Re: [Mesa-dev] [PATCH] loader/dri3: Improve dri3 thread-safety

2017-11-20 Thread Thomas Hellstrom
p on 17.04 (with Xorg) doesn't see the hangs. Disabling Gallium threading makes no difference. Any ideas what's going on? Thanks, Nicolai On 03.11.2017 12:02, Thomas Hellstrom wrote: It turned out that with recent changes that call into dri3 from glFinish(), it appears like different thread end

Re: [Mesa-dev] [PATCH] loader/dri3: Improve dri3 thread-safety

2017-11-06 Thread Thomas Hellstrom
On 11/06/2017 12:14 PM, Nicolai Hähnle wrote: On 03.11.2017 12:02, Thomas Hellstrom wrote: It turned out that with recent changes that call into dri3 from glFinish(), it appears like different thread end up waiting for X events simultaneously, causing deadlocks since they steal events from

[Mesa-dev] [PATCH] loader/dri3: Improve dri3 thread-safety

2017-11-03 Thread Thomas Hellstrom
completely thread-safe but at least it's a first step. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102358 Fixes: d5ba75f8881 "st/dri2 Plumb the flush_swapbuffer functionality through to dri3" Signed-off-by: Thomas Hellstrom <thellst...@vmware.com> --- src/loader/loader_dr

Re: [Mesa-dev] [PATCH v2] st/mesa: Initialize textures array in st_framebuffer_validate

2017-10-17 Thread Thomas Hellstrom
window is resized. v2: * Use generic stable tag instead of Fixes: tag, since the problem could already happen before the commit referenced in v1 (Thomas Hellstrom) * Use memset to initialize the array on the stack instead of allocating the array with os_calloc. Cc: mesa-sta...@lists.freedeskt

Re: [Mesa-dev] [PATCH 2/2] loader/dri3: Make sure we invalidate a drawable on size change

2017-10-16 Thread Thomas Hellstrom
On 10/16/2017 04:39 PM, Michel Dänzer wrote: On 16/10/17 02:21 PM, Thomas Hellstrom wrote: On 10/16/2017 12:53 PM, Thomas Hellstrom wrote: Hi, Michel, On 10/16/2017 12:35 PM, Michel Dänzer wrote: Hi Thomas, On 05/09/17 10:15 AM, Thomas Hellstrom wrote: If we're seeing a drawable size

Re: [Mesa-dev] [PATCH 2/2] loader/dri3: Make sure we invalidate a drawable on size change

2017-10-16 Thread Thomas Hellstrom
Hi, Michel, On 10/16/2017 12:35 PM, Michel Dänzer wrote: Hi Thomas, On 05/09/17 10:15 AM, Thomas Hellstrom wrote: If we're seeing a drawable size change, in particular after processing a configure notify event, make sure we invalidate so that the state tracker picks up the new geometry

Re: [Mesa-dev] [PATCH 2/2] loader/dri3: Make sure we invalidate a drawable on size change

2017-10-16 Thread Thomas Hellstrom
On 10/16/2017 12:53 PM, Thomas Hellstrom wrote: Hi, Michel, On 10/16/2017 12:35 PM, Michel Dänzer wrote: Hi Thomas, On 05/09/17 10:15 AM, Thomas Hellstrom wrote: If we're seeing a drawable size change, in particular after processing a configure notify event, make sure we invalidate so

[Mesa-dev] dri3 thread safe

2017-10-10 Thread Thomas Hellstrom
Hi, Gregory. I just noticed the following text in dri3_glx.c: 63b78c93 (Gregory Hainaut   2017-05-29 13:18:26 +0200  506)    /* Unlike DRI2, DRI3 doesn't call GetBuffers/GetBuffersWithFormat 63b78c93 (Gregory Hainaut   2017-05-29 13:18:26 +0200  507) * during draw so we're safe here.

Re: [Mesa-dev] [PATCH 1/3] loader/dri3: Use local blits and local buffers when resizing

2017-10-03 Thread Thomas Hellstrom
On 10/03/2017 06:15 PM, Sinclair Yeh wrote: On Tue, Oct 03, 2017 at 02:16:42PM +0200, Thomas Hellstrom wrote: Hi! Could anyone please review this series? Thanks, Thomas Minor typo in the commit message of 1/3: [Mesa-dev] [PATCH 1/3] loader/dri3: Use local blits and local buffers when

Re: [Mesa-dev] [PATCH 1/3] loader/dri3: Use local blits and local buffers when resizing

2017-10-03 Thread Thomas Hellstrom
Hi! Could anyone please review this series? Thanks, Thomas On 09/15/2017 10:48 AM, Thomas Hellstrom wrote: When a drawable is resized, and we we fill the resized buffers, with data from the old buffers, use a local blit if there is a local buffer (back or fake front), and we have local

Re: [Mesa-dev] [PATCH] st/dri: Add an option to always request a front buffer from the loader

2017-09-18 Thread Thomas Hellstrom
On 09/18/2017 12:43 PM, Eric Anholt wrote: Thomas Hellstrom <thellst...@vmware.com> writes: When an application decides to read from the front buffer of a window, typically a fake front is created and initialized with the real front window contents. However, if there was a window m

Re: [Mesa-dev] [PATCH] st/dri: Add an option to always request a front buffer from the loader

2017-09-18 Thread Thomas Hellstrom
On 09/18/2017 01:10 PM, Thomas Hellstrom wrote: On 09/18/2017 12:43 PM, Eric Anholt wrote: Thomas Hellstrom <thellst...@vmware.com> writes: When an application decides to read from the front buffer of a window, typically a fake front is created and initialized with the real front

Re: [Mesa-dev] [PATCH] st/dri: Add an option to always request a front buffer from the loader

2017-09-18 Thread Thomas Hellstrom
Hi. On 09/18/2017 12:18 PM, Keith Packard wrote: Thomas Hellstrom <thellst...@vmware.com> writes: When an application decides to read from the front buffer of a window, typically a fake front is created and initialized with the real front window contents. However, if there was a

[Mesa-dev] [PATCH 1/3] loader/dri3: Use local blits and local buffers when resizing

2017-09-15 Thread Thomas Hellstrom
When a drawable is resized, and we we fill the resized buffers, with data from the old buffers, use a local blit if there is a local buffer (back or fake front), and we have local blitting capability. Signed-off-by: Thomas Hellstrom <thellst...@vmware.com> --- src/loader/loader_dri3_he

[Mesa-dev] [PATCH 2/3] loader/dri3: Avoid resizing existing buffers in dri3_find_back_alloc

2017-09-15 Thread Thomas Hellstrom
Resize only in loader_dri3_get_buffers(), where the dri driver has a chance to immediately update the viewport. Signed-off-by: Thomas Hellstrom <thellst...@vmware.com> --- src/loader/loader_dri3_helper.c | 41 +++-- 1 file changed, 31 insertions(

[Mesa-dev] [PATCH 3/3] loader/dri3: Don't accidently free buffer holding new back content

2017-09-15 Thread Thomas Hellstrom
Avoid freeing buffers holding new back content (with GLX_SWAP_COPY_OML and GLX_SWAP_EXCHANGE_OML) Prevously that would have resulted in back buffer content becoming incorrect after a swap, although I haven't managed to trigger such a situation yet. Signed-off-by: Thomas Hellstrom <thel

[Mesa-dev] [PATCH] st/dri: Add an option to always request a front buffer from the loader

2017-09-15 Thread Thomas Hellstrom
that read from the frontbuffer become robust with dri3. While there is a memory usage overhead with this option enabled, the performance overhead with dri3 should be minimal. With dri2 the situation is different and require more work. Signed-off-by: Thomas Hellstrom <thellst...@vmware.

[Mesa-dev] [PATCH] mesa/st: Fix frontbuffer rendering regression

2017-09-07 Thread Thomas Hellstrom
again as soon as any rendering was touching the front. Now the latter part never happened, because it was part of a state validation and we never marked that part of the state as dirty. So mark the framebuffer state dirty after a frontbuffer flush. (fdo bugzilla 102496) Signed-off-by: Thoma

[Mesa-dev] [PATCH 2/2] loader/dri3: Make sure we invalidate a drawable on size change

2017-09-05 Thread Thomas Hellstrom
If we're seeing a drawable size change, in particular after processing a configure notify event, make sure we invalidate so that the state tracker picks up the new geometry. Signed-off-by: Thomas Hellstrom <thellst...@vmware.com> --- src/loader/loader_dri3_helper.c | 2 ++ 1 file chan

[Mesa-dev] [PATCH 1/2] loader/dri3: Process event after each fence wait

2017-09-05 Thread Thomas Hellstrom
This tries to mimic dri2 behaviour where events are typically processed while waiting for X replies. Since, during steady-state dri3 rendering, we seldom wait for xcb replies, and haven't enabled any automatic event processing, instead check for events after a fence wait. Signed-off-by: Thomas

Re: [Mesa-dev] [PATCH 2/2] loader/dri3: Invalidate the drawable after copySubBuffer

2017-09-05 Thread Thomas Hellstrom
On 09/05/2017 08:50 AM, Thomas Hellstrom wrote: Hi, Michel, [...] I guess what could perhaps be done is to process any received events in dri3_fence_await, and invalidate only if we see a drawable change to try to mimic dri2 behaviour.. Actually this seems like a better and more general

Re: [Mesa-dev] [PATCH 1/2] loader/dri3: Use client local back to front blit in copySubBuffer if available

2017-09-05 Thread Thomas Hellstrom
On 09/05/2017 08:49 AM, Axel Davy wrote: Hi, [...] Reviewed-by: Axel Davy Thanks for reviewing, Axel. /Thomas ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org

Re: [Mesa-dev] [PATCH 2/2] loader/dri3: Invalidate the drawable after copySubBuffer

2017-09-05 Thread Thomas Hellstrom
Hi, Michel, On 09/05/2017 06:02 AM, Michel Dänzer wrote: On 04/09/17 09:27 PM, Thomas Hellstrom wrote: Anyone using copySubBuffer as a replacement for swapBuffers would probably want window resizing to update the viewport. Signed-off-by: Thomas Hellstrom <thellst...@vmware.com> ---

Re: [Mesa-dev] [PATCH 1/2] loader/dri3: Use client local back to front blit in copySubBuffer if available

2017-09-05 Thread Thomas Hellstrom
Hi! On 09/05/2017 07:36 AM, Axel Davy wrote: On 04/09/2017 14:27, Thomas Hellstrom wrote: The copySubBuffer functionality always attempted a server side blit from back to fake front if a fake front was present, and we weren't displaying on a remote GPU. Now that we always have local blit

[Mesa-dev] [PATCH 2/2] loader/dri3: Invalidate the drawable after copySubBuffer

2017-09-04 Thread Thomas Hellstrom
Anyone using copySubBuffer as a replacement for swapBuffers would probably want window resizing to update the viewport. Signed-off-by: Thomas Hellstrom <thellst...@vmware.com> --- src/loader/loader_dri3_helper.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/

[Mesa-dev] [PATCH 1/2] loader/dri3: Use client local back to front blit in copySubBuffer if available

2017-09-04 Thread Thomas Hellstrom
blit. Signed-off-by: Thomas Hellstrom <thellst...@vmware.com> --- src/loader/loader_dri3_helper.c | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/loader/loader_dri3_helper.c b/src/loader/loader_dri3_helper.c index e3120f5..c0a6e0d 100644 --- a/src/

Re: [Mesa-dev] [PATCH 2/9] loader_dri3/glx/egl: Optionally use a blit context for blitting operations

2017-08-18 Thread Thomas Hellstrom
On 08/18/2017 07:02 PM, Emil Velikov wrote: Hi Thomas, On 15 August 2017 at 19:31, Thomas Hellstrom <thellst...@vmware.com> wrote: +/** + * A cached blit context. + */ +struct loader_dri3_blit_context { + mtx_t mtx; + __DRIcontext *ctx; + __DRIscreen *cur_screen; +

[Mesa-dev] [PATCH 9/9] loader_dri3: Make sure we have an updated back v3

2017-08-16 Thread Thomas Hellstrom
there was no GL rendering in between. Make sure that we have a back buffer in those situations. v2: Eliminate the drawable have_back_format member. v3: Make sure we re-initialize the back even if it exists. Signed-off-by: Thomas Hellstrom <thellst...@vmware.com> Reviewed-by: Michel Dänzer <mi

[Mesa-dev] [PATCH 9/9] loader_dri3: Make sure we have an updated back v2

2017-08-15 Thread Thomas Hellstrom
there was no GL rendering in between. Make sure that we have a back buffer in those situations. v2: Eliminate the drawable have_back_format member. Signed-off-by: Thomas Hellstrom <thellst...@vmware.com> --- src/loader/loader_dri3_helper.c | 62 ++--- src/

[Mesa-dev] [PATCH 8/9] loader_dri3: Support GLX_SWAP_EXCHANGE_OML

2017-08-15 Thread Thomas Hellstrom
Add support for the exchange swap method. Since we're now forcing a fake front buffer and we exchange the back and fake front on swaps, we don't need to add much code. Signed-off-by: Thomas Hellstrom <thellst...@vmware.com> Reviewed-by: Michel Dänzer <michel.daen...@amd.com> ---

[Mesa-dev] [PATCH 0/9] dri2: Swapbuffer update v3.

2017-08-15 Thread Thomas Hellstrom
Implement back-to-fake-front flips, Fix EGL_BUFFER_PRESERVED path. Implement dri3 support for GLX_SWAP_EXCHANGE_OML and GLX_SWAP_COPY_OML. The back-to-fake-front flips will save a full buffer copy in the case of a fake front being enabled and GLX_SWAP_UNDEFINED_OML. Support for

[Mesa-dev] [PATCH 3/9] loader_dri3: Increase the likelyhood of reusing the current swap buffer

2017-08-15 Thread Thomas Hellstrom
Signed-off-by: Thomas Hellstrom <thellst...@vmware.com> Reviewed-by: Michel Dänzer <michel.daen...@amd.com> --- src/loader/loader_dri3_helper.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/loader/loader_dri3_helper.c b/src/loader/loader_dri3_helper.c index 131c9e9..b3

[Mesa-dev] [PATCH 2/9] loader_dri3/glx/egl: Optionally use a blit context for blitting operations

2017-08-15 Thread Thomas Hellstrom
with dri3. If we don't have a current context when we want to blit, try creating a private dri context and maintain a context cache of a single context. Signed-off-by: Thomas Hellstrom <thellst...@vmware.com> --- src/egl/drivers/dri2/egl_dri2.c | 5 +- src/egl/drivers/dri2/egl_

[Mesa-dev] [PATCH 4/9] loader_dri3: Honor the request to preserve back buffer content

2017-08-15 Thread Thomas Hellstrom
server-side page-flipping to avoid a client deadlock and then, when grabbing a new back buffer, sleep until the old back is idle, which may take a substantial time depending on swap interval. Signed-off-by: Thomas Hellstrom <thellst...@vmware.com> --- src/loader/loader_dri3_helper.

[Mesa-dev] [PATCH 7/9] loader_dri3: Eliminate the back-to-fake-front copy

2017-08-15 Thread Thomas Hellstrom
-by: Thomas Hellstrom <thellst...@vmware.com> Reviewed-by: Michel Dänzer <michel.daen...@amd.com> --- src/loader/loader_dri3_helper.c | 50 + 1 file changed, 31 insertions(+), 19 deletions(-) diff --git a/src/loader/loader_dri3_helper.c

Re: [Mesa-dev] [PATCH 02/11] loader/dri3: Make sure we always have a context for image blit operations

2017-08-15 Thread Thomas Hellstrom
Hi, Michel, Thanks for reviewing. On 08/15/2017 08:57 AM, Michel Dänzer wrote: On 11/08/17 11:14 PM, Thomas Hellstrom wrote: The code was relying on us always having a current context for client local image blit operations. Otherwise the blit would be skipped. However, glxSwapBuffers

Re: [Mesa-dev] [PATCH 06/11] loader_dri3: Honour the request to preserve back buffer content

2017-08-15 Thread Thomas Hellstrom
On 08/15/2017 09:33 AM, Michel Dänzer wrote: On 11/08/17 11:14 PM, Thomas Hellstrom wrote: EGL uses the force_copy parameter to loader_dri3_swap_buffers_msc() to indicate that it wants to preserve back buffer contents across a buffer swap. While the loader then turns off server-side page

Re: [Mesa-dev] [PATCH 11/11] loader_dri3: Make sure we have an updated back

2017-08-15 Thread Thomas Hellstrom
On 08/15/2017 09:32 AM, Michel Dänzer wrote: On 11/08/17 11:14 PM, Thomas Hellstrom wrote: With GLX_SWAP_COPY_OML and GLX_SWAP_EXCHANGE_OML it may happen in situations when glXSwapBuffers() is immediately followed by for example another glXSwapBuffers() or glXCopyBuffers() or back buffer age

[Mesa-dev] [PATCH 10/11] loader_dri3: Support GLX_SWAP_EXCHANGE_OML

2017-08-11 Thread Thomas Hellstrom
Add support for the exchange swap method. Since we're now forcing a fake front buffer and we exchange the back and fake front on swaps, we don't need to add much code. Signed-off-by: Thomas Hellstrom <thellst...@vmware.com> --- src/loader/loader_dri3_helper.c | 8 +--- 1 file chan

[Mesa-dev] [PATCH 11/11] loader_dri3: Make sure we have an updated back

2017-08-11 Thread Thomas Hellstrom
there was no GL rendering in between. Make sure that we have a back buffer in those situations. Signed-off-by: Thomas Hellstrom <thellst...@vmware.com> --- src/loader/loader_dri3_helper.c | 64 ++--- src/loader/loader_dri3_helper.h | 3 ++ 2 files changed, 57 inse

[Mesa-dev] [PATCH 06/11] loader_dri3: Honour the request to preserve back buffer content

2017-08-11 Thread Thomas Hellstrom
server-side page-flipping to avoid a client deadlock and then, when grabbing a new back buffer, sleep until the old back is idle, which may take a substantial time depending on swap interval. Signed-off-by: Thomas Hellstrom <thellst...@vmware.com> --- src/loader/loader_dri3_helper.

[Mesa-dev] [PATCH 09/11] loader_dri3: Eliminate the back-to-fake-front copy

2017-08-11 Thread Thomas Hellstrom
-by: Thomas Hellstrom <thellst...@vmware.com> --- src/loader/loader_dri3_helper.c | 50 + 1 file changed, 31 insertions(+), 19 deletions(-) diff --git a/src/loader/loader_dri3_helper.c b/src/loader/loader_dri3_helper.c index 2787f9f..7056f46 100644 ---

[Mesa-dev] [PATCH 07/11] loader_dri3: Support GLX_SWAP_COPY_OML

2017-08-11 Thread Thomas Hellstrom
Support the GLX_SWAP_COPY_OML method. When this method is requested, we use the same swapbuffer code path as EGL_BUFFER_PRESERVED. Signed-off-by: Thomas Hellstrom <thellst...@vmware.com> --- src/loader/loader_dri3_helper.c | 9 - src/loader/loader_dri3_helper.h | 1 + 2 files chan

[Mesa-dev] [PATCH 08/11] loader_dri3: Remove buffer_type from buffer metadata

2017-08-11 Thread Thomas Hellstrom
It's not used anywhere and now that we're about to exchange back- and fake fronts it doesn't serve a purpose. Signed-off-by: Thomas Hellstrom <thellst...@vmware.com> --- src/loader/loader_dri3_helper.c | 2 -- src/loader/loader_dri3_helper.h | 2 -- 2 files changed, 4 deletions(-) diff

[Mesa-dev] [PATCH 03/11] glx: Notify the dri3 loader if we are about destroy a dri screen

2017-08-11 Thread Thomas Hellstrom
This gives the dri3 loader a chance to clean up the blit context cache. Signed-off-by: Thomas Hellstrom <thellst...@vmware.com> --- src/glx/dri3_glx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/glx/dri3_glx.c b/src/glx/dri3_glx.c index dc94740..b79fec7 100644 --- a/s

[Mesa-dev] [PATCH 00/10] dri3: Swapbuffer update v2

2017-08-11 Thread Thomas Hellstrom
. That test required modifying the dri2 state tracke to advertise unconditional support for GLX_SWAP_EXCHANGE_OML A piglit glx-swap-copy test derived from the glx-swap-exchange test. Not posted yet. Signed-off-by: Thomas Hellstrom <thellst...@vmware.

[Mesa-dev] [PATCH 02/11] loader/dri3: Make sure we always have a context for image blit operations

2017-08-11 Thread Thomas Hellstrom
with dri3. If we don't have a current context when we want to blit, try creating a private dri context and maintain a context cache of a single context. Signed-off-by: Thomas Hellstrom <thellst...@vmware.com> --- src/loader/loader_dri3_helper.c | 237 src/

[Mesa-dev] [PATCH 04/11] egl/x11_dri3: Notify the dri3 loader when we're about to close a screen

2017-08-11 Thread Thomas Hellstrom
This gives the dri3 loader a chance to clean up the blit context cache. Signed-off-by: Thomas Hellstrom <thellst...@vmware.com> --- src/egl/drivers/dri2/egl_dri2.c | 5 - src/egl/drivers/dri2/egl_dri2.h | 2 ++ src/egl/drivers/dri2/platform_x11_dri3.c | 9 + 3

Re: [Mesa-dev] [PATCH 1/4] dri: Fix __DRIconfig reporting of __DRI_ATTRIB_SWAP_METHOD

2017-08-10 Thread Thomas Hellstrom
Hi, Emil, On 08/10/2017 06:20 PM, Emil Velikov wrote: Hi Thomas, Apologies for dropping in so late. On 9 August 2017 at 10:53, Thomas Hellstrom <thellst...@vmware.com> wrote: The attribMap had two entries for this attribute, and driGetConfigAttribIndex didn't return a proper

Re: [Mesa-dev] [PATCH 2/2] dri3: Swapbuffer update

2017-08-10 Thread Thomas Hellstrom
On 08/10/2017 05:27 AM, Michel Dänzer wrote: On 09/08/17 04:07 PM, Thomas Hellstrom wrote: On 08/09/2017 08:36 AM, Michel Dänzer wrote: On 08/08/17 03:48 PM, Thomas Hellstrom wrote: Implement back-to-fake-front flips, Fix EGL_BUFFER_PRESERVED path. Implement dri3 support

Re: [Mesa-dev] [PATCH 4/4] dri: Introduce SWAP_METHOD tokens

2017-08-09 Thread Thomas Hellstrom
On 08/10/2017 05:20 AM, Michel Dänzer wrote: On 09/08/17 06:53 PM, Thomas Hellstrom wrote: We shouldn't be using GLX tokens in the dri subsystem, so define dri SWAP_METHOD tokens and translate when necessary. Unfortunately the X server uses the dri swap method value untranslated as the GLX

Re: [Mesa-dev] [PATCH 1/4] dri: Fix __DRIconfig reporting of __DRI_ATTRIB_SWAP_METHOD

2017-08-09 Thread Thomas Hellstrom
On 08/10/2017 05:20 AM, Michel Dänzer wrote: On 09/08/17 06:53 PM, Thomas Hellstrom wrote: The attribMap had two entries for this attribute, and driGetConfigAttribIndex didn't return a proper value for this attribute. Fix this, and also make sure we return SWAP_UNDEFINED for single-buffer

[Mesa-dev] [PATCH 3/4] glx: Fix swap method config matching

2017-08-09 Thread Thomas Hellstrom
Due to bugs in dri swap method reporting, neither the fbconfigs received from the server nor the value reported from driconfigs were correct. Now that's been fixed and we can enable config swapmethod matching again. Signed-off-by: Thomas Hellstrom <thellst...@vmware.com> --- src/glx/dri_co

[Mesa-dev] [PATCH 4/4] dri: Introduce SWAP_METHOD tokens

2017-08-09 Thread Thomas Hellstrom
have the same values as the corresponding GLX tokens. Signed-off-by: Thomas Hellstrom <thellst...@vmware.com> --- include/GL/internal/dri_interface.h | 12 src/gallium/state_trackers/dri/dri_screen.c | 3 ++- src/glx/dri_common.c

[Mesa-dev] [0/4] glx/dri: Attempt to fix GLX_OML_swap_method v2

2017-08-09 Thread Thomas Hellstrom
The current implementation was suffering from the following problems: 1) The driGetConfigAttribIndex function was not returning any value for the driconfig swapMethod. 2) The X server GLX code is using the value obtained from the AIGLX dri driver driGetConfigAttribIndex to populate its GLX

  1   2   3   4   >