summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2017-01-31 18:04:47 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2017-01-31 23:01:50 +0900
commit8467d65b23f8b18d053a470fb78d71b5087da37a (patch)
treec3a5132ac78e582b24df277aed5cc939b36d2b0b
parenta909ca1f68e178f54c5cc047ddff79d25b2c34c6 (diff)
evas gl common - have a gl array buffer pool to avoid hitting malloc
this improves performance a bit by avoding libc's malloc and the heap by using a custom buffer pool thathas basically immediate O(1) lookup time (in real life) that baloons out and contracts back as time goes on. @optimize
-rw-r--r--src/modules/evas/engines/gl_common/evas_gl_context.c395
1 files changed, 250 insertions, 145 deletions
diff --git a/src/modules/evas/engines/gl_common/evas_gl_context.c b/src/modules/evas/engines/gl_common/evas_gl_context.c
index dc04597cbc..e3589a2ea6 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_context.c
+++ b/src/modules/evas/engines/gl_common/evas_gl_context.c
@@ -9,7 +9,6 @@
9 9
10#define PRG_INVALID NULL 10#define PRG_INVALID NULL
11#define GLPIPES 1 11#define GLPIPES 1
12#define FREE(a) do { if (a) { free(a); } a = NULL; } while(0)
13 12
14static int tbm_sym_done = 0; 13static int tbm_sym_done = 0;
15int _evas_engine_GL_common_log_dom = -1; 14int _evas_engine_GL_common_log_dom = -1;
@@ -1097,6 +1096,233 @@ error:
1097 return NULL; 1096 return NULL;
1098} 1097}
1099 1098
1099#define VERTEX_CNT 3
1100#define COLOR_CNT 4
1101#define TEX_CNT 2
1102#define SAM_CNT 2
1103#define MASK_CNT 4
1104
1105#define PUSH_VERTEX(n, x, y, z) do { \
1106 gc->pipe[n].array.vertex[nv++] = x; \
1107 gc->pipe[n].array.vertex[nv++] = y; \
1108 gc->pipe[n].array.vertex[nv++] = z; } while(0)
1109#define PUSH_COLOR(n, r, g, b, a) do { \
1110 gc->pipe[n].array.color[nc++] = r; \
1111 gc->pipe[n].array.color[nc++] = g; \
1112 gc->pipe[n].array.color[nc++] = b; \
1113 gc->pipe[n].array.color[nc++] = a; } while(0)
1114#define PUSH_TEXUV(n, u, v) do { \
1115 gc->pipe[n].array.texuv[nu++] = u; \
1116 gc->pipe[n].array.texuv[nu++] = v; } while(0)
1117#define PUSH_TEXUV2(n, u, v) do { \
1118 gc->pipe[n].array.texuv2[nu2++] = u; \
1119 gc->pipe[n].array.texuv2[nu2++] = v; } while(0)
1120#define PUSH_TEXUV3(n, u, v) do { \
1121 gc->pipe[n].array.texuv3[nu3++] = u; \
1122 gc->pipe[n].array.texuv3[nu3++] = v; } while(0)
1123#define PUSH_TEXA(n, u, v) do { \
1124 gc->pipe[n].array.texa[na++] = u; \
1125 gc->pipe[n].array.texa[na++] = v; } while(0)
1126#define PUSH_TEXM(n, u, v, w, z) do { \
1127 gc->pipe[n].array.mask[nm++] = u; \
1128 gc->pipe[n].array.mask[nm++] = v; \
1129 gc->pipe[n].array.mask[nm++] = w; \
1130 gc->pipe[n].array.mask[nm++] = z; } while(0)
1131#define PUSH_TEXSAM(n, x, y) do { \
1132 gc->pipe[n].array.texsam[ns++] = x; \
1133 gc->pipe[n].array.texsam[ns++] = y; } while(0)
1134
1135#define PUSH_6_VERTICES(pn, x, y, w, h) do { \
1136 PUSH_VERTEX(pn, x , y , 0); PUSH_VERTEX(pn, x + w, y , 0); \
1137 PUSH_VERTEX(pn, x , y + h, 0); PUSH_VERTEX(pn, x + w, y , 0); \
1138 PUSH_VERTEX(pn, x + w, y + h, 0); PUSH_VERTEX(pn, x , y + h, 0); \
1139 } while (0)
1140#define PUSH_6_QUAD(pn, x1, y1, x2, y2, x3, y3, x4, y4) \
1141 PUSH_TEXUV(pn, x1, y1); PUSH_TEXUV(pn, x2, y2); PUSH_TEXUV(pn, x4, y4);\
1142 PUSH_TEXUV(pn, x2, y2); PUSH_TEXUV(pn, x3, y3); PUSH_TEXUV(pn, x4, y4);
1143
1144#define PUSH_6_TEXUV(pn, x1, y1, x2, y2) \
1145 PUSH_6_QUAD(pn, x1, y1, x2, y1, x2, y2, x1, y2);
1146
1147#define PUSH_6_TEXUV2(pn, x1, y1, x2, y2) do { \
1148 PUSH_TEXUV2(pn, x1, y1); PUSH_TEXUV2(pn, x2, y1); PUSH_TEXUV2(pn, x1, y2); \
1149 PUSH_TEXUV2(pn, x2, y1); PUSH_TEXUV2(pn, x2, y2); PUSH_TEXUV2(pn, x1, y2); \
1150 } while (0)
1151#define PUSH_6_TEXUV3(pn, x1, y1, x2, y2) do { \
1152 PUSH_TEXUV3(pn, x1, y1); PUSH_TEXUV3(pn, x2, y1); PUSH_TEXUV3(pn, x1, y2); \
1153 PUSH_TEXUV3(pn, x2, y1); PUSH_TEXUV3(pn, x2, y2); PUSH_TEXUV3(pn, x1, y2); \
1154 } while (0)
1155#define PUSH_6_TEXA(pn, x1, y1, x2, y2) do { \
1156 PUSH_TEXA(pn, x1, y1); PUSH_TEXA(pn, x2, y1); PUSH_TEXA(pn, x1, y2); \
1157 PUSH_TEXA(pn, x2, y1); PUSH_TEXA(pn, x2, y2); PUSH_TEXA(pn, x1, y2); \
1158 } while (0)
1159#define PUSH_SAMPLES(pn, dx, dy) do { \
1160 PUSH_TEXSAM(pn, dx, dy); PUSH_TEXSAM(pn, dx, dy); PUSH_TEXSAM(pn, dx, dy); \
1161 PUSH_TEXSAM(pn, dx, dy); PUSH_TEXSAM(pn, dx, dy); PUSH_TEXSAM(pn, dx, dy); \
1162 } while (0)
1163#define PUSH_MASKSAM(pn, x, y, cnt) do { int _i; for (_i = 0; _i < cnt; _i++) { \
1164 gc->pipe[pn].array.masksam[nms++] = x; gc->pipe[pn].array.masksam[nms++] = y; \
1165 } } while (0)
1166#define PUSH_6_COLORS(pn, r, g, b, a) \
1167 do { int i; for (i = 0; i < 6; i++) PUSH_COLOR(pn, r, g, b, a); } while(0)
1168
1169#define PIPE_GROW(gc, pn, inc) \
1170 int nv = gc->pipe[pn].array.num * VERTEX_CNT; (void) nv; \
1171 int nc = gc->pipe[pn].array.num * COLOR_CNT; (void) nc; \
1172 int nu = gc->pipe[pn].array.num * TEX_CNT; (void) nu; \
1173 int nu2 = gc->pipe[pn].array.num * TEX_CNT; (void) nu2; \
1174 int nu3 = gc->pipe[pn].array.num * TEX_CNT; (void) nu3; \
1175 int na = gc->pipe[pn].array.num * TEX_CNT; (void) na; \
1176 int ns = gc->pipe[pn].array.num * SAM_CNT; (void) ns; \
1177 int nm = gc->pipe[pn].array.num * MASK_CNT; (void) nm; \
1178 int nms = gc->pipe[pn].array.num * SAM_CNT; (void) nms; \
1179 gc->pipe[pn].array.num += inc; \
1180 array_alloc(gc, pn);
1181
1182#define PIPE_FREE(x) \
1183 do { _pipebuf_free(x); (x) = NULL; } while (0)
1184
1185typedef struct _Pipebuf
1186{
1187 int skipped, alloc;
1188} Pipebuf;
1189
1190static int _pipe_bufs_max = 0;
1191static int _pipe_bufs_skipped = 0;
1192static Eina_List *_pipe_bufs = NULL;
1193
1194/*
1195static int _used = 0, _alloced = 0, _realloced = 0;
1196static int _searches = 0, _looks = 0;
1197*/
1198
1199static void *
1200_pipebuf_resize(void *pb, int size)
1201{
1202 Pipebuf *buf, *buf2;
1203 Eina_List *l, *ll;
1204
1205 if (size > _pipe_bufs_max) _pipe_bufs_max = size;
1206
1207 if (!pb)
1208 {
1209 if (_pipe_bufs)
1210 {
1211// _searches++;
1212 EINA_LIST_FOREACH(_pipe_bufs, l, buf)
1213 {
1214// _looks++;
1215 if (buf->alloc >= size) break;
1216 buf->skipped++;
1217 _pipe_bufs_skipped++;
1218 }
1219 if (l)
1220 {
1221// _used++;
1222 _pipe_bufs = eina_list_remove_list(_pipe_bufs, l);
1223 _pipe_bufs_skipped -= buf->skipped;
1224 buf->skipped = 0;
1225 goto done;
1226 }
1227 }
1228 buf = malloc(size + sizeof(Pipebuf));
1229 if (!buf) return NULL;
1230 buf->skipped = 0;
1231 buf->alloc = size;
1232// _alloced++;
1233 goto done;
1234 }
1235 buf = (Pipebuf *)(((unsigned char *)pb) - sizeof(Pipebuf));
1236 if (buf->alloc < size)
1237 {
1238 buf2 = realloc(buf, size + sizeof(Pipebuf));
1239 if (!buf2) return NULL;
1240// _realloced++;
1241 buf = buf2;
1242 buf->alloc = size;
1243 }
1244done:
1245 if (_pipe_bufs_skipped > 100)
1246 {
1247 EINA_LIST_REVERSE_FOREACH_SAFE(_pipe_bufs, l, ll, buf2)
1248 {
1249 if (buf2->skipped > 5)
1250 {
1251 _pipe_bufs = eina_list_remove_list(_pipe_bufs, l);
1252 _pipe_bufs_skipped -= buf2->skipped;
1253 free(buf2);
1254 if (_pipe_bufs_skipped == 0) break;
1255 }
1256 }
1257 }
1258// if ((_used + _alloced + _realloced) % 1000 == 0)
1259// printf("MAX=%i/%i skipped=%i searching=%i/%i - %i | %i | %i\n",
1260// _pipe_bufs_max, eina_list_count(_pipe_bufs), _pipe_bufs_skipped,
1261// _looks, _searches,
1262// _used, _alloced, _realloced);
1263 return ((unsigned char *)buf) + sizeof(Pipebuf);
1264}
1265
1266static void
1267_pipebuf_free(void *pb)
1268{
1269 Pipebuf *buf;
1270
1271 if (!pb) return;
1272 buf = (Pipebuf *)(((unsigned char *)pb) - sizeof(Pipebuf));
1273 _pipe_bufs_max = (_pipe_bufs_max * 19) / 20;
1274 if (buf->alloc > (_pipe_bufs_max * 4))
1275 {
1276 free(buf);
1277 return;
1278 }
1279 if ((!_pipe_bufs) || (eina_list_count(_pipe_bufs) < 20))
1280 {
1281 _pipe_bufs = eina_list_prepend(_pipe_bufs, buf);
1282 return;
1283 }
1284 free(buf);
1285}
1286
1287static void
1288_pipebuf_clear(void)
1289{
1290 Pipebuf *buf;
1291
1292 _pipe_bufs_max = 0;
1293 EINA_LIST_FREE(_pipe_bufs, buf)
1294 {
1295 free(buf);
1296 }
1297}
1298
1299static void
1300array_alloc(Evas_Engine_GL_Context *gc, int n)
1301{
1302 gc->havestuff = EINA_TRUE;
1303 if (gc->pipe[n].array.num <= gc->pipe[n].array.alloc) return;
1304
1305 gc->pipe[n].array.alloc += 6 * 256;
1306
1307#define RALOC(field, type, size) \
1308 if (gc->pipe[n].array.use_##field) \
1309 gc->pipe[n].array.field = _pipebuf_resize(gc->pipe[n].array.field, \
1310 gc->pipe[n].array.alloc * sizeof(type) * size)
1311
1312 RALOC(vertex, GLshort, VERTEX_CNT);
1313 RALOC(color, GLubyte, COLOR_CNT);
1314 RALOC(texuv, GLfloat, TEX_CNT);
1315 RALOC(texa, GLfloat, TEX_CNT);
1316 RALOC(texuv2, GLfloat, TEX_CNT);
1317 RALOC(texuv3, GLfloat, TEX_CNT);
1318 RALOC(texsam, GLfloat, SAM_CNT);
1319 RALOC(mask, GLfloat, MASK_CNT);
1320 RALOC(masksam, GLfloat, SAM_CNT);
1321
1322#undef ALOC
1323#undef RALOC
1324}
1325
1100EAPI void 1326EAPI void
1101evas_gl_common_context_free(Evas_Engine_GL_Context *gc) 1327evas_gl_common_context_free(Evas_Engine_GL_Context *gc)
1102{ 1328{
@@ -1122,15 +1348,15 @@ evas_gl_common_context_free(Evas_Engine_GL_Context *gc)
1122 { 1348 {
1123 for (i = 0; i < gc->shared->info.tune.pipes.max; i++) 1349 for (i = 0; i < gc->shared->info.tune.pipes.max; i++)
1124 { 1350 {
1125 FREE(gc->pipe[i].array.vertex); 1351 PIPE_FREE(gc->pipe[i].array.vertex);
1126 FREE(gc->pipe[i].array.color); 1352 PIPE_FREE(gc->pipe[i].array.color);
1127 FREE(gc->pipe[i].array.texuv); 1353 PIPE_FREE(gc->pipe[i].array.texuv);
1128 FREE(gc->pipe[i].array.texuv2); 1354 PIPE_FREE(gc->pipe[i].array.texuv2);
1129 FREE(gc->pipe[i].array.texuv3); 1355 PIPE_FREE(gc->pipe[i].array.texuv3);
1130 FREE(gc->pipe[i].array.texa); 1356 PIPE_FREE(gc->pipe[i].array.texa);
1131 FREE(gc->pipe[i].array.texsam); 1357 PIPE_FREE(gc->pipe[i].array.texsam);
1132 FREE(gc->pipe[i].array.mask); 1358 PIPE_FREE(gc->pipe[i].array.mask);
1133 FREE(gc->pipe[i].array.masksam); 1359 PIPE_FREE(gc->pipe[i].array.masksam);
1134 } 1360 }
1135 } 1361 }
1136 1362
@@ -1167,7 +1393,11 @@ evas_gl_common_context_free(Evas_Engine_GL_Context *gc)
1167 free(gc->shared); 1393 free(gc->shared);
1168 shared = NULL; 1394 shared = NULL;
1169 } 1395 }
1170 if (gc == _evas_gl_common_context) _evas_gl_common_context = NULL; 1396 if (gc == _evas_gl_common_context)
1397 {
1398 _pipebuf_clear();
1399 _evas_gl_common_context = NULL;
1400 }
1171 free(gc); 1401 free(gc);
1172 if (_evas_gl_common_cutout_rects) 1402 if (_evas_gl_common_cutout_rects)
1173 { 1403 {
@@ -1385,76 +1615,6 @@ evas_gl_common_context_target_surface_set(Evas_Engine_GL_Context *gc,
1385 _evas_gl_common_viewport_set(gc); 1615 _evas_gl_common_viewport_set(gc);
1386} 1616}
1387 1617
1388#define VERTEX_CNT 3
1389#define COLOR_CNT 4
1390#define TEX_CNT 2
1391#define SAM_CNT 2
1392#define MASK_CNT 4
1393
1394#define PUSH_VERTEX(n, x, y, z) do { \
1395 gc->pipe[n].array.vertex[nv++] = x; \
1396 gc->pipe[n].array.vertex[nv++] = y; \
1397 gc->pipe[n].array.vertex[nv++] = z; } while(0)
1398#define PUSH_COLOR(n, r, g, b, a) do { \
1399 gc->pipe[n].array.color[nc++] = r; \
1400 gc->pipe[n].array.color[nc++] = g; \
1401 gc->pipe[n].array.color[nc++] = b; \
1402 gc->pipe[n].array.color[nc++] = a; } while(0)
1403#define PUSH_TEXUV(n, u, v) do { \
1404 gc->pipe[n].array.texuv[nu++] = u; \
1405 gc->pipe[n].array.texuv[nu++] = v; } while(0)
1406#define PUSH_TEXUV2(n, u, v) do { \
1407 gc->pipe[n].array.texuv2[nu2++] = u; \
1408 gc->pipe[n].array.texuv2[nu2++] = v; } while(0)
1409#define PUSH_TEXUV3(n, u, v) do { \
1410 gc->pipe[n].array.texuv3[nu3++] = u; \
1411 gc->pipe[n].array.texuv3[nu3++] = v; } while(0)
1412#define PUSH_TEXA(n, u, v) do { \
1413 gc->pipe[n].array.texa[na++] = u; \
1414 gc->pipe[n].array.texa[na++] = v; } while(0)
1415#define PUSH_TEXM(n, u, v, w, z) do { \
1416 gc->pipe[n].array.mask[nm++] = u; \
1417 gc->pipe[n].array.mask[nm++] = v; \
1418 gc->pipe[n].array.mask[nm++] = w; \
1419 gc->pipe[n].array.mask[nm++] = z; } while(0)
1420#define PUSH_TEXSAM(n, x, y) do { \
1421 gc->pipe[n].array.texsam[ns++] = x; \
1422 gc->pipe[n].array.texsam[ns++] = y; } while(0)
1423
1424#define PUSH_6_VERTICES(pn, x, y, w, h) do { \
1425 PUSH_VERTEX(pn, x , y , 0); PUSH_VERTEX(pn, x + w, y , 0); \
1426 PUSH_VERTEX(pn, x , y + h, 0); PUSH_VERTEX(pn, x + w, y , 0); \
1427 PUSH_VERTEX(pn, x + w, y + h, 0); PUSH_VERTEX(pn, x , y + h, 0); \
1428 } while (0)
1429#define PUSH_6_QUAD(pn, x1, y1, x2, y2, x3, y3, x4, y4) \
1430 PUSH_TEXUV(pn, x1, y1); PUSH_TEXUV(pn, x2, y2); PUSH_TEXUV(pn, x4, y4);\
1431 PUSH_TEXUV(pn, x2, y2); PUSH_TEXUV(pn, x3, y3); PUSH_TEXUV(pn, x4, y4);
1432
1433#define PUSH_6_TEXUV(pn, x1, y1, x2, y2) \
1434 PUSH_6_QUAD(pn, x1, y1, x2, y1, x2, y2, x1, y2);
1435
1436#define PUSH_6_TEXUV2(pn, x1, y1, x2, y2) do { \
1437 PUSH_TEXUV2(pn, x1, y1); PUSH_TEXUV2(pn, x2, y1); PUSH_TEXUV2(pn, x1, y2); \
1438 PUSH_TEXUV2(pn, x2, y1); PUSH_TEXUV2(pn, x2, y2); PUSH_TEXUV2(pn, x1, y2); \
1439 } while (0)
1440#define PUSH_6_TEXUV3(pn, x1, y1, x2, y2) do { \
1441 PUSH_TEXUV3(pn, x1, y1); PUSH_TEXUV3(pn, x2, y1); PUSH_TEXUV3(pn, x1, y2); \
1442 PUSH_TEXUV3(pn, x2, y1); PUSH_TEXUV3(pn, x2, y2); PUSH_TEXUV3(pn, x1, y2); \
1443 } while (0)
1444#define PUSH_6_TEXA(pn, x1, y1, x2, y2) do { \
1445 PUSH_TEXA(pn, x1, y1); PUSH_TEXA(pn, x2, y1); PUSH_TEXA(pn, x1, y2); \
1446 PUSH_TEXA(pn, x2, y1); PUSH_TEXA(pn, x2, y2); PUSH_TEXA(pn, x1, y2); \
1447 } while (0)
1448#define PUSH_SAMPLES(pn, dx, dy) do { \
1449 PUSH_TEXSAM(pn, dx, dy); PUSH_TEXSAM(pn, dx, dy); PUSH_TEXSAM(pn, dx, dy); \
1450 PUSH_TEXSAM(pn, dx, dy); PUSH_TEXSAM(pn, dx, dy); PUSH_TEXSAM(pn, dx, dy); \
1451 } while (0)
1452#define PUSH_MASKSAM(pn, x, y, cnt) do { int _i; for (_i = 0; _i < cnt; _i++) { \
1453 gc->pipe[pn].array.masksam[nms++] = x; gc->pipe[pn].array.masksam[nms++] = y; \
1454 } } while (0)
1455#define PUSH_6_COLORS(pn, r, g, b, a) \
1456 do { int i; for (i = 0; i < 6; i++) PUSH_COLOR(pn, r, g, b, a); } while(0)
1457
1458static inline Eina_Bool 1618static inline Eina_Bool
1459_push_mask(Evas_Engine_GL_Context *gc, const int pn, int nm, Evas_GL_Texture *mtex, 1619_push_mask(Evas_Engine_GL_Context *gc, const int pn, int nm, Evas_GL_Texture *mtex,
1460 int mx, int my, int mw, int mh, Shader_Sampling msam, int nms) 1620 int mx, int my, int mw, int mh, Shader_Sampling msam, int nms)
@@ -1515,61 +1675,6 @@ _push_mask(Evas_Engine_GL_Context *gc, const int pn, int nm, Evas_GL_Texture *mt
1515 _push_mask(gc, pn, nm, mtex, mx, my, mw, mh, msam, nms); \ 1675 _push_mask(gc, pn, nm, mtex, mx, my, mw, mh, msam, nms); \
1516 } while(0) 1676 } while(0)
1517 1677
1518#define PIPE_GROW(gc, pn, inc) \
1519 int nv = gc->pipe[pn].array.num * VERTEX_CNT; (void) nv; \
1520 int nc = gc->pipe[pn].array.num * COLOR_CNT; (void) nc; \
1521 int nu = gc->pipe[pn].array.num * TEX_CNT; (void) nu; \
1522 int nu2 = gc->pipe[pn].array.num * TEX_CNT; (void) nu2; \
1523 int nu3 = gc->pipe[pn].array.num * TEX_CNT; (void) nu3; \
1524 int na = gc->pipe[pn].array.num * TEX_CNT; (void) na; \
1525 int ns = gc->pipe[pn].array.num * SAM_CNT; (void) ns; \
1526 int nm = gc->pipe[pn].array.num * MASK_CNT; (void) nm; \
1527 int nms = gc->pipe[pn].array.num * SAM_CNT; (void) nms; \
1528 gc->pipe[pn].array.num += inc; \
1529 array_alloc(gc, pn);
1530
1531static inline void
1532array_alloc(Evas_Engine_GL_Context *gc, int n)
1533{
1534 gc->havestuff = EINA_TRUE;
1535 if (gc->pipe[n].array.num <= gc->pipe[n].array.alloc)
1536 {
1537#define ALOC(field, type, size) \
1538 if ((gc->pipe[n].array.use_##field) && (!gc->pipe[n].array.field)) \
1539 gc->pipe[n].array.field = malloc(gc->pipe[n].array.alloc * sizeof(type) * size)
1540
1541 ALOC(vertex, GLshort, VERTEX_CNT);
1542 ALOC(color, GLubyte, COLOR_CNT);
1543 ALOC(texuv, GLfloat, TEX_CNT);
1544 ALOC(texa, GLfloat, TEX_CNT);
1545 ALOC(texuv2, GLfloat, TEX_CNT);
1546 ALOC(texuv3, GLfloat, TEX_CNT);
1547 ALOC(texsam, GLfloat, SAM_CNT);
1548 ALOC(mask, GLfloat, MASK_CNT);
1549 ALOC(masksam, GLfloat, SAM_CNT);
1550 return;
1551 }
1552 gc->pipe[n].array.alloc += 6 * 1024;
1553
1554#define RALOC(field, type, size) \
1555 if (gc->pipe[n].array.use_##field) \
1556 gc->pipe[n].array.field = realloc(gc->pipe[n].array.field, \
1557 gc->pipe[n].array.alloc * sizeof(type) * size)
1558
1559 RALOC(vertex, GLshort, VERTEX_CNT);
1560 RALOC(color, GLubyte, COLOR_CNT);
1561 RALOC(texuv, GLfloat, TEX_CNT);
1562 RALOC(texa, GLfloat, TEX_CNT);
1563 RALOC(texuv2, GLfloat, TEX_CNT);
1564 RALOC(texuv3, GLfloat, TEX_CNT);
1565 RALOC(texsam, GLfloat, SAM_CNT);
1566 RALOC(mask, GLfloat, MASK_CNT);
1567 RALOC(masksam, GLfloat, SAM_CNT);
1568
1569#undef ALOC
1570#undef RALOC
1571}
1572
1573#ifdef GLPIPES 1678#ifdef GLPIPES
1574static int 1679static int
1575pipe_region_intersects(Evas_Engine_GL_Context *gc, int n, 1680pipe_region_intersects(Evas_Engine_GL_Context *gc, int n,
@@ -3689,15 +3794,15 @@ shader_array_flush(Evas_Engine_GL_Context *gc)
3689 gc->pipe[i].array.use_masksam = 0; 3794 gc->pipe[i].array.use_masksam = 0;
3690 gc->pipe[i].array.anti_alias = 0; 3795 gc->pipe[i].array.anti_alias = 0;
3691 3796
3692 FREE(gc->pipe[i].array.vertex); 3797 PIPE_FREE(gc->pipe[i].array.vertex);
3693 FREE(gc->pipe[i].array.color); 3798 PIPE_FREE(gc->pipe[i].array.color);
3694 FREE(gc->pipe[i].array.texuv); 3799 PIPE_FREE(gc->pipe[i].array.texuv);
3695 FREE(gc->pipe[i].array.texuv2); 3800 PIPE_FREE(gc->pipe[i].array.texuv2);
3696 FREE(gc->pipe[i].array.texuv3); 3801 PIPE_FREE(gc->pipe[i].array.texuv3);
3697 FREE(gc->pipe[i].array.texa); 3802 PIPE_FREE(gc->pipe[i].array.texa);
3698 FREE(gc->pipe[i].array.texsam); 3803 PIPE_FREE(gc->pipe[i].array.texsam);
3699 FREE(gc->pipe[i].array.mask); 3804 PIPE_FREE(gc->pipe[i].array.mask);
3700 FREE(gc->pipe[i].array.masksam); 3805 PIPE_FREE(gc->pipe[i].array.masksam);
3701 3806
3702 gc->pipe[i].array.num = 0; 3807 gc->pipe[i].array.num = 0;
3703 gc->pipe[i].array.alloc = 0; 3808 gc->pipe[i].array.alloc = 0;