summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2014-11-18 17:37:25 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2014-11-18 18:46:58 +0900
commitf663980111740112d41fbe86dbe56fabca5a9172 (patch)
treef915f90681f48c99c03617752dfc2081032c4975
parent8ea9bc7ba060347fcfbf3fd03e363755d6d23299 (diff)
Evas GL: Add some debug
It will be triggered when EVAS_GL_API_DEBUG is set. Yeah, that's abusing the variable a bit, as it was intended for GL calls only, but this is pretty harmless. Also add string "GL_DEPTH_STENCIL".
-rw-r--r--src/modules/evas/engines/gl_common/evas_gl_core.c73
1 files changed, 67 insertions, 6 deletions
diff --git a/src/modules/evas/engines/gl_common/evas_gl_core.c b/src/modules/evas/engines/gl_common/evas_gl_core.c
index 7768af7d39..81bc3b2103 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_core.c
+++ b/src/modules/evas/engines/gl_common/evas_gl_core.c
@@ -128,6 +128,8 @@ _internal_resource_make_current(void *eng_data, EVGL_Context *ctx)
128 surface = (void*)rsc->surface; 128 surface = (void*)rsc->surface;
129 129
130 // Do the make current 130 // Do the make current
131 if (evgl_engine->api_debug_mode)
132 DBG("Calling make_current(%p, %p)", surface, context);
131 ret = evgl_engine->funcs->make_current(eng_data, surface, context, 1); 133 ret = evgl_engine->funcs->make_current(eng_data, surface, context, 1);
132 if (!ret) 134 if (!ret)
133 { 135 {
@@ -769,6 +771,8 @@ _glenum_string_get(GLenum e)
769 return "GL_STENCIL_INDEX8"; 771 return "GL_STENCIL_INDEX8";
770 772
771 // Depth_Stencil 773 // Depth_Stencil
774 case GL_DEPTH_STENCIL:
775 return "GL_DEPTH_STENCIL";
772 case GL_DEPTH24_STENCIL8: 776 case GL_DEPTH24_STENCIL8:
773 return "GL_DEPTH24_STENCIL8"; 777 return "GL_DEPTH24_STENCIL8";
774#endif 778#endif
@@ -1503,6 +1507,7 @@ evgl_surface_create(void *eng_data, Evas_GL_Config *cfg, int w, int h)
1503 char *s = NULL; 1507 char *s = NULL;
1504 int direct_override = 0, direct_mem_opt = 0; 1508 int direct_override = 0, direct_mem_opt = 0;
1505 Eina_Bool need_reconfigure = EINA_FALSE; 1509 Eina_Bool need_reconfigure = EINA_FALSE;
1510 Eina_Bool dbg;
1506 1511
1507 // Check if engine is valid 1512 // Check if engine is valid
1508 if (!evgl_engine) 1513 if (!evgl_engine)
@@ -1511,6 +1516,7 @@ evgl_surface_create(void *eng_data, Evas_GL_Config *cfg, int w, int h)
1511 evas_gl_common_error_set(eng_data, EVAS_GL_BAD_ACCESS); 1516 evas_gl_common_error_set(eng_data, EVAS_GL_BAD_ACCESS);
1512 return NULL; 1517 return NULL;
1513 } 1518 }
1519 dbg = evgl_engine->api_debug_mode;
1514 1520
1515 if (!cfg) 1521 if (!cfg)
1516 { 1522 {
@@ -1608,6 +1614,7 @@ evgl_surface_create(void *eng_data, Evas_GL_Config *cfg, int w, int h)
1608 } 1614 }
1609 } 1615 }
1610 1616
1617 if (dbg) DBG("Calling make_current(NULL, NULL)");
1611 if (!evgl_engine->funcs->make_current(eng_data, NULL, NULL, 0)) 1618 if (!evgl_engine->funcs->make_current(eng_data, NULL, NULL, 0))
1612 { 1619 {
1613 ERR("Error doing make_current(NULL, NULL)."); 1620 ERR("Error doing make_current(NULL, NULL).");
@@ -1618,7 +1625,6 @@ evgl_surface_create(void *eng_data, Evas_GL_Config *cfg, int w, int h)
1618 // Keep track of all the created surfaces 1625 // Keep track of all the created surfaces
1619 LKL(evgl_engine->resource_lock); 1626 LKL(evgl_engine->resource_lock);
1620 evgl_engine->surfaces = eina_list_prepend(evgl_engine->surfaces, sfc); 1627 evgl_engine->surfaces = eina_list_prepend(evgl_engine->surfaces, sfc);
1621 LKU(evgl_engine->resource_lock);
1622 1628
1623 if (sfc->direct_fb_opt && 1629 if (sfc->direct_fb_opt &&
1624 (sfc->depth_fmt || sfc->stencil_fmt || sfc->depth_stencil_fmt)) 1630 (sfc->depth_fmt || sfc->stencil_fmt || sfc->depth_stencil_fmt))
@@ -1627,6 +1633,7 @@ evgl_surface_create(void *eng_data, Evas_GL_Config *cfg, int w, int h)
1627 evgl_engine->direct_depth_stencil_surfaces = 1633 evgl_engine->direct_depth_stencil_surfaces =
1628 eina_list_prepend(evgl_engine->direct_depth_stencil_surfaces, sfc); 1634 eina_list_prepend(evgl_engine->direct_depth_stencil_surfaces, sfc);
1629 } 1635 }
1636 LKU(evgl_engine->resource_lock);
1630 1637
1631 if (need_reconfigure) 1638 if (need_reconfigure)
1632 { 1639 {
@@ -1634,6 +1641,8 @@ evgl_surface_create(void *eng_data, Evas_GL_Config *cfg, int w, int h)
1634 ERR("Surface reconfigure is not implemented yet"); 1641 ERR("Surface reconfigure is not implemented yet");
1635 } 1642 }
1636 1643
1644 if (dbg) DBG("Created surface sfc %p (eng %p)", sfc, eng_data);
1645
1637 return sfc; 1646 return sfc;
1638 1647
1639error: 1648error:
@@ -1647,6 +1656,7 @@ evgl_pbuffer_surface_create(void *eng_data, Evas_GL_Config *cfg,
1647{ 1656{
1648 EVGL_Surface *sfc = NULL; 1657 EVGL_Surface *sfc = NULL;
1649 void *pbuffer; 1658 void *pbuffer;
1659 Eina_Bool dbg;
1650 1660
1651 // Check if engine is valid 1661 // Check if engine is valid
1652 if (!evgl_engine) 1662 if (!evgl_engine)
@@ -1655,6 +1665,7 @@ evgl_pbuffer_surface_create(void *eng_data, Evas_GL_Config *cfg,
1655 evas_gl_common_error_set(eng_data, EVAS_GL_BAD_ACCESS); 1665 evas_gl_common_error_set(eng_data, EVAS_GL_BAD_ACCESS);
1656 return NULL; 1666 return NULL;
1657 } 1667 }
1668 dbg = evgl_engine->api_debug_mode;
1658 1669
1659 if (!cfg) 1670 if (!cfg)
1660 { 1671 {
@@ -1735,6 +1746,7 @@ evgl_pbuffer_surface_create(void *eng_data, Evas_GL_Config *cfg,
1735 1746
1736 sfc->pbuffer.native_surface = pbuffer; 1747 sfc->pbuffer.native_surface = pbuffer;
1737 1748
1749 if (dbg) DBG("Calling make_current(NULL, NULL)");
1738 if (!evgl_engine->funcs->make_current(eng_data, NULL, NULL, 0)) 1750 if (!evgl_engine->funcs->make_current(eng_data, NULL, NULL, 0))
1739 { 1751 {
1740 ERR("Error doing make_current(NULL, NULL)."); 1752 ERR("Error doing make_current(NULL, NULL).");
@@ -1746,6 +1758,8 @@ evgl_pbuffer_surface_create(void *eng_data, Evas_GL_Config *cfg,
1746 evgl_engine->surfaces = eina_list_prepend(evgl_engine->surfaces, sfc); 1758 evgl_engine->surfaces = eina_list_prepend(evgl_engine->surfaces, sfc);
1747 LKU(evgl_engine->resource_lock); 1759 LKU(evgl_engine->resource_lock);
1748 1760
1761 if (dbg) DBG("Created PBuffer surface sfc %p:%p (eng %p)", sfc, pbuffer, eng_data);
1762
1749 return sfc; 1763 return sfc;
1750 1764
1751error: 1765error:
@@ -1758,6 +1772,9 @@ evgl_surface_destroy(void *eng_data, EVGL_Surface *sfc)
1758{ 1772{
1759 EVGL_Resource *rsc; 1773 EVGL_Resource *rsc;
1760 Eina_Bool need_reconfigure = EINA_FALSE; 1774 Eina_Bool need_reconfigure = EINA_FALSE;
1775 Eina_Bool dbg;
1776
1777 // FIXME: This does some make_current(0,0) which may have side effects
1761 1778
1762 // Check input parameter 1779 // Check input parameter
1763 if ((!evgl_engine) || (!sfc)) 1780 if ((!evgl_engine) || (!sfc))
@@ -1773,6 +1790,9 @@ evgl_surface_destroy(void *eng_data, EVGL_Surface *sfc)
1773 return 0; 1790 return 0;
1774 } 1791 }
1775 1792
1793 if ((dbg = evgl_engine->api_debug_mode))
1794 DBG("Destroying surface sfc %p (eng %p)", sfc, eng_data);
1795
1776 if ((rsc->current_ctx) && (rsc->current_ctx->current_sfc == sfc) ) 1796 if ((rsc->current_ctx) && (rsc->current_ctx->current_sfc == sfc) )
1777 { 1797 {
1778 if (evgl_engine->api_debug_mode) 1798 if (evgl_engine->api_debug_mode)
@@ -1802,18 +1822,19 @@ evgl_surface_destroy(void *eng_data, EVGL_Surface *sfc)
1802 if (sfc->gles1_indirect) 1822 if (sfc->gles1_indirect)
1803 { 1823 {
1804 int ret; 1824 int ret;
1825 if (dbg) DBG("sfc %p is used for GLES 1.x indirect rendering", sfc);
1826
1805 if (!evgl_engine->funcs->gles1_surface_destroy) 1827 if (!evgl_engine->funcs->gles1_surface_destroy)
1806 { 1828 {
1807 ERR("Error destroying GLES 1.x surface"); 1829 ERR("Error destroying GLES 1.x surface");
1808 return 0; 1830 return 0;
1809 } 1831 }
1810 1832
1811 INF("Destroying special surface used for GLES 1.x rendering"); 1833 DBG("Destroying special surface used for GLES 1.x rendering");
1812 ret = evgl_engine->funcs->gles1_surface_destroy(eng_data, sfc); 1834 ret = evgl_engine->funcs->gles1_surface_destroy(eng_data, sfc);
1813 1835
1814 if (!ret) ERR("Engine failed to destroy a GLES1.x Surface."); 1836 if (!ret) ERR("Engine failed to destroy a GLES1.x Surface.");
1815 return ret; 1837 return ret;
1816
1817 } 1838 }
1818 1839
1819 1840
@@ -1828,6 +1849,7 @@ evgl_surface_destroy(void *eng_data, EVGL_Surface *sfc)
1828 if (sfc->pbuffer.native_surface) 1849 if (sfc->pbuffer.native_surface)
1829 { 1850 {
1830 int ret; 1851 int ret;
1852 if (dbg) DBG("Surface sfc %p is a pbuffer: %p", sfc, sfc->pbuffer.native_surface);
1831 1853
1832 if (sfc->pbuffer.fbo) 1854 if (sfc->pbuffer.fbo)
1833 glDeleteFramebuffers(1, &sfc->pbuffer.fbo); 1855 glDeleteFramebuffers(1, &sfc->pbuffer.fbo);
@@ -1842,6 +1864,7 @@ evgl_surface_destroy(void *eng_data, EVGL_Surface *sfc)
1842 return ret; 1864 return ret;
1843 } 1865 }
1844 1866
1867 if (dbg) DBG("Calling make_current(NULL, NULL)");
1845 if (!evgl_engine->funcs->make_current(eng_data, NULL, NULL, 0)) 1868 if (!evgl_engine->funcs->make_current(eng_data, NULL, NULL, 0))
1846 { 1869 {
1847 ERR("Error doing make_current(NULL, NULL)."); 1870 ERR("Error doing make_current(NULL, NULL).");
@@ -1851,7 +1874,6 @@ evgl_surface_destroy(void *eng_data, EVGL_Surface *sfc)
1851 // Remove it from the list 1874 // Remove it from the list
1852 LKL(evgl_engine->resource_lock); 1875 LKL(evgl_engine->resource_lock);
1853 evgl_engine->surfaces = eina_list_remove(evgl_engine->surfaces, sfc); 1876 evgl_engine->surfaces = eina_list_remove(evgl_engine->surfaces, sfc);
1854 LKU(evgl_engine->resource_lock);
1855 1877
1856 if (sfc->direct_fb_opt && 1878 if (sfc->direct_fb_opt &&
1857 (sfc->depth_fmt || sfc->stencil_fmt || sfc->depth_stencil_fmt)) 1879 (sfc->depth_fmt || sfc->stencil_fmt || sfc->depth_stencil_fmt))
@@ -1862,6 +1884,7 @@ evgl_surface_destroy(void *eng_data, EVGL_Surface *sfc)
1862 evgl_engine->direct_depth_stencil_surfaces = 1884 evgl_engine->direct_depth_stencil_surfaces =
1863 eina_list_remove_list(evgl_engine->direct_depth_stencil_surfaces, found); 1885 eina_list_remove_list(evgl_engine->direct_depth_stencil_surfaces, found);
1864 } 1886 }
1887 LKU(evgl_engine->resource_lock);
1865 1888
1866 if (need_reconfigure) 1889 if (need_reconfigure)
1867 { 1890 {
@@ -1897,6 +1920,9 @@ evgl_context_create(void *eng_data, EVGL_Context *share_ctx,
1897 return NULL; 1920 return NULL;
1898 } 1921 }
1899 1922
1923 if (evgl_engine->api_debug_mode)
1924 DBG("Creating context GLESv%d (eng = %p, shctx = %p)", version, eng_data, share_ctx);
1925
1900 // Allocate context object 1926 // Allocate context object
1901 ctx = calloc(1, sizeof(EVGL_Context)); 1927 ctx = calloc(1, sizeof(EVGL_Context));
1902 if (!ctx) 1928 if (!ctx)
@@ -1927,19 +1953,29 @@ evgl_context_create(void *eng_data, EVGL_Context *share_ctx,
1927 evgl_engine->contexts = eina_list_prepend(evgl_engine->contexts, ctx); 1953 evgl_engine->contexts = eina_list_prepend(evgl_engine->contexts, ctx);
1928 LKU(evgl_engine->resource_lock); 1954 LKU(evgl_engine->resource_lock);
1929 1955
1956 if (evgl_engine->api_debug_mode)
1957 DBG("Created ctx %p", ctx);
1958
1930 return ctx; 1959 return ctx;
1931} 1960}
1932 1961
1933
1934int 1962int
1935evgl_context_destroy(void *eng_data, EVGL_Context *ctx) 1963evgl_context_destroy(void *eng_data, EVGL_Context *ctx)
1936{ 1964{
1965 Eina_Bool dbg;
1966
1937 // Check the input 1967 // Check the input
1938 if ((!evgl_engine) || (!ctx)) 1968 if ((!evgl_engine) || (!ctx))
1939 { 1969 {
1940 ERR("Invalid input data. Engine: %p Context:%p", evgl_engine, ctx); 1970 ERR("Invalid input data. Engine: %p Context:%p", evgl_engine, ctx);
1941 return 0; 1971 return 0;
1942 } 1972 }
1973 dbg = evgl_engine->api_debug_mode;
1974
1975 // FIXME: this calls make_current(0,0) which probably shouldn't be the case
1976 // if the context is not current (?)
1977
1978 if (dbg) DBG("Destroying context (eng = %p, ctx = %p)", eng_data, ctx);
1943 1979
1944 // Set the context current with resource context/surface 1980 // Set the context current with resource context/surface
1945 if (!_internal_resource_make_current(eng_data, NULL)) 1981 if (!_internal_resource_make_current(eng_data, NULL))
@@ -1953,6 +1989,7 @@ evgl_context_destroy(void *eng_data, EVGL_Context *ctx)
1953 glDeleteFramebuffers(1, &ctx->surface_fbo); 1989 glDeleteFramebuffers(1, &ctx->surface_fbo);
1954 1990
1955 // Unset the currrent context 1991 // Unset the currrent context
1992 if (dbg) DBG("Calling make_current(NULL, NULL)");
1956 if (!evgl_engine->funcs->make_current(eng_data, NULL, NULL, 0)) 1993 if (!evgl_engine->funcs->make_current(eng_data, NULL, NULL, 0))
1957 { 1994 {
1958 ERR("Error doing make_current(NULL, NULL)."); 1995 ERR("Error doing make_current(NULL, NULL).");
@@ -1982,6 +2019,7 @@ evgl_context_destroy(void *eng_data, EVGL_Context *ctx)
1982int 2019int
1983evgl_make_current(void *eng_data, EVGL_Surface *sfc, EVGL_Context *ctx) 2020evgl_make_current(void *eng_data, EVGL_Surface *sfc, EVGL_Context *ctx)
1984{ 2021{
2022 Eina_Bool dbg = EINA_FALSE;
1985 EVGL_Resource *rsc; 2023 EVGL_Resource *rsc;
1986 int curr_fbo = 0; 2024 int curr_fbo = 0;
1987 2025
@@ -1997,7 +2035,13 @@ evgl_make_current(void *eng_data, EVGL_Surface *sfc, EVGL_Context *ctx)
1997 } 2035 }
1998 2036
1999 // Get TLS Resources 2037 // Get TLS Resources
2000 if (!(rsc = _evgl_tls_resource_get())) return 0; 2038 rsc = _evgl_tls_resource_get();
2039
2040 // Abuse debug mode - extra tracing for make_current and friends
2041 dbg = evgl_engine->api_debug_mode;
2042 if (dbg) DBG("(eng = %p, sfc = %p, ctx = %p), rsc = %p", eng_data, sfc, ctx, rsc);
2043
2044 if (!rsc) return 0;
2001 2045
2002 // Unset 2046 // Unset
2003 if ((!sfc) && (!ctx)) 2047 if ((!sfc) && (!ctx))
@@ -2008,11 +2052,14 @@ evgl_make_current(void *eng_data, EVGL_Surface *sfc, EVGL_Context *ctx)
2008 evgl_direct_partial_render_end(); 2052 evgl_direct_partial_render_end();
2009 } 2053 }
2010 2054
2055 // FIXME: This code path does not properly set the underlying TLS vars.
2056 if (dbg) DBG("Calling make_current(NULL, NULL)");
2011 if (!evgl_engine->funcs->make_current(eng_data, NULL, NULL, 0)) 2057 if (!evgl_engine->funcs->make_current(eng_data, NULL, NULL, 0))
2012 { 2058 {
2013 ERR("Error doing make_current(NULL, NULL)."); 2059 ERR("Error doing make_current(NULL, NULL).");
2014 return 0; 2060 return 0;
2015 } 2061 }
2062
2016 //FIXME!!! 2063 //FIXME!!!
2017 if (rsc->current_ctx) 2064 if (rsc->current_ctx)
2018 { 2065 {
@@ -2020,6 +2067,7 @@ evgl_make_current(void *eng_data, EVGL_Surface *sfc, EVGL_Context *ctx)
2020 rsc->current_ctx = NULL; 2067 rsc->current_ctx = NULL;
2021 rsc->current_eng = NULL; 2068 rsc->current_eng = NULL;
2022 } 2069 }
2070 if (dbg) DBG("Call to make_current(NULL, NULL) was successful.");
2023 return 1; 2071 return 1;
2024 } 2072 }
2025 2073
@@ -2036,6 +2084,8 @@ evgl_make_current(void *eng_data, EVGL_Surface *sfc, EVGL_Context *ctx)
2036 { 2084 {
2037 if (_evgl_direct_renderable(rsc, sfc)) 2085 if (_evgl_direct_renderable(rsc, sfc))
2038 { 2086 {
2087 if (dbg) DBG("sfc %p is direct renderable (has buffers: %d).", sfc, sfc->buffers_allocated);
2088
2039 // Destroy created resources 2089 // Destroy created resources
2040 if (sfc->buffers_allocated) 2090 if (sfc->buffers_allocated)
2041 { 2091 {
@@ -2059,6 +2109,7 @@ evgl_make_current(void *eng_data, EVGL_Surface *sfc, EVGL_Context *ctx)
2059 // Create internal buffers if not yet created 2109 // Create internal buffers if not yet created
2060 if (!sfc->buffers_allocated) 2110 if (!sfc->buffers_allocated)
2061 { 2111 {
2112 if (dbg) DBG("Allocating buffers for sfc %p", sfc);
2062 if (!_surface_buffers_allocate(eng_data, sfc, sfc->w, sfc->h, 1)) 2113 if (!_surface_buffers_allocate(eng_data, sfc, sfc->w, sfc->h, 1))
2063 { 2114 {
2064 ERR("Unable Create Specificed Surfaces. Unsupported format!"); 2115 ERR("Unable Create Specificed Surfaces. Unsupported format!");
@@ -2081,12 +2132,15 @@ evgl_make_current(void *eng_data, EVGL_Surface *sfc, EVGL_Context *ctx)
2081 2132
2082 if (ctx->version == EVAS_GL_GLES_1_X) 2133 if (ctx->version == EVAS_GL_GLES_1_X)
2083 { 2134 {
2135 if (dbg) DBG("ctx %p is GLES 1", ctx);
2084 if (_evgl_direct_renderable(rsc, sfc)) 2136 if (_evgl_direct_renderable(rsc, sfc))
2085 { 2137 {
2138 if (dbg) DBG("sfc %p is direct renderable.", sfc);
2086 rsc->direct.rendered = 1; 2139 rsc->direct.rendered = 1;
2087 } 2140 }
2088 else 2141 else
2089 { 2142 {
2143 if (dbg) DBG("Calling make_current(%p, %p)", sfc->gles1_sfc, ctx->context);
2090 evgl_engine->funcs->make_current(eng_data, sfc->gles1_sfc, 2144 evgl_engine->funcs->make_current(eng_data, sfc->gles1_sfc,
2091 ctx->context, EINA_TRUE); 2145 ctx->context, EINA_TRUE);
2092 } 2146 }
@@ -2105,6 +2159,8 @@ evgl_make_current(void *eng_data, EVGL_Surface *sfc, EVGL_Context *ctx)
2105 // Direct Rendering 2159 // Direct Rendering
2106 if (_evgl_direct_renderable(rsc, sfc)) 2160 if (_evgl_direct_renderable(rsc, sfc))
2107 { 2161 {
2162 if (dbg) DBG("sfc %p is direct renderable.", sfc);
2163
2108 // This is to transition from FBO rendering to direct rendering 2164 // This is to transition from FBO rendering to direct rendering
2109 glGetIntegerv(GL_FRAMEBUFFER_BINDING, &curr_fbo); 2165 glGetIntegerv(GL_FRAMEBUFFER_BINDING, &curr_fbo);
2110 if (ctx->surface_fbo == (GLuint)curr_fbo) 2166 if (ctx->surface_fbo == (GLuint)curr_fbo)
@@ -2136,6 +2192,8 @@ evgl_make_current(void *eng_data, EVGL_Surface *sfc, EVGL_Context *ctx)
2136 } 2192 }
2137 else if (sfc->pbuffer.native_surface) 2193 else if (sfc->pbuffer.native_surface)
2138 { 2194 {
2195 if (dbg) DBG("Surface sfc %p is a pbuffer: %p", sfc, sfc->pbuffer.native_surface);
2196
2139 // Call end tiling 2197 // Call end tiling
2140 if (rsc->direct.partial.enabled) 2198 if (rsc->direct.partial.enabled)
2141 evgl_direct_partial_render_end(); 2199 evgl_direct_partial_render_end();
@@ -2151,6 +2209,7 @@ evgl_make_current(void *eng_data, EVGL_Surface *sfc, EVGL_Context *ctx)
2151 ERR("Could not detach current FBO"); 2209 ERR("Could not detach current FBO");
2152 } 2210 }
2153 2211
2212 if (dbg) DBG("Calling make_current(%p, %p)", sfc->pbuffer.native_surface, ctx->context);
2154 evgl_engine->funcs->make_current(eng_data, sfc->pbuffer.native_surface, 2213 evgl_engine->funcs->make_current(eng_data, sfc->pbuffer.native_surface,
2155 ctx->context, EINA_TRUE); 2214 ctx->context, EINA_TRUE);
2156 2215
@@ -2165,6 +2224,8 @@ evgl_make_current(void *eng_data, EVGL_Surface *sfc, EVGL_Context *ctx)
2165 } 2224 }
2166 else 2225 else
2167 { 2226 {
2227 if (dbg) DBG("Surface sfc %p is a normal surface.", sfc);
2228
2168 // Attach fbo and the buffers 2229 // Attach fbo and the buffers
2169 if ((ctx->current_sfc != sfc) || (ctx != sfc->current_ctx)) 2230 if ((ctx->current_sfc != sfc) || (ctx != sfc->current_ctx))
2170 { 2231 {