[Mesa-dev] [PATCH 07/10] i965/test: Remove the fragment/vertex_program field from test visitors

Jason Ekstrand jason at jlekstrand.net
Thu May 26 01:52:23 UTC 2016


None of them are actually using it.  It's a relic of an older compiler
interface that required a gl_program.
---
 src/mesa/drivers/dri/i965/test_fs_cmod_propagation.cpp     | 4 ----
 src/mesa/drivers/dri/i965/test_fs_saturate_propagation.cpp | 4 ----
 src/mesa/drivers/dri/i965/test_vec4_cmod_propagation.cpp   | 5 -----
 src/mesa/drivers/dri/i965/test_vec4_copy_propagation.cpp   | 5 -----
 src/mesa/drivers/dri/i965/test_vec4_register_coalesce.cpp  | 5 -----
 5 files changed, 23 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/test_fs_cmod_propagation.cpp b/src/mesa/drivers/dri/i965/test_fs_cmod_propagation.cpp
index 034d8a5..7cd7245 100644
--- a/src/mesa/drivers/dri/i965/test_fs_cmod_propagation.cpp
+++ b/src/mesa/drivers/dri/i965/test_fs_cmod_propagation.cpp
@@ -37,7 +37,6 @@ public:
    struct gl_context *ctx;
    struct brw_wm_prog_data *prog_data;
    struct gl_shader_program *shader_prog;
-   struct brw_fragment_program *fp;
    fs_visitor *v;
 };
 
@@ -60,14 +59,11 @@ void cmod_propagation_test::SetUp()
    devinfo = (struct brw_device_info *)calloc(1, sizeof(*devinfo));
    compiler->devinfo = devinfo;
 
-   fp = ralloc(NULL, struct brw_fragment_program);
    prog_data = ralloc(NULL, struct brw_wm_prog_data);
    nir_shader *shader = nir_shader_create(NULL, MESA_SHADER_FRAGMENT, NULL);
 
    v = new cmod_propagation_fs_visitor(compiler, prog_data, shader);
 
-   _mesa_init_gl_program(&fp->program.Base, GL_FRAGMENT_SHADER, 0);
-
    devinfo->gen = 4;
 }
 
diff --git a/src/mesa/drivers/dri/i965/test_fs_saturate_propagation.cpp b/src/mesa/drivers/dri/i965/test_fs_saturate_propagation.cpp
index 7b3b9e5..06caaad 100644
--- a/src/mesa/drivers/dri/i965/test_fs_saturate_propagation.cpp
+++ b/src/mesa/drivers/dri/i965/test_fs_saturate_propagation.cpp
@@ -37,7 +37,6 @@ public:
    struct gl_context *ctx;
    struct brw_wm_prog_data *prog_data;
    struct gl_shader_program *shader_prog;
-   struct brw_fragment_program *fp;
    fs_visitor *v;
 };
 
@@ -60,14 +59,11 @@ void saturate_propagation_test::SetUp()
    devinfo = (struct brw_device_info *)calloc(1, sizeof(*devinfo));
    compiler->devinfo = devinfo;
 
-   fp = ralloc(NULL, struct brw_fragment_program);
    prog_data = ralloc(NULL, struct brw_wm_prog_data);
    nir_shader *shader = nir_shader_create(NULL, MESA_SHADER_FRAGMENT, NULL);
 
    v = new saturate_propagation_fs_visitor(compiler, prog_data, shader);
 
-   _mesa_init_gl_program(&fp->program.Base, GL_FRAGMENT_SHADER, 0);
-
    devinfo->gen = 4;
 }
 
diff --git a/src/mesa/drivers/dri/i965/test_vec4_cmod_propagation.cpp b/src/mesa/drivers/dri/i965/test_vec4_cmod_propagation.cpp
index 0b74165..1b6a9e7 100644
--- a/src/mesa/drivers/dri/i965/test_vec4_cmod_propagation.cpp
+++ b/src/mesa/drivers/dri/i965/test_vec4_cmod_propagation.cpp
@@ -39,7 +39,6 @@ public:
    struct brw_device_info *devinfo;
    struct gl_context *ctx;
    struct gl_shader_program *shader_prog;
-   struct brw_vertex_program *vp;
    struct brw_vue_prog_data *prog_data;
    vec4_visitor *v;
 };
@@ -103,14 +102,10 @@ void cmod_propagation_test::SetUp()
    prog_data = (struct brw_vue_prog_data *)calloc(1, sizeof(*prog_data));
    compiler->devinfo = devinfo;
 
-   vp = ralloc(NULL, struct brw_vertex_program);
-
    nir_shader *shader = nir_shader_create(NULL, MESA_SHADER_VERTEX, NULL);
 
    v = new cmod_propagation_vec4_visitor(compiler, shader, prog_data);
 
-   _mesa_init_gl_program(&vp->program.Base, GL_VERTEX_SHADER, 0);
-
    devinfo->gen = 4;
 }
 
diff --git a/src/mesa/drivers/dri/i965/test_vec4_copy_propagation.cpp b/src/mesa/drivers/dri/i965/test_vec4_copy_propagation.cpp
index 0638246..901f12a 100644
--- a/src/mesa/drivers/dri/i965/test_vec4_copy_propagation.cpp
+++ b/src/mesa/drivers/dri/i965/test_vec4_copy_propagation.cpp
@@ -38,7 +38,6 @@ public:
    struct brw_device_info *devinfo;
    struct gl_context *ctx;
    struct gl_shader_program *shader_prog;
-   struct brw_vertex_program *vp;
    struct brw_vue_prog_data *prog_data;
    vec4_visitor *v;
 };
@@ -96,14 +95,10 @@ void copy_propagation_test::SetUp()
    prog_data = (struct brw_vue_prog_data *)calloc(1, sizeof(*prog_data));
    compiler->devinfo = devinfo;
 
-   vp = ralloc(NULL, struct brw_vertex_program);
-
    nir_shader *shader = nir_shader_create(NULL, MESA_SHADER_VERTEX, NULL);
 
    v = new copy_propagation_vec4_visitor(compiler, shader, prog_data);
 
-   _mesa_init_gl_program(&vp->program.Base, GL_VERTEX_SHADER, 0);
-
    devinfo->gen = 4;
 }
 
diff --git a/src/mesa/drivers/dri/i965/test_vec4_register_coalesce.cpp b/src/mesa/drivers/dri/i965/test_vec4_register_coalesce.cpp
index 1873d9c..944c738 100644
--- a/src/mesa/drivers/dri/i965/test_vec4_register_coalesce.cpp
+++ b/src/mesa/drivers/dri/i965/test_vec4_register_coalesce.cpp
@@ -40,7 +40,6 @@ public:
    struct brw_device_info *devinfo;
    struct gl_context *ctx;
    struct gl_shader_program *shader_prog;
-   struct brw_vertex_program *vp;
    struct brw_vue_prog_data *prog_data;
    vec4_visitor *v;
 };
@@ -99,14 +98,10 @@ void register_coalesce_test::SetUp()
    prog_data = (struct brw_vue_prog_data *)calloc(1, sizeof(*prog_data));
    compiler->devinfo = devinfo;
 
-   vp = ralloc(NULL, struct brw_vertex_program);
-
    nir_shader *shader = nir_shader_create(NULL, MESA_SHADER_VERTEX, NULL);
 
    v = new register_coalesce_vec4_visitor(compiler, shader, prog_data);
 
-   _mesa_init_gl_program(&vp->program.Base, GL_VERTEX_SHADER, 0);
-
    devinfo->gen = 4;
 }
 
-- 
2.5.0.400.gff86faf



More information about the mesa-dev mailing list