• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //
2 // Copyright 2018 The ANGLE Project Authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file.
5 //
6 // Program11: D3D11 implementation of an OpenGL Program.
7 
8 #include "libANGLE/renderer/d3d/d3d11/Program11.h"
9 
10 #include "libANGLE/Context.h"
11 #include "libANGLE/renderer/d3d/d3d11/Context11.h"
12 #include "libANGLE/renderer/d3d/d3d11/Renderer11.h"
13 #include "libANGLE/renderer/d3d/d3d11/StateManager11.h"
14 
15 namespace rx
16 {
Program11(const gl::ProgramState & programState,Renderer11 * renderer)17 Program11::Program11(const gl::ProgramState &programState, Renderer11 *renderer)
18     : ProgramD3D(programState, renderer)
19 {}
20 
21 Program11::~Program11() = default;
22 
syncState(const gl::Context * context,const gl::Program::DirtyBits & dirtyBits)23 angle::Result Program11::syncState(const gl::Context *context,
24                                    const gl::Program::DirtyBits &dirtyBits)
25 {
26     Renderer11 *renderer11       = GetImplAs<Context11>(context)->getRenderer();
27     StateManager11 *stateManager = renderer11->getStateManager();
28 
29     // This single flag should be replace by individual dirtyness.
30     stateManager->invalidateProgramUniformBuffers();
31 
32     return angle::Result::Continue;
33 }
34 }  // namespace rx
35