mirror of
https://gitee.com/openharmony/third_party_mesa3d
synced 2024-11-26 17:12:07 +00:00
panfrost 适配AcquireFence
Signed-off-by: xiawenyu <xia_wenyu@126.com>
This commit is contained in:
parent
fc4325e87a
commit
d2693f329e
@ -121,6 +121,7 @@ panfrost_get_param(struct pipe_screen *screen, enum pipe_cap param)
|
||||
case PIPE_CAP_SAMPLE_SHADING:
|
||||
case PIPE_CAP_FRAGMENT_SHADER_DERIVATIVES:
|
||||
case PIPE_CAP_FRAMEBUFFER_NO_ATTACHMENT:
|
||||
case PIPE_CAP_NATIVE_FENCE_FD:
|
||||
return 1;
|
||||
|
||||
case PIPE_CAP_MAX_RENDER_TARGETS:
|
||||
@ -742,6 +743,16 @@ panfrost_fence_reference(struct pipe_screen *pscreen,
|
||||
*ptr = fence;
|
||||
}
|
||||
|
||||
static int
|
||||
panfrost_fence_get_fd(struct pipe_screen *_screen,
|
||||
struct pipe_fence_handle *fence)
|
||||
{
|
||||
struct panfrost_device *dev = pan_device(_screen);
|
||||
int fd = -1;
|
||||
drmSyncobjExportSyncFile(dev->fd, fence->syncobj, &fd);
|
||||
return fd;
|
||||
}
|
||||
|
||||
static bool
|
||||
panfrost_fence_finish(struct pipe_screen *pscreen,
|
||||
struct pipe_context *ctx,
|
||||
@ -879,6 +890,7 @@ panfrost_create_screen(int fd, struct renderonly *ro)
|
||||
screen->base.context_create = panfrost_create_context;
|
||||
screen->base.get_compiler_options = panfrost_screen_get_compiler_options;
|
||||
screen->base.fence_reference = panfrost_fence_reference;
|
||||
screen->base.fence_get_fd = panfrost_fence_get_fd;
|
||||
screen->base.fence_finish = panfrost_fence_finish;
|
||||
screen->base.set_damage_region = panfrost_resource_set_damage_region;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user