iris: be sure to skip buffers in resolve code
authorKenneth Graunke <kenneth@whitecape.org>
Sat, 8 Dec 2018 10:01:19 +0000 (02:01 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 21 Feb 2019 18:26:12 +0000 (10:26 -0800)
Buffers don't have ISL surfaces, and this can get us into trouble.

src/gallium/drivers/iris/iris_resolve.c

index aedc12f125b301ebc4cc31bc874ecb1e9df5194a..eb8552a3acab6baf704fe864a695a6f0fc9349ba 100644 (file)
@@ -94,6 +94,9 @@ resolve_sampler_views(struct iris_context *ice,
       struct iris_sampler_view *isv = shs->textures[i];
       struct iris_resource *res = (void *) isv->base.texture;
 
+      if (res->base.target == PIPE_BUFFER)
+         continue;
+
       if (batch->name != IRIS_BATCH_COMPUTE) {
          disable_rb_aux_buffer(ice, draw_aux_buffer_disabled,
                                res, isv->view.base_level, isv->view.levels,
@@ -122,6 +125,9 @@ resolve_image_views(struct iris_context *ice,
       const int i = u_bit_scan(&views);
       struct iris_resource *res = (void *) shs->image[i].res;
 
+      if (res->base.target == PIPE_BUFFER)
+         continue;
+
       if (batch->name != IRIS_BATCH_COMPUTE) {
          disable_rb_aux_buffer(ice, draw_aux_buffer_disabled,
                                res, 0, ~0, "as a shader image");