Allow configuring iOS build with CMake (#3234)
This commit is contained in:
@@ -366,7 +366,6 @@ bool Context::renderTileClippingMasks(gfx::RenderPass& renderPass,
|
||||
vertDesc->layouts()->setObject(layoutDesc.get(), ShaderClass::attributes[0].index);
|
||||
|
||||
// Create a render pipeline state, telling Metal how to render the primitives
|
||||
const auto& renderPassDescriptor = mtlRenderPass.getDescriptor();
|
||||
const std::size_t hash = mbgl::util::hash(ShaderClass::attributes[0].index,
|
||||
0,
|
||||
MTL::VertexFormatShort2,
|
||||
|
||||
@@ -252,7 +252,8 @@ void Drawable::draw(PaintParameters& parameters) const {
|
||||
const auto stencilMode = enableStencil ? parameters.stencilModeForClipping(tileID->toUnwrapped())
|
||||
: gfx::StencilMode::disabled();
|
||||
impl->depthStencilState = context.makeDepthStencilState(depthMode, stencilMode, renderable);
|
||||
impl->previousStencilMode = *newStencilMode;
|
||||
// FIXME: https://github.com/maplibre/maplibre-native/issues/3248
|
||||
if (newStencilMode) impl->previousStencilMode = *newStencilMode;
|
||||
}
|
||||
renderPass.setDepthStencilState(impl->depthStencilState);
|
||||
renderPass.setStencilReference(impl->previousStencilMode.ref);
|
||||
@@ -387,8 +388,6 @@ void Drawable::setVertexAttrId(const size_t id) {
|
||||
}
|
||||
|
||||
void Drawable::bindAttributes(RenderPass& renderPass) const noexcept {
|
||||
const auto& encoder = renderPass.getMetalEncoder();
|
||||
|
||||
NS::UInteger attributeIndex = 0;
|
||||
for (const auto& binding : impl->attributeBindings) {
|
||||
const auto* buffer = static_cast<const mtl::VertexBufferResource*>(binding ? binding->vertexBufferResource
|
||||
@@ -402,8 +401,6 @@ void Drawable::bindAttributes(RenderPass& renderPass) const noexcept {
|
||||
}
|
||||
|
||||
void Drawable::bindInstanceAttributes(RenderPass& renderPass) const noexcept {
|
||||
const auto& encoder = renderPass.getMetalEncoder();
|
||||
|
||||
NS::UInteger attributeIndex = 0;
|
||||
for (const auto& binding : impl->instanceBindings) {
|
||||
if (binding.has_value()) {
|
||||
@@ -520,7 +517,6 @@ void Drawable::upload(gfx::UploadPass& uploadPass_) {
|
||||
assert(false);
|
||||
return;
|
||||
}
|
||||
const auto& shaderMTL = static_cast<const ShaderProgram&>(*shader);
|
||||
|
||||
auto& uploadPass = static_cast<UploadPass&>(uploadPass_);
|
||||
auto& contextBase = uploadPass.getContext();
|
||||
|
||||
@@ -43,7 +43,6 @@ void LayerGroup::render(RenderOrchestrator&, PaintParameters& parameters) {
|
||||
const auto debugGroup = parameters.encoder->createDebugGroup(getName() + "-render");
|
||||
#endif
|
||||
|
||||
auto& context = static_cast<Context&>(parameters.context);
|
||||
auto& renderPass = static_cast<RenderPass&>(*parameters.renderPass);
|
||||
|
||||
bool bindUBOs = false;
|
||||
|
||||
@@ -111,7 +111,6 @@ void TileLayerGroup::render(RenderOrchestrator&, PaintParameters& parameters) {
|
||||
}
|
||||
};
|
||||
|
||||
const auto depthMode = parameters.depthModeFor3D();
|
||||
if (stencil3d) {
|
||||
stencilMode3d = parameters.stencilModeFor3D();
|
||||
encoder->setStencilReferenceValue(stencilMode3d.ref);
|
||||
|
||||
@@ -165,11 +165,6 @@ gfx::AttributeBindingArray UploadPass::buildAttributeBindings(
|
||||
gfx::AttributeBindingArray bindings;
|
||||
bindings.resize(defaults.allocatedSize());
|
||||
|
||||
constexpr std::size_t align = 16;
|
||||
constexpr std::uint8_t padding = 0;
|
||||
|
||||
uint32_t vertexStride = 0;
|
||||
|
||||
// For each attribute in the program, with the corresponding default and optional override...
|
||||
const auto resolveAttr = [&](const size_t id, auto& default_, auto& override_) -> void {
|
||||
auto& effectiveAttr = override_ ? *override_ : default_;
|
||||
|
||||
Reference in New Issue
Block a user