diff options
author | Georgios Pinitas <georgios.pinitas@arm.com> | 2019-10-25 18:25:17 +0100 |
---|---|---|
committer | Georgios Pinitas <georgios.pinitas@arm.com> | 2019-11-01 17:26:05 +0000 |
commit | 7ae80a928564eba96c4fef0b91b1c50e1647fb8d (patch) | |
tree | 18a6a38e9d61f09f46cc08ba231802eb4519b846 /src/core/GLES_COMPUTE/GCKernelLibrary.cpp | |
parent | bfd75d64b99342a6cb46380f7173c39026ed7ea2 (diff) | |
download | ComputeLibrary-7ae80a928564eba96c4fef0b91b1c50e1647fb8d.tar.gz |
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>
Diffstat (limited to 'src/core/GLES_COMPUTE/GCKernelLibrary.cpp')
-rw-r--r-- | src/core/GLES_COMPUTE/GCKernelLibrary.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/core/GLES_COMPUTE/GCKernelLibrary.cpp b/src/core/GLES_COMPUTE/GCKernelLibrary.cpp index 015e085355..4b3c5aa869 100644 --- a/src/core/GLES_COMPUTE/GCKernelLibrary.cpp +++ b/src/core/GLES_COMPUTE/GCKernelLibrary.cpp @@ -337,6 +337,33 @@ GCKernelLibrary &GCKernelLibrary::get() 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 |