diff --git a/lib/graphicsdev/Metal.mm b/lib/graphicsdev/Metal.mm index f9ac89c..7ea1e62 100644 --- a/lib/graphicsdev/Metal.mm +++ b/lib/graphicsdev/Metal.mm @@ -573,7 +573,8 @@ struct MetalShaderDataBinding : IShaderDataBinding IGraphicsBuffer* m_ibuf; size_t m_ubufCount; std::unique_ptr m_ubufs; - std::vector> m_ubufOffs; + std::unique_ptr m_ubufOffs; + std::unique_ptr m_fubufs; size_t m_texCount; std::unique_ptr m_texs; MetalShaderDataBinding(MetalContext* ctx, @@ -591,16 +592,23 @@ struct MetalShaderDataBinding : IShaderDataBinding m_texCount(texCount), m_texs(new ITexture*[texCount]) { - if (ubufOffs && ubufSizes) + if (ubufCount && ubufStages) { - m_ubufOffs.reserve(ubufCount); + m_fubufs.reset(new bool[ubufCount]); + for (size_t i=0 ; i