diff options
author | Arcady Goldmints-Orlov <[email protected]> | 2018-12-20 02:12:25 +0100 |
---|---|---|
committer | Alejandro PiƱeiro <[email protected]> | 2019-07-12 23:42:41 +0200 |
commit | 761b0fe95f00a9a5adfd0369326eeffb23af449a (patch) | |
tree | 440dc119bcc0fdf4ee0d2056805ad12e4c17fb88 | |
parent | c3122d24318632b124cf6b065b19d5c863537057 (diff) |
glsl/serialize: Update write_program_resource_data() to handle NULL input and output variable names
Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]>
-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 825e43fdbba..552300f7eaf 100644 --- a/src/compiler/glsl/serialize.cpp +++ b/src/compiler/glsl/serialize.cpp @@ -790,7 +790,11 @@ write_program_resource_data(struct blob *metadata, encode_type_to_blob(metadata, var->interface_type); encode_type_to_blob(metadata, var->outermost_struct_type); - blob_write_string(metadata, var->name); + if (var->name) { + blob_write_string(metadata, var->name); + } else { + blob_write_string(metadata, ""); + } size_t s_var_size, s_var_ptrs; get_shader_var_and_pointer_sizes(&s_var_size, &s_var_ptrs, var); |