KhronosGroup / MoltenVK

MoltenVK is a Vulkan Portability implementation. It layers a subset of the high-performance, industry-standard Vulkan graphics and compute API over Apple's Metal graphics framework, enabling Vulkan applications to run on macOS, iOS and tvOS.
Apache License 2.0
4.76k stars 419 forks source link

maxPerStageDescriptorUpdateAfterBindSamplers = 16 on an M1 MAX #2227

Closed ashkann closed 4 months ago

ashkann commented 5 months ago

Hello. Running the latest SDK on a Mac Book Pro (M1 MAX), the maxPerStageDescriptorUpdateAfterBindSamplers and not the other one (maxPerStageDescriptorSamplers) is still 16. This is preventing me from doing bindless. I'm not sure I'm understanding it all correctly but this should be much much higher than 16, no ?

image

Trying to exceed the limit results in a validation error (as expected):

image

billhollings commented 5 months ago
  1. Have you enabled the configuration parameter MVK_CONFIG_USE_METAL_ARGUMENT_BUFFERS? If not, see the Configuring MoltenVK section of Docs/MoltenVK_Runtime_UserGuide.md to learn how to do that.

  2. Are you running on a GPU that supports Tier 2 argument buffers? On macOS, that would generally be either Apple Silicon, or a discrete GPU.

ashkann commented 5 months ago

@billhollings Thank you for your quick reply.

  1. Setting the MVK_CONFIG_USE_METAL_ARGUMENT_BUFFERS to 1 or 2 makes the validation error disappear but now my application doesn't work (it was working before since I wasn't in reality using that many descriptors). image Much better now ☝️ but I was expecting much higher numbers. I'm wondering what is it I'm missing here ...

  2. The chip is reported as INTEGRATED in the gpu database but I believe this counts as "Apple Silicon" ? This is the best GPU you can find on a Mac Book (this is a Mac Book Pro).

    image
ashkann commented 4 months ago

Closing since basically got the answer.