Hash :
e7ce481f
        
        Author :
  
        
        Date :
2023-11-01T22:44:22
        
      
Consolidate parallel compilation in front-end This cleans up the multiple compilation task implementations in the backends and consolidates them in the front-end. The front-end is then able to do the compilation in an unlocked tail call instead if desired (in a future change). This change is in preparation for having the program link tasks directly wait on the shader compilation tasks. As a result, the "shader resolve" should not be needed to access the shader compilation results; it should be enough to wait for the compilation job. This change therefore moves post-processing of results to the compilation job itself as they did not need to actually be done after compilation is done (merely after translation is done). As a side effect, shader substition and other debug features should now work for the GL backend as they are now done before back-end compilation. Bug: angleproject:8297 Change-Id: Ib9274b1149fadca7545956a864d6635b6cba5c3a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4994655 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@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.
//
// ShaderImpl.cpp: Implementation methods of ShaderImpl
#include "libANGLE/renderer/ShaderImpl.h"
#include "libANGLE/Context.h"
#include "libANGLE/trace.h"
namespace rx
{
bool ShaderTranslateTask::translate(ShHandle compiler,
                                    const ShCompileOptions &options,
                                    const std::string &source)
{
    ANGLE_TRACE_EVENT1("gpu.angle", "ShaderTranslateTask::run", "source", source);
    const char *src = source.c_str();
    return sh::Compile(compiler, &src, 1, options);
}
angle::Result ShaderImpl::onLabelUpdate(const gl::Context *context)
{
    return angle::Result::Continue;
}
}  // namespace rx