spirv: avoid allocating memory twice

ptr_type was allocated twice. This drops the second allocation.

It has been like this since the introduction of the code in
b778e7bd6c

Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18450>
This commit is contained in:
Thomas H.P. Andersen 2022-09-06 23:25:43 +02:00 committed by Marge Bot
parent c93b72d045
commit 6d19b34571

View file

@ -2440,7 +2440,6 @@ vtn_handle_variables(struct vtn_builder *b, SpvOp opcode,
struct vtn_value *val = vtn_push_value(b, w[2], vtn_value_type_pointer);
struct vtn_type *ptr_type = rzalloc(b, struct vtn_type);
ptr_type = rzalloc(b, struct vtn_type);
ptr_type->base_type = vtn_base_type_pointer;
ptr_type->deref = sampler_type;
ptr_type->storage_class = SpvStorageClassUniform;