kotlin-graphics / vkk Goto Github PK
View Code? Open in Web Editor NEWVK², Kotlin Wrapper for Vulkan: code expressiveness and safety meet graphic power
License: Apache License 2.0
VK², Kotlin Wrapper for Vulkan: code expressiveness and safety meet graphic power
License: Apache License 2.0
Hi, when i run such code (Java 13, Archlinux, com.github.kotlin-graphics:vkk:-SNAPSHOT)
val queueCreateInfos = ArrayList<DeviceQueueCreateInfo>()
graphicsQueueIndex = getQueueFamilyIndex(queueFamilyProperties, VkQueueFlag.GRAPHICS_BIT)
queueCreateInfos += DeviceQueueCreateInfo(
queueFamilyIndex = graphicsQueueIndex,
queuePriority = 1.0F
)
val createInfo = DeviceCreateInfo(
queueCreateInfos = queueCreateInfos,
enabledExtensionNames = setOf(KHRSwapchain.VK_KHR_SWAPCHAIN_EXTENSION_NAME),
enabledFeatures = PhysicalDeviceFeatures()
)
physicalDevice.createDevice(createInfo)
I get:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007f0c16c2ea88, pid=57643, tid=57644
#
# JRE version: OpenJDK Runtime Environment (13.0.1+9) (build 13.0.1+9)
# Java VM: OpenJDK 64-Bit Server VM (13.0.1+9, mixed mode, tiered, compressed oops, g1 gc, linux-amd64)
# Problematic frame:
# C [libvulkan.so.1+0x2ea88] loader_layer_create_device+0x408
#
# Core dump will be written. Default location: Core dumps may be processed with "/usr/lib/systemd/systemd-coredump %P %u %g %s %t %c %h" (or dumping to /home/runx/misc/src/universe/core.57643)
#
# If you would like to submit a bug report, please visit:
# http://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
I rebuilt the libvulkan.so.1 library with debug information and open dump in gdb:
rogram terminated with signal SIGABRT, Aborted.
#0 0x00007f0c6792cf25 in raise () from /usr/lib/libc.so.6
[Current thread is 1 (Thread 0x7f0c66147700 (LWP 57644))]
(gdb) bt
#0 0x00007f0c6792cf25 in raise () from /usr/lib/libc.so.6
#1 0x00007f0c67916897 in abort () from /usr/lib/libc.so.6
#2 0x00007f0c6671d096 in ?? () from /usr/lib/jvm/java-13-openjdk/lib/server/libjvm.so
#3 0x00007f0c6742f277 in ?? () from /usr/lib/jvm/java-13-openjdk/lib/server/libjvm.so
#4 0x00007f0c6742fbfb in ?? () from /usr/lib/jvm/java-13-openjdk/lib/server/libjvm.so
#5 0x00007f0c6742fc2e in ?? () from /usr/lib/jvm/java-13-openjdk/lib/server/libjvm.so
#6 0x00007f0c670e8a2f in JVM_handle_linux_signal () from /usr/lib/jvm/java-13-openjdk/lib/server/libjvm.so
#7 0x00007f0c670dc6aa in ?? () from /usr/lib/jvm/java-13-openjdk/lib/server/libjvm.so
#8 <signal handler called>
#9 loader_layer_create_device (instance=instance@entry=0x0, physicalDevice=physicalDevice@entry=0x7f0c609f9220, pCreateInfo=pCreateInfo@entry=0x7f0c60a091d0,
pAllocator=pAllocator@entry=0x0, pDevice=pDevice@entry=0x7f0c60a09218, layerGIPA=layerGIPA@entry=0x0, nextGDPA=0x0) at /usr/src/debug/Vulkan-Loader-1.1.130/loader/loader.c:5537
#10 0x00007f0c16c320b1 in vkCreateDevice (physicalDevice=0x7f0c609f9220, pCreateInfo=0x7f0c60a091d0, pAllocator=0x0, pDevice=0x7f0c60a09218)
at /usr/src/debug/Vulkan-Loader-1.1.130/loader/trampoline.c:756
#11 0x00007f0c487b4597 in ?? ()
#12 0x00007f0c16c32070 in ?? () at /usr/src/debug/Vulkan-Loader-1.1.130/loader/trampoline.c:665 from /usr/lib/libvulkan.so.1
#13 0x0000000800108670 in ?? ()
#14 0x00007f0c1745cff8 in ?? ()
#15 0x00007f0c6001a800 in ?? ()
#16 0x00007f0c1745cff8 in ?? ()
#17 0x00007f0c6001a800 in ?? ()
#18 0xfffffffe00000000 in ?? ()
#19 0x0000000000000000 in ?? ()
/usr/src/debug/Vulkan-Loader-1.1.130/loader/loader.c:5537
:
enumDeviceExtensionProperties = inst->disp->layer_inst_disp.EnumerateDeviceExtensionProperties;
in
// Get the physical device (ICD) extensions
struct loader_extension_list icd_exts;
icd_exts.list = NULL;
res = loader_init_generic_list(inst, (struct loader_generic_list *)&icd_exts, sizeof(VkExtensionProperties));
if (VK_SUCCESS != res) {
loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0, "vkCreateDevice: Failed to create ICD extension list");
goto out;
}
PFN_vkEnumerateDeviceExtensionProperties enumDeviceExtensionProperties = NULL;
if (layerGIPA != NULL) {
enumDeviceExtensionProperties =
(PFN_vkEnumerateDeviceExtensionProperties)layerGIPA(instance, "vkEnumerateDeviceExtensionProperties");
} else {
enumDeviceExtensionProperties = inst->disp->layer_inst_disp.EnumerateDeviceExtensionProperties;
}
res = loader_add_device_extensions(inst, enumDeviceExtensionProperties, internal_device, "Unknown", &icd_exts);
if (res != VK_SUCCESS) {
loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0, "vkCreateDevice: Failed to add extensions to list");
goto out;
}
Hi Folks,
I believe there is a bug with the priorities float buffer allocation in vk.DeviceQueueCreateInfo.
When doing the following the creation of a logical device fails with a SIGSEGV:
val queue = vk.DeviceQueueCreateInfo {
queueFamilyIndex = graphics
queuePriority = 1.0f
}
Results in
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x0000000122816a51, pid=88962, tid=0x0000000000000307
#
# JRE version: Java(TM) SE Runtime Environment (8.0_171-b11) (build 1.8.0_171-b11)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.171-b11 mixed mode bsd-amd64 compressed oops)
# Problematic frame:
# C [libMoltenVK.dylib+0x56a51]
However, when I push the float buffer myself, everything works fine:
val queue = vk.DeviceQueueCreateInfo {
queueFamilyIndex = graphics
queuePriorities = stack.floats(1.0f)
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.