i965/fs,vec4: Get rid of the sanity_param_count
authorJason Ekstrand <jason.ekstrand@intel.com>
Fri, 2 Oct 2015 01:15:21 +0000 (18:15 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Fri, 2 Oct 2015 21:22:53 +0000 (14:22 -0700)
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.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_fs.cpp
src/mesa/drivers/dri/i965/brw_fs.h
src/mesa/drivers/dri/i965/brw_vec4.cpp
src/mesa/drivers/dri/i965/brw_vec4.h
src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp

index 2e92ef789dbb551e0862666cb745514f16ea19bb..30bb84b846c739fc0fc607fbe29b3582873519e1 100644 (file)
@@ -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;
 }
 
index 213b2e0de7c834b44c69615b3c01320f1f2849a3..321d302a12a07c0b41f1e3b33fe6fe66620672ad 100644 (file)
@@ -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;
 
index 52db8ea8cf08dcfc1189440d0033dfc3b6b6e0fd..71bb2010f96e43867a1b522554795dfe067725a9 100644 (file)
@@ -1802,8 +1802,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();
 
@@ -1926,13 +1924,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;
 }
 
index 6e3af60eb8276a2052523626642ac357f79ec5b3..3095a517fc7df4d0993a6545a952059d0c8744b4 100644 (file)
@@ -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;
 
index bc9d9a0eff2b202ad4a6027a0218b3978a19ea9a..f4cbc9e58edac269e44bc4d8d870d44d2c64b1af 100644 (file)
@@ -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),