[Mesa-dev] [PATCH 12/13] i965/fs, vec4: Get rid of the sanity_param_count
Jason Ekstrand
jason at jlekstrand.net
Thu Oct 1 18:50:38 PDT 2015
It doesn't exist for anything other than an assert that, as far as I can
tell, isn't possible to trip. Soon, we will remove prog from the visitor
entirely and this will become even more impossible to hit.
---
src/mesa/drivers/dri/i965/brw_fs.cpp | 18 ------------------
src/mesa/drivers/dri/i965/brw_fs.h | 1 -
src/mesa/drivers/dri/i965/brw_vec4.cpp | 9 ---------
src/mesa/drivers/dri/i965/brw_vec4.h | 2 --
src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 1 -
5 files changed, 31 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index 2d67085..7e6022b 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -4985,8 +4985,6 @@ fs_visitor::run_fs(bool do_rep_send)
assert(stage == MESA_SHADER_FRAGMENT);
- sanity_param_count = prog->Parameters->NumParameters;
-
if (devinfo->gen >= 6)
setup_payload_gen6();
else
@@ -5055,13 +5053,6 @@ fs_visitor::run_fs(bool do_rep_send)
else
wm_prog_data->reg_blocks_16 = brw_register_blocks(grf_used);
- /* If any state parameters were appended, then ParameterValues could have
- * been realloced, in which case the driver uniform storage set up by
- * _mesa_associate_uniform_storage() would point to freed memory. Make
- * sure that didn't happen.
- */
- assert(sanity_param_count == prog->Parameters->NumParameters);
-
return !failed;
}
@@ -5071,8 +5062,6 @@ fs_visitor::run_cs()
assert(stage == MESA_SHADER_COMPUTE);
assert(shader);
- sanity_param_count = prog->Parameters->NumParameters;
-
setup_cs_payload();
if (shader_time_index >= 0)
@@ -5100,13 +5089,6 @@ fs_visitor::run_cs()
if (failed)
return false;
- /* If any state parameters were appended, then ParameterValues could have
- * been realloced, in which case the driver uniform storage set up by
- * _mesa_associate_uniform_storage() would point to freed memory. Make
- * sure that didn't happen.
- */
- assert(sanity_param_count == prog->Parameters->NumParameters);
-
return !failed;
}
diff --git a/src/mesa/drivers/dri/i965/brw_fs.h b/src/mesa/drivers/dri/i965/brw_fs.h
index 213b2e0..321d302 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.h
+++ b/src/mesa/drivers/dri/i965/brw_fs.h
@@ -300,7 +300,6 @@ public:
const struct brw_sampler_prog_key_data *key_tex;
struct brw_stage_prog_data *prog_data;
- unsigned int sanity_param_count;
int *param_size;
diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/i965/brw_vec4.cpp
index a8cdd19..8a76f36 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4.cpp
@@ -1803,8 +1803,6 @@ vec4_visitor::emit_shader_time_write(int shader_time_subindex, src_reg value)
bool
vec4_visitor::run()
{
- sanity_param_count = prog->Parameters->NumParameters;
-
if (shader_time_index >= 0)
emit_shader_time_begin();
@@ -1927,13 +1925,6 @@ vec4_visitor::run()
brw_get_scratch_size(last_scratch * REG_SIZE);
}
- /* If any state parameters were appended, then ParameterValues could have
- * been realloced, in which case the driver uniform storage set up by
- * _mesa_associate_uniform_storage() would point to freed memory. Make
- * sure that didn't happen.
- */
- assert(sanity_param_count == prog->Parameters->NumParameters);
-
return !failed;
}
diff --git a/src/mesa/drivers/dri/i965/brw_vec4.h b/src/mesa/drivers/dri/i965/brw_vec4.h
index 6e3af60..3095a51 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4.h
+++ b/src/mesa/drivers/dri/i965/brw_vec4.h
@@ -97,8 +97,6 @@ public:
const struct brw_sampler_prog_key_data * const key_tex;
struct brw_vue_prog_data * const prog_data;
- unsigned int sanity_param_count;
-
char *fail_msg;
bool failed;
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
index bc9d9a0..f4cbc9e 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
@@ -1836,7 +1836,6 @@ vec4_visitor::vec4_visitor(const struct brw_compiler *compiler,
shader_prog, prog, &prog_data->base, stage),
key_tex(key_tex),
prog_data(prog_data),
- sanity_param_count(0),
fail_msg(NULL),
first_non_payload_grf(0),
need_all_constants_in_pull_buffer(false),
--
2.5.0.400.gff86faf
More information about the mesa-dev
mailing list