Skip to content

Commit a1f62dd

Browse files
committed
Fix crash in Richard Burns Rally with DXVK 2.6.2
DXVK can call "vkCmdClearAttachments" in a secondary command buffer, which is provided with inheritance rendering info, but is missing the attachments at recording time. As such the "clear_depth_stencil_view" event is invoked with a zero handle, which was not handled.
1 parent 21e3fb9 commit a1f62dd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/09-depth/generic_depth_addon.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -765,7 +765,7 @@ static void on_bind_depth_stencil(command_list *cmd_list, uint32_t, const resour
765765
static bool on_clear_depth_stencil(command_list *cmd_list, resource_view dsv, const float *depth, const uint8_t *, uint32_t, const rect *)
766766
{
767767
// Ignore clears that do not affect the depth buffer (stencil clears)
768-
if (depth != nullptr)
768+
if (dsv != 0 && depth != nullptr)
769769
{
770770
auto &state = *cmd_list->get_private_data<state_tracking>();
771771

0 commit comments

Comments
 (0)