Module: Mesa Branch: main Commit: fe73e07a51484d2ee991632a2cf7045cd76ffe2b URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=fe73e07a51484d2ee991632a2cf7045cd76ffe2b
Author: Jesse Natalie <[email protected]> Date: Thu Oct 27 15:55:58 2022 -0700 d3d12: Set PIPE_CAP_MAX_TEXTURE_UPLOAD_MEMORY_BUDGET Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19357> --- src/gallium/drivers/d3d12/d3d12_screen.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/gallium/drivers/d3d12/d3d12_screen.cpp b/src/gallium/drivers/d3d12/d3d12_screen.cpp index db92481a79f..5446d5b5d2a 100644 --- a/src/gallium/drivers/d3d12/d3d12_screen.cpp +++ b/src/gallium/drivers/d3d12/d3d12_screen.cpp @@ -335,6 +335,11 @@ d3d12_get_param(struct pipe_screen *pscreen, enum pipe_cap param) /* This is asking about varyings, not total registers, so remove the 2 tess factor registers. */ return D3D12_HS_OUTPUT_PATCH_CONSTANT_REGISTER_COUNT - 2; + case PIPE_CAP_MAX_TEXTURE_UPLOAD_MEMORY_BUDGET: + /* Picking a value in line with other drivers. Without this, we can end up easily hitting OOM + * if an app just creates, initializes, and destroys resources without explicitly flushing. */ + return 64 * 1024 * 1024; + default: return u_pipe_screen_get_param_defaults(pscreen, param); }
