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

Kristian Høgsberg krh at bitplanet.net
Mon Jul 29 12:37:00 PDT 2013


On Thu, Jul 25, 2013 at 11:31 AM, Kenneth Graunke <kenneth at whitecape.org> wrote:
> 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);
>     }

Awesome.

Reviewed-by: Kristian Høgsberg <krh at bitplanet.net>


More information about the mesa-dev mailing list