diff options
author | Jason Ekstrand <[email protected]> | 2017-09-29 11:30:25 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2017-10-12 22:39:31 -0700 |
commit | 8d90e2883954eb7022cf8fc98be3773cc5513e7b (patch) | |
tree | 0dd35f769a6cd39c9f44e48768df13182090b48b /src/intel/compiler/brw_vec4_visitor.cpp | |
parent | 29737eac985cf028b19d977cb8fa0d7320cf91cf (diff) |
intel/compiler: Allocate pull_param in assign_constant_locations
Now that everything is nicely ralloc'd, we can allocate the pull_param
array in assign_constant_locations instead of higher up. We can also
re-allocate the param array so that it's exactly the needed size. This
should save us some memory because we're not allocating the total needed
param space for both push and pull.
Reviewed-by: Jordan Justen <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/intel/compiler/brw_vec4_visitor.cpp')
-rw-r--r-- | src/intel/compiler/brw_vec4_visitor.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/intel/compiler/brw_vec4_visitor.cpp b/src/intel/compiler/brw_vec4_visitor.cpp index ff5cd2d4334..ae516196b15 100644 --- a/src/intel/compiler/brw_vec4_visitor.cpp +++ b/src/intel/compiler/brw_vec4_visitor.cpp @@ -1782,6 +1782,11 @@ vec4_visitor::move_uniform_array_access_to_pull_constants() return; } + /* Allocate the pull_params array */ + assert(stage_prog_data->nr_pull_params == 0); + stage_prog_data->pull_param = ralloc_array(mem_ctx, uint32_t, + this->uniforms * 4); + int pull_constant_loc[this->uniforms]; memset(pull_constant_loc, -1, sizeof(pull_constant_loc)); |