Multi-Threading issue Intel vs Nvidia, parallel CB creation with parallel submissions.

Hi all,

I will try to explain the problem I encounter, if it is an issue or just bad implementation.

My setup is: Intel I5 dual core with Intel HD 620 + Geforce 940MX.

I create a small sample that do 3 render passes:

clear Pass-> clear the Depth and Color target. result: ok
depth pass-> writes the depth only. result: ok
color pass-> using the depth. result: undefined.

Design: The color pass is multithreaded in this way,

.- Each thread generates a vkCommandBuffer, sharing the render pass and after it finish submit to the graphic queue. All of threads use a primary command buffer type but each threads has their on pool and cbs.

.- The layout and dependencies seems to be correct and the sub passes has the correct flags for storing and load when needed.

Now: on the intel HD620 the color pass is correctly displayed means all the CBs write on the attached buffer using the depth just for reading…on the 940MX is not the case is like each submission clears the previous rendered submitted CB or crash.
I tried ordering them or just submit 1 submit info with them as a list, nothing seems to work.
I didn’t try again create a submit info per thread…could be that?
I don’t have any barrier for that.

I tried to find a clue on the Spec but I don’t have enough time to dig on it.

The main concept is create primary command buffers and submit them within each thread but sharing the depth + attachment.
I can fix this design to : A.- match the secondary command buffer or be closer to the LunarVG example…but I was wondering why Intel allow this when Nvidia drivers not…

Any clue is appreciated and thanks in advance.

Ok, I found with render doc that indeed the FrameBuffer is correctly draw…O.o

and NSight is showing the same thing, except that 2 of the 3 swapchains images are corrupted…except the one in the capture…

How can I update my nsight capture? I have no idea why I have a FB correctly created but displaying the previous corrupted? FB…

Those anyone encounter that the capture show a correct FB draw but the previous one totally broken? after I step over the next frame is correctly created on NSight, but on the C# form is not… anyone?

Ok I was able to fix it! seems that even if I use the depth only for reading I

attachments[1].loadOp = VK_ATTACHMENT_LOAD_OP_LOAD;

the store op needs to be set:

attachments[1].storeOp = VK_ATTACHMENT_STORE_OP_STORE;

and not _OP_DONT_CARE…

But know I need to check if the depth pre pass make sense or not.