Search the Community

Showing results for tags 'Vulkan' in content posted in Graphics and GPU Programming.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Categories

  • Audio
    • Music and Sound FX
  • Business
    • Business and Law
    • Career Development
    • Production and Management
  • Game Design
    • Game Design and Theory
    • Writing for Games
    • UX for Games
  • Industry
    • Interviews
    • Event Coverage
  • Programming
    • Artificial Intelligence
    • General and Gameplay Programming
    • Graphics and GPU Programming
    • Engines and Middleware
    • Math and Physics
    • Networking and Multiplayer
  • Visual Arts
  • Archive

Categories

  • News

Categories

  • Audio
  • Visual Arts
  • Programming
  • Writing

Categories

  • Audio Jobs
  • Business Jobs
  • Game Design Jobs
  • Programming Jobs
  • Visual Arts Jobs

Categories

  • GameDev Unboxed

Forums

  • Audio
    • Music and Sound FX
  • Business
    • Games Career Development
    • Production and Management
    • Games Business and Law
  • Game Design
    • Game Design and Theory
    • Writing for Games
  • Programming
    • Artificial Intelligence
    • Engines and Middleware
    • General and Gameplay Programming
    • Graphics and GPU Programming
    • Math and Physics
    • Networking and Multiplayer
  • Visual Arts
    • 2D and 3D Art
    • Critique and Feedback
  • Topical
    • Virtual and Augmented Reality
    • News
  • Community
    • GameDev Challenges
    • For Beginners
    • GDNet+ Member Forum
    • GDNet Lounge
    • GDNet Comments, Suggestions, and Ideas
    • Coding Horrors
    • Your Announcements
    • Hobby Project Classifieds
    • Indie Showcase
    • Article Writing
  • Affiliates
    • NeHe Productions
    • AngelCode
  • Workshops
    • C# Workshop
    • CPP Workshop
    • Freehand Drawing Workshop
    • Hands-On Interactive Game Development
    • SICP Workshop
    • XNA 4.0 Workshop
  • Archive
    • Topical
    • Affiliates
    • Contests
    • Technical

Calendars

  • Community Calendar
  • Games Industry Events
  • Game Jams

Blogs

There are no results to display.

There are no results to display.

Marker Groups

  • Members

Developers


Group


About Me


Website


Industry Role


Twitter


Github


Twitch


Steam

Found 92 results

  1. Hey, I was wondering if on mobile development (Android mainly but iOS as well if you know of it), if there is a GPUView equivalent for whole system debugging so we can figure out if the CPU/GPU are being pipelined efficiently, if there are bubbles, etc. Also slightly tangent question, but do mobile GPU's have a DMA engine exposed as a dedicated Transfer Queue for Vulkan?
  2. I am working on a project which needs to share render targets between Vulkan and DirectX12. I have enabled the external memory extension and now allocate the memory for the render targets by adding the VkExportMemoryInfoKHR to the pNext chain of VkMemoryAllocateInfo. Similarly I have added the VkExternalMemoryImageCreateInfo to the pNext chain of VkImageCreateInfo. After calling the get win32 handle function, I get some handle pointer which is not null (I assume it is valid). VkExternalMemoryImageCreateInfoKHR externalImageInfo = {}; if (gExternalMemoryExtensionKHR) { externalImageInfo.sType = VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_KHR; externalImageInfo.pNext = NULL; externalImageInfo.handleTypes = VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT_KHR | VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHR | VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_KHR | VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT_KHR | VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT_KHR | VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT_KHR | VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT_KH imageCreateInfo.pNext = &externalImageInfo; } vkCreateImage(...); VkExportMemoryAllocateInfoKHR exportInfo = { VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_KHR }; exportInfo.handleTypes = VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT_KHR | VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHR | VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_KHR | VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT_KHR | VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT_KHR | VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT_KHR | VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT_KHR; memoryAllocateInfo.pNext = &exportInfo; vkAllocateMemory(...); VkMemoryGetWin32HandleInfoKHR info = { VK_STRUCTURE_TYPE_MEMORY_GET_WIN32_HANDLE_INFO_KHR, NULL }; info.memory = pTexture->GetMemory(); info.handleType = VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT_KHR; VkResult res = vkGetMemoryWin32HandleKHR(vulkanDevice, &info, &pTexture->pSharedHandle); ASSERT(VK_SUCCESS == res); Now when I try to call OpenSharedHandle from a D3D12 device, it crashes inside nvwgf2umx.dll with the integer division by zero error. I am now lost and have no idea what the other handle types do. For example: How do we get the D3D12 resource from the VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHR handle? I also found some documentation on this link but it doesn't help much. https://javadoc.lwjgl.org/org/lwjgl/vulkan/NVExternalMemoryWin32.html This is all assuming the extension works as expected since it has made it to the KHR
  3. I am trying to get vulkan on android working and have run into a big issue. I don't see any validation layers available. I have tried linking their libraries into mine but still no layers. I have tried compiling it into a library of my own but the headers for it are all over the place. Unfortunately , google's examples and tutorials are out of date and don't work for me. Any idea what I have to do to get those layers to work?
  4. It seems like nobody really knows what is the correct behavior after window minimizes in Vulkan. I have looked at most of the examples (Sascha Willems, GPUOpen,...) and all of them crash after the window minimize event with the error VK_ERROR_OUT_OF_DATE either with an assertion during acquire image or after calling present. This is because we have to recreate the swap chain. I tried this but then Vulkan expects you to provide a swap chain with extents { 0, 0, 0, 0 }, but now if you try to set the viewport or create new image views with extents { 0, 0, 0, 0 }, Vulkan expects you to provide non-zero values. So now I am confused. Should we just do nothing after a window minimize event? No rendering, update, ...?
  5. Hi all, First time poster here, although I've been reading posts here for quite a while. This place has been invaluable for learning graphics programming -- thanks for a great resource! Right now, I'm working on a graphics abstraction layer for .NET which supports D3D11, Vulkan, and OpenGL at the moment. I have implemented most of my planned features already, and things are working well. Some remaining features that I am planning are Compute Shaders, and some flavor of read-write shader resources. At the moment, my shaders can just get simple read-only access to a uniform (or constant) buffer, a texture, or a sampler. Unfortunately, I'm having a tough time grasping the distinctions between all of the different kinds of read-write resources that are available. In D3D alone, there seem to be 5 or 6 different kinds of resources with similar but different characteristics. On top of that, I get the impression that some of them are more or less "obsoleted" by the newer kinds, and don't have much of a place in modern code. There seem to be a few pivots: The data source/destination (buffer or texture) Read-write or read-only Structured or unstructured (?) Ordered vs unordered (?) These are just my observations based on a lot of MSDN and OpenGL doc reading. For my library, I'm not interested in exposing every possibility to the user -- just trying to find a good "middle-ground" that can be represented cleanly across API's which is good enough for common scenarios. Can anyone give a sort of "overview" of the different options, and perhaps compare/contrast the concepts between Direct3D, OpenGL, and Vulkan? I'd also be very interested in hearing how other folks have abstracted these concepts in their libraries.
  6. Hi, In Vulkan you have render passes where you specify which attachments to render to and which to read from, and subpasses within the render pass which can depend on each other. If one subpass needs to finish before another can begin you specify that with a subpass dependency. In my engine I don't currently use subpasses as the concept of the "render pass" translates roughly to setting a render target and clearing it followed by a number of draw calls in DirectX, while there isn't really any good way to model subpasses in DX. Because of this, in Vulkan, my frame mostly consists of a number of render passes each with one subpass. My question is, do I have to specify dependencies between the render passes or is that needed only if you have multiple subpasses? In the Vulkan Programming Guide, chapter 13 it says: "In the example renderpass we set up in Chapter 7, we used a single subpass with no dependencies and a single set of outputs.”, which suggests that you only need dependencies between subpasses, not between render passes. However, the (excellent) tutorials at vulkan-tutorial.com have you creating a subpass dependency to "external subpasses" in the chapter on "Rendering and presentation", under "Subpass dependencies": https://vulkan-tutorial.com/Drawing_a_triangle/Drawing/Rendering_and_presentation even if they are using only one render pass with a single subpass. So, in short; If I have render pass A, with a single subpass, rendering to an attachment and render pass B, also with a single subpass, rendering to that same attachment, do I have to specify subpass dependencies between the two subpasses of the render passes, in order to make render pass A finish before B can begin, or are they handled implicitly by the fact that they belong to different render passes? Thanks!
  7. I am looking at the SaschaWillems subpass example for getting some insight into subpass depdendencies but its hard to understand whats going on without any comments. Also there is not a lot of documentation on subpass dependencies overall. Looking at the code, I can see that user specifies the src subpass, dst subpass and src state, dst state. But there is no mention of which resource the dependency is on. Is a subpass dependency like a pipeline barrier. If yes, how does it issue the barrier? Is the pipeline barrier issued on all attachments in the subpass with the input src and dst access flags? Any explanation will really clear a lot of doubts on subpass dependencies. Thank you
  8. I need to index into a texture array using indices which are not dynamically uniform. This works fine on NVIDIA chips but you can see the artifacts on AMD due to the wavefront problem. This means, a lot of pixel invocations get the wrong index value. I know you fix this by using NonUniformResourceIndex in hlsl. Is there an equivalent for Vulkan glsl? This is the shader code for reference. As you can see, index is an arbitrary value for each pixel and is not dynamically uniform. I fix this for hlsl by using NonUniformResourceIndex(index) layout(set = 0, binding = 0) uniform sampler textureSampler; layout(set = 0, binding = 1) uniform texture2D albedoMaps[256]; layout(location = 0) out vec4 oColor; void main() { uint index = calculate_arbitrary_texture_index(); vec2 texCoord = calculate_texcoord(); vec4 albedo = texture(sampler2D(albedoMaps[index], textureSampler), texCoord); oColor = albedo; } Thank you
  9. As the title says, I am explicitly creating a too small descriptor pool, which should NOT support the resources I am going to allocate from it. std::array<vk::DescriptorPoolSize, 3> type_count; // Initialize our pool with these values type_count[0].type = vk::DescriptorType::eCombinedImageSampler; type_count[0].descriptorCount = 0; type_count[1].type = vk::DescriptorType::eSampler; type_count[1].descriptorCount = 0; type_count[2].type = vk::DescriptorType::eUniformBuffer; type_count[2].descriptorCount = 0; vk::DescriptorPoolCreateInfo createInfo = vk::DescriptorPoolCreateInfo() .setPNext(nullptr) .setMaxSets(iMaxSets) .setPoolSizeCount(type_count.size()) .setPPoolSizes(type_count.data()); pool = aDevice.createDescriptorPool(createInfo); I have an allocation function which looks like this, I am allocating a uniform, image-combined sampler and a regular sampler. Though if my pool is empty this should not work? vk::DescriptorSetAllocateInfo alloc_info[1] = {}; alloc_info[0].pNext = NULL; alloc_info[0].setDescriptorPool(pool); alloc_info[0].setDescriptorSetCount(iNumToAllocate); alloc_info[0].setPSetLayouts(&iDescriptorLayouts); std::vector<vk::DescriptorSet> tDescriptors; tDescriptors.resize(iNumToAllocate); iDevice.allocateDescriptorSets(alloc_info, tDescriptors.data());
  10. When loading in a model with a lot of meshes that have different materials that contain different textures, how would you handle this in Vulkan? Is it possible to partially change a DescriptorSet with a WriteDescriptorSet object? Even if it is possible, it does not sound ideal to update the descriptor set for every mesh. I am aware of the boundless texture arrays in shader model 5.0+, but for now I want to keep it as simple as possible.
  11. It is a bit unclear to me for what kind of tasks you would want to create a new command buffer/how to use them. is it ideal to have a command buffer per draw call? Per material call? Per render-pass? I know in Dx12 command lists can have complete rendering pipelines recorded, but I am a bit unsure how to see command buffers in Vulkan.
  12. So I've been trying to implement a multi-threaded resource system w/ vulkan in my free time, where a thread can request a resource to be loaded, and it gets pushed into a queue. On another thread, the resource (as of right now, a mesh) gets loaded from a file, and I map the data to a staging buffer. The issue comes in where I record the command buffer to copy the data to a GPU buffer. I record a secondary command buffer w/ just the vkCmdCopyBuffer command, and push it to a queue to be executed from a primary command buffer on the main thread to a transfer-only queue. As far as I can tell, the staging works fine, and the mesh is drawn and looks perfectly fine, but my validation layers (VK_LAYER_LUNARG_standard_validation) spam tell me: "vkCmdBindIndexBuffer(): Cannot read invalid region of memory allocation 0x16 for bound Buffer object 0x15, please fill the memory before using," and the vertex buffer binding gives me an identical message. Both buffers were created with the proper bits, TRANSFER_SRC for the staging buffer, TRANSFER_DST for the gpu buffer (plus index and vertex buffer usage bits). I use Vulkan Memory Allocator from GPUOpen to handle buffer memory allocation, and I'm careful to make sure that the staging buffer is mapped properly and isn't deleted before the command finishes. The validation layers stop spamming telling me this error if I switch the copy commands to using primary buffers, even when recorded in the same way (i.e. just changing the level parameter), but everything I've seen recommends recording secondary command buffers simultaneously on worker threads, and submitting them on the main thread later. Any ideas on why my validation layers are freaking out, or did I just skip over something when reading the spec? Here's some relevant code:
  13. If I have an array of storage buffers or constant buffers with descriptor type UNIFORM/STORAGE_BUFFER_DYNAMIC how would I specify the dynamic offsets in bind descriptor sets? Offsets: A[0] = 256 A[1] = 1024 A[2] = 4096 A[3] = 8192 Will the dynamic offsets array look like { 256, 1024, ... }? And what will be the dynamicOffsetCount? Will it be 1 or the array size?
  14. Does anyone know what is Vulkan's version of the UAVBarrier in DX12? In my situation, I have two compute shaders. The first one clears the uav and second one writes to the uav. void ComputePass(Cmd* pCmd) { cmdDispatch(pCmd, pClearBufferPipeline); // Barrier to make sure clear buffer shader and fill buffer shader dont execute in parallel cmdUavBarrier(pCmd, pUavBuffer); cmdDispatch(pCmd, pFillBufferPipeline); } My best guess was the VkMemoryBarrier but I am not very familiar with vulkan barriers. So any info on this would really help. Thank you.
  15. Hi, I posted on here a while back about rendering architecture and came away with some great information. I am planning on implementing a render queue which collects the visible objects in the scene and sorts them based on different criteria to minimise state change etc.. The thing I am currently undecided about is: what is the best way to submit my draw calls? (I am wanting to support both OpenGL and Vulkan) At the moment I have two ideas for how I can handle it. The renderable handles the rendering (i.e. It calls renderContext->BindVertexBuffer(...) etc) and setup the renderer state Pro- Each renderable is full in control of how it renders Con - Have to manually manage state The renderable pushes RenderCommands (DrawMesh, DrawMeshIndexed etc) into a CommandBuffer that gets executed by the RenderBacked at the end of the frame Pro - Stateless Con - Seems more difficult to extend with new features Pro/Con - The front end only has a subset of rendering capabilities There are more pros / cons for each, but I have listed a couple to help show my thinking.. Any one have any comments on either of these two approaches or any other approaches that are typically used? Thanks
  16. I have been reading about async compute in the new apis and it all sounds pretty interesting. Here is my basic understanding of the implementation of async compute in a simple application like computing the Mandelbrot fractal: In this case, the compute queue generates a texture of the fractal and the graphics queue presents it. Program structure: // Create 3 UAV textures for triple buffering // Create 3 fences for compute queue beginCmd(computeCmd); cmdDispatch(computeCmd); endCmd(computeCmd); queueSubmit(computeQueue, fence[frameIdx]); if (!getFenceReady(fence[frameIdx - 1]) waitForFences(fence[frameIdx - 1]); beginCmd(graphicsCmd); cmdDraw(uavTexture[frameIdx - 1]); endCmd(graphicsCmd); queueSubmit(graphicsQueue); I am not sure about one thing in this structure All the examples I have seen use vkWaitForFences but I thought fences are used for waiting from the CPU for the GPU to complete. Should I use semaphores instead, so the graphics queue waits on the GPU for the compute queue to finish if it's running faster than the compute queue? Any advice on this will really help to make efficient use of async compute.
  17. Hello, I am currently working on synchronization for frame submission in Vulkan. This is currently the logic of the draw function. void draw() { uint32_t listIndex = gFrameCount++ % gSwapChainImageCount; Cmd* pCmd = ppCmds[listIndex]; beginCmd(pCmd); // resets command buffer fillCommandList(pCmd); endCmd(pCmd); queueSubmit(pGraphicsQueue, pCmd); } gSwapChainImageCount is currently 3. So there are no validation errors for first three frames but after I try to reset the command list in the fourth frame (listIndex is back to 0), I get a validation error ERROR: [DS] : Attempt to reset command buffer (0x0000025AC56701B0) which is in use. The spec valid usage text states 'commandBuffer must not be in the pending state' Now from what I read, submit will automatically stall after the third frame if swapChain[0] is still used. I have tried using all the present modes (Immediate, Fifo, Mailbox,...) but it gives the same error. This leads me to believe that what I read was not correct. In that case, I would need to stall until that frame has been processed. So what would be the best way to determine if a commandBuffer is still in use in Vulkan?
  18. Hi, I am trying to fix an issue I am seeing with my engine using Vulkan. I tested my code on 2 pcs and on one of them with debug build I get flicker while moving the camera which seems to be caused by accessing wrong constant buffer values. Considering it doesn't happen with both pcs and release build makes me believe that it is a synchronization issue. That said I made some tests which proved otherwise. To give some details about my code, I have rendering setup in a way that cpu can record up to 3 frames ahead of the gpu and then I wait with a fence. So all the resources are tripled and I access the proper one for each frame. Currently for my test case I have 3 render threads, each having their own command buffer. First thread just does vkCmdUpdateBuffer on the buffers that will be used for other command buffers. I have pipeline barriers with srcAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT and dstAccessMask = VK_ACCESS_UNIFORM_READ_BIT for each update(for now) to make sure it works. Second thread fills the command buffer for gbuffer rendering. And last thread fills the command buffer for lighting. At the beginning of the lighting command buffer there is a pipeline barrier with VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT, VK_ACCESS_SHADER_READ_BIT, VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL, VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL to make sure all writes to it finished. And after light draw I just convert the gbuffer render targets their old format using VK_ACCESS_SHADER_READ_BIT, VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT, VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL, VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL. Once all the threads are done I submit each command buffer individually(I will get to this in a little bit), with the order I mentioned. 1-Update command buffer 2-Gbuffer command buffer 3-Light command buffer. So from what I understand from Vulkan docs pipeline barriers are creating dependency in the commands given to a single queue. So it shouldn't matter which command buffer does the barrier. In my case for example, using the buffer barrier with srcAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT, dstAccessMask = VK_ACCESS_UNIFORM_READ_BIT should make that buffer available for uniform read in the future commands even if they were in another command buffer. So to find the issue tried bunch of stuff. First tried getting capture with renderdoc but I couldn't reproduce the issue when I run my app with renderdoc. Seems like it is forcing the command to happen linearly. I am not sure if there are any other tool that does similar thing. Then I tried using vkQueueWaitIdle which solved the issue as I was expecting. And I kept the most interesting to the last :). Instead of submitting the command buffers individually, if I submit as batch with VkSubmitInfo.commandBufferCount = 3, I don't see the issue happening anymore. Also in a similar fashion instead of using separate command buffers with their own Begin and End, if I use 1 command buffer and just fill that command buffer with these commands in the order I mentioned, again I don't see the issue. Thanks in advance.
  19. In D3D, if you want to render depth information to a texture and later use that texture as input to a shader you might create a texture with the format DXGI_FORMAT_R24G8_TYPELESS. You would then create two views to the texture, eg. one view with format DXGI_FORMAT_D24_UNORM_S8_UINT for rendering the depth and one SRV with format DXGI_FORMAT_R24_UNORM_X8_TYPELESS for sampling from the texture. How would one go about doing this in Vulkan since VkFormat does not seem to contain any typeless formats?
  20. Hi, I tried searching for this but either I failed or couldn't find anything. I know there's D11/D12 interop and there are extensions for GL/D11 (though not very efficient). I was wondering if there's any Vulkan/D11 or Vulkan/D12 interop? Thanks!
  21. Hello, my first post here :-) About half a year ago i started with C++ (did a little C before) and poking into graphics programming. Right now i am digging through the various vulkan tutorials. A probably naive question that arose is: If i have a device (in my case a GTX970 clone) that exposes on each of two gpus two families, one with 16 queues for graphics, compute, etc and another one with a single transfer queue, do i loose potential performance if i only use 1 of the 16 graphics queues ? Or, in other words, are these queues represented by hardware or logical entities ? And how is that handled across different vendors ? Do intel and amd handle this similar or would a program have to take care of different handling across different hardware ? Cheers gb
  22. As in the title, does vkGetImageMemoryRequirements() take into account the alignment/size adjustments required for VK_IMAGE_TILING_OPTIMAL images given by bufferImageGranularity? I'm assuming no, but the spec isn't all that clear.
  23. Hey guys. Vulkan newbie from OpenGL here. Is there a way to remove a secondary buffer from a primary buffer in Vulkan? If not, how else can I remove objects? I'm binding my primary buffer to: Bind RenderPass Draw Related Secondary Command Buffers End RenderPass And my secondary buffers to: Bind Graphics Pipeline Bind Vertex Buffer Bind Index Buffer Bind Descriptors Draw Indexed The only other way I can guess to have objects be removeable is to have one command buffer per object and add them all to submitInfo.pCommandBuffers, but then I'll be rebinding the renderpass a lot, plus I figure it's more work for the GPU. Also, how would object removal be handled with indirect draws, as I'm planning on looking into that relatively soon? EDIT: One more question, is there a way to bind one descriptor set (for the projection, view, model, and combination matrices) to multiple graphics pipelines? And is there a way to bind graphics pipelines to multiple secondary command buffers?
  24. Hey, I am wondering what is the most efficient way to create a mipmapped texture for use with a texture sampler in Vulkan. Basically I have a bunch of mip levels that I want to tuck into an image with the tiling set to VK_IMAGE_TILING_OPTIMAL, the layout VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL and the memory properties VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT. To be able to map to host memory and memcpy the pixel data into the image I have to create a staging image with VK_IMAGE_TILING_LINEAR right? However, VK_IMAGE_TILING_LINEAR only supports one mip level. So what I do is create a staging image for every mip level, memcpy into those and then copy the mip level 0 of each staging image into the correct mip level of the final texture, with vkCmdCopyImage. This seems like an awful lot of temporary images and copying just to get the texture put together. Is this the best way to do it? How do you do it? Do you have a pool of staging images or do you create temporaries every time? Cheers!
  25. So I'm currently updating my rendering architecture to gain more performance from the newer APIs , DX12/Vulkan, while still supporting D3D11 and I wanted to get some advice on the architecture to use. As far as I know there are two main architectures ; the first is using a single main thread. This thread performs gameplay logic using a task system, and once that is complete, performs visibility and drawcall logic using a task system and submits commands back on the main thread. As far as I know, the benefits of this approach is reducing input latency, but a consequence is that you have to wait for rendering tasks to complete before you perform game logic again. The second is a main thread and a render thread. After gameplay logic is computed, the main thread syncs data with the rendering thread. The rendering thread will compute visibility , draw call , and command buffer generation using the task system and submits command lists on the rendering thread. A benefit of this approach is that it does not block the computation of gameplay logic, but creates a frame of latency.