From 49896861ce81d15e248edb4c6f92819ab9f20c20 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Fri, 19 Jan 2018 15:09:05 -0800 Subject: [PATCH] iris: linear resources --- src/gallium/drivers/iris/iris_resource.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/gallium/drivers/iris/iris_resource.c b/src/gallium/drivers/iris/iris_resource.c index 65985747d00..b141d0de8b3 100644 --- a/src/gallium/drivers/iris/iris_resource.c +++ b/src/gallium/drivers/iris/iris_resource.c @@ -212,12 +212,6 @@ iris_resource_create_with_modifiers(struct pipe_screen *pscreen, uint64_t modifier = DRM_FORMAT_MOD_INVALID; - if (templ->target == PIPE_BUFFER) - modifier = DRM_FORMAT_MOD_LINEAR; - - if (templ->bind & (PIPE_BIND_LINEAR | PIPE_BIND_CURSOR)) - modifier = DRM_FORMAT_MOD_LINEAR; - if (modifiers_count == 0) { /* Display is X-tiled for historical reasons. */ modifier = (templ->bind & PIPE_BIND_DISPLAY_TARGET) ? @@ -225,6 +219,12 @@ iris_resource_create_with_modifiers(struct pipe_screen *pscreen, /* XXX: make sure this doesn't do stupid things for internal textures */ } + if (templ->target == PIPE_BUFFER) + modifier = DRM_FORMAT_MOD_LINEAR; + + if (templ->bind & (PIPE_BIND_LINEAR | PIPE_BIND_CURSOR)) + modifier = DRM_FORMAT_MOD_LINEAR; + if (modifier == DRM_FORMAT_MOD_INVALID) { /* User requested specific modifiers */ modifier = select_best_modifier(devinfo, modifiers, modifiers_count); -- 2.30.2