Mesa (master): i965: Remove brw_shader_program wrapper struct.

Kenneth Graunke kwg at kemper.freedesktop.org
Thu Nov 15 19:16:22 UTC 2012


Module: Mesa
Branch: master
Commit: 80b3af5b6dbc6682baf63deda76a2ed203d586ae
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=80b3af5b6dbc6682baf63deda76a2ed203d586ae

Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Tue Nov 13 19:59:08 2012 -0800

i965: Remove brw_shader_program wrapper struct.

At this point, it's just gl_shader_program.  Nobody even uses it; even
the program that creates them only returns gl_shader_program pointers.

Reviewed-by: Eric Anholt <eric at anholt.net>

---

 src/mesa/drivers/dri/i965/brw_context.h  |    4 ----
 src/mesa/drivers/dri/i965/brw_shader.cpp |    9 ++++-----
 2 files changed, 4 insertions(+), 9 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h
index 3911b22..49460e9 100644
--- a/src/mesa/drivers/dri/i965/brw_context.h
+++ b/src/mesa/drivers/dri/i965/brw_context.h
@@ -280,10 +280,6 @@ struct brw_shader {
    struct exec_list *ir;
 };
 
-struct brw_shader_program {
-   struct gl_shader_program base;
-};
-
 /* Data about a particular attempt to compile a program.  Note that
  * there can be many of these, each in a different GL state
  * corresponding to a different brw_wm_prog_key struct, with different
diff --git a/src/mesa/drivers/dri/i965/brw_shader.cpp b/src/mesa/drivers/dri/i965/brw_shader.cpp
index f8482e1..005779d 100644
--- a/src/mesa/drivers/dri/i965/brw_shader.cpp
+++ b/src/mesa/drivers/dri/i965/brw_shader.cpp
@@ -48,13 +48,12 @@ brw_new_shader(struct gl_context *ctx, GLuint name, GLuint type)
 struct gl_shader_program *
 brw_new_shader_program(struct gl_context *ctx, GLuint name)
 {
-   struct brw_shader_program *prog;
-   prog = rzalloc(NULL, struct brw_shader_program);
+   struct gl_shader_program *prog = rzalloc(NULL, struct gl_shader_program);
    if (prog) {
-      prog->base.Name = name;
-      _mesa_init_shader_program(ctx, &prog->base);
+      prog->Name = name;
+      _mesa_init_shader_program(ctx, prog);
    }
-   return &prog->base;
+   return prog;
 }
 
 /**




More information about the mesa-commit mailing list