}
return binary->config;
}
+
+void radeon_shader_binary_free_members(struct radeon_shader_binary *binary) {
+ FREE(binary->code);
+ FREE(binary->config);
+ FREE(binary->rodata);
+}
const struct radeon_shader_binary *binary,
uint64_t symbol_offset);
+/**
+ * Free all memory allocated for members of \p binary. This function does
+ * not free \p binary.
+ */
+void radeon_shader_binary_free_members(struct radeon_shader_binary *binary);
#endif /* RADEON_ELF_UTIL_H */
pipe_resource_reference(
(struct pipe_resource **)&program->input_buffer, NULL);
- FREE(program->binary.code);
- FREE(program->binary.config);
- FREE(program->binary.rodata);
+ radeon_shader_binary_free_members(&program->binary);
FREE(program);
}
return r;
}
r = si_shader_binary_read(sscreen, shader, &binary);
- FREE(binary.code);
- FREE(binary.config);
- FREE(binary.rodata);
+ radeon_shader_binary_free_members(&binary);
return r;
}