Re: [Mesa-dev] [PATCH rfc 0/3] Be able to disable EGL/GLX_EXT_buffer_age
On Fri, Jul 6, 2018 at 6:20 AM Eric Anholt wrote: > > Qiang Yu writes: > > > Hi Emil, > > > > On Thu, Jul 5, 2018 at 9: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 able to disable it and add a > >> >> gallium pipe cap for gallium driver usage. Due to currently > >> >> only out of tree lima driver need it, and not sure if this is > >> >> the right way to disable it, so I send this RFC before lima be > >> >> able to upstream. > >> >> > >> > Pretty sure we already have a way to handle that. Look for > >> > glx_disable_ext_buffer_age - it was introduced for the VMWare driver. > >> > Although we should: > >> > a) tweak the name - kind of split if we need to > >> > b) add glx/dri2 and egl support > >> > > >> Looking at the implementation - it uses a driver query, meaning that > >> one could enable it at a later stage. > >> No need to worry if the user has old drirc/etc as with current solution. > > > > Yes, use drirc to disable buffer age means it can be enabled by changing > > the config (driver has to support it). But GPU like mali just don't want to > > support it at all (need extra code do bad things). > > You must have the ability to load back into the tile buffer, so I think > the driver should continue to support buffer age. You don't know the > complexity of recreating their whole frame, that decision should be up > to them. Yeah, mali can load back into the tile buffer. But buffer age ext has no way to tell how much partial draw cost for different GPU, expose it just tell application partial draw is cheaper. Regards, Qiang > That said, it would be really nice for EGL to decide not to > preserve buffers (and emit the resource invalidate call through gallium) > when the client hasn't asked for a buffer age recently, and then just > report the undefined buffer age value the first time they ask for it. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH rfc 0/3] Be able to disable EGL/GLX_EXT_buffer_age
Qiang Yu writes: > Hi Emil, > > On Thu, Jul 5, 2018 at 9: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 able to disable it and add a >> >> gallium pipe cap for gallium driver usage. Due to currently >> >> only out of tree lima driver need it, and not sure if this is >> >> the right way to disable it, so I send this RFC before lima be >> >> able to upstream. >> >> >> > Pretty sure we already have a way to handle that. Look for >> > glx_disable_ext_buffer_age - it was introduced for the VMWare driver. >> > Although we should: >> > a) tweak the name - kind of split if we need to >> > b) add glx/dri2 and egl support >> > >> Looking at the implementation - it uses a driver query, meaning that >> one could enable it at a later stage. >> No need to worry if the user has old drirc/etc as with current solution. > > Yes, use drirc to disable buffer age means it can be enabled by changing > the config (driver has to support it). But GPU like mali just don't want to > support it at all (need extra code do bad things). You must have the ability to load back into the tile buffer, so I think the driver should continue to support buffer age. You don't know the complexity of recreating their whole frame, that decision should be up to them. That said, it would be really nice for EGL to decide not to preserve buffers (and emit the resource invalidate call through gallium) when the client hasn't asked for a buffer age recently, and then just report the undefined buffer age value the first time they ask for it. signature.asc Description: PGP signature ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH rfc 0/3] Be able to disable EGL/GLX_EXT_buffer_age
Hi Emil, On Thu, Jul 5, 2018 at 9: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 able to disable it and add a > >> gallium pipe cap for gallium driver usage. Due to currently > >> only out of tree lima driver need it, and not sure if this is > >> the right way to disable it, so I send this RFC before lima be > >> able to upstream. > >> > > Pretty sure we already have a way to handle that. Look for > > glx_disable_ext_buffer_age - it was introduced for the VMWare driver. > > Although we should: > > a) tweak the name - kind of split if we need to > > b) add glx/dri2 and egl support > > > Looking at the implementation - it uses a driver query, meaning that > one could enable it at a later stage. > No need to worry if the user has old drirc/etc as with current solution. Yes, use drirc to disable buffer age means it can be enabled by changing the config (driver has to support it). But GPU like mali just don't want to support it at all (need extra code do bad things). Regards, Qiang > > Having two ways of doing the same thing is a bad idea. > Perhaps we can remove the drirc implementation and use this instead? > > Thomas, what do you think? > > Thanks > Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH rfc 0/3] Be able to disable EGL/GLX_EXT_buffer_age
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 able to disable it and add a gallium pipe cap for gallium driver usage. Due to currently only out of tree lima driver need it, and not sure if this is the right way to disable it, so I send this RFC before lima be able to upstream. Pretty sure we already have a way to handle that. Look for glx_disable_ext_buffer_age - it was introduced for the VMWare driver. Although we should: a) tweak the name - kind of split if we need to b) add glx/dri2 and egl support Looking at the implementation - it uses a driver query, meaning that one could enable it at a later stage. No need to worry if the user has old drirc/etc as with current solution. Having two ways of doing the same thing is a bad idea. Perhaps we can remove the drirc implementation and use this instead? Thomas, what do you think? The thing is that we only notice a performance regression with GL compositors like gnome-shell and compiz, and that's typically because of side effects of these compositors. They're using full buffer swaps when the extension is enabled rather than damage regions. For other applications we want it enabled. So we need a way to turn it off for certain apps. /Thomas Thanks Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH rfc 0/3] Be able to disable EGL/GLX_EXT_buffer_age
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 able to disable it and add a >> gallium pipe cap for gallium driver usage. Due to currently >> only out of tree lima driver need it, and not sure if this is >> the right way to disable it, so I send this RFC before lima be >> able to upstream. >> > Pretty sure we already have a way to handle that. Look for > glx_disable_ext_buffer_age - it was introduced for the VMWare driver. > Although we should: > a) tweak the name - kind of split if we need to > b) add glx/dri2 and egl support > Looking at the implementation - it uses a driver query, meaning that one could enable it at a later stage. No need to worry if the user has old drirc/etc as with current solution. Having two ways of doing the same thing is a bad idea. Perhaps we can remove the drirc implementation and use this instead? Thomas, what do you think? Thanks Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH rfc 0/3] Be able to disable EGL/GLX_EXT_buffer_age
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 able to disable it and add a > gallium pipe cap for gallium driver usage. Due to currently > only out of tree lima driver need it, and not sure if this is > the right way to disable it, so I send this RFC before lima be > able to upstream. > Pretty sure we already have a way to handle that. Look for glx_disable_ext_buffer_age - it was introduced for the VMWare driver. Although we should: a) tweak the name - kind of split if we need to b) add glx/dri2 and egl support HTH Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH rfc 0/3] Be able to disable EGL/GLX_EXT_buffer_age
Hi Qiang, On Thu, 5 Jul 2018 at 03:32, 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 able to disable it and add a > gallium pipe cap for gallium driver usage. Due to currently > only out of tree lima driver need it, and not sure if this is > the right way to disable it, so I send this RFC before lima be > able to upstream. Series is: Acked-by: Daniel Stone Cheers, Daniel ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH rfc 0/3] Be able to disable EGL/GLX_EXT_buffer_age
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 able to disable it and add a gallium pipe cap for gallium driver usage. Due to currently only out of tree lima driver need it, and not sure if this is the right way to disable it, so I send this RFC before lima be able to upstream. Qiang Yu (3): egl,glx: query dri integer to expose EGL/GLX_EXT_buffer_age gallium: add PIPE_CAP_BUFFER_AGE egl: fix query buffer age fail when EGL_KHR_partial_update include/GL/internal/dri_interface.h | 2 ++ src/egl/drivers/dri2/egl_dri2.c | 3 +++ src/egl/drivers/dri2/platform_android.c | 1 - src/egl/drivers/dri2/platform_drm.c | 4 ++-- src/egl/drivers/dri2/platform_wayland.c | 2 -- src/egl/drivers/dri2/platform_x11.c | 1 - src/egl/main/eglsurface.c | 7 ++- src/gallium/docs/source/screen.rst | 1 + src/gallium/drivers/etnaviv/etnaviv_screen.c| 1 + src/gallium/drivers/freedreno/freedreno_screen.c| 1 + src/gallium/drivers/i915/i915_screen.c | 1 + src/gallium/drivers/llvmpipe/lp_screen.c| 1 + src/gallium/drivers/nouveau/nv30/nv30_screen.c | 1 + src/gallium/drivers/nouveau/nv50/nv50_screen.c | 1 + src/gallium/drivers/nouveau/nvc0/nvc0_screen.c | 1 + src/gallium/drivers/r300/r300_screen.c | 1 + src/gallium/drivers/r600/r600_pipe.c| 1 + src/gallium/drivers/radeonsi/si_get.c | 1 + src/gallium/drivers/softpipe/sp_screen.c| 1 + src/gallium/drivers/svga/svga_screen.c | 1 + src/gallium/drivers/swr/swr_screen.cpp | 1 + src/gallium/drivers/vc4/vc4_screen.c| 1 + src/gallium/drivers/vc5/vc5_screen.c| 1 + src/gallium/drivers/virgl/virgl_screen.c| 2 ++ src/gallium/include/pipe/p_defines.h| 1 + src/gallium/state_trackers/dri/dri_query_renderer.c | 5 + src/glx/dri3_glx.c | 12 +--- src/mesa/drivers/dri/i915/intel_screen.c| 3 +++ src/mesa/drivers/dri/i965/intel_screen.c| 3 +++ src/mesa/drivers/dri/nouveau/nouveau_screen.c | 3 +++ src/mesa/drivers/dri/radeon/radeon_screen.c | 3 +++ src/mesa/drivers/dri/swrast/swrast.c| 3 +++ 32 files changed, 61 insertions(+), 10 deletions(-) -- 2.17.1 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev