diff options
author | Samuel Pitoiset <[email protected]> | 2017-04-20 19:02:28 +0200 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2017-04-21 10:08:32 +0200 |
commit | 862361c4f547efbbc9ff7d01b65ac43c42545db9 (patch) | |
tree | b3ebd2a563eb84c7eab128115f2b6f967e452302 /src/compiler/glsl/shader_cache.cpp | |
parent | 4a0aa0b3b3c07469aeef5d627f63adda6f5bcf5a (diff) |
glsl: get rid of values_for_type()
This function is actually a wrapper for component_slots()
and it always returns 1 (or N) for samplers. Since
component_slots() now return 1 for samplers, it can go.
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Timothy Arceri <[email protected]>
Reviewed-by: Edward O'Callaghan <[email protected]>
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 738e5488ac2..19d69c36fc4 100644 --- a/src/compiler/glsl/shader_cache.cpp +++ b/src/compiler/glsl/shader_cache.cpp @@ -599,7 +599,7 @@ write_uniforms(struct blob *metadata, struct gl_shader_program *prog) !prog->data->UniformStorage[i].is_shader_storage && prog->data->UniformStorage[i].block_index == -1) { unsigned vec_size = - values_for_type(prog->data->UniformStorage[i].type) * + prog->data->UniformStorage[i].type->component_slots() * MAX2(prog->data->UniformStorage[i].array_elements, 1); blob_write_bytes(metadata, prog->data->UniformStorage[i].storage, sizeof(union gl_constant_value) * vec_size); @@ -659,7 +659,7 @@ read_uniforms(struct blob_reader *metadata, struct gl_shader_program *prog) !prog->data->UniformStorage[i].is_shader_storage && prog->data->UniformStorage[i].block_index == -1) { unsigned vec_size = - values_for_type(prog->data->UniformStorage[i].type) * + prog->data->UniformStorage[i].type->component_slots() * MAX2(prog->data->UniformStorage[i].array_elements, 1); blob_copy_bytes(metadata, (uint8_t *) prog->data->UniformStorage[i].storage, |