summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/compiler/glsl/serialize.cpp6
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);