freedreno: Handle PIPE_FORMAT_NONE buffers

Clover creates buffers with format=NONE.. which is not technically
incorrect.  Just treat this as r8_unorm so we know width0 is the size
in bytes.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13160>
This commit is contained in:
Rob Clark 2021-08-08 12:23:43 -07:00 committed by Marge Bot
parent 9e74f458a8
commit ac783acd74

View file

@ -1224,6 +1224,10 @@ fd_resource_allocate_and_resolve(struct pipe_screen *pscreen,
prsc = &rsc->b.b;
/* Clover creates buffers with PIPE_FORMAT_NONE: */
if ((prsc->target == PIPE_BUFFER) && (format == PIPE_FORMAT_NONE))
format = prsc->format = PIPE_FORMAT_R8_UNORM;
DBG("%" PRSC_FMT, PRSC_ARGS(prsc));
if (tmpl->bind & PIPE_BIND_SHARED)