Hash :
67fc293a
Author :
Date :
2024-04-05T13:25:12
WebGPU: Add shader translation and program linking stubs. Add a TranslatorWGSL which outputs the same translated shaders every time. Implement the compile and link tasks. Bug: angleproject:8662 Change-Id: I62bbd6c528e1d671d0f4becc38f15f1eceb0336c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5428807 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Matthew Denton <mpdenton@chromium.org>
//
// Copyright 2024 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.
//
#ifndef COMPILER_TRANSLATOR_WGSL_H_
#define COMPILER_TRANSLATOR_WGSL_H_
#include "compiler/translator/Compiler.h"
namespace sh
{
class TranslatorWGSL : public TCompiler
{
public:
TranslatorWGSL(sh::GLenum type, ShShaderSpec spec, ShShaderOutput output);
protected:
bool translate(TIntermBlock *root,
const ShCompileOptions &compileOptions,
PerformanceDiagnostics *perfDiagnostics) override;
[[nodiscard]] bool shouldFlattenPragmaStdglInvariantAll() override;
};
} // namespace sh
#endif // COMPILER_TRANSLATOR_WGSL_H_