summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2016-05-26 18:30:35 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2016-05-26 18:35:07 +0900
commit56a7a66e97e231e8b9a7c3917055993fe36b4c30 (patch)
tree8c69dabea03c0786694320aa3be325e5a8b129b2 /src
parentf20f4c6e50d1535a2cefe81bbe90d78f0fc5a9a3 (diff)
Evas GL common: Simplify GLPIPES... trying to prevent a crash
An unknown crash happened in glDrawArrays() where color_ptr is a non-reachable pointer that looks like a valid malloc() zone. Unreproducible issue. I can only hope this patch doesn't actually break anything. This cleans up rectangle and line in particular, that were not using common code to use GLPIPES. I honestly couldn't find a problem though.
Diffstat (limited to 'src')
-rw-r--r--src/modules/evas/engines/gl_common/evas_gl_common.h4
-rw-r--r--src/modules/evas/engines/gl_common/evas_gl_context.c233
2 files changed, 65 insertions, 172 deletions
diff --git a/src/modules/evas/engines/gl_common/evas_gl_common.h b/src/modules/evas/engines/gl_common/evas_gl_common.h
index fb383acea9..809d88b4ad 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_common.h
+++ b/src/modules/evas/engines/gl_common/evas_gl_common.h
@@ -279,10 +279,6 @@ struct _Evas_Engine_GL_Context
279 Shader_Type type; 279 Shader_Type type;
280 } region; 280 } region;
281 struct { 281 struct {
282 int x, y, w, h;
283 Eina_Bool active : 1;
284 } clip;
285 struct {
286 Evas_GL_Program *prog; 282 Evas_GL_Program *prog;
287 Evas_GL_Image *surface; 283 Evas_GL_Image *surface;
288 GLuint cur_tex, cur_texu, cur_texv, cur_texa, cur_texm; 284 GLuint cur_tex, cur_texu, cur_texv, cur_texa, cur_texm;
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 4fc9e4d109..615b45e45e 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_context.c
+++ b/src/modules/evas/engines/gl_common/evas_gl_context.c
@@ -9,6 +9,7 @@
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)
12 13
13static int sym_done = 0; 14static int sym_done = 0;
14static int tbm_sym_done = 0; 15static int tbm_sym_done = 0;
@@ -1000,15 +1001,15 @@ evas_gl_common_context_free(Evas_Engine_GL_Context *gc)
1000 { 1001 {
1001 for (i = 0; i < gc->shared->info.tune.pipes.max; i++) 1002 for (i = 0; i < gc->shared->info.tune.pipes.max; i++)
1002 { 1003 {
1003 if (gc->pipe[i].array.vertex) free(gc->pipe[i].array.vertex); 1004 FREE(gc->pipe[i].array.vertex);
1004 if (gc->pipe[i].array.color) free(gc->pipe[i].array.color); 1005 FREE(gc->pipe[i].array.color);
1005 if (gc->pipe[i].array.texuv) free(gc->pipe[i].array.texuv); 1006 FREE(gc->pipe[i].array.texuv);
1006 if (gc->pipe[i].array.texa) free(gc->pipe[i].array.texa); 1007 FREE(gc->pipe[i].array.texuv2);
1007 if (gc->pipe[i].array.texuv2) free(gc->pipe[i].array.texuv2); 1008 FREE(gc->pipe[i].array.texuv3);
1008 if (gc->pipe[i].array.texuv3) free(gc->pipe[i].array.texuv3); 1009 FREE(gc->pipe[i].array.texa);
1009 if (gc->pipe[i].array.texsam) free(gc->pipe[i].array.texsam); 1010 FREE(gc->pipe[i].array.texsam);
1010 if (gc->pipe[i].array.masksam) free(gc->pipe[i].array.masksam); 1011 FREE(gc->pipe[i].array.mask);
1011 if (gc->pipe[i].array.mask) free(gc->pipe[i].array.mask); 1012 FREE(gc->pipe[i].array.masksam);
1012 } 1013 }
1013 } 1014 }
1014 1015
@@ -1104,11 +1105,6 @@ evas_gl_common_context_newframe(Evas_Engine_GL_Context *gc)
1104 gc->pipe[i].region.w = 0; 1105 gc->pipe[i].region.w = 0;
1105 gc->pipe[i].region.h = 0; 1106 gc->pipe[i].region.h = 0;
1106 gc->pipe[i].region.type = 0; 1107 gc->pipe[i].region.type = 0;
1107 gc->pipe[i].clip.active = 0;
1108 gc->pipe[i].clip.x = 0;
1109 gc->pipe[i].clip.y = 0;
1110 gc->pipe[i].clip.w = 0;
1111 gc->pipe[i].clip.h = 0;
1112 gc->pipe[i].shader.surface = NULL; 1108 gc->pipe[i].shader.surface = NULL;
1113 gc->pipe[i].shader.prog = NULL; 1109 gc->pipe[i].shader.prog = NULL;
1114 gc->pipe[i].shader.cur_tex = 0; 1110 gc->pipe[i].shader.cur_tex = 0;
@@ -1489,9 +1485,9 @@ array_alloc(Evas_Engine_GL_Context *gc, int n)
1489 if (gc->pipe[n].array.num <= gc->pipe[n].array.alloc) 1485 if (gc->pipe[n].array.num <= gc->pipe[n].array.alloc)
1490 { 1486 {
1491#define ALOC(field, type, size) \ 1487#define ALOC(field, type, size) \
1492 if ((gc->pipe[n].array.use_##field) && (!gc->pipe[n].array.field)) \ 1488 if ((gc->pipe[n].array.use_##field) && (!gc->pipe[n].array.field)) \
1493 gc->pipe[n].array.field = \ 1489 gc->pipe[n].array.field = malloc(gc->pipe[n].array.alloc * sizeof(type) * size)
1494 malloc(gc->pipe[n].array.alloc * sizeof(type) * size) 1490
1495 ALOC(vertex, GLshort, VERTEX_CNT); 1491 ALOC(vertex, GLshort, VERTEX_CNT);
1496 ALOC(color, GLubyte, COLOR_CNT); 1492 ALOC(color, GLubyte, COLOR_CNT);
1497 ALOC(texuv, GLfloat, TEX_CNT); 1493 ALOC(texuv, GLfloat, TEX_CNT);
@@ -1504,11 +1500,12 @@ array_alloc(Evas_Engine_GL_Context *gc, int n)
1504 return; 1500 return;
1505 } 1501 }
1506 gc->pipe[n].array.alloc += 6 * 1024; 1502 gc->pipe[n].array.alloc += 6 * 1024;
1503
1507#define RALOC(field, type, size) \ 1504#define RALOC(field, type, size) \
1508 if (gc->pipe[n].array.use_##field) \ 1505 if (gc->pipe[n].array.use_##field) \
1509 gc->pipe[n].array.field = realloc \ 1506 gc->pipe[n].array.field = realloc(gc->pipe[n].array.field, \
1510 (gc->pipe[n].array.field, \ 1507 gc->pipe[n].array.alloc * sizeof(type) * size)
1511 gc->pipe[n].array.alloc * sizeof(type) * size) 1508
1512 RALOC(vertex, GLshort, VERTEX_CNT); 1509 RALOC(vertex, GLshort, VERTEX_CNT);
1513 RALOC(color, GLubyte, COLOR_CNT); 1510 RALOC(color, GLubyte, COLOR_CNT);
1514 RALOC(texuv, GLfloat, TEX_CNT); 1511 RALOC(texuv, GLfloat, TEX_CNT);
@@ -1518,6 +1515,9 @@ array_alloc(Evas_Engine_GL_Context *gc, int n)
1518 RALOC(texsam, GLfloat, SAM_CNT); 1515 RALOC(texsam, GLfloat, SAM_CNT);
1519 RALOC(mask, GLfloat, MASK_CNT); 1516 RALOC(mask, GLfloat, MASK_CNT);
1520 RALOC(masksam, GLfloat, SAM_CNT); 1517 RALOC(masksam, GLfloat, SAM_CNT);
1518
1519#undef ALOC
1520#undef RALOC
1521} 1521}
1522 1522
1523#ifdef GLPIPES 1523#ifdef GLPIPES
@@ -1621,7 +1621,7 @@ _evas_gl_common_context_push(Shader_Type rtype,
1621#ifdef GLPIPES 1621#ifdef GLPIPES
1622 again: 1622 again:
1623#endif 1623#endif
1624 vertex_array_size_check(gc, gc->state.top_pipe, 6); 1624 vertex_array_size_check(gc, gc->state.top_pipe, (rtype == SHD_LINE) ? 2 : 6);
1625 pn = gc->state.top_pipe; 1625 pn = gc->state.top_pipe;
1626#ifdef GLPIPES 1626#ifdef GLPIPES
1627 if (!((pn == 0) && (gc->pipe[pn].array.num == 0))) 1627 if (!((pn == 0) && (gc->pipe[pn].array.num == 0)))
@@ -1667,7 +1667,7 @@ _evas_gl_common_context_push(Shader_Type rtype,
1667 if (gc->pipe[pn].array.im != tex->im) 1667 if (gc->pipe[pn].array.im != tex->im)
1668 { 1668 {
1669 shader_array_flush(gc); 1669 shader_array_flush(gc);
1670 pn = gc->state.top_pipe; 1670 pn = gc->state.top_pipe; // 0 after flush
1671 gc->pipe[pn].array.im = tex->im; 1671 gc->pipe[pn].array.im = tex->im;
1672 goto again; 1672 goto again;
1673 } 1673 }
@@ -1715,6 +1715,10 @@ evas_gl_common_context_line_push(Evas_Engine_GL_Context *gc,
1715 int pn = 0, i; 1715 int pn = 0, i;
1716 GLuint mtexid = mtex ? mtex->pt->texture : 0; 1716 GLuint mtexid = mtex ? mtex->pt->texture : 0;
1717 Shader_Sampling masksam = SHD_SAM11; 1717 Shader_Sampling masksam = SHD_SAM11;
1718 int x = MIN(x1, x2);
1719 int y = MIN(y1, y2);
1720 int w = abs(x2 - x1);
1721 int h = abs(y2 - y1);
1718 1722
1719 if (!(gc->dc->render_op == EVAS_RENDER_COPY) && ((a < 255) || (mtex))) 1723 if (!(gc->dc->render_op == EVAS_RENDER_COPY) && ((a < 255) || (mtex)))
1720 blend = EINA_TRUE; 1724 blend = EINA_TRUE;
@@ -1723,9 +1727,14 @@ evas_gl_common_context_line_push(Evas_Engine_GL_Context *gc,
1723 0, 0, 0, 0, EINA_FALSE, NULL, EINA_FALSE, 1727 0, 0, 0, 0, EINA_FALSE, NULL, EINA_FALSE,
1724 mtex, mask_smooth, mw, mh, NULL, NULL, &masksam); 1728 mtex, mask_smooth, mw, mh, NULL, NULL, &masksam);
1725 1729
1726 shader_array_flush(gc); 1730 pn = _evas_gl_common_context_push(SHD_LINE,
1727 vertex_array_size_check(gc, gc->state.top_pipe, 2); 1731 gc, NULL, mtex,
1728 pn = gc->state.top_pipe; 1732 prog,
1733 x, y, w, h,
1734 blend,
1735 EINA_FALSE,
1736 0, 0, 0, 0, 0,
1737 mask_smooth);
1729 1738
1730 gc->pipe[pn].region.type = SHD_LINE; 1739 gc->pipe[pn].region.type = SHD_LINE;
1731 gc->pipe[pn].shader.prog = prog; 1740 gc->pipe[pn].shader.prog = prog;
@@ -1752,26 +1761,13 @@ evas_gl_common_context_line_push(Evas_Engine_GL_Context *gc,
1752 gc->pipe[pn].array.use_masksam = (masksam != SHD_SAM11); 1761 gc->pipe[pn].array.use_masksam = (masksam != SHD_SAM11);
1753 gc->pipe[pn].array.use_mask = !!mtex; 1762 gc->pipe[pn].array.use_mask = !!mtex;
1754 1763
1764 pipe_region_expand(gc, pn, x, y, w, h);
1755 PIPE_GROW(gc, pn, 2); 1765 PIPE_GROW(gc, pn, 2);
1756 PUSH_VERTEX(pn, x1, y1, 0); 1766 PUSH_VERTEX(pn, x1, y1, 0);
1757 PUSH_VERTEX(pn, x2, y2, 0); 1767 PUSH_VERTEX(pn, x2, y2, 0);
1758 PUSH_MASK(pn, mtex, mx, my, mw, mh, masksam); 1768 PUSH_MASK(pn, mtex, mx, my, mw, mh, masksam);
1759
1760 for (i = 0; i < 2; i++) 1769 for (i = 0; i < 2; i++)
1761 PUSH_COLOR(pn, r, g, b, a); 1770 PUSH_COLOR(pn, r, g, b, a);
1762
1763 shader_array_flush(gc);
1764 gc->pipe[pn].array.line = 0;
1765 gc->pipe[pn].array.anti_alias = 0;
1766 //gc->pipe[pn].array.use_vertex = 0;
1767 gc->pipe[pn].array.use_color = 0;
1768 gc->pipe[pn].array.use_texuv = 0;
1769 gc->pipe[pn].array.use_texuv2 = 0;
1770 gc->pipe[pn].array.use_texuv3 = 0;
1771 gc->pipe[pn].array.use_texa = 0;
1772 gc->pipe[pn].array.use_texsam = 0;
1773 gc->pipe[pn].array.use_masksam = 0;
1774 gc->pipe[pn].array.use_mask = 0;
1775} 1771}
1776 1772
1777void 1773void
@@ -1795,116 +1791,28 @@ evas_gl_common_context_rectangle_push(Evas_Engine_GL_Context *gc,
1795 0, 0, 0, 0, EINA_FALSE, NULL, EINA_FALSE, 1791 0, 0, 0, 0, EINA_FALSE, NULL, EINA_FALSE,
1796 mtex, mask_smooth, mw, mh, NULL, NULL, &masksam); 1792 mtex, mask_smooth, mw, mh, NULL, NULL, &masksam);
1797 1793
1798again:
1799 vertex_array_size_check(gc, gc->state.top_pipe, 6);
1800 pn = gc->state.top_pipe;
1801#ifdef GLPIPES
1802 if ((pn == 0) && (gc->pipe[pn].array.num == 0))
1803 {
1804 gc->pipe[pn].region.type = SHD_RECT;
1805 gc->pipe[pn].shader.prog = prog;
1806 gc->pipe[pn].shader.cur_tex = 0;
1807 gc->pipe[pn].shader.cur_texm = mtexid;
1808 gc->pipe[pn].shader.blend = blend;
1809 gc->pipe[pn].shader.render_op = gc->dc->render_op;
1810 gc->pipe[pn].shader.mask_smooth = mask_smooth;
1811 gc->pipe[pn].shader.clip = 0;
1812 gc->pipe[pn].shader.cx = 0;
1813 gc->pipe[pn].shader.cy = 0;
1814 gc->pipe[pn].shader.cw = 0;
1815 gc->pipe[pn].shader.ch = 0;
1816 gc->pipe[pn].array.line = 0;
1817 gc->pipe[pn].array.use_vertex = 1;
1818 gc->pipe[pn].array.use_color = 1;
1819 gc->pipe[pn].array.use_texuv = 0;
1820 gc->pipe[pn].array.use_texuv2 = 0;
1821 gc->pipe[pn].array.use_texuv3 = 0;
1822 gc->pipe[pn].array.use_texa = 0;
1823 gc->pipe[pn].array.use_texsam = 0;
1824 gc->pipe[pn].array.use_masksam = (masksam != SHD_SAM11);
1825 gc->pipe[pn].array.use_mask = !!mtex;
1826 }
1827 else
1828 {
1829 int found = 0, i;
1830 1794
1831 for (i = pn; i >= 0; i--) 1795 pn = _evas_gl_common_context_push(SHD_RECT,
1832 { 1796 gc, NULL, mtex,
1833 if ((gc->pipe[i].region.type == SHD_RECT) 1797 prog,
1834 && (gc->pipe[i].shader.cur_tex == 0) 1798 x, y, w, h,
1835 && (gc->pipe[i].shader.cur_texm == mtexid) 1799 blend,
1836 && (gc->pipe[i].shader.prog == prog) 1800 EINA_FALSE,
1837 && (gc->pipe[i].shader.blend == blend) 1801 0, 0, 0, 0, 0,
1838 && (gc->pipe[i].shader.render_op == gc->dc->render_op) 1802 mask_smooth);
1839 && (gc->pipe[i].shader.clip == 0)
1840 && (gc->pipe[i].shader.mask_smooth == mask_smooth)
1841 )
1842 {
1843 found = 1;
1844 pn = i;
1845 break;
1846 }
1847 if (pipe_region_intersects(gc, i, x, y, w, h)) break;
1848 }
1849 if (!found)
1850 {
1851 pn = gc->state.top_pipe + 1;
1852 if (pn >= gc->shared->info.tune.pipes.max)
1853 {
1854 shader_array_flush(gc);
1855 goto again;
1856 }
1857 gc->state.top_pipe = pn;
1858 gc->pipe[pn].region.type = SHD_RECT;
1859 gc->pipe[pn].shader.prog = prog;
1860 gc->pipe[pn].shader.cur_tex = 0;
1861 gc->pipe[pn].shader.cur_texm = mtexid;
1862 gc->pipe[pn].shader.blend = blend;
1863 gc->pipe[pn].shader.render_op = gc->dc->render_op;
1864 gc->pipe[pn].shader.mask_smooth = mask_smooth;
1865 gc->pipe[pn].shader.clip = 0;
1866 gc->pipe[pn].shader.cx = 0;
1867 gc->pipe[pn].shader.cy = 0;
1868 gc->pipe[pn].shader.cw = 0;
1869 gc->pipe[pn].shader.ch = 0;
1870 gc->pipe[pn].array.line = 0;
1871 gc->pipe[pn].array.use_vertex = 1;
1872 gc->pipe[pn].array.use_color = 1;
1873 gc->pipe[pn].array.use_texuv = 0;
1874 gc->pipe[pn].array.use_texuv2 = 0;
1875 gc->pipe[pn].array.use_texuv3 = 0;
1876 gc->pipe[pn].array.use_texa = 0;
1877 gc->pipe[pn].array.use_texsam = 0;
1878 gc->pipe[pn].array.use_masksam = (masksam != SHD_SAM11);
1879 gc->pipe[pn].array.use_mask = !!mtex;
1880 }
1881 }
1882#else
1883 if ((gc->pipe[pn].shader.cur_tex != 0)
1884 || (gc->pipe[pn].shader.cur_texm != mtexid)
1885 || (gc->pipe[pn].shader.prog != prog)
1886 || (gc->pipe[pn].shader.blend != blend)
1887 || (gc->pipe[pn].shader.render_op != gc->dc->render_op)
1888 || (gc->pipe[pn].shader.clip != 0)
1889 || (mtex && (gc->pipe[pn].shader.mask_smooth != mask_smooth))
1890 )
1891 {
1892 shader_array_flush(gc);
1893 pn = gc->state.top_pipe;
1894 gc->pipe[pn].shader.prog = prog;
1895 gc->pipe[pn].shader.cur_tex = 0;
1896 gc->pipe[pn].shader.cur_texm = mtexid;
1897 gc->pipe[pn].shader.blend = blend;
1898 gc->pipe[pn].shader.render_op = gc->dc->render_op;
1899 gc->pipe[pn].shader.mask_smooth = mask_smooth;
1900 gc->pipe[pn].shader.clip = 0;
1901 gc->pipe[pn].shader.cx = 0;
1902 gc->pipe[pn].shader.cy = 0;
1903 gc->pipe[pn].shader.cw = 0;
1904 gc->pipe[pn].shader.ch = 0;
1905 }
1906 1803
1907 gc->pipe[pn].region.type = SHD_RECT; 1804 gc->pipe[pn].region.type = SHD_RECT;
1805 gc->pipe[pn].shader.prog = prog;
1806 gc->pipe[pn].shader.cur_tex = 0;
1807 gc->pipe[pn].shader.cur_texm = mtexid;
1808 gc->pipe[pn].shader.blend = blend;
1809 gc->pipe[pn].shader.render_op = gc->dc->render_op;
1810 gc->pipe[pn].shader.mask_smooth = mask_smooth;
1811 gc->pipe[pn].shader.clip = 0;
1812 gc->pipe[pn].shader.cx = 0;
1813 gc->pipe[pn].shader.cy = 0;
1814 gc->pipe[pn].shader.cw = 0;
1815 gc->pipe[pn].shader.ch = 0;
1908 gc->pipe[pn].array.line = 0; 1816 gc->pipe[pn].array.line = 0;
1909 gc->pipe[pn].array.use_vertex = 1; 1817 gc->pipe[pn].array.use_vertex = 1;
1910 gc->pipe[pn].array.use_color = 1; 1818 gc->pipe[pn].array.use_color = 1;
@@ -1914,8 +1822,7 @@ again:
1914 gc->pipe[pn].array.use_texa = 0; 1822 gc->pipe[pn].array.use_texa = 0;
1915 gc->pipe[pn].array.use_texsam = 0; 1823 gc->pipe[pn].array.use_texsam = 0;
1916 gc->pipe[pn].array.use_masksam = (masksam != SHD_SAM11); 1824 gc->pipe[pn].array.use_masksam = (masksam != SHD_SAM11);
1917 gc->pipe[pn].array.use_texm = !!mtex; 1825 gc->pipe[pn].array.use_mask = !!mtex;
1918#endif
1919 1826
1920 pipe_region_expand(gc, pn, x, y, w, h); 1827 pipe_region_expand(gc, pn, x, y, w, h);
1921 PIPE_GROW(gc, pn, 6); 1828 PIPE_GROW(gc, pn, 6);
@@ -3706,16 +3613,6 @@ shader_array_flush(Evas_Engine_GL_Context *gc)
3706 gc->state.current.clip = gc->pipe[i].shader.clip; 3613 gc->state.current.clip = gc->pipe[i].shader.clip;
3707 gc->state.current.anti_alias = gc->pipe[i].array.anti_alias; 3614 gc->state.current.anti_alias = gc->pipe[i].array.anti_alias;
3708 3615
3709 if (gc->pipe[i].array.vertex) free(gc->pipe[i].array.vertex);
3710 if (gc->pipe[i].array.color) free(gc->pipe[i].array.color);
3711 if (gc->pipe[i].array.texuv) free(gc->pipe[i].array.texuv);
3712 if (gc->pipe[i].array.texa) free(gc->pipe[i].array.texa);
3713 if (gc->pipe[i].array.texuv2) free(gc->pipe[i].array.texuv2);
3714 if (gc->pipe[i].array.texuv3) free(gc->pipe[i].array.texuv3);
3715 if (gc->pipe[i].array.texsam) free(gc->pipe[i].array.texsam);
3716 if (gc->pipe[i].array.mask) free(gc->pipe[i].array.mask);
3717 if (gc->pipe[i].array.masksam) free(gc->pipe[i].array.masksam);
3718
3719 gc->pipe[i].array.line = 0; 3616 gc->pipe[i].array.line = 0;
3720 //gc->pipe[i].array.use_vertex = 0; 3617 //gc->pipe[i].array.use_vertex = 0;
3721 gc->pipe[i].array.use_color = 0; 3618 gc->pipe[i].array.use_color = 0;
@@ -3727,16 +3624,16 @@ shader_array_flush(Evas_Engine_GL_Context *gc)
3727 gc->pipe[i].array.use_mask = 0; 3624 gc->pipe[i].array.use_mask = 0;
3728 gc->pipe[i].array.use_masksam = 0; 3625 gc->pipe[i].array.use_masksam = 0;
3729 gc->pipe[i].array.anti_alias = 0; 3626 gc->pipe[i].array.anti_alias = 0;
3730 3627
3731 gc->pipe[i].array.vertex = NULL; 3628 FREE(gc->pipe[i].array.vertex);
3732 gc->pipe[i].array.color = NULL; 3629 FREE(gc->pipe[i].array.color);
3733 gc->pipe[i].array.texuv = NULL; 3630 FREE(gc->pipe[i].array.texuv);
3734 gc->pipe[i].array.texuv2 = NULL; 3631 FREE(gc->pipe[i].array.texuv2);
3735 gc->pipe[i].array.texuv3 = NULL; 3632 FREE(gc->pipe[i].array.texuv3);
3736 gc->pipe[i].array.texa = NULL; 3633 FREE(gc->pipe[i].array.texa);
3737 gc->pipe[i].array.texsam = NULL; 3634 FREE(gc->pipe[i].array.texsam);
3738 gc->pipe[i].array.mask = NULL; 3635 FREE(gc->pipe[i].array.mask);
3739 gc->pipe[i].array.masksam = NULL; 3636 FREE(gc->pipe[i].array.masksam);
3740 3637
3741 gc->pipe[i].array.num = 0; 3638 gc->pipe[i].array.num = 0;
3742 gc->pipe[i].array.alloc = 0; 3639 gc->pipe[i].array.alloc = 0;