d3d12: Don't align already-aligned size in `d3d12_bufmgr_create_buffer`
authorGiancarlo Devich <giancarlodevich@live.com>
Mon, 17 Oct 2022 20:24:14 +0000 (13:24 -0700)
committerMarge Bot <emma+marge@anholt.net>
Fri, 28 Oct 2022 19:46:25 +0000 (19:46 +0000)
This is handled by `pb_cache_manager_create_buffer`.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19082>

src/gallium/drivers/d3d12/d3d12_bufmgr.cpp

index 47d4a25..85414ff 100644 (file)
@@ -321,10 +321,6 @@ d3d12_bufmgr_create_buffer(struct pb_manager *pmgr,
    if (!buf)
       return NULL;
 
-   // Align the buffer to D3D12_CONSTANT_BUFFER_DATA_PLACEMENT_ALIGNMENT
-   // in case it is to be used as a CBV.
-   size = align64(size, D3D12_CONSTANT_BUFFER_DATA_PLACEMENT_ALIGNMENT);
-
    pipe_reference_init(&buf->base.reference, 1);
    buf->base.alignment_log2 = util_logbase2(pb_desc->alignment);
    buf->base.usage = pb_desc->usage;