From 761b0fe95f00a9a5adfd0369326eeffb23af449a Mon Sep 17 00:00:00 2001 From: Arcady Goldmints-Orlov Date: Thu, 20 Dec 2018 02:12:25 +0100 Subject: [PATCH] glsl/serialize: Update write_program_resource_data() to handle NULL input and output variable names Reviewed-by: Caio Marcelo de Oliveira Filho --- src/compiler/glsl/serialize.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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); -- 2.30.2