summaryrefslogtreecommitdiffstats
path: root/libs/rs/driver
diff options
context:
space:
mode:
authorAlex Sakhartchouk <alexst@google.com>2012-01-10 10:16:52 -0800
committerAlex Sakhartchouk <alexst@google.com>2012-01-10 10:16:52 -0800
commit33680ff630760228c33cc3731eb5718be7bbc04f (patch)
tree5526f284b362418518d7ebe1d77fcefe3941450a /libs/rs/driver
parentdd1da451159578d865230ceada3e1f0058e3c18e (diff)
downloadframeworks_base-33680ff630760228c33cc3731eb5718be7bbc04f.zip
frameworks_base-33680ff630760228c33cc3731eb5718be7bbc04f.tar.gz
frameworks_base-33680ff630760228c33cc3731eb5718be7bbc04f.tar.bz2
Adding ability to bind constants to shaders.
Change-Id: I63b664fd2fec7e0c8157b7185782192132222f1a
Diffstat (limited to 'libs/rs/driver')
-rw-r--r--libs/rs/driver/rsdRuntimeStubs.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/libs/rs/driver/rsdRuntimeStubs.cpp b/libs/rs/driver/rsdRuntimeStubs.cpp
index 07808a6..38bd48f 100644
--- a/libs/rs/driver/rsdRuntimeStubs.cpp
+++ b/libs/rs/driver/rsdRuntimeStubs.cpp
@@ -90,6 +90,16 @@ static void SC_BindTexture(ProgramFragment *pf, uint32_t slot, Allocation *a) {
rsrBindTexture(rsc, sc, pf, slot, a);
}
+static void SC_BindVertexConstant(ProgramVertex *pv, uint32_t slot, Allocation *a) {
+ GET_TLS();
+ rsrBindConstant(rsc, sc, pv, slot, a);
+}
+
+static void SC_BindFragmentConstant(ProgramFragment *pf, uint32_t slot, Allocation *a) {
+ GET_TLS();
+ rsrBindConstant(rsc, sc, pf, slot, a);
+}
+
static void SC_BindSampler(ProgramFragment *pf, uint32_t slot, Sampler *s) {
GET_TLS();
rsrBindSampler(rsc, sc, pf, slot, s);
@@ -591,6 +601,8 @@ static RsdSymbolTable gSyms[] = {
{ "_Z20rsgBindProgramRaster17rs_program_raster", (void *)&SC_BindProgramRaster, false },
{ "_Z14rsgBindSampler19rs_program_fragmentj10rs_sampler", (void *)&SC_BindSampler, false },
{ "_Z14rsgBindTexture19rs_program_fragmentj13rs_allocation", (void *)&SC_BindTexture, false },
+ { "_Z15rsgBindConstant19rs_program_fragmentj13rs_allocation", (void *)&SC_BindFragmentConstant, false },
+ { "_Z15rsgBindConstant17rs_program_vertexj13rs_allocation", (void *)&SC_BindVertexConstant, false },
{ "_Z36rsgProgramVertexLoadProjectionMatrixPK12rs_matrix4x4", (void *)&SC_VpLoadProjectionMatrix, false },
{ "_Z31rsgProgramVertexLoadModelMatrixPK12rs_matrix4x4", (void *)&SC_VpLoadModelMatrix, false },