tu: Mark tiling impossible if we couldn't lay out gmem in the first place.
authorEmma Anholt <emma@anholt.net>
Wed, 1 Feb 2023 23:20:14 +0000 (15:20 -0800)
committerEmma Anholt <emma@anholt.net>
Thu, 2 Feb 2023 22:55:59 +0000 (14:55 -0800)
We were leaving the field undefined, which tripped me up later.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21004>

src/freedreno/vulkan/tu_cmd_buffer.c
src/freedreno/vulkan/tu_util.c

index cd19e2a..711fbd3 100644 (file)
@@ -686,8 +686,7 @@ use_sysmem_rendering(struct tu_cmd_buffer *cmd,
       return true;
 
    /* can't fit attachments into gmem */
-   if (!cmd->state.pass->gmem_pixels[cmd->state.gmem_layout] ||
-       !cmd->state.tiling->possible)
+   if (!cmd->state.tiling->possible)
       return true;
 
    if (cmd->state.framebuffer->layers > 1)
index 07a9df2..46880f2 100644 (file)
@@ -174,8 +174,10 @@ tu_tiling_config_update_tile_layout(struct tu_framebuffer *fb,
    /* will force to sysmem, don't bother trying to have a valid tile config
     * TODO: just skip all GMEM stuff when sysmem is forced?
     */
-   if (!pass->gmem_pixels[gmem_layout])
+   if (!pass->gmem_pixels[gmem_layout]) {
+      tiling->possible = false;
       return;
+   }
 
    if (TU_DEBUG(FORCEBIN)) {
       /* start with 2x2 tiles */