Fix device choosing code + refactoring
basically due to VulkanMod being pretty smart, it would prefer to use the last device (in my case llvmpipe), if no discrete gpu was found. (I don't have a discrete gpu) These commits allow people to have a igpu and dgpu in the same system and the dgpu would be preferred. If no dgpu was found, the igpu or vgpu would be used. if you only have a cpu device, the game will throw an exception saying no gpu found.
closes #56
I also noticed a crap ton of deprecation warnings from callocStack and mallocStack, so I replaced them with calloc and malloc
rebased & fixed merge conflicts
@xCollateral I rebased and switched back to callocStack/mallocStack
That is a lot of commits, squashing the commits here would be a good thing I think.
That is a lot of commits, squashing the commits here would be a good thing I think.
yeah lots of them are reverts lol I will do it later when I get time
i have a error 1 pls help me to fix it minecraft version 1.19 Quilt Loader
crash report:
---- Minecraft Crash Report ---- // You should try our sister game, Minceraft!
Time: 9/11/22, 12:22 AM Description: Initializing game
java.lang.RuntimeException: Failed to create instance
at net.vulkanmod.vulkan.Vulkan.createInstance(Vulkan.java:289)
at net.vulkanmod.vulkan.Vulkan.initVulkan(Vulkan.java:180)
at net.vulkanmod.vulkan.VRenderSystem.initRenderer(VRenderSystem.java:59)
at com.mojang.blaze3d.systems.RenderSystem.initRenderer(RenderSystem.java:1510)
at net.minecraft.class_310.
A detailed walkthrough of the error, its code path and all known details is as follows:
-- Head --
Thread: Render thread
Stacktrace:
at net.vulkanmod.vulkan.Vulkan.createInstance(Vulkan.java:289)
at net.vulkanmod.vulkan.Vulkan.initVulkan(Vulkan.java:180)
at net.vulkanmod.vulkan.VRenderSystem.initRenderer(VRenderSystem.java:59)
at com.mojang.blaze3d.systems.RenderSystem.initRenderer(RenderSystem.java:1510)
at net.minecraft.class_310.
-- Initialization -- Details: Modules: ADVAPI32.dll:Расширенная библиотека API Windows 32:10.0.19041.1889 (WinBuild.160101.0800):Microsoft Corporation COMCTL32.dll:Библиотека элементов управления взаимодействия с пользователем:6.10 (WinBuild.160101.0800):Microsoft Corporation CRYPT32.dll:API32 криптографии:10.0.19041.1889 (WinBuild.160101.0800):Microsoft Corporation CRYPTBASE.dll:Base cryptographic API DLL:10.0.19041.546 (WinBuild.160101.0800):Microsoft Corporation CRYPTSP.dll:Cryptographic Service Provider API:10.0.19041.546 (WinBuild.160101.0800):Microsoft Corporation ColorAdapterClient.dll:Microsoft Color Adapter Client:10.0.19041.546 (WinBuild.160101.0800):Microsoft Corporation CoreMessaging.dll:Microsoft CoreMessaging Dll:10.0.19041.746:Microsoft Corporation CoreUIComponents.dll:Microsoft Core UI Components Dll:10.0.19041.546:Microsoft Corporation DBGHELP.DLL:Windows Image Helper:10.0.19041.867 (WinBuild.160101.0800):Microsoft Corporation DEVOBJ.dll:Device Information Set DLL:10.0.19041.1620 (WinBuild.160101.0800):Microsoft Corporation DNSAPI.dll:Динамическая библиотека API DNS-клиента:10.0.19041.1889 (WinBuild.160101.0800):Microsoft Corporation GDI32.dll:GDI Client DLL:10.0.19041.1620 (WinBuild.160101.0800):Microsoft Corporation IMM32.DLL:Multi-User Windows IMM32 API Client DLL:10.0.19041.546 (WinBuild.160101.0800):Microsoft Corporation IPHLPAPI.DLL:API вспомогательного приложения IP:10.0.19041.1889 (WinBuild.160101.0800):Microsoft Corporation KERNEL32.DLL:Библиотека клиента Windows NT BASE API:10.0.19041.1889 (WinBuild.160101.0800):Microsoft Corporation KERNELBASE.dll:Библиотека клиента Windows NT BASE API:10.0.19041.1889 (WinBuild.160101.0800):Microsoft Corporation MSCTF.dll:Серверная библиотека MSCTF:10.0.19041.1889 (WinBuild.160101.0800):Microsoft Corporation NLAapi.dll:Network Location Awareness 2:10.0.19041.1151 (WinBuild.160101.0800):Microsoft Corporation NSI.dll:NSI User-mode interface DLL:10.0.19041.610 (WinBuild.160101.0800):Microsoft Corporation NTASN1.dll:Microsoft ASN.1 API:10.0.19041.1 (WinBuild.160101.0800):Microsoft Corporation Ole32.dll:Microsoft OLE для Windows:10.0.19041.1889 (WinBuild.160101.0800):Microsoft Corporation OleAut32.dll:OLEAUT32.DLL:10.0.19041.985 (WinBuild.160101.0800):Microsoft Corporation PROPSYS.dll:Система страниц свойств (Майкрософт):7.0.19041.1889 (WinBuild.160101.0800):Microsoft Corporation PSAPI.DLL:Process Status Helper:10.0.19041.546 (WinBuild.160101.0800):Microsoft Corporation Pdh.dll:Модуль поддержки данных производительности Windows:10.0.19041.1889 (WinBuild.160101.0800):Microsoft Corporation RPCRT4.dll:Библиотека удаленного вызова процедур:10.0.19041.1889 (WinBuild.160101.0800):Microsoft Corporation SHCORE.dll:SHCORE:10.0.19041.1889 (WinBuild.160101.0800):Microsoft Corporation SHELL32.dll:Общая библиотека оболочки Windows:10.0.19041.1889 (WinBuild.160101.0800):Microsoft Corporation USER32.dll:Многопользовательская библиотека клиента USER API Windows:10.0.19041.1889 (WinBuild.160101.0800):Microsoft Corporation USERENV.dll:Userenv:10.0.19041.1889 (WinBuild.160101.0800):Microsoft Corporation VCRUNTIME140.dll:Microsoft® C Runtime Library:14.28.29913.0 built by: vcwrkspc:Microsoft Corporation VERSION.dll:Version Checking and File Installation Libraries:10.0.19041.546 (WinBuild.160101.0800):Microsoft Corporation WINHTTP.dll:Службы HTTP Windows:10.0.19041.1889 (WinBuild.160101.0800):Microsoft Corporation WINMM.dll:MCI API DLL:10.0.19041.1889 (WinBuild.160101.0800):Microsoft Corporation WS2_32.dll:32-разрядная библиотека Windows Socket 2.0:10.0.19041.1081 (WinBuild.160101.0800):Microsoft Corporation WSOCK32.dll:Windows Socket 32-Bit DLL:10.0.19041.1889 (WinBuild.160101.0800):Microsoft Corporation Wldp.dll:Политика блокировки Windows:10.0.19041.1889 (WinBuild.160101.0800):Microsoft Corporation amsi.dll:Anti-Malware Scan Interface:10.0.19041.1620 (WinBuild.160101.0800):Microsoft Corporation bcrypt.dll:Библиотека криптографических примитивов Windows:10.0.19041.1889 (WinBuild.160101.0800):Microsoft Corporation bcryptPrimitives.dll:Windows Cryptographic Primitives Library:10.0.19041.1415 (WinBuild.160101.0800):Microsoft Corporation cfgmgr32.dll:Configuration Manager DLL:10.0.19041.1620 (WinBuild.160101.0800):Microsoft Corporation clbcatq.dll:COM+ Configuration Catalog:2001.12.10941.16384 (WinBuild.160101.0800):Microsoft Corporation combase.dll:Microsoft COM для Windows:10.0.19041.1889 (WinBuild.160101.0800):Microsoft Corporation dbgcore.DLL:Windows Core Debugging Helpers:10.0.19041.789 (WinBuild.160101.0800):Microsoft Corporation dhcpcsvc.DLL:Служба DHCP-клиента:10.0.19041.1889 (WinBuild.160101.0800):Microsoft Corporation dhcpcsvc6.DLL:Клиент DHCPv6:10.0.19041.1889 (WinBuild.160101.0800):Microsoft Corporation dinput8.dll:Microsoft DirectInput:10.0.19041.1889 (WinBuild.160101.0800):Microsoft Corporation dwmapi.dll:Интерфейс API диспетчера окон рабочего стола (Майкрософт):10.0.19041.1889 (WinBuild.160101.0800):Microsoft Corporation fwpuclnt.dll:API пользовательского режима FWP/IPsec:10.0.19041.1889 (WinBuild.160101.0800):Microsoft Corporation gdi32full.dll:GDI Client DLL:10.0.19041.1706 (WinBuild.160101.0800):Microsoft Corporation glfw.dll:GLFW 3.4.0 DLL:3.4.0:GLFW icm32.dll:Microsoft Color Management Module (CMM):10.0.19041.546 (WinBuild.160101.0800):Microsoft Corporation inputhost.dll:InputHost:10.0.19041.1741 (WinBuild.160101.0800):Microsoft Corporation java.dll:Java(TM) Platform SE binary:17.0.4.1:Oracle Corporation javaw.exe:Java(TM) Platform SE binary:17.0.4.1:Oracle Corporation jimage.dll:Java(TM) Platform SE binary:17.0.4.1:Oracle Corporation jli.dll:Java(TM) Platform SE binary:17.0.4.1:Oracle Corporation jna1165274000429174218.dll:JNA native library:6.1.2:Java(TM) Native Access (JNA) jsvml.dll:Java(TM) Platform SE binary:17.0.4.1:Oracle Corporation jvm.dll:Java HotSpot(TM) 64-Bit server VM:17.0.4.1:Oracle Corporation kernel.appcore.dll:AppModel API Host:10.0.19041.546 (WinBuild.160101.0800):Microsoft Corporation lwjgl.dll lwjgl_stb.dll management.dll:Java(TM) Platform SE binary:17.0.4.1:Oracle Corporation management_ext.dll:Java(TM) Platform SE binary:17.0.4.1:Oracle Corporation mscms.dll:DLL-библиотека системы сопоставления цветов Майкрософт:10.0.19041.1889 (WinBuild.160101.0800):Microsoft Corporation msvcp140.dll:Microsoft® C Runtime Library:14.28.29913.0 built by: vcwrkspc:Microsoft Corporation msvcp_win.dll:Microsoft® C Runtime Library:10.0.19041.789 (WinBuild.160101.0800):Microsoft Corporation msvcrt.dll:Windows NT CRT DLL:7.0.19041.546 (WinBuild.160101.0800):Microsoft Corporation mswsock.dll:Расширение поставщика службы API Microsoft Windows Sockets 2.0:10.0.19041.1889 (WinBuild.160101.0800):Microsoft Corporation napinsp.dll:Поставщик оболочки совместимости для имен электронной почты:10.0.19041.1889 (WinBuild.160101.0800):Microsoft Corporation ncrypt.dll:Маршрутизатор Windows NCrypt:10.0.19041.1889 (WinBuild.160101.0800):Microsoft Corporation net.dll:Java(TM) Platform SE binary:17.0.4.1:Oracle Corporation nio.dll:Java(TM) Platform SE binary:17.0.4.1:Oracle Corporation ntdll.dll:Системная библиотека NT:10.0.19041.1889 (WinBuild.160101.0800):Microsoft Corporation ntmarta.dll:Поставщик Windows NT MARTA:10.0.19041.1889 (WinBuild.160101.0800):Microsoft Corporation perfos.dll:Библиотека объектов производительности системы Windows:10.0.19041.1889 (WinBuild.160101.0800):Microsoft Corporation pnrpnsp.dll:Поставщик пространства имен PNRP:10.0.19041.1889 (WinBuild.160101.0800):Microsoft Corporation profapi.dll:User Profile Basic API:10.0.19041.844 (WinBuild.160101.0800):Microsoft Corporation rasadhlp.dll:Remote Access AutoDial Helper:10.0.19041.546 (WinBuild.160101.0800):Microsoft Corporation rsaenh.dll:Microsoft Enhanced Cryptographic Provider:10.0.19041.1 (WinBuild.160101.0800):Microsoft Corporation sechost.dll:Host for SCM/SDDL/LSA Lookup APIs:10.0.19041.1 (WinBuild.160101.0800):Microsoft Corporation shlwapi.dll:Библиотека небольших программ оболочки:10.0.19041.1889 (WinBuild.160101.0800):Microsoft Corporation sunmscapi.dll:Java(TM) Platform SE binary:17.0.4.1:Oracle Corporation textinputframework.dll:"TextInputFramework.DYNLINK":10.0.19041.1806 (WinBuild.160101.0800):Microsoft Corporation ucrtbase.dll:Microsoft® C Runtime Library:10.0.19041.789 (WinBuild.160101.0800):Microsoft Corporation uxtheme.dll:Библиотека тем UxTheme (Microsoft):10.0.19041.1889 (WinBuild.160101.0800):Microsoft Corporation vcruntime140_1.dll:Microsoft® C Runtime Library:14.28.29913.0 built by: vcwrkspc:Microsoft Corporation verify.dll:Java(TM) Platform SE binary:17.0.4.1:Oracle Corporation vulkan-1.dll:Vulkan Loader:1.0.65.1: win32u.dll:Win32u:10.0.19041.1889 (WinBuild.160101.0800):Microsoft Corporation windows.storage.dll:API хранения Microsoft WinRT:10.0.19041.1889 (WinBuild.160101.0800):Microsoft Corporation winrnr.dll:LDAP RnR Provider DLL:10.0.19041.546 (WinBuild.160101.0800):Microsoft Corporation wintypes.dll:Библиотека DLL основных типов Windows:10.0.19041.1889 (WinBuild.160101.0800):Microsoft Corporation wshbth.dll:Windows Sockets Helper DLL:10.0.19041.546 (WinBuild.160101.0800):Microsoft Corporation xinput1_4.dll:API общего контроллера (Майкрософт):10.0.19041.1889 (WinBuild.160101.0800):Microsoft Corporation zip.dll:Java(TM) Platform SE binary:17.0.4.1:Oracle Corporation Stacktrace: at net.minecraft.client.main.Main.main(Main.java:198) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at org.quiltmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:423) at org.quiltmc.loader.impl.launch.knot.Knot.launch(Knot.java:76) at org.quiltmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:24) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at org.multimc.onesix.OneSixLauncher.launchWithMainClass(OneSixLauncher.java:210) at org.multimc.onesix.OneSixLauncher.launch(OneSixLauncher.java:245) at org.multimc.EntryPoint.listen(EntryPoint.java:143) at org.multimc.EntryPoint.main(EntryPoint.java:34)
-- System Details --
Details:
Minecraft Version: 1.19
Minecraft Version ID: 1.19
Operating System: Windows 10 (amd64) version 10.0
Java Version: 17.0.4.1, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode, sharing), Oracle Corporation
Memory: 896416728 bytes (854 MiB) / 1600126976 bytes (1526 MiB) up to 4294967296 bytes (4096 MiB)
CPUs: 8
Processor Vendor: GenuineIntel
Processor Name: Intel(R) Core(TM) i7-2670QM CPU @ 2.20GHz
Identifier: Intel64 Family 6 Model 42 Stepping 7
Microarchitecture: Sandy Bridge (Client)
Frequency (GHz): 2.20
Number of physical packages: 1
Number of physical CPUs: 4
Number of logical CPUs: 8
Graphics card #0 name: NVIDIA GeForce 410M
Graphics card #0 vendor: NVIDIA (0x10de)
Graphics card #0 VRAM (MB): 1024.00
Graphics card #0 deviceId: 0x1055
Graphics card #0 versionInfo: DriverVersion=23.21.13.9135
Memory slot #0 capacity (MB): 4096.00
Memory slot #0 clockSpeed (GHz): 20.31
Memory slot #0 type: DDR3
Memory slot #1 capacity (MB): 4096.00
Memory slot #1 clockSpeed (GHz): 20.31
Memory slot #1 type: DDR3
Virtual memory max (MB): 9141.86
Virtual memory used (MB): 4194.44
Swap memory total (MB): 1984.00
Swap memory used (MB): 107.96
JVM Flags: 3 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xms512m -Xmx4096m
Launched Version: 1.19
Backend library: LWJGL version 3.3.1 SNAPSHOT
Backend API: Unknown
Window size:
I think this might have been fixed in th latest commits in the master branch Have to confirm this though edit: it's been fixed