etnaviv: remove pipe_fence_handle::ctx
authorRob Clark <robdclark@gmail.com>
Wed, 9 May 2018 01:00:18 +0000 (21:00 -0400)
committerChristian Gmeiner <christian.gmeiner@gmail.com>
Fri, 11 May 2018 16:42:13 +0000 (18:42 +0200)
A fence can outlive the ctx it was created from (see glmark2).. etnaviv
doesn't actually need fence->ctx so lets remove it before someone makes
the mistake of assuming it is a valid pointer.

Signed-off-by: Rob Clark <robdclark@gmail.com>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
src/gallium/drivers/etnaviv/etnaviv_fence.c

index 22a964ad282e854c3e9352b47cfa9147dbda4689..cf3e67766ba46b83850b5c7c209e1dd1b043e35c 100644 (file)
@@ -36,7 +36,6 @@
 
 struct pipe_fence_handle {
    struct pipe_reference reference;
-   struct etna_context *ctx;
    struct etna_screen *screen;
    int fence_fd;
    uint32_t timestamp;
@@ -111,7 +110,6 @@ etna_fence_create(struct pipe_context *pctx, int fence_fd)
 
    pipe_reference_init(&fence->reference, 1);
 
-   fence->ctx = ctx;
    fence->screen = ctx->screen;
    fence->timestamp = etna_cmd_stream_timestamp(ctx->stream);
    fence->fence_fd = fence_fd;