COMPMID-2549: Add GLES Runtime Context interfaces.
* Creates interfaces and concrete classes
* Ports GCActivationalLayer
* Adapts test framework and relevant tests
Change-Id: Ide36cd65ebf185958db3c4a5bebd630fcb2f39b3
Signed-off-by: Georgios Pinitas <georgios.pinitas@arm.com>
Reviewed-on: https://review.mlplatform.org/c/2199
Reviewed-by: Pablo Marquez <pablo.tello@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
diff --git a/src/core/GLES_COMPUTE/GCKernelLibrary.cpp b/src/core/GLES_COMPUTE/GCKernelLibrary.cpp
index 015e085..4b3c5aa 100644
--- a/src/core/GLES_COMPUTE/GCKernelLibrary.cpp
+++ b/src/core/GLES_COMPUTE/GCKernelLibrary.cpp
@@ -337,6 +337,33 @@
return _kernel_library;
}
+void GCKernelLibrary::init(std::string shader_path, EGLDisplay dpy, EGLContext ctx)
+{
+ //TODO: deal with old display and context.
+ _shader_path = std::move(shader_path);
+
+ _display = dpy;
+ _context = ctx;
+
+ eglMakeCurrent(_display, EGL_NO_SURFACE, EGL_NO_SURFACE, _context);
+ setup_dummy_fbo();
+}
+
+void GCKernelLibrary::set_shader_path(const std::string &shader_path)
+{
+ _shader_path = shader_path;
+}
+
+void GCKernelLibrary::set_context(EGLDisplay dpy, EGLContext ctx)
+{
+ //TODO: deal with old display and context.
+ _display = dpy;
+ _context = ctx;
+
+ eglMakeCurrent(dpy, EGL_NO_SURFACE, EGL_NO_SURFACE, ctx);
+ setup_dummy_fbo();
+}
+
GCKernel GCKernelLibrary::create_kernel(const std::string &shader_name, const StringSet &build_options_set) const
{
// Find which program contains the kernel