Edit

kc3-lang/angle/src/libANGLE/renderer/gl/FenceNVGL.cpp

Branch :

  • Show log

    Commit

  • Author : Jamie Madill
    Date : 2018-07-25 10:41:22
    Hash : a0691b77
    Message : Pass Context to Fence Impl methods. This is needed for the error refactoring and also for the Vulkan implementation. Bug: angleproject:2738 Change-Id: I4e1bed7f67ef17feb5554b5838a2ed5feb22bba0 Reviewed-on: https://chromium-review.googlesource.com/1150091 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>

  • src/libANGLE/renderer/gl/FenceNVGL.cpp
  • //
    // Copyright 2015 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.
    //
    
    // FenceNVGL.cpp: Implements the class methods for FenceNVGL.
    
    #include "libANGLE/renderer/gl/FenceNVGL.h"
    
    #include "common/debug.h"
    #include "libANGLE/renderer/gl/FunctionsGL.h"
    
    
    namespace rx
    {
    
    FenceNVGL::FenceNVGL(const FunctionsGL *functions)
        : FenceNVImpl(),
          mFunctions(functions)
    {
        mFunctions->genFencesNV(1, &mFence);
    }
    
    FenceNVGL::~FenceNVGL()
    {
        mFunctions->deleteFencesNV(1, &mFence);
        mFence = 0;
    }
    
    gl::Error FenceNVGL::set(const gl::Context *context, GLenum condition)
    {
        ASSERT(condition == GL_ALL_COMPLETED_NV);
        mFunctions->setFenceNV(mFence, condition);
        return gl::NoError();
    }
    
    gl::Error FenceNVGL::test(const gl::Context *context, GLboolean *outFinished)
    {
        ASSERT(outFinished);
        *outFinished = mFunctions->testFenceNV(mFence);
        return gl::NoError();
    }
    
    gl::Error FenceNVGL::finish(const gl::Context *context)
    {
        mFunctions->finishFenceNV(mFence);
        return gl::NoError();
    }
    
    }