From: Kenneth Graunke Date: Fri, 27 Sep 2013 18:34:09 +0000 (-0700) Subject: i965: Move memset of TextureFormatSupported to brw_init_surface_formats. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8d315b25830de88108a87b2d555d54f7691e7983;p=mesa.git i965: Move memset of TextureFormatSupported to brw_init_surface_formats. brw_init_surface_formats already sets entries in TextureFormatsSupported to true; it may as well take care of initializing it to false too. Signed-off-by: Kenneth Graunke Reviewed-by: Ian Romanick --- diff --git a/src/mesa/drivers/dri/i965/brw_surface_formats.c b/src/mesa/drivers/dri/i965/brw_surface_formats.c index 86663365301..7afca79819a 100644 --- a/src/mesa/drivers/dri/i965/brw_surface_formats.c +++ b/src/mesa/drivers/dri/i965/brw_surface_formats.c @@ -532,6 +532,8 @@ brw_init_surface_formats(struct brw_context *brw) int gen; gl_format format; + memset(&ctx->TextureFormatSupported, 0, sizeof(ctx->TextureFormatSupported)); + gen = brw->gen * 10; if (brw->is_g4x) gen += 5; diff --git a/src/mesa/drivers/dri/i965/intel_context.c b/src/mesa/drivers/dri/i965/intel_context.c index 154b05293fd..8a48e632748 100644 --- a/src/mesa/drivers/dri/i965/intel_context.c +++ b/src/mesa/drivers/dri/i965/intel_context.c @@ -380,9 +380,6 @@ intelInitContext(struct brw_context *brw, functions->Viewport = intel_viewport; } - memset(&ctx->TextureFormatSupported, - 0, sizeof(ctx->TextureFormatSupported)); - /* Estimate the size of the mappable aperture into the GTT. There's an * ioctl to get the whole GTT size, but not one to get the mappable subset. * It turns out it's basically always 256MB, though some ancient hardware