{"nofmask", DBG(NO_FMASK), "Disable MSAA compression"},
{"nodma", DBG(NO_DMA), "Disable SDMA-copy for DRI_PRIME"},
+ {"extra_md", DBG(EXTRA_METADATA), "Set UMD metadata for all textures and with additional fields for umr"},
+
{"tmz", DBG(TMZ), "Force allocation of scanout/depth/stencil buffer as encrypted"},
{"sqtt", DBG(SQTT), "Enable SQTT"},
ac_surface_compute_umd_metadata(&sscreen->info, &tex->surface,
tex->buffer.b.b.last_level + 1,
desc, &md.size_metadata, md.metadata,
- false);
+ sscreen->debug_flags & DBG(EXTRA_METADATA));
sscreen->ws->buffer_set_metadata(sscreen->ws, tex->buffer.buf, &md, &tex->surface);
}
*/
if (num_planes > 1)
plane_templ[i].bind |= PIPE_BIND_SHARED;
+ /* Setting metadata on suballocated buffers is impossible. So use PIPE_BIND_CUSTOM to
+ * request a non-suballocated buffer.
+ */
+ if (!is_zs && sscreen->debug_flags & DBG(EXTRA_METADATA))
+ plane_templ[i].bind |= PIPE_BIND_CUSTOM;
if (si_init_surface(sscreen, &surface[i], &plane_templ[i], tile_mode, modifier,
false, plane_templ[i].bind & PIPE_BIND_SCANOUT,
last_plane->buffer.b.b.next = &tex->buffer.b.b;
last_plane = tex;
}
+ if (i == 0 && !is_zs && sscreen->debug_flags & DBG(EXTRA_METADATA))
+ si_set_tex_bo_metadata(sscreen, tex);
}
return (struct pipe_resource *)plane0;