diff options
author | Timothy Arceri <[email protected]> | 2017-06-16 09:56:56 +1000 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2017-11-29 21:50:48 +1100 |
commit | a39a3b4b76276160d99d7805109ecad9c1c95b1f (patch) | |
tree | bf6cba9daf03288443b41940ae4f770cb2eaf85c /src/compiler/glsl/shader_cache.cpp | |
parent | f8a54c489d305010eb6c622bb4e4acd714ee7532 (diff) |
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 <[email protected]>
Diffstat (limited to 'src/compiler/glsl/shader_cache.cpp')
-rw-r--r-- | src/compiler/glsl/shader_cache.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/glsl/shader_cache.cpp b/src/compiler/glsl/shader_cache.cpp index cc63c1c3afd..57e1d24fcbf 100644 --- a/src/compiler/glsl/shader_cache.cpp +++ b/src/compiler/glsl/shader_cache.cpp @@ -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, |