Vulkan SDK 之 Device】的更多相关文章

 Enumerate Physical Devices Vulkan instance创建完成之后,vulkan loader是知道你有几个物理设备(显卡),但是程序不知道,需要通过 相关接口获取设备情况. Create a (Logical) Device Picking a Device Device Queues and Queue Families Queue是一个抽象层,用来将指令提交给GPU. typedef enum VkQueueFlagBits { VK_QUEUE_GRAPH…
DiligentEngine的API是D3d11和D3D12风格的,vulkan也被封装成了这种风格的API. 在了解Diligent Engine是如何对vulkan进行封装之前,我准备先学习下Vulkan.知乎funchun的编程指南是中文版,英文不好,准备先看一版中文版,回头再去研习其他的内容. 1.Vulkan编程指南阅读摘要 1.1 Vulkan SDK 安装完成之后,安装目录有如下文件.在阅读编程指南的过程中,我并未采用指南中的demo code来进行研究,而是使用的SDK自带的de…
上一篇 Vulkan SDK Demo 熟悉 粗略的了解了下,一个app是如何调用vulkan的api来展示一个立方体的,但是对其中的每一个api了解并不深刻,后面的系列会根据sample的tutorial Welcome to the Vulkan Samples Tutorial , 结合官方提供的教程来深入的进行学习,Lunar在github上有一个repo,Vulkan Samples, 本章要学习的是instance. Vulkan Samples需要设置msbuild和Camke的环…
Create a Render Pass A render pass describes the scope of a rendering operation by specifying the collection of attachments, subpasses, and dependencies used during the rendering operation. A render pass consists of at least one subpass. The communic…
深度缓冲是可选的,比如渲染一个3D的立方体的时候,就需要用到深度缓冲.Swapchain就算有多个images,此时深度缓冲区也只需要一个.vkCreateSwapchainKHR 会创建所有需要的images, 深度缓冲的image需要你手动创建和分配内存,流程如下: Create the depth buffer image object Allocate the depth buffer device memory Bind the memory to the image object C…
Swapchain是一系列最终会展示给用户的图像的集合. /* * Set up swapchain: * - Get supported uses for all queues * - Try to find a queue that supports both graphics and present * - If no queue supports both, find a present queue and make sure we have a * graphics queue * -…
A graphics pipeline consists of shader stages, a pipeline layout, a render pass, and fixed-function pipeline stages. Dynamic State A dynamic pipeline state is a state that can be changed by a command buffer command during the execution of a command b…
The Vulkan Framebuffer Framebuffers represent a collection of memory attachments that are used by a render pass instance. Examples of these memory attachments include the color image buffers and depth buffer that we created in previous samples. A fra…
Compiling GLSL Shaders into SPIR-V 1.SPIR-V 是vulkan的底层shader语言.GLSL可以通过相关接口转换为SPIR-V. Creating Vulkan Shader Modules The Microsoft open source DXC compiler now supports Vulkan and DX12 backend code generation.  DXC, Microsoft’s open source HLSL compi…
当我们有了一个uniform buff之后,vulkan 还不知道这个信息,需要通过descriptor进行描述. Descriptors and Descriptor Sets A descriptor is a special opaque shader variable(隐藏变量) that shaders use to access buffer and image resources in an indirect fashion. It can be thought of as a "…