summaryrefslogtreecommitdiff
path: root/driver/rsdGL.cpp
diff options
context:
space:
mode:
authorAlex Sakhartchouk <alexst@google.com>2011-04-29 16:49:08 -0700
committerAlex Sakhartchouk <alexst@google.com>2011-04-29 16:49:08 -0700
commita04e30dbb5ab11592b03666bb3d102070759c58e (patch)
tree7db6cf06de3d034d8bc8b8f7f7e4a2ed212556e4 /driver/rsdGL.cpp
parent609201dadcf408cf6246f48a752b8ffbb49d41c3 (diff)
downloadrs-a04e30dbb5ab11592b03666bb3d102070759c58e.tar.gz
Moving renderscript GL code into the HAL
This change affects - shaders - meshes - fonts - quad rendering Change-Id: I2a53acb4cd1fa8f4c6e67668f6ee969f3d7f7aa1
Diffstat (limited to 'driver/rsdGL.cpp')
-rw-r--r--driver/rsdGL.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/driver/rsdGL.cpp b/driver/rsdGL.cpp
index 26e1bdf4..48690d54 100644
--- a/driver/rsdGL.cpp
+++ b/driver/rsdGL.cpp
@@ -40,6 +40,8 @@
#include <malloc.h>
#include "rsContext.h"
+#include "rsdShaderCache.h"
+#include "rsdVertexArray.h"
using namespace android;
using namespace android::renderscript;
@@ -128,6 +130,11 @@ static void DumpDebug(RsdHal *dc) {
void rsdGLShutdown(const Context *rsc) {
RsdHal *dc = (RsdHal *)rsc->mHal.drv;
+ dc->gl.shaderCache->cleanupAll();
+ delete dc->gl.shaderCache;
+
+ delete dc->gl.vertexArrayState;
+
LOGV("%p, deinitEGL", rsc);
if (dc->gl.egl.context != EGL_NO_CONTEXT) {
@@ -287,6 +294,10 @@ bool rsdGLInit(const Context *rsc) {
DumpDebug(dc);
}
+ dc->gl.shaderCache = new RsdShaderCache();
+ dc->gl.vertexArrayState = new RsdVertexArrayState();
+ dc->gl.vertexArrayState->init(dc->gl.gl.maxVertexAttribs);
+
LOGV("initGLThread end %p", rsc);
return true;
}