Mesa (master): i965: Don't create a swrast context on ES2+.

Kenneth Graunke kwg at kemper.freedesktop.org
Mon Jul 29 20:26:31 UTC 2013


Module: Mesa
Branch: master
Commit: efb566dff22933517630537c2bfb8da34018ad8c
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=efb566dff22933517630537c2bfb8da34018ad8c

Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Thu Jul 25 11:31:20 2013 -0700

i965: Don't create a swrast context on ES2+.

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>
Reviewed-by: Matt Turner <mattst88 at gmail.com>
Reviewed-by: Chad Versace <chad.versace at linux.intel.com>
Reviewed-by: Kristian Høgsberg <krh at bitplanet.net>

---

 src/mesa/drivers/dri/i965/intel_context.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/intel_context.c b/src/mesa/drivers/dri/i965/intel_context.c
index 2e15a55..7860e1f 100644
--- a/src/mesa/drivers/dri/i965/intel_context.c
+++ b/src/mesa/drivers/dri/i965/intel_context.c
@@ -557,7 +557,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);
    }
 




More information about the mesa-commit mailing list