mesa: rework _mesa_add_parameter() to only add a single param

This is more inline with what the functions name suggests it should
do, and makes the code much easier to follow.

This will also make adding uniform packing support much simpler.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
This commit is contained in:
Timothy Arceri
2017-06-16 09:56:56 +10:00
parent f8a54c489d
commit a39a3b4b76
3 changed files with 41 additions and 39 deletions

View File

@@ -985,7 +985,7 @@ write_shader_parameters(struct blob *metadata,
blob_write_bytes(metadata, param->StateIndexes,
sizeof(param->StateIndexes));
i += (param->Size + 3) / 4;
i++;
}
blob_write_bytes(metadata, params->ParameterValues,
@@ -1014,7 +1014,7 @@ read_shader_parameters(struct blob_reader *metadata,
_mesa_add_parameter(params, type, name, size, data_type,
NULL, state_indexes);
i += (size + 3) / 4;
i++;
}
blob_copy_bytes(metadata, (uint8_t *) params->ParameterValues,