MCPcopy Create free account
hub / github.com/KhronosGroup/Vulkan-ValidationLayers / ListBuffers

Method ListBuffers

layers/gpu_dump/gpu_dump.cpp:90–120  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

88}
89
90bool GpuDump::ListBuffers(std::ostringstream& ss, VkDeviceAddress address, uint32_t indents, bool new_line_start) {
91 if (new_line_start) {
92 ss << "\n";
93 }
94
95 auto buffer_states = GetBuffersByAddress(address);
96 for (uint32_t i = 0; i < indents; i++) {
97 ss << " ";
98 }
99
100 for (uint32_t i = 0; i < buffer_states.size(); i++) {
101 if (i != 0) {
102 ss << '\n';
103 for (uint32_t j = 0; j < indents; j++) {
104 ss << " ";
105 }
106 }
107 auto& buffer_state = buffer_states[i];
108 ss << "- " << buffer_state->Describe(*this);
109 }
110
111 if (buffer_states.empty()) {
112 ss << "- [WARNING] No VkBuffer found at 0x" << std::hex << address;
113 }
114
115 if (!new_line_start) {
116 ss << "\n";
117 }
118
119 return buffer_states.empty();
120}
121
122bool GpuDump::ListAccelerationStructures(std::ostringstream& ss, VkDeviceAddress address, uint32_t indents, bool new_line_start) {
123 if (new_line_start) {

Calls 3

sizeMethod · 0.45
DescribeMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected