gfx-rs / portability

Vulkan Portability Implementation
Mozilla Public License 2.0
384 stars 25 forks source link

Issue running vulkan_minimal_compute sample.. #156

Closed oscarbg closed 6 years ago

oscarbg commented 6 years ago

Hi, just testing https://github.com/Erkaman/vulkan_minimal_compute sample that works with MoltenVK.. a very minimal Mandelbrot program using compute shader.. doesn't need any mods for Mac compilation and nice is that also uses validation layers if you have installed "correctly" from MacOS SDK.. I thought portability may be not compatible with these layers but was wrong.. seems working OK which is nice.. anyway doesn't work Ok (it should generate Mandelbrot.png).. output is: Debug Report: Validation: [ VUID_Undefined ] Object: 0x7fd592c096e0 (Type = 3) | Number of currently valid memory objects is not less than the maximum allowed (0). Segmentation fault: 11

perhaps is some lame bug of device limits not set correctly? thanks..

kvark commented 6 years ago

When running in debug, this program requires LUNARG_standard_validation layer and DEBUG_REPORT extension. The former is technically just a reporting issue (but still an issue). The latter is not yet implemented (but certainly planned).

When running in release, it actually executes correctly for me (producing the Mandelbrot image). Enabling Metal validation reveals a small issue with thread group counts:

graphics35334:vulkan_minimal_compute dmalyshau$ METAL_DEVICE_WRAPPER_TYPE=1 build/vulkan_minimal_compute 
2018-08-31 13:12:01.379 vulkan_minimal_compute[523:5608124] Metal API Validation Enabled
-[MTLDebugComputeCommandEncoder _validateThreadsPerThreadgroup:]:949: failed assertion `(threadsPerThreadgroup.width(32) * threadsPerThreadgroup.height(32) * threadsPerThreadgroup.depth(1))(1024) must be <= 256. (kernel threadgroup size limit)'
Abort trap: 6
oscarbg commented 6 years ago

Ok thanks for giving a look.. will compile in release mode and stop doing all testing in Mojave beta..

kvark commented 6 years ago

I'm on Mojave as well. What's wrong with it?

On Aug 31, 2018, at 18:46, Oscar Barenys notifications@github.com wrote:

Ok thanks for giving a look.. will compile in release mode and stop doing all testing in Mojave beta..

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

oscarbg commented 6 years ago

Ok good to know.. as said before VKD3D triangle demo doesn't render correctly on a Mojave beta from month ago (I'm on slow free disk space), but Ok on 10.13.6 on AMD RX Vega..