freedreno/a6xx: Allow blit based transfers

Some apps (like firefox and chromium) seem to like to create textures
with internal format GL_RGBA8 but then upload GL_BGRA to them.  If the
app were a bit more clever it could hit the memcpy path.  But fallback
sw conversion (convert_ubytes()) is slow.  If we are going to have to
make this extra copy, do it on the gpu.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30064>
This commit is contained in:
Rob Clark
2024-07-07 07:35:57 -07:00
committed by Marge Bot
parent 30dbfc87cd
commit bda47e29de

View File

@@ -278,6 +278,10 @@ fd_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
return has_compute(screen);
case PIPE_CAP_TEXTURE_TRANSFER_MODES:
if (screen->gen >= 6)
return PIPE_TEXTURE_TRANSFER_BLIT;
return 0;
case PIPE_CAP_PCI_GROUP:
case PIPE_CAP_PCI_BUS:
case PIPE_CAP_PCI_DEVICE: