MCPcopy Create free account
hub / github.com/crosire/reshade / SetGraphicsRootConstantBufferView

Method SetGraphicsRootConstantBufferView

source/d3d12/d3d12_command_list.cpp:654–674  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

652#endif
653}
654void STDMETHODCALLTYPE D3D12GraphicsCommandList::SetGraphicsRootConstantBufferView(UINT RootParameterIndex, D3D12_GPU_VIRTUAL_ADDRESS BufferLocation)
655{
656 _orig->SetGraphicsRootConstantBufferView(RootParameterIndex, BufferLocation);
657
658#if RESHADE_ADDON >= 2
659 if (!reshade::has_addon_event<reshade::addon_event::push_descriptors>())
660 return;
661
662 reshade::api::buffer_range buffer_range;
663 if (!_device_impl->resolve_gpu_address(BufferLocation, &buffer_range.buffer, &buffer_range.offset))
664 return;
665 buffer_range.size = UINT64_MAX;
666
667 reshade::invoke_addon_event<reshade::addon_event::push_descriptors>(
668 this,
669 reshade::api::shader_stage::all_graphics,
670 to_handle(_current_root_signature[0]),
671 RootParameterIndex,
672 reshade::api::descriptor_table_update { {}, 0, 0, 1, reshade::api::descriptor_type::constant_buffer, &buffer_range });
673#endif
674}
675void STDMETHODCALLTYPE D3D12GraphicsCommandList::SetComputeRootShaderResourceView(UINT RootParameterIndex, D3D12_GPU_VIRTUAL_ADDRESS BufferLocation)
676{
677 _orig->SetComputeRootShaderResourceView(RootParameterIndex, BufferLocation);

Callers 1

push_descriptorsMethod · 0.80

Calls 2

resolve_gpu_addressMethod · 0.80
to_handleFunction · 0.70

Tested by

no test coverage detected