i965: Move memset of TextureFormatSupported to brw_init_surface_formats.
authorKenneth Graunke <kenneth@whitecape.org>
Fri, 27 Sep 2013 18:34:09 +0000 (11:34 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Sun, 13 Oct 2013 07:10:44 +0000 (00:10 -0700)
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 <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/mesa/drivers/dri/i965/brw_surface_formats.c
src/mesa/drivers/dri/i965/intel_context.c

index 866633653011791586b76b6949c634fc45099ad1..7afca79819ad1bdc431e72eb8a9be9ab2449ebf3 100644 (file)
@@ -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;
index 154b05293fddb1d45aa9117cf73791c861427e7b..8a48e6327487377cc24661ee484aba7ae4463c1d 100644 (file)
@@ -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