Add gl::Program::syncState and dirty bits.
Currently this handles uniform block bindings. Cleans up some logic in D3D.
Bug: angleproject:2747
Change-Id: I8c2989738d50a77d6f6d90a9ff11dceab6d3129c
Reviewed-on: https://chromium-review.googlesource.com/1172085
Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
diff --git a/src/libANGLE/renderer/ProgramImpl.h b/src/libANGLE/renderer/ProgramImpl.h
index 713e2f4..927c139 100644
--- a/src/libANGLE/renderer/ProgramImpl.h
+++ b/src/libANGLE/renderer/ProgramImpl.h
@@ -109,9 +109,6 @@
GLint location,
GLuint *params) const = 0;
- // TODO: synchronize in syncState when dirty bits exist.
- virtual void setUniformBlockBinding(GLuint uniformBlockIndex, GLuint uniformBlockBinding) = 0;
-
// CHROMIUM_path_rendering
// Set parameters to control fragment shader input variable interpolation
virtual void setPathFragmentInputGen(const std::string &inputName,
@@ -129,10 +126,19 @@
const gl::ProgramState &getState() const { return mState; }
+ virtual gl::Error syncState(const gl::Context *context,
+ const gl::Program::DirtyBits &dirtyBits);
+
protected:
const gl::ProgramState &mState;
};
+inline gl::Error ProgramImpl::syncState(const gl::Context *context,
+ const gl::Program::DirtyBits &dirtyBits)
+{
+ return gl::NoError();
+}
+
} // namespace rx
#endif // LIBANGLE_RENDERER_PROGRAMIMPL_H_