Hash :
492a7e43
Author :
Date :
2014-11-05T13:27:06
Encapulate the ESSL compiler into a GL object that is per-context. * Allows for multiple contexts have to have different client versions, caps and extensions without causing shader compilation failures. BUG=angle:823 Change-Id: I523679e90be031b0b7fa385d46d6839b1cf3029f Reviewed-on: https://chromium-review.googlesource.com/227710 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
//
// Copyright (c) 2014 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.
//
// Compiler.cpp: implements the gl::Compiler class.
#include "libANGLE/Compiler.h"
#include "libANGLE/renderer/CompilerImpl.h"
#include "common/debug.h"
namespace gl
{
Compiler::Compiler(rx::CompilerImpl *impl)
: mCompiler(impl)
{
ASSERT(mCompiler);
}
Compiler::~Compiler()
{
SafeDelete(mCompiler);
}
Error Compiler::release()
{
return mCompiler->release();
}
rx::CompilerImpl *Compiler::getImplementation()
{
return mCompiler;
}
}