vulkan

Vulkan SDK Demo 之一 熟悉

佐手、 提交于 2020-02-03 00:56:53
DiligentEngine的API是D3d11和D3D12风格的,vulkan也被封装成了这种风格的API。 在了解Diligent Engine是如何对vulkan进行封装之前,我准备先学习下Vulkan。知乎funchun的编程指南是中文版,英文不好,准备先看一版中文版,回头再去研习其他的内容。 1.Vulkan编程指南阅读摘要 1.1 Vulkan SDK 安装完成之后,安装目录有如下文件。在阅读编程指南的过程中,我并未采用指南中的demo code来进行研究,而是使用的SDK自带的demo进行学习。 1.2 Vulkan SDK Demo validation layers /* * This is info for a temp callback to use during CreateInstance. * After the instance is created, we use the instance-based * function to register the final callback. */ VkDebugUtilsMessengerCreateInfoEXT dbg_messenger_create_info; if (demo->validate) { // VK_EXT_debug_utils style dbg_messenger

Synchronization between drawcalls in Vulkan

≡放荡痞女 提交于 2020-01-30 09:13:45
问题 As far as I understand, if I have a drawcall that in some way uses the results of any previous drawcall or writes to the same render target (framebuffer), then I need to make sure that the later drawcall sees the memory effects of all previous drawcalls. But what about, when I am rendering a scene with a bunch of objects, each such object is one drawcall and all these drawcalls write to the same framebuffer. Do I need to issue a memory barrier after every drawcall ? For example Sascha Willem

Synchronization between drawcalls in Vulkan

我是研究僧i 提交于 2020-01-30 09:13:00
问题 As far as I understand, if I have a drawcall that in some way uses the results of any previous drawcall or writes to the same render target (framebuffer), then I need to make sure that the later drawcall sees the memory effects of all previous drawcalls. But what about, when I am rendering a scene with a bunch of objects, each such object is one drawcall and all these drawcalls write to the same framebuffer. Do I need to issue a memory barrier after every drawcall ? For example Sascha Willem

Can memory imported to Vulkan from another API be freed by Vulkan?

狂风中的少年 提交于 2020-01-24 15:08:06
问题 On POSIX systems, one can import memory objects from other APIs through file descriptors using VkImportMemoryFdInfoKHR (it works similarly on Windows using VkImportMemoryWin32HandleInfoKHR ). Once the memory object has been imported, is Vulkan allowed to free the underlying memory with vkFreeMemory , or can the memory only be freed by the API that has allocated it? Thank you for your help! 回答1: Vulkan is not merely allowed to free the VkDeviceMemory object; it is required to do so. When you

how to add Mac OS Framework on Cmake file for C++ project

六眼飞鱼酱① 提交于 2020-01-15 10:27:10
问题 I am trying to add an external library (Vulkan) to my project. This library is pre-compiled and has a framework. My project tree: - build - source - Entry - main.cpp - include - ext - vulkan - macos - include - lib - Frameworks - CMakeLists.txt In my CMakeLists.txt, I try to add the lib of my vulkan lib like this: if(APPLE) set(vulkan_lib_dir ${CMAKE_SOURCE_DIR}/ext/vulkan/macos/lib) file(GLOB LIB_VULKAN ${vulkan_lib_dir}/*.dylib ) INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/ext/vulkan/macos

还在使用OpenGL ES做渲染,你Out了,赶紧来拥抱Vulkan吧~

若如初见. 提交于 2020-01-08 20:54:22
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 背景介绍 Vulkan是Khronos组织制定的“下一代”开放的图形显示API。是与DirectX12能够匹敌的GPU API标准。 Vulkan是基于AMD的Mantle API演化而来,眼下Vulkan 1.0标准已经完毕并正式公布。下图是Vulkan的效果: 上一代的OpenGL|ES并不会被遗弃。还会继续发展,非常有可能OpenGL|ES变为Vulkan的简化API。 Vulkan的优势 与OpenGL|ES相比Vulkan的优势: 1、更简单的显示驱动层 Vulkan提供了能直接控制和訪问底层GPU的显示驱动抽象层。显示驱动仅仅是对硬件薄薄的封装,这样能够显著提升操作GPU硬件的效率和性能。之前OpenGL的驱动层对开发人员隐藏的非常多细节,如今都暴露出来。Vulkan甚至不包括执行期的错误检查层。驱动层干的事情少了,隐藏的bug也就少了。 2、支持多线程 Vulkan不再使用OpenGL的状态机设计,内部也不保存全局状态变量。显示资源全然由应用层负责管理。包括内存管理、线程管理、多线程绘制命令产生、渲染队列提交等。 应用程序能够充分利用CPU的多核多线程的计算资源,降低CPU等待,降低延迟。带来的问题是。线程间的同步问题也由应用程序负责,从而对开发人员的要求也更高。 3、预编译Shaders

Is this understanding of VkDescriptorPoolCreateInfo.pPoolSizes correct?

眉间皱痕 提交于 2020-01-03 03:05:09
问题 In Vulkan, I understand that a descriptor pool is used to allocate descriptor sets of some layout for use in a shader, but in the VkDescriptorPoolCreateInfo passed to vkCreateDescriptorPool , there is a field pPoolSizes that takes a bunch of objects containing a descriptor type and a number. The documentation seems somewhat vague, but is this saying that a given descriptor pool can only have a certain, predetermined amount of each type of descriptor allocated from it in descriptor sets? If so

Multi-thread rendering vs command pools

和自甴很熟 提交于 2020-01-01 05:12:12
问题 Nicol Bolas: After all, being able to build command buffers in parallel is one of the selling points of Vulkan. Specs (5.1 Command Pools) (emphasis mine): Command pools are application-synchronized, meaning that a command pool must not be used concurrently in multiple threads. That includes use via recording commands on any command buffers allocated from the pool , as well as operations that allocate, free, and reset command buffers or the pool itself. Doesn't this kind of kill the whole

VKAPI_ATTR and VKAPI_CALL macros in Vulkan

守給你的承諾、 提交于 2019-12-31 02:13:16
问题 I have been searching and I still am not sure what VKAPI_ATTR and VKAPI_CALL are. I am not sure if they are suppose to be a macro or some fancy C++ function declaration I am not aware of. What is VKAPI_ATTR void VKAPI_CALL vkCommand(void) offering that void vkCommand(void) doesn't offer? 回答1: They are macros to make sure the correct calling convention is applied. This is less important in 64 bit where they have mostly converged but in 32 bit there are several incompatible ones. Unfortunately

VKAPI_ATTR and VKAPI_CALL macros in Vulkan

无人久伴 提交于 2019-12-31 02:12:28
问题 I have been searching and I still am not sure what VKAPI_ATTR and VKAPI_CALL are. I am not sure if they are suppose to be a macro or some fancy C++ function declaration I am not aware of. What is VKAPI_ATTR void VKAPI_CALL vkCommand(void) offering that void vkCommand(void) doesn't offer? 回答1: They are macros to make sure the correct calling convention is applied. This is less important in 64 bit where they have mostly converged but in 32 bit there are several incompatible ones. Unfortunately