Module: Mesa Branch: master Commit: 3b687722b3a914e9d63bd2a9fa1b1abb12a288c1 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=3b687722b3a914e9d63bd2a9fa1b1abb12a288c1
Author: Jesse Natalie <[email protected]> Date: Mon Mar 1 13:46:55 2021 -0800 d3d12: Really handle null constant buffers Previous attempt was checking the wrong pointer... Fixes: eb27db86 ("d3d12: Handle null constant buffers") Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4362 Reviewed-by: Bill Kristiansen <[email protected]> Reviewed-by: Erik Faye-Lund <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9349> --- src/gallium/drivers/d3d12/d3d12_draw.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/gallium/drivers/d3d12/d3d12_draw.cpp b/src/gallium/drivers/d3d12/d3d12_draw.cpp index 7d05923e0f0..ee765677dd8 100644 --- a/src/gallium/drivers/d3d12/d3d12_draw.cpp +++ b/src/gallium/drivers/d3d12/d3d12_draw.cpp @@ -60,10 +60,7 @@ fill_cbv_descriptors(struct d3d12_context *ctx, struct pipe_constant_buffer *buffer = &ctx->cbufs[stage][binding]; D3D12_CONSTANT_BUFFER_VIEW_DESC cbv_desc = {}; - if (buffer) { - assert(buffer->buffer_size > 0); - assert(buffer->buffer); - + if (buffer && buffer->buffer) { struct d3d12_resource *res = d3d12_resource(buffer->buffer); d3d12_transition_resource_state(ctx, res, D3D12_RESOURCE_STATE_VERTEX_AND_CONSTANT_BUFFER); cbv_desc.BufferLocation = d3d12_resource_gpu_virtual_address(res) + buffer->buffer_offset; _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
