vulkan

Vulkan: ordering image memory barriers in multiple command buffers

馋奶兔 提交于 2019-12-10 12:54:33
问题 For resource transitions, you need to know the 'before' and 'after' VkImageLayout of the resource (eg. in the VkImageMemoryBarrier passed to vkCmdPipelineBarrier ). Vulkan does not guarantee any ordering of execution of command buffers, unless explicitly stated in the API documentation (from this answer). However, vkCmdPipelineBarrier does explicitly say that it creates a dependency between commands in the command buffer, before and after the call. So it is possible to 'know' the layout of an

How to repeatedly update a uniform data for number of objects inside a single Vulkan render pass and make the update synchronized?

五迷三道 提交于 2019-12-10 10:57:27
问题 I'm trying to port my OpenGL 3D game engine to Vulkan. There are large numbers of 3D objects in the game scene and each has it own attributes (model matrix, lights, etc.) and the objects are completely dynamic, which means some 3D objects may come in and others may be removed during the game play. with OpenGL, I grouped 3D object's attribute into a uniform buffer in shader (code simplified): layout(std140, set = 0, binding = 0) uniform object_attrib { vec3 light_pos; vec3 light_color; mat4

Calling vkEnumerateDeviceExtensionProperties “twice” - is it required?

纵然是瞬间 提交于 2019-12-10 10:39:55
问题 From the man page for vkEnumerateDeviceExtensionProperties, vkEnumerateDeviceExtensionProperties retrieves properties for extensions on a physical device whose handle is given in physicalDevice. To determine the extensions implemented by a layer set pLayerName to point to the layer’s name and any returned extensions are implemented by that layer. Setting pLayerName to NULL will return the available non-layer extensions. pPropertyCount must be set to the size of the VkExtensionProperties array

Is Vulkan's VkMemoryHeapFlagBits missing values?

ぃ、小莉子 提交于 2019-12-10 05:32:00
问题 At Vulkan specs 1.0.9 (pg. 180), we have the following: typedef struct VkMemoryHeap { VkDeviceSize size; VkMemoryHeapFlags flags; } VkMemoryHeap; and this description: • size is the total memory size in bytes in the heap. • flags is a bitmask of attribute flags for the heap. The bits specified in flags are: typedef enum VkMemoryHeapFlagBits { VK_MEMORY_HEAP_DEVICE_LOCAL_BIT = 0x00000001, } VkMemoryHeapFlagBits; But when I query VkPhysicalDeviceMemoryProperties I've got flags with zero values.

WebGPU学习系列目录

﹥>﹥吖頭↗ 提交于 2019-12-08 11:45:29
介绍 大家好,本系列从0开始学习WebGPU API,并给出相关的demo。 WebGPU介绍 WebGPU相当于DX12/Vulkan,能让程序员更灵活地操作GPU,从而大幅提升性能。 为什么要学习WebGPU WebGPU更好地支持多线程 WebGPU支持compute shader,从而让程序员能利用GPU实现很多优化 WebGPU与WebGL2的区别很大,两者不容易兼容。如果要从WebGL1升级,最好直接升级到WebGPU,一劳永逸 WebGPU是标准,各大浏览器都会支持。不像WebGL2,苹果直接不支持。 目前WebGPU虽然还未正式发布,但已经比较成熟了,也有相关的Demo可供学习 目录 WebGPU学习(一): 开篇 WebGPU学习(二): 学习“绘制一个三角形”示例 WebGPU学习(三):MSAA WebGPU学习(四):Alpha To Coverage 来源: https://www.cnblogs.com/chaogex/p/12005108.html

Use Vulkan VkImage as a CUDA cuArray

房东的猫 提交于 2019-12-08 01:34:44
问题 What is the correct way of using a Vulkan VkImage as a CUDA cuArray? I've been trying to follow some examples, however I get a CUDA_ERROR_INVALID_VALUE on a call to cuExternalMemoryGetMappedMipmappedArray() To provide the information in an ordered way. I'm using CUDA 10.1 Base code comes from https://github.com/SaschaWillems/Vulkan, in particular I'm using the 01 - Vulkan Gears demo, enriched with the saveScreenshot method 09 - Capturing screenshots Instead of saving the snapshot image to a

Vulkan TOP/ BOTTOM OF PIPE and ALL_COMMANDS

旧巷老猫 提交于 2019-12-07 23:29:23
问题 As a lot of "beginner", I thought use TOP_OF_PIPELINE as a dst and BOTTOM_OF_PIPELINE as a src meant ALL_COMMANDS for both. Here Nicol Bolas wrote that "Since top/bottom of the pipe make no sense for memory barriers, maybe using them should just be flat-out invalid. And thus useful only for execution barriers." From what I understand, since TOP and BOTTOM does not perform any access into memory, putting barrier on top or bottom can't make memory visible^^. As I understand what Nicol Bolas

Is rebinding a graphics pipeline in Vulkan a guaranteed no-op?

守給你的承諾、 提交于 2019-12-07 16:26:50
问题 In the simplified scenario where each object to be rendered is translated into a secondary command buffer and each of those command buffers bind a graphics pipeline initially: is a guaranteed no-op to bind the pipeline that was immediately bound before? Or the order of execution of the secondary command buffers is not guaranteed at all? 回答1: is a guaranteed no-op to bind the pipeline that was immediately bound before? No. In fact, in the case you're outlining, you should assume precisely the

How to create and run an example Vulkan app on the Android emulator?

不想你离开。 提交于 2019-12-07 15:02:14
问题 I want to play around with mobile Vulkan without having to buy a device. If it is not supported, please provide evidence (e.g. source code, official Google statements). Are there any plans to support it? If supported, please give detailed and tested instructions of how to get a minimal hello world triangle app running, including the app you have tested with. I have tried https://github.com/googlesamples/android-vulkan-tutorials/tree/7ba478ac2e0d9006c9e2e261446003a4449b8aa3/tutorial05_triangle

What is the Vulkan equivalent of the GtkGLArea widget (GTK+)?

£可爱£侵袭症+ 提交于 2019-12-07 09:22:52
问题 Background: I want to write a CAD application. I want to implement all rendering with Vulkan. And I want to use GTK+. I don't want a (visible) different window for the rendered image of the object. So I researched and found the GtkGLArea widget, which seems to do what I want, but for OpenGL. Is there an equivalent to GTKGLArea ? If not, is there another way to implement what I'm thinking of? 回答1: There is a GdkWindow which I believe is behind many Gtk graphic types such as GtkWindow and