[Mesa-dev] [PATCH RFC] clover: clone pipe-resource if root-buffer already exists
Jan Vesely
jan.vesely at rutgers.edu
Tue Mar 7 15:37:17 UTC 2017
On Fri, 2017-03-03 at 14:45 -0800, Francisco Jerez wrote:
> Jan Vesely <jan.vesely at rutgers.edu> writes:
>
> > Fixes cl-api-enqueue-read_write-buffer on carrizo+topaz machine
> >
> > Signed-off-by: Jan Vesely <jan.vesely at rutgers.edu>
> > ---
> > I'm not sure if cloning is the right thigh to do.
> > Should we copy the pointer and increase ref count instead?
> >
> > PS: the assert did not trigger despite building mesa with --enable-debug
> >
> > Jan
> >
> > src/gallium/state_trackers/clover/core/resource.cpp | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/src/gallium/state_trackers/clover/core/resource.cpp b/src/gallium/state_trackers/clover/core/resource.cpp
> > index 06fd3f6..71414f4 100644
> > --- a/src/gallium/state_trackers/clover/core/resource.cpp
> > +++ b/src/gallium/state_trackers/clover/core/resource.cpp
> > @@ -172,7 +172,7 @@ root_resource::root_resource(clover::device &dev, memory_obj &obj,
> > root_resource::root_resource(clover::device &dev, memory_obj &obj,
> > root_resource &r) :
> > resource(dev, obj) {
> > - assert(0); // XXX -- resource shared among dev and r.dev
> > + pipe = dev.pipe->resource_create(dev.pipe, r.pipe);
>
> AFAIK this doesn't actually create a resource shared among the two
> devices, which is what you need here.
right. I misunderstood what the test does. Guess I'll need to look into
prime handles.
thanks,
Jan
>
> > }
> >
> > root_resource::~root_resource() {
> > --
> > 2.9.3
--
Jan Vesely <jan.vesely at rutgers.edu>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170307/fbba072c/attachment-0001.sig>
More information about the mesa-dev
mailing list