vulkan

Vulkan texture rendering on multiple meshes

末鹿安然 提交于 2019-11-30 07:14:37
问题 I am in the middle of rendering different textures on multiple meshes of a model, but I do not have much clues about the procedures. Someone suggested for each mesh, create its own descriptor sets and call vkCmdBindDescriptorSets() and vkCmdDrawIndexed() for rendering like this: // Pipeline with descriptor set layout that matches the shared descriptor sets vkCmdBindPipeline(...pipelines.mesh...); ... // Mesh A vkCmdBindDescriptorSets(...&meshA.descriptorSet... ); vkCmdDrawIndexed(...); //

Vulkan texture rendering on multiple meshes

喜夏-厌秋 提交于 2019-11-29 04:36:52
I am in the middle of rendering different textures on multiple meshes of a model, but I do not have much clues about the procedures. Someone suggested for each mesh, create its own descriptor sets and call vkCmdBindDescriptorSets() and vkCmdDrawIndexed() for rendering like this: // Pipeline with descriptor set layout that matches the shared descriptor sets vkCmdBindPipeline(...pipelines.mesh...); ... // Mesh A vkCmdBindDescriptorSets(...&meshA.descriptorSet... ); vkCmdDrawIndexed(...); // Mesh B vkCmdBindDescriptorSets(...&meshB.descriptorSet... ); vkCmdDrawIndexed(...); However, the above

Why do we need multiple render passes and subpasses?

非 Y 不嫁゛ 提交于 2019-11-28 11:41:00
I had some experience with DirectX12 in the past and I don't remember something similar to render passes in Vulkan so I can't make an analogy. If I'm understanding correctly command buffers inside the same subpass doesn't need to be synchronized. So why to complicate and make multiple of them? Why can't I just take one command buffer and put all my frame related info there? Imagine that the GPU cannot render to images directly. Imagine that it can only render to special framebuffer memory storage, which is completely separate from regular image memory. You cannot talk to this framebuffer

Why does vkGetPhysicalDeviceMemoryProperties return multiple identical memory types?

↘锁芯ラ 提交于 2019-11-28 08:11:56
问题 So, I'm gathering some info about my device in Vulkan during initialization and find a unique (or rather, quite similar) set of memory types returned by vkGetPhysicalDeviceMemoryProperties: Device Name: GeForce GTX 1060 3GB Device ID: 7170 Device Type: 2 Device Vendor ID: 4318 Device API Version: 4194369 (1.0.65) Device Driver Version: 1636843520 (390.65) Device Heaps: 0 -> Size: 3133145088 Flags: 1 1 -> Size: 8523874304 Flags: 0 Device Memory: 0 -> Index: 1 Flags: 0 1 -> Index: 1 Flags: 0 2

How to connect Android MediaCodec Surface to Vulkan

ⅰ亾dé卋堺 提交于 2019-11-27 22:46:08
问题 I have a pretty good understanding of decoding with Android MediaCodec and feeding YUV through a Surface into an OpenGL texture. I would like to do something similar with Vulkan. However I have not been successful in finding any documentation or sample code. My question is: how would I wire up the following pipeline? MediaCodec Video Decoder ⇨ Surface ⇨ texture ⇨ Vulkan Details Video decoder is configured using MediaCodec#configure Surface is an Android Surface (link to API, link to arch.)

Vulkan: What is the point of sType in vk*CreateInfo structs?

倖福魔咒の 提交于 2019-11-27 14:20:13
In all of the create info structs ( vk*CreateInfo ) in the new Vulkan API, there is ALWAYS a .sType member. Why is this there if the value can only be one thing? Also the Vulkan specification is very explicit that you can only use vk*CreateInfo structs as parameters for their corresponding vkCreate* function. It seems a little redundant. I can see that if the driver was passing this struct straight to the GPU, you might need to have it (I did notice it is always the first member). But this seems like a really bad idea for the app to do it because if the driver did it, apps would be much less

5月Linux市场Steam 份额在增长

ε祈祈猫儿з 提交于 2019-11-26 14:12:57
随着新的一个月的开始,Valve公布了上个月的软件/硬件调查数据。在2019年5月,Steam Linux 的使用率按百分比略微上升。 上个月,运行Linux的Steam用户比例(根据有争议的Steam调查)上升到了0.84%,比4月份上升了0.02%。这一数字在很大程度上符合最近该地区约0.8%的预期,并且比去年有所上升。 自Valve去年推出Steam Play以来,Linux游戏市场的份额一直呈逐点增长的趋势。由于基于Wine的Proton和DXVK将Direct3D转换为Vulkan, Steam Play允许许多著名的Windows游戏在Linux上运行。但是没有任何Linux独家产品,Steam机器的回归或任何里程碑式的原因导致Windows游戏玩家突然转向Linux。结果,它每个月都是平缓或微小的增长。 5月份在Steam上使用Windows的比例为95.9%,而macOS为3.26% 每月Steam调查数据可在SteamPowered.com上查看。 来源: oschina 链接: https://my.oschina.net/u/3008585/blog/3064905

Should I ever use a `vec3` inside of a uniform buffer or shader storage buffer object?

我是研究僧i 提交于 2019-11-26 11:20:59
The vec3 type is a very nice type. It only takes up 3 floats, and I have data that only needs 3 floats. And I want to use one in a structure in a UBO and/or SSBO: layout(std140) uniform UBO { vec4 data1; vec3 data2; float data3; }; layout(std430) buffer SSBO { vec4 data1; vec3 data2; float data3; }; Then, in my C or C++ code, I can do this to create matching data structures: struct UBO { vector4 data1; vector3 data2; float data3; }; struct SSBO { vector4 data1; vector3 data2; float data3; }; Is this a good idea? Nicol Bolas NO! Never do this! When declaring UBOs/SSBOs, pretend that all 3

Should I ever use a `vec3` inside of a uniform buffer or shader storage buffer object?

自古美人都是妖i 提交于 2019-11-26 01:43:14
问题 The vec3 type is a very nice type. It only takes up 3 floats, and I have data that only needs 3 floats. And I want to use one in a structure in a UBO and/or SSBO: layout(std140) uniform UBO { vec4 data1; vec3 data2; float data3; }; layout(std430) buffer SSBO { vec4 data1; vec3 data2; float data3; }; Then, in my C or C++ code, I can do this to create matching data structures: struct UBO { vector4 data1; vector3 data2; float data3; }; struct SSBO { vector4 data1; vector3 data2; float data3; };

Rendering meshes with multiple indices

≡放荡痞女 提交于 2019-11-25 22:30:25
问题 I have some vertex data. Positions, normals, texture coordinates. I probably loaded it from a .obj file or some other format. Maybe I\'m drawing a cube. But each piece of vertex data has its own index. Can I render this mesh data using OpenGL/Direct3D? 回答1: In the most general sense, no. OpenGL and Direct3D only allow one index per vertex; the index fetches from each stream of vertex data. Therefore, every unique combination of components must have its own separate index. So if you have a