mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 06:40:11 +01:00
glsl: reserve parameter storage on cache restore
Since we know how big the list will be we can allocate the storage upfront. Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
This commit is contained in:
parent
1183eb487f
commit
ed61530121
1 changed files with 1 additions and 0 deletions
|
|
@ -1101,6 +1101,7 @@ read_shader_parameters(struct blob_reader *metadata,
|
|||
uint32_t i = 0;
|
||||
uint32_t num_parameters = blob_read_uint32(metadata);
|
||||
|
||||
_mesa_reserve_parameter_storage(params, num_parameters);
|
||||
while (i < num_parameters) {
|
||||
gl_register_file type = (gl_register_file) blob_read_uint32(metadata);
|
||||
const char *name = blob_read_string(metadata);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue