mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 20:28:04 +02:00
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 <billkris@microsoft.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9349>
This commit is contained in:
parent
8708d32d9c
commit
3b687722b3
1 changed files with 1 additions and 4 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue