From: Arcady Goldmints-Orlov Date: Thu, 20 Dec 2018 01:12:25 +0000 (+0100) Subject: glsl/serialize: Update write_program_resource_data() to handle NULL input and output... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=761b0fe95f00a9a5adfd0369326eeffb23af449a;p=mesa.git glsl/serialize: Update write_program_resource_data() to handle NULL input and output variable names Reviewed-by: Caio Marcelo de Oliveira Filho --- 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);