{
struct pipe_surface *old_dst = *dst;
- if (pipe_reference_described(&(*dst)->reference, &src->reference,
+ if (pipe_reference_described(&old_dst->reference, &src->reference,
(debug_reference_descriptor)
debug_describe_surface))
old_dst->context->surface_destroy(old_dst->context, old_dst);
static inline void
pipe_surface_release(struct pipe_context *pipe, struct pipe_surface **ptr)
{
- if (pipe_reference_described(&(*ptr)->reference, NULL,
+ struct pipe_surface *old = *ptr;
+
+ if (pipe_reference_described(&old->reference, NULL,
(debug_reference_descriptor)
debug_describe_surface))
- pipe->surface_destroy(pipe, *ptr);
+ pipe->surface_destroy(pipe, old);
*ptr = NULL;
}
{
struct pipe_resource *old_dst = *dst;
- if (pipe_reference_described(&(*dst)->reference, &src->reference,
+ if (pipe_reference_described(&old_dst->reference, &src->reference,
(debug_reference_descriptor)
debug_describe_resource)) {
/* Avoid recursion, which would prevent inlining this function */
{
struct pipe_sampler_view *old_dst = *dst;
- if (pipe_reference_described(&(*dst)->reference, &src->reference,
+ if (pipe_reference_described(&old_dst->reference, &src->reference,
(debug_reference_descriptor)
debug_describe_sampler_view))
old_dst->context->sampler_view_destroy(old_dst->context, old_dst);
struct pipe_sampler_view **ptr)
{
struct pipe_sampler_view *old_view = *ptr;
- if (pipe_reference_described(&(*ptr)->reference, NULL,
+
+ if (pipe_reference_described(&old_view->reference, NULL,
(debug_reference_descriptor)debug_describe_sampler_view)) {
ctx->sampler_view_destroy(ctx, old_view);
}
{
struct pipe_stream_output_target *old_dst = *dst;
- if (pipe_reference_described(&(*dst)->reference, &src->reference,
+ if (pipe_reference_described(&old_dst->reference, &src->reference,
(debug_reference_descriptor)debug_describe_so_target))
old_dst->context->stream_output_target_destroy(old_dst->context, old_dst);
*dst = src;