gallium: add a resource flag to say no over allocation.
authorDave Airlie <airlied@redhat.com>
Fri, 19 Jun 2020 06:25:49 +0000 (16:25 +1000)
committerDave Airlie <airlied@redhat.com>
Mon, 17 Aug 2020 04:30:49 +0000 (14:30 +1000)
llvmpipe overallocates buffers for buffers used as render targets,
however this breaks some vulkan apps (UE4), so add a workaround
flag to force llvmpipe to not overallocate certain buffers.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6082>

src/gallium/include/pipe/p_defines.h

index 88e65ca787ec537336801cf9bc8cabfb030b2cdf..235c8ec06bcb9cbd64faab60eb6d60a0f9ef0340 100644 (file)
@@ -512,6 +512,7 @@ enum pipe_flush_flags
 #define PIPE_RESOURCE_FLAG_SPARSE                (1 << 3)
 #define PIPE_RESOURCE_FLAG_SINGLE_THREAD_USE     (1 << 4)
 #define PIPE_RESOURCE_FLAG_ENCRYPTED             (1 << 5)
+#define PIPE_RESOURCE_FLAG_DONT_OVER_ALLOCATE    (1 << 6)
 #define PIPE_RESOURCE_FLAG_DRV_PRIV    (1 << 8) /* driver/winsys private */
 #define PIPE_RESOURCE_FLAG_FRONTEND_PRIV         (1 << 24) /* gallium frontend private */