[Mesa-dev] [PATCH 07/17] i965/fs: Remove the gl_program from the generator

Jason Ekstrand jason at jlekstrand.net
Thu Oct 8 17:22:39 PDT 2015


---
 src/mesa/drivers/dri/i965/brw_blorp_blit_eu.cpp | 2 +-
 src/mesa/drivers/dri/i965/brw_fs.cpp            | 4 ++--
 src/mesa/drivers/dri/i965/brw_fs.h              | 3 ---
 src/mesa/drivers/dri/i965/brw_fs_generator.cpp  | 3 +--
 src/mesa/drivers/dri/i965/brw_vec4.cpp          | 2 +-
 5 files changed, 5 insertions(+), 9 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_blorp_blit_eu.cpp b/src/mesa/drivers/dri/i965/brw_blorp_blit_eu.cpp
index d458ad8..5308d17 100644
--- a/src/mesa/drivers/dri/i965/brw_blorp_blit_eu.cpp
+++ b/src/mesa/drivers/dri/i965/brw_blorp_blit_eu.cpp
@@ -32,7 +32,7 @@ brw_blorp_eu_emitter::brw_blorp_eu_emitter(struct brw_context *brw,
      generator(brw->intelScreen->compiler, brw,
                mem_ctx, (void *) rzalloc(mem_ctx, struct brw_wm_prog_key),
                (struct brw_stage_prog_data *) rzalloc(mem_ctx, struct brw_wm_prog_data),
-               NULL, 0, false, "BLORP")
+               0, false, "BLORP")
 {
    if (debug_flag)
       generator.enable_debug("blorp");
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index ba62fdd..3c83f2a 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -5167,7 +5167,7 @@ brw_wm_fs_emit(struct brw_context *brw,
 
    fs_generator g(brw->intelScreen->compiler, brw,
                   mem_ctx, (void *) key, &prog_data->base,
-                  &fp->Base, v.promoted_constants, v.runtime_check_aads_emit, "FS");
+                  v.promoted_constants, v.runtime_check_aads_emit, "FS");
 
    if (unlikely(INTEL_DEBUG & DEBUG_WM)) {
       char *name;
@@ -5323,7 +5323,7 @@ brw_cs_emit(struct brw_context *brw,
    }
 
    fs_generator g(brw->intelScreen->compiler, brw,
-                  mem_ctx, (void*) key, &prog_data->base, &cp->Base,
+                  mem_ctx, (void*) key, &prog_data->base,
                   v8.promoted_constants, v8.runtime_check_aads_emit, "CS");
    if (INTEL_DEBUG & DEBUG_CS) {
       char *name = ralloc_asprintf(mem_ctx, "%s compute shader %d",
diff --git a/src/mesa/drivers/dri/i965/brw_fs.h b/src/mesa/drivers/dri/i965/brw_fs.h
index e8b511f..61b6ee6 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.h
+++ b/src/mesa/drivers/dri/i965/brw_fs.h
@@ -400,7 +400,6 @@ public:
                 void *mem_ctx,
                 const void *key,
                 struct brw_stage_prog_data *prog_data,
-                struct gl_program *fp,
                 unsigned promoted_constants,
                 bool runtime_check_aads_emit,
                 const char *stage_abbrev);
@@ -499,8 +498,6 @@ private:
    const void * const key;
    struct brw_stage_prog_data * const prog_data;
 
-   const struct gl_program *prog;
-
    unsigned dispatch_width; /**< 8 or 16 */
 
    exec_list discard_halt_patches;
diff --git a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp
index 93ff5b1..8bdf582 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp
@@ -131,7 +131,6 @@ fs_generator::fs_generator(const struct brw_compiler *compiler, void *log_data,
                            void *mem_ctx,
                            const void *key,
                            struct brw_stage_prog_data *prog_data,
-                           struct gl_program *prog,
                            unsigned promoted_constants,
                            bool runtime_check_aads_emit,
                            const char *stage_abbrev)
@@ -139,7 +138,7 @@ fs_generator::fs_generator(const struct brw_compiler *compiler, void *log_data,
    : compiler(compiler), log_data(log_data),
      devinfo(compiler->devinfo), key(key),
      prog_data(prog_data),
-     prog(prog), promoted_constants(promoted_constants),
+     promoted_constants(promoted_constants),
      runtime_check_aads_emit(runtime_check_aads_emit), debug_flag(false),
      stage_abbrev(stage_abbrev), mem_ctx(mem_ctx)
 {
diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/i965/brw_vec4.cpp
index e966b96..602b943 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4.cpp
@@ -1969,7 +1969,7 @@ brw_vs_emit(struct brw_context *brw,
 
       fs_generator g(brw->intelScreen->compiler, brw,
                      mem_ctx, (void *) key, &prog_data->base.base,
-                     &vp->Base, v.promoted_constants,
+                     v.promoted_constants,
                      v.runtime_check_aads_emit, "VS");
       if (INTEL_DEBUG & DEBUG_VS) {
          char *name;
-- 
2.5.0.400.gff86faf



More information about the mesa-dev mailing list