Re: [Mesa-dev] [PATCH 1/6 v3] r600g: do not use "fast-clear" for small textures (v3)

2018-06-03 Thread Gert Wollny
This gives me ~200 FPS more with a 200x200 glxgears window with both,
Barts and Ceder. 

Reviewed-by: Gert Wollny  

Am Montag, den 01.01.2018, 10:38 +0300 schrieb Konstantin Kharlamov:
> Ported from radeonsi. Improves windowed glxgears ran as
> 
>   vblank_mode=0 glxgears -info -geometry 0+0+512+512
> 
> from ≈2270 FPS to ≈2360 FPS. Tested with AMD TURKS.
> 
> v2: turned out glxgears ignores the option above, the correct way
> would
> be "512x512+0+0". Now it can be seen 512x512 actually loses 30 FPS.
> 300×300 however wins around a hundred FPS, and to leave some room in
> case results may differ for other cards I want not to nitpick in
> search
> of an optimum but to simply leave 300×300 in the code.
> v3: remove redundant braces, and try harder for the mail to stick to
> the rest of the series.
> 
> Signed-off-by: Konstantin Kharlamov 
> ---
>  src/gallium/drivers/r600/r600_texture.c | 10 ++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/src/gallium/drivers/r600/r600_texture.c
> b/src/gallium/drivers/r600/r600_texture.c
> index 03cdcd22ee..778e801136 100644
> --- a/src/gallium/drivers/r600/r600_texture.c
> +++ b/src/gallium/drivers/r600/r600_texture.c
> @@ -1793,6 +1793,16 @@ void evergreen_do_fast_color_clear(struct
> r600_common_context *rctx,
>   !(tex->resource.external_usage &
> PIPE_HANDLE_USAGE_EXPLICIT_FLUSH))
>   continue;
>  
> + /* Use a slow clear for small surfaces where the
> cost of
> +  * the eliminate pass can be higher than the benefit
> of fast
> +  * clear. AMDGPU-pro does this, but the numbers may
> differ.
> +  *
> +  * This helps on both dGPUs and APUs, even small
> ones.
> +  */
> + if (tex->resource.b.b.nr_samples <= 1 &&
> + tex->resource.b.b.width0 * tex-
> >resource.b.b.height0 <= 300 * 300)
> + continue;
> +
>   {
>   /* 128-bit formats are unusupported */
>   if (tex->surface.bpe > 8) {
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH 1/6 v3] r600g: do not use "fast-clear" for small textures (v3)

2017-12-31 Thread Konstantin Kharlamov
Ported from radeonsi. Improves windowed glxgears ran as

vblank_mode=0 glxgears -info -geometry 0+0+512+512

from ≈2270 FPS to ≈2360 FPS. Tested with AMD TURKS.

v2: turned out glxgears ignores the option above, the correct way would
be "512x512+0+0". Now it can be seen 512x512 actually loses 30 FPS.
300×300 however wins around a hundred FPS, and to leave some room in
case results may differ for other cards I want not to nitpick in search
of an optimum but to simply leave 300×300 in the code.
v3: remove redundant braces, and try harder for the mail to stick to
the rest of the series.

Signed-off-by: Konstantin Kharlamov 
---
 src/gallium/drivers/r600/r600_texture.c | 10 ++
 1 file changed, 10 insertions(+)

diff --git a/src/gallium/drivers/r600/r600_texture.c 
b/src/gallium/drivers/r600/r600_texture.c
index 03cdcd22ee..778e801136 100644
--- a/src/gallium/drivers/r600/r600_texture.c
+++ b/src/gallium/drivers/r600/r600_texture.c
@@ -1793,6 +1793,16 @@ void evergreen_do_fast_color_clear(struct 
r600_common_context *rctx,
!(tex->resource.external_usage & 
PIPE_HANDLE_USAGE_EXPLICIT_FLUSH))
continue;
 
+   /* Use a slow clear for small surfaces where the cost of
+* the eliminate pass can be higher than the benefit of fast
+* clear. AMDGPU-pro does this, but the numbers may differ.
+*
+* This helps on both dGPUs and APUs, even small ones.
+*/
+   if (tex->resource.b.b.nr_samples <= 1 &&
+   tex->resource.b.b.width0 * tex->resource.b.b.height0 <= 300 
* 300)
+   continue;
+
{
/* 128-bit formats are unusupported */
if (tex->surface.bpe > 8) {
-- 
2.15.1

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev