From 5afdb62a392eaf8ae41e09b9dd37b7922abd03b5 Mon Sep 17 00:00:00 2001 From: Jack Andersen Date: Mon, 4 Apr 2016 16:37:46 -1000 Subject: [PATCH] Metal depth range --- lib/graphicsdev/Metal.mm | 37 ++++++++++++++++++++++++++----------- 1 file changed, 26 insertions(+), 11 deletions(-) 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