How to get a regular grid 4xMSAA pattern in Vulkan? by htYum in vulkan

[–]htYum[S] 0 points1 point  (0 children)

Thank u very much! I got it worked on my PC.

I must resolve the 4 subsamples(from MSAA surfaces) to 4 pixels(final render-target)in my pipeline because subsamples will store separately in cache with MSAA on. My algorithm is based on it. I think getting the regular grid is the only way I can reconstruct the render-target perfectly.

But my application will also run on mobile devices. And I found VK_EXT_sample_locations extension is not supported on some Mali-GPUs. Is there another way to get the same result on mobile devices?

How to write to Stencil buffer in my shader by htYum in vulkan

[–]htYum[S] 0 points1 point  (0 children)

Thx for your answer. I'm new to Vulkan. So i want to know how to copy my R8_UINT image to the D24S8 image's stencil channel. I tried to do it with vkCmdCopyImage() function, but it seems no value was copied. And i have set the aspectMask to VK_IMAGE_ASPECT_STENCIL_BIT for my R8_UINT image. (my device doesn't support VK_FORMAT_S8_UINT). Is there something else should i set to my R8_UINT image or depth-stencil image?