[Mesa-dev] [PATCH 4/4] radeon: Determine the bo priority (MSAA, depth, UVD are high)
Marek Olšák
maraeo at gmail.com
Mon Jan 6 16:13:21 PST 2014
On Mon, Jan 6, 2014 at 12:18 PM, Lauri Kasanen <cand at gmx.com> wrote:
> Signed-off-by: Lauri Kasanen <cand at gmx.com>
> ---
> src/gallium/drivers/radeon/r600_buffer_common.c | 8 ++++++++
> src/gallium/drivers/radeon/radeon_uvd.c | 4 ++--
> src/gallium/winsys/radeon/drm/radeon_drm_bo.c | 4 ++++
> src/gallium/winsys/radeon/drm/radeon_drm_bo.h | 1 +
> src/gallium/winsys/radeon/drm/radeon_drm_cs.c | 2 +-
> src/gallium/winsys/radeon/drm/radeon_winsys.h | 2 ++
> 6 files changed, 18 insertions(+), 3 deletions(-)
>
> diff --git a/src/gallium/drivers/radeon/r600_buffer_common.c b/src/gallium/drivers/radeon/r600_buffer_common.c
> index ac5fbcc..fb8005a 100644
> --- a/src/gallium/drivers/radeon/r600_buffer_common.c
> +++ b/src/gallium/drivers/radeon/r600_buffer_common.c
> @@ -25,6 +25,7 @@
> */
>
> #include "r600_cs.h"
> +#include "util/u_format.h"
> #include "util/u_memory.h"
> #include "util/u_upload_mgr.h"
> #include <inttypes.h>
> @@ -101,6 +102,12 @@ bool r600_init_resource(struct r600_common_screen *rscreen,
> bool use_reusable_pool, unsigned usage)
> {
> uint32_t initial_domain, domains;
> + bool high_prio = false;
> +
> + /* If it's depth or MSAA, consider it high priority */
> + if (util_format_has_depth(util_format_description(res->b.b.format)) ||
> + res->b.b.nr_samples > 1)
> + high_prio = true;
I think this is a wrong place to check for texture properties. It
should be in r600_texture_create_object.
Marek
More information about the mesa-dev
mailing list