diff options
-rw-r--r-- | src/gallium/drivers/iris/iris_resource.c | 12 |
1 files 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); |