[Mesa-dev] [PATCH] r600g, radeonsi: Preserve existing buffer flags

Marek Olšák maraeo at gmail.com
Tue Sep 2 02:34:41 PDT 2014


Reviewed-by: Marek Olšák <marek.olsak at amd.com>

Marek

On Tue, Sep 2, 2014 at 10:54 AM, Michel Dänzer <michel at daenzer.net> wrote:
> From: Michel Dänzer <michel.daenzer at amd.com>
>
> The default case was accidentally clearing RADEON_FLAG_CPU_ACCESS from the
> previous fall-through cases.
>
> Reported-by: Mathias Fröhlich <Mathias.Froehlich at gmx.net>
> Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
> ---
>  src/gallium/drivers/radeon/r600_buffer_common.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/src/gallium/drivers/radeon/r600_buffer_common.c b/src/gallium/drivers/radeon/r600_buffer_common.c
> index c4e87a0..d85b64b 100644
> --- a/src/gallium/drivers/radeon/r600_buffer_common.c
> +++ b/src/gallium/drivers/radeon/r600_buffer_common.c
> @@ -121,17 +121,17 @@ bool r600_init_resource(struct r600_common_screen *rscreen,
>                  */
>                 if (rscreen->info.drm_minor < 40) {
>                         res->domains = RADEON_DOMAIN_GTT;
> -                       flags = RADEON_FLAG_GTT_WC;
> +                       flags |= RADEON_FLAG_GTT_WC;
>                         break;
>                 }
> -               flags = RADEON_FLAG_CPU_ACCESS;
> +               flags |= RADEON_FLAG_CPU_ACCESS;
>                 /* fall through */
>         case PIPE_USAGE_DEFAULT:
>         case PIPE_USAGE_IMMUTABLE:
>         default:
>                 /* Not listing GTT here improves performance in some apps. */
>                 res->domains = RADEON_DOMAIN_VRAM;
> -               flags = RADEON_FLAG_GTT_WC;
> +               flags |= RADEON_FLAG_GTT_WC;
>                 break;
>         }
>
> --
> 2.1.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list