d3d12: Don't allow CPU storage for huge buffers

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40896>
This commit is contained in:
Jesse Natalie 2026-04-10 15:54:25 -07:00 committed by Marge Bot
parent 889f71f71a
commit 2c99dc8a18

View file

@ -513,7 +513,8 @@ d3d12_resource_create_or_place(struct d3d12_screen *screen,
init_valid_range(res);
threaded_resource_init(&res->base.b,
templ->usage == PIPE_USAGE_DEFAULT &&
templ->target == PIPE_BUFFER);
templ->target == PIPE_BUFFER &&
templ->width0 < 0x1000);
memset(&res->bind_counts, 0, sizeof(d3d12_resource::bind_counts));