Mesa (master): r300g,r300c: memset the compiler struct to zeros
Marek Olšák
mareko at kemper.freedesktop.org
Sun Sep 5 03:10:22 UTC 2010
Module: Mesa
Branch: master
Commit: ece8490bb5fbee10bbe8d186bdc5e13f85e22df4
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=ece8490bb5fbee10bbe8d186bdc5e13f85e22df4
Author: Marek Olšák <maraeo at gmail.com>
Date: Sun Sep 5 05:07:02 2010 +0200
r300g,r300c: memset the compiler struct to zeros
This should fix bogus reports "Too many temporaries." and maybe some others.
---
src/gallium/drivers/r300/r300_vs.c | 1 +
src/mesa/drivers/dri/r300/r300_blit.c | 1 +
src/mesa/drivers/dri/r300/r300_fragprog_common.c | 1 +
src/mesa/drivers/dri/r300/r300_vertprog.c | 1 +
4 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/src/gallium/drivers/r300/r300_vs.c b/src/gallium/drivers/r300/r300_vs.c
index add3d55..22c94ad 100644
--- a/src/gallium/drivers/r300/r300_vs.c
+++ b/src/gallium/drivers/r300/r300_vs.c
@@ -199,6 +199,7 @@ void r300_translate_vertex_shader(struct r300_context *r300,
unsigned i;
/* Setup the compiler */
+ memset(&compiler, 0, sizeof(compiler));
rc_init(&compiler.Base);
compiler.Base.Debug = DBG_ON(r300, DBG_VP);
diff --git a/src/mesa/drivers/dri/r300/r300_blit.c b/src/mesa/drivers/dri/r300/r300_blit.c
index 5f261e0..74aef76 100644
--- a/src/mesa/drivers/dri/r300/r300_blit.c
+++ b/src/mesa/drivers/dri/r300/r300_blit.c
@@ -56,6 +56,7 @@ static void create_vertex_program(struct r300_context *r300)
struct r300_vertex_program_compiler compiler;
struct rc_instruction *inst;
+ memset(&compiler, 0, sizeof(compiler));
rc_init(&compiler.Base);
inst = rc_insert_new_instruction(&compiler.Base, compiler.Base.Program.Instructions.Prev);
diff --git a/src/mesa/drivers/dri/r300/r300_fragprog_common.c b/src/mesa/drivers/dri/r300/r300_fragprog_common.c
index d0006d6..4af91f1 100644
--- a/src/mesa/drivers/dri/r300/r300_fragprog_common.c
+++ b/src/mesa/drivers/dri/r300/r300_fragprog_common.c
@@ -213,6 +213,7 @@ static void translate_fragment_program(GLcontext *ctx, struct r300_fragment_prog
r300ContextPtr r300 = R300_CONTEXT(ctx);
struct r300_fragment_program_compiler compiler;
+ memset(&compiler, 0, sizeof(compiler));
rc_init(&compiler.Base);
compiler.Base.Debug = (RADEON_DEBUG & RADEON_PIXEL) ? GL_TRUE : GL_FALSE;
diff --git a/src/mesa/drivers/dri/r300/r300_vertprog.c b/src/mesa/drivers/dri/r300/r300_vertprog.c
index 4a3bbdb..a160128 100644
--- a/src/mesa/drivers/dri/r300/r300_vertprog.c
+++ b/src/mesa/drivers/dri/r300/r300_vertprog.c
@@ -238,6 +238,7 @@ static struct r300_vertex_program *build_program(GLcontext *ctx,
vp->Base = _mesa_clone_vertex_program(ctx, mesa_vp);
memcpy(&vp->key, wanted_key, sizeof(vp->key));
+ memset(&compiler, 0, sizeof(compiler));
rc_init(&compiler.Base);
compiler.Base.Debug = (RADEON_DEBUG & RADEON_VERTS) ? GL_TRUE : GL_FALSE;
More information about the mesa-commit
mailing list