Skip to content

Commit 60df65e

Browse files
committed
Re-editing README based on code changes
1 parent f01613d commit 60df65e

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

samples/extensions/device_fault/README.adoc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ VkResult faultResult = vkGetDeviceFaultInfoEXT(vk_device, &faultCount, &faultInf
114114
LOGE("Vendor Fault Description: {}", faultInfo.pVendorInfos ? faultInfo.pVendorInfos->description : "No Vendor Information available.")
115115
// Log each address info with decimal and hexadecimal representations
116116
for (uint32_t i = 0; i < faultCount.addressInfoCount; i++) {
117-
LOGE("Fault Address Info Address Type: {}", std::to_string(addressInfos[i].addressType));
117+
LOGE("Fault Address Info Address Type: {}", vk::to_string(static_cast<vk::DeviceFaultAddressTypeEXT>(addressInfos[i].addressType)));
118118
LOGE("Fault Address Info Reported Address -> Decimal: {} | Hex: 0x{:X}", addressInfos[i].reportedAddress, static_cast<uint64_t>(addressInfos[i].reportedAddress));
119119
}
120120
}
@@ -224,15 +224,15 @@ Concrete out-of-bounds example:
224224
In our setup, a compute shader writes directly into a Shader Storage Buffer Object (SSBO) via buffer device addresses.
225225
We are using VK_EXT_device_binding_report extension in this sample to report our memory allocation and binding addresses as shown below:
226226

227-
image::./images/binding_address.png[DeviceFault]
227+
image::./images/binding_address_info.png[DeviceFault]
228228

229-
One of the SSBO's was bound at `0x5FF96F900 (decimal 412,206,731,264)` with a size of `2048 bytes`.
229+
One of the SSBO's was bound at `0x5FF96E4000 (decimal 412,206,645,248)` with a size of `2048 bytes`.
230230
We deliberately issued a store to `positions.positions[1,000,000]`, where `Position` is a `std430` array of `vec2` so each element is `8 bytes`.
231231
The shader therefore targets `base + index * 8 = base + 8,000,000 bytes (hex 0x007A1200)`.
232232

233-
image::./images/fault_address.png[DeviceFault]
233+
image::./images/failed_logcat_output.png[DeviceFault]
234234

235-
The device fault report shows `0x55F9E9A200 (decimal 412,214,731,264)`, and the difference from the bound base is exactly `8,000,000 bytes`.
235+
The device fault report shows `0x5ff9e85200 (decimal 412,214,645,248)`, and the difference from the bound base is exactly `8,000,000 bytes`.
236236
There is no rounding in this report. Just straightforward pointer arithmetic making it trivial to correlate the fault with the offending SSBO and confirm the write was ``~7.63 MiB` past a `2 KiB` allocation.
237237

238238
Keep that in mind that there are no guarantees around the granularity of the fault addresses (and no guarantee that an out of bounds access generates a fault at all!), so this will vary across vendors.
235 KB
Loading
42.9 KB
Loading

0 commit comments

Comments
 (0)