-
Notifications
You must be signed in to change notification settings - Fork 181
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Vulkan devices report in crash report
- Loading branch information
1 parent
fbed533
commit d376d8c
Showing
3 changed files
with
35 additions
and
13 deletions.
There are no files selected for viewing
18 changes: 18 additions & 0 deletions
18
src/main/java/net/vulkanmod/mixin/debug/crash_report/SystemReportM.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package net.vulkanmod.mixin.debug.crash_report; | ||
|
||
import net.minecraft.SystemReport; | ||
import net.vulkanmod.vulkan.device.DeviceManager; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.Inject; | ||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; | ||
|
||
@Mixin(SystemReport.class) | ||
public class SystemReportM { | ||
|
||
@Inject(method = "appendToCrashReportString", at = @At("RETURN")) | ||
private void addVulkanDevicesInfo(StringBuilder stringBuilder, CallbackInfo ci) { | ||
stringBuilder.append("\n\n -- VulkanMod Device Report --"); | ||
stringBuilder.append(DeviceManager.getAvailableDevicesInfo()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters