[Mesa-dev] [PATCH] i965: Don't create a swrast context on ES2+.

Kenneth Graunke kenneth at whitecape.org
Thu Jul 25 11:31:20 PDT 2013


We already skip this for API_OPENGL_CORE; ES2+ is very similar.
The primary user of the swrast context is GL_SELECT and GL_FEEDBACK,
which have never existed in ES.

This saves approximately 18MB of memory in GLBenchmark 2.7 Egypt (ES2).
No regressions in es3conform on Ivybridge.

Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
---
 src/mesa/drivers/dri/i965/intel_context.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mesa/drivers/dri/i965/intel_context.c b/src/mesa/drivers/dri/i965/intel_context.c
index 742bcc3..ce98706 100644
--- a/src/mesa/drivers/dri/i965/intel_context.c
+++ b/src/mesa/drivers/dri/i965/intel_context.c
@@ -536,7 +536,7 @@ intelInitContext(struct brw_context *brw,
     * software fallbacks (which we have to support on legacy GL to do weird
     * glDrawPixels(), glBitmap(), and other functions).
     */
-   if (api != API_OPENGL_CORE) {
+   if (api != API_OPENGL_CORE && api != API_OPENGLES2) {
       _swrast_CreateContext(ctx);
    }
 
-- 
1.8.3.3



More information about the mesa-dev mailing list