Hash :
ff64d2c7
Author :
Date :
2021-08-06T21:24:09
Choose direct-to-Metal translator through a feature. Define directMetalGeneration in FeaturesMtl.h. If ANGLE_ENABLE_METAL_SPIRV is defined to 1 (still the default), directMetalGeneration defaults to false. It can be overridden via the standard ANGLE mechanism: ANGLE_FEATURE_OVERRIDES_ENABLED=directMetalGeneration It can also be overridden by instantiating angle_end2end_tests with the directives: WithDirectMetalGeneration(ES2_METAL()) WithDirectMetalGeneration(ES3_METAL()) These directives aren't working properly yet though. The direct-to-Metal compiler is instantiated, but the _DirectMetalGen versions of the tests fail. They pass when switching the Metal backend's default behavior using the above environment variable. This will be debugged in follow-on CLs. Thanks to syoussefi@ for the prototype of this CL: https://chromium-review.googlesource.com/3076129 Bug: angleproject:5505 Change-Id: I188ab89abc75bf89c5ed2d90102af311feaa1960 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3079083 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Kenneth Russell <kbr@chromium.org>
//
// Copyright 2019 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// CompilerMtl.h:
// Defines the class interface for CompilerMtl, implementing CompilerImpl.
//
#ifndef LIBANGLE_RENDERER_METAL_COMPILERMTL_H_
#define LIBANGLE_RENDERER_METAL_COMPILERMTL_H_
#include "libANGLE/renderer/CompilerImpl.h"
namespace rx
{
class CompilerMtl : public CompilerImpl
{
public:
CompilerMtl(ShShaderOutput translatorOutputType);
~CompilerMtl() override;
ShShaderOutput getTranslatorOutputType() const override;
private:
ShShaderOutput mTranslatorOutputType;
};
} // namespace rx
#endif /* LIBANGLE_RENDERER_METAL_COMPILERMTL_H_ */