Skip to content

Commit

Permalink
vkd3d: Avoid VVL error when game binds nothing.
Browse files Browse the repository at this point in the history
It's possible to use SKIP tiles for everything and that leads to error
on NV driver due to DEVICE_LOST following invalid usage with bindCount
== 0.

Signed-off-by: Hans-Kristian Arntzen <[email protected]>
  • Loading branch information
HansKristian-Work committed Jan 16, 2025
1 parent 8263b1b commit 52d5cf9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libs/vkd3d/command.c
Original file line number Diff line number Diff line change
Expand Up @@ -17508,6 +17508,10 @@ static void STDMETHODCALLTYPE d3d12_command_queue_UpdateTileMappings(ID3D12Comma
}
}

/* Avoids tripping validation error since it's not legal to have bindCount == 0. */
if (sub.bind_sparse.bind_count == 0)
goto fail;

vkd3d_free(bound_tiles);
d3d12_command_queue_add_submission(command_queue, &sub);
return;
Expand Down

0 comments on commit 52d5cf9

Please sign in to comment.