diff options
author | Arcady Goldmints-Orlov <[email protected]> | 2018-11-29 15:16:34 +0100 |
---|---|---|
committer | Alejandro PiƱeiro <[email protected]> | 2019-07-12 23:42:41 +0200 |
commit | c3122d24318632b124cf6b065b19d5c863537057 (patch) | |
tree | e703eb14ddd315330052ab04a437f7329023d963 /src/compiler/glsl/serialize.cpp | |
parent | 0baa553fab5cfbee3410ca9f311e2bf61ccec5d4 (diff) |
glsl/serialize: Handle NULL uniform name in write_uniforms()
Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]>
Diffstat (limited to 'src/compiler/glsl/serialize.cpp')
-rw-r--r-- | src/compiler/glsl/serialize.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/compiler/glsl/serialize.cpp b/src/compiler/glsl/serialize.cpp index 47e535842fa..825e43fdbba 100644 --- a/src/compiler/glsl/serialize.cpp +++ b/src/compiler/glsl/serialize.cpp @@ -435,7 +435,11 @@ write_uniforms(struct blob *metadata, struct gl_shader_program *prog) for (unsigned i = 0; i < prog->data->NumUniformStorage; i++) { encode_type_to_blob(metadata, prog->data->UniformStorage[i].type); blob_write_uint32(metadata, prog->data->UniformStorage[i].array_elements); - blob_write_string(metadata, prog->data->UniformStorage[i].name); + if (prog->data->UniformStorage[i].name) { + blob_write_string(metadata, prog->data->UniformStorage[i].name); + } else { + blob_write_string(metadata, ""); + } blob_write_uint32(metadata, prog->data->UniformStorage[i].builtin); blob_write_uint32(metadata, prog->data->UniformStorage[i].remap_location); blob_write_uint32(metadata, prog->data->UniformStorage[i].block_index); |