On 27/09/14 18:29, Marek Olšák wrote: > There should be no warning on master. On master, the variables have > the pipe_resource type. On stable branches, the variables have the > pipe_constant_buffer type, so the expression should be changed to > &...ring->buffer. Without that, it probably crashes. > Perhaps I'm missing something here but according to include/pipe/p_state.h pipe_constant_buffer is defined as
struct pipe_constant_buffer { struct pipe_resource *buffer; /**< the actual buffer */ ... } Thus the original patch will provide struct pipe_resource** "masked" as struct pipe_constant_buffer*. So things are unlikely to crash. Either way I've followed your suggestion and updated the patch - s/ring/ring.buffer/ Thanks Emil > Marek > > On Sat, Sep 27, 2014 at 5:45 PM, Emil Velikov <emil.l.veli...@gmail.com> > wrote: >> Hi Marek, >> >> This commit introduces a couple of compiler warnings >> warning: passing argument 1 of 'pipe_resource_reference' from >> incompatible pointer type >> >> Afaics the same behaviour is resent on master, and the commit is simply >> missing a cast. I've picked up the patch for 10.2 (and 10.3 in a moment) >> but do let me know if I'm missing something. >> >> Thanks >> Emil >> >> On 19/09/14 21:17, Marek Olšák wrote: >>> From: Marek Olšák <marek.ol...@amd.com> >>> >>> --- >>> src/gallium/drivers/radeonsi/si_pipe.c | 2 ++ >>> 1 file changed, 2 insertions(+) >>> >>> diff --git a/src/gallium/drivers/radeonsi/si_pipe.c >>> b/src/gallium/drivers/radeonsi/si_pipe.c >>> index 4f9c876..2cce5cc 100644 >>> --- a/src/gallium/drivers/radeonsi/si_pipe.c >>> +++ b/src/gallium/drivers/radeonsi/si_pipe.c >>> @@ -38,6 +38,8 @@ static void si_destroy_context(struct pipe_context >>> *context) >>> >>> si_release_all_descriptors(sctx); >>> >>> + pipe_resource_reference(&sctx->esgs_ring, NULL); >>> + pipe_resource_reference(&sctx->gsvs_ring, NULL); >>> pipe_resource_reference(&sctx->null_const_buf.buffer, NULL); >>> r600_resource_reference(&sctx->border_color_table, NULL); >>> >>> >> _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev