panfrost: Set `initialized` in more cases
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Fri, 19 Jul 2019 23:11:27 +0000 (16:11 -0700)
committerAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Mon, 22 Jul 2019 15:20:34 +0000 (08:20 -0700)
Indirect linear writes were not being marked as initialized, causing the
back blit to be dropped, breaking the listed tests.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
src/gallium/drivers/panfrost/ci/expected-failures.txt
src/gallium/drivers/panfrost/pan_resource.c

index 54be6f99f92de250dd988530b8d5aebf92ac5929..440231bfb54bb581fcf177447d375312c6f45caa 100644 (file)
@@ -237,8 +237,3 @@ dEQP-GLES2.functional.shaders.preprocessor.predefined_macros.line_2_fragment
 dEQP-GLES2.functional.shaders.preprocessor.predefined_macros.line_2_vertex
 dEQP-GLES2.functional.shaders.scoping.valid.local_variable_hides_function_parameter_fragment
 dEQP-GLES2.functional.shaders.scoping.valid.local_variable_hides_function_parameter_vertex
-dEQP-GLES2.functional.texture.specification.basic_copytexsubimage2d.cube_alpha
-dEQP-GLES2.functional.texture.specification.basic_copytexsubimage2d.cube_luminance
-dEQP-GLES2.functional.texture.specification.basic_copytexsubimage2d.cube_luminance_alpha
-dEQP-GLES2.functional.texture.specification.basic_copytexsubimage2d.cube_rgb
-dEQP-GLES2.functional.texture.specification.basic_copytexsubimage2d.cube_rgba
index 3f8d50cad73c768e339aa2b8954576da7289f529..e7bd4442f949cce64c49cf4717a3f0f0a97646b7 100644 (file)
@@ -592,23 +592,24 @@ panfrost_transfer_unmap(struct pipe_context *pctx,
         struct panfrost_gtransfer *trans = pan_transfer(transfer);
         struct panfrost_resource *prsrc = (struct panfrost_resource *) transfer->resource;
 
+        /* Mark whatever we wrote as written */
+        if (transfer->usage & PIPE_TRANSFER_WRITE)
+                prsrc->slices[transfer->level].initialized = true;
+
         if (trans->map) {
                 struct panfrost_bo *bo = prsrc->bo;
 
                 if (transfer->usage & PIPE_TRANSFER_WRITE) {
-                        unsigned level = transfer->level;
-                        prsrc->slices[level].initialized = true;
-
                         if (prsrc->layout == PAN_AFBC) {
                                 DBG("Unimplemented: writes to AFBC\n");
                         } else if (prsrc->layout == PAN_TILED) {
                                 assert(transfer->box.depth == 1);
 
                                 panfrost_store_tiled_image(
-                                        bo->cpu + prsrc->slices[level].offset,
+                                        bo->cpu + prsrc->slices[transfer->level].offset,
                                         trans->map,
                                         &transfer->box,
-                                        prsrc->slices[level].stride,
+                                        prsrc->slices[transfer->level].stride,
                                         transfer->stride,
                                         util_format_get_blocksize(prsrc->base.format));
                         }
@@ -638,6 +639,9 @@ panfrost_transfer_flush_region(struct pipe_context *pctx,
                 util_range_add(&rsc->valid_buffer_range,
                                transfer->box.x + box->x,
                                transfer->box.x + box->x + box->width);
+        } else {
+                unsigned level = transfer->level;
+                rsc->slices[level].initialized = true;
         }
 }