[Mesa-dev] [PATCH 17/29] i965: Move memset of TextureFormatSupported to brw_init_surface_formats.
Kenneth Graunke
kenneth at whitecape.org
Fri Sep 27 16:45:56 PDT 2013
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 at whitecape.org>
---
src/mesa/drivers/dri/i965/brw_surface_formats.c | 2 ++
src/mesa/drivers/dri/i965/intel_context.c | 3 ---
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_surface_formats.c b/src/mesa/drivers/dri/i965/brw_surface_formats.c
index 0d8d805..fd7d307 100644
--- a/src/mesa/drivers/dri/i965/brw_surface_formats.c
+++ b/src/mesa/drivers/dri/i965/brw_surface_formats.c
@@ -531,6 +531,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 154b052..8a48e63 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
--
1.8.3.4
More information about the mesa-dev
mailing list