iris: Don't bother considering if the underlying surface is a cube
authorKenneth Graunke <kenneth@whitecape.org>
Fri, 30 Nov 2018 07:03:20 +0000 (23:03 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 21 Feb 2019 18:26:10 +0000 (10:26 -0800)
Dave fixed it to consider whether the sampler view is a cube.
With that, there's no point (possibly harm) in looking if the original
resource was a cube...if it's an array view, we don't want to treat it
as a cube anymore...

src/gallium/drivers/iris/iris_state.c

index d35738ea51ccb8c58a3accb3b729840e55701889..9ef6df7770eb3721d1e5037daa7141a7ca801b89 100644 (file)
@@ -1523,9 +1523,7 @@ iris_create_sampler_view(struct pipe_context *ctx,
 
    isv->res = (struct iris_resource *) tex;
 
-   isl_surf_usage_flags_t usage =
-      ISL_SURF_USAGE_TEXTURE_BIT |
-      (isv->res->surf.usage & ISL_SURF_USAGE_CUBE_BIT);
+   isl_surf_usage_flags_t usage = ISL_SURF_USAGE_TEXTURE_BIT;
 
    if (isv->base.target == PIPE_TEXTURE_CUBE ||
        isv->base.target == PIPE_TEXTURE_CUBE_ARRAY)