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

Method get_sampler

examples/utils/descriptor_tracking.cpp:27–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25}
26
27sampler descriptor_tracking::get_sampler(descriptor_heap heap, uint32_t offset) const
28{
29 const descriptor_heap_data &heap_data = heaps.at(heap);
30
31 if (offset < heap_data.descriptors.size())
32 {
33 const std::pair<descriptor_type, descriptor_data> &descriptor = heap_data.descriptors[offset];
34
35 if (descriptor.first == descriptor_type::sampler ||
36 descriptor.first == descriptor_type::sampler_with_resource_view)
37 return descriptor.second.t.sampler;
38 }
39
40 return { 0 };
41}
42resource_view descriptor_tracking::get_resource_view(descriptor_heap heap, uint32_t offset) const
43{
44 const descriptor_heap_data &heap_data = heaps.at(heap);

Callers 1

parse_technique_passMethod · 0.80

Calls 1

atMethod · 0.80

Tested by

no test coverage detected