iris: Order CS stall and TC invalidate for format reinterpretation hacks
authorKenneth Graunke <kenneth@whitecape.org>
Mon, 17 Jun 2019 11:55:07 +0000 (06:55 -0500)
committerKenneth Graunke <kenneth@whitecape.org>
Mon, 17 Jun 2019 21:38:08 +0000 (16:38 -0500)
This should ensure the TC invalidate happens after the stall.

Fixes KHR-GL43.copy_image.functional which does a CopyImage (blorp_copy)
from a buffer (using R8G8B8A8_UINT), then GetTexImage to read back the
original image (using R10G10B10A2_UNORM).

src/gallium/drivers/iris/iris_blit.c

index 5861c965c065d0a422a9c896859e2fd118100f99..95209cb408f17d77424832aba30f301996224a7d 100644 (file)
@@ -289,9 +289,8 @@ tex_cache_flush_hack(struct iris_batch *batch)
     *
     * TODO: Remove this hack!
     */
-   iris_emit_pipe_control_flush(batch,
-                                PIPE_CONTROL_CS_STALL |
-                                PIPE_CONTROL_TEXTURE_CACHE_INVALIDATE);
+   iris_emit_pipe_control_flush(batch, PIPE_CONTROL_CS_STALL);
+   iris_emit_pipe_control_flush(batch, PIPE_CONTROL_TEXTURE_CACHE_INVALIDATE);
 }
 
 /**