Skip to content

Commit 8323b47

Browse files
committed
fix(mods::shader): fix invalid bit_cast
1 parent afa84c1 commit 8323b47

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/mods/shader.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2051,10 +2051,10 @@ inline constexpr auto OnCommandAction = []<typename T, typename Context>(
20512051
// ReShade binds D3D12 graphics buffer UAV root descriptors as SRVs.
20522052
// Bypass that setter for this root-descriptor case instead of issuing
20532053
// an invalid graphics SRV bind before the native UAV bind.
2054-
std::bit_cast<ID3D12GraphicsCommandList*>(context.cmd_list->get_native())
2055-
->SetGraphicsRootUnorderedAccessView(
2056-
first_view_push.layout_param,
2057-
context.cmd_list->get_device()->get_resource_view_gpu_address(descriptor_views[0]));
2054+
auto* native_cmd_list = reinterpret_cast<ID3D12GraphicsCommandList*>(context.cmd_list->get_native());
2055+
native_cmd_list->SetGraphicsRootUnorderedAccessView(
2056+
first_view_push.layout_param,
2057+
context.cmd_list->get_device()->get_resource_view_gpu_address(descriptor_views[0]));
20582058
} else {
20592059
context.cmd_list->push_descriptors(
20602060
descriptor_stages,

0 commit comments

Comments
 (0)