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

Method dispatch_rays

source/d3d12/d3d12_impl_command_list.cpp:678–706  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

676 assert(false);
677}
678void reshade::d3d12::command_list_impl::dispatch_rays(api::resource raygen, uint64_t raygen_offset, uint64_t raygen_size, api::resource miss, uint64_t miss_offset, uint64_t miss_size, uint64_t miss_stride, api::resource hit_group, uint64_t hit_group_offset, uint64_t hit_group_size, uint64_t hit_group_stride, api::resource callable, uint64_t callable_offset, uint64_t callable_size, uint64_t callable_stride, uint32_t width, uint32_t height, uint32_t depth)
679{
680 _has_commands = true;
681
682 if (_supports_ray_tracing)
683 {
684 D3D12_DISPATCH_RAYS_DESC desc;
685 desc.RayGenerationShaderRecord.StartAddress = _device_impl->get_resource_gpu_address(raygen) + raygen_offset;
686 desc.RayGenerationShaderRecord.SizeInBytes = raygen_size;
687 desc.MissShaderTable.StartAddress = _device_impl->get_resource_gpu_address(miss) + miss_offset;
688 desc.MissShaderTable.SizeInBytes = miss_size;
689 desc.MissShaderTable.StrideInBytes = miss_stride;
690 desc.HitGroupTable.StartAddress = _device_impl->get_resource_gpu_address(hit_group) + hit_group_offset;
691 desc.HitGroupTable.SizeInBytes = hit_group_size;
692 desc.HitGroupTable.StrideInBytes = hit_group_stride;
693 desc.CallableShaderTable.StartAddress = _device_impl->get_resource_gpu_address(callable) + callable_offset;
694 desc.CallableShaderTable.SizeInBytes = callable_size;
695 desc.CallableShaderTable.StrideInBytes = callable_stride;
696 desc.Width = width;
697 desc.Height = height;
698 desc.Depth = depth;
699
700 static_cast<ID3D12GraphicsCommandList4 *>(_orig)->DispatchRays(&desc);
701 }
702 else
703 {
704 assert(false);
705 }
706}
707void reshade::d3d12::command_list_impl::draw_or_dispatch_indirect(api::indirect_command, api::resource, uint64_t, uint32_t, uint32_t)
708{
709 assert(false);

Callers

nothing calls this directly

Calls 2

DispatchRaysMethod · 0.80

Tested by

no test coverage detected