* Rob Clark <robclark@freedesktop.org>
*/
+#include "drm-uapi/drm_fourcc.h"
#include "pipe/p_screen.h"
#include "util/u_format.h"
screen->setup_slices = fd6_setup_slices;
screen->tile_mode = fd6_tile_mode;
screen->fill_ubwc_buffer_sizes = fd6_fill_ubwc_buffer_sizes;
+
+ static const uint64_t supported_modifiers[] = {
+ DRM_FORMAT_MOD_LINEAR,
+ DRM_FORMAT_MOD_QCOM_COMPRESSED,
+ };
+
+ screen->supported_modifiers = supported_modifiers;
+ screen->num_supported_modifiers = ARRAY_SIZE(supported_modifiers);
}
if (tmpl->bind & PIPE_BIND_SHARED)
allow_ubwc = find_modifier(DRM_FORMAT_MOD_QCOM_COMPRESSED, modifiers, count);
+ /* TODO turn on UBWC for all internal buffers
+ * Manhattan benchmark shows artifacts when enabled. Once this
+ * is fixed the following line can be removed.
+ */
+ allow_ubwc &= !!(fd_mesa_debug & FD_DBG_UBWC);
+
if (screen->tile_mode &&
(tmpl->target != PIPE_BUFFER) &&
!linear) {
{"ttile", FD_DBG_TTILE, "Enable texture tiling (a5xx)"},
{"perfcntrs", FD_DBG_PERFC, "Expose performance counters"},
{"softpin", FD_DBG_SOFTPIN,"Enable softpin command submission (experimental)"},
+ {"ubwc", FD_DBG_UBWC, "Enable UBWC for all internal buffers (experimental)"},
DEBUG_NAMED_VALUE_END
};
#define FD_DBG_TTILE 0x200000
#define FD_DBG_PERFC 0x400000
#define FD_DBG_SOFTPIN 0x800000
-
+#define FD_DBG_UBWC 0x1000000
extern int fd_mesa_debug;
extern bool fd_binning_enabled;