/third_party/mesa3d/src/gallium/winsys/svga/drm/ |
D | vmw_screen_pools.c | 41 vmw_pools_cleanup(struct vmw_winsys_screen *vws) in vmw_pools_cleanup() argument 43 if (vws->pools.mob_shader_slab_fenced) in vmw_pools_cleanup() 44 vws->pools.mob_shader_slab_fenced->destroy in vmw_pools_cleanup() 45 (vws->pools.mob_shader_slab_fenced); in vmw_pools_cleanup() 46 if (vws->pools.mob_shader_slab) in vmw_pools_cleanup() 47 vws->pools.mob_shader_slab->destroy(vws->pools.mob_shader_slab); in vmw_pools_cleanup() 48 if (vws->pools.mob_fenced) in vmw_pools_cleanup() 49 vws->pools.mob_fenced->destroy(vws->pools.mob_fenced); in vmw_pools_cleanup() 50 if (vws->pools.mob_cache) in vmw_pools_cleanup() 51 vws->pools.mob_cache->destroy(vws->pools.mob_cache); in vmw_pools_cleanup() [all …]
|
D | vmw_screen.c | 67 vmw_winsys_screen_init_mksstat(struct vmw_winsys_screen *vws) in vmw_winsys_screen_init_mksstat() argument 71 for (i = 0; i < ARRAY_SIZE(vws->mksstat_tls); ++i) { in vmw_winsys_screen_init_mksstat() 72 vws->mksstat_tls[i].stat_pages = NULL; in vmw_winsys_screen_init_mksstat() 73 vws->mksstat_tls[i].stat_id = -1UL; in vmw_winsys_screen_init_mksstat() 74 vws->mksstat_tls[i].pid = 0; in vmw_winsys_screen_init_mksstat() 82 vmw_winsys_screen_deinit_mksstat(struct vmw_winsys_screen *vws) in vmw_winsys_screen_deinit_mksstat() argument 86 for (i = 0; i < ARRAY_SIZE(vws->mksstat_tls); ++i) { in vmw_winsys_screen_deinit_mksstat() 87 uint32_t expected = __atomic_load_n(&vws->mksstat_tls[i].pid, __ATOMIC_ACQUIRE); in vmw_winsys_screen_deinit_mksstat() 97 …if (__atomic_compare_exchange_n(&vws->mksstat_tls[i].pid, &expected, 0, false, __ATOMIC_ACQ_REL, _… in vmw_winsys_screen_deinit_mksstat() 99 .id = vws->mksstat_tls[i].stat_id in vmw_winsys_screen_deinit_mksstat() [all …]
|
D | vmw_screen_svga.c | 214 vmw_svga_winsys_add_stats(struct vmw_winsys_screen *vws, int slot) in vmw_svga_winsys_add_stats() argument 276 snprintf(desc, sizeof(desc) - 1, "vmw_winsys_screen=%p pid=%d", vws, gettid()); in vmw_svga_winsys_add_stats() 288 if (drmCommandWriteRead(vws->ioctl.drm_fd, DRM_VMW_MKSSTAT_ADD, &arg, sizeof(arg))) { in vmw_svga_winsys_add_stats() 295 vws->mksstat_tls[slot].stat_pages = area; in vmw_svga_winsys_add_stats() 296 vws->mksstat_tls[slot].stat_id = id; in vmw_svga_winsys_add_stats() 309 vmw_winsys_screen_mksstat_acq_slot(struct vmw_winsys_screen *vws) in vmw_winsys_screen_mksstat_acq_slot() argument 312 const size_t base = (size_t)pid % ARRAY_SIZE(vws->mksstat_tls); in vmw_winsys_screen_mksstat_acq_slot() 315 if (mksstat_tls_global && vmw_winsys_screen(mksstat_tls_global->sws) == vws) { in vmw_winsys_screen_mksstat_acq_slot() 318 …if (__atomic_compare_exchange_n(&vws->mksstat_tls[slot].pid, &expecpid, -1U, false, __ATOMIC_ACQ_R… in vmw_winsys_screen_mksstat_acq_slot() 322 for (i = 0; i < ARRAY_SIZE(vws->mksstat_tls); ++i) { in vmw_winsys_screen_mksstat_acq_slot() [all …]
|
D | vmw_screen_ioctl.c | 84 vmw_ioctl_context_create(struct vmw_winsys_screen *vws) in vmw_ioctl_context_create() argument 91 ret = drmCommandRead(vws->ioctl.drm_fd, DRM_VMW_CREATE_CONTEXT, in vmw_ioctl_context_create() 102 vmw_ioctl_extended_context_create(struct vmw_winsys_screen *vws, in vmw_ioctl_extended_context_create() argument 111 ret = drmCommandWriteRead(vws->ioctl.drm_fd, in vmw_ioctl_extended_context_create() 123 vmw_ioctl_context_destroy(struct vmw_winsys_screen *vws, uint32 cid) in vmw_ioctl_context_destroy() argument 132 (void)drmCommandWrite(vws->ioctl.drm_fd, DRM_VMW_UNREF_CONTEXT, in vmw_ioctl_context_destroy() 138 vmw_ioctl_surface_create(struct vmw_winsys_screen *vws, in vmw_ioctl_surface_create() argument 187 ret = drmCommandWriteRead(vws->ioctl.drm_fd, DRM_VMW_CREATE_SURFACE, in vmw_ioctl_surface_create() 200 vmw_ioctl_gb_surface_create(struct vmw_winsys_screen *vws, in vmw_ioctl_gb_surface_create() argument 231 if (vws->ioctl.have_drm_2_15) { in vmw_ioctl_gb_surface_create() [all …]
|
D | vmw_screen.h | 140 vmw_ioctl_context_create(struct vmw_winsys_screen *vws); 143 vmw_ioctl_extended_context_create(struct vmw_winsys_screen *vws, 147 vmw_ioctl_context_destroy(struct vmw_winsys_screen *vws, 151 vmw_ioctl_surface_create(struct vmw_winsys_screen *vws, 160 vmw_ioctl_gb_surface_create(struct vmw_winsys_screen *vws, 174 vmw_ioctl_gb_surface_ref(struct vmw_winsys_screen *vws, 183 vmw_ioctl_surface_destroy(struct vmw_winsys_screen *vws, 187 vmw_ioctl_command(struct vmw_winsys_screen *vws, 197 vmw_ioctl_region_create(struct vmw_winsys_screen *vws, uint32_t size); 212 vmw_ioctl_fence_finish(struct vmw_winsys_screen *vws, [all …]
|
D | vmw_fence.c | 43 struct vmw_winsys_screen *vws; member 253 vmw_fence_reference(struct vmw_winsys_screen *vws, in vmw_fence_reference() argument 261 struct vmw_fence_ops *ops = vmw_fence_ops(vws->fence_ops); in vmw_fence_reference() 264 vmw_ioctl_fence_unref(vws, vfence->handle); in vmw_fence_reference() 296 vmw_fence_signalled(struct vmw_winsys_screen *vws, in vmw_fence_signalled() argument 322 ret = vmw_ioctl_fence_signalled(vws, vfence->handle, vflags); in vmw_fence_signalled() 345 vmw_fence_finish(struct vmw_winsys_screen *vws, in vmw_fence_finish() argument 375 ret = vmw_ioctl_fence_finish(vws, vfence->handle, vflags); in vmw_fence_finish() 417 struct vmw_winsys_screen *vws = vmw_fence_ops(ops)->vws; in vmw_fence_ops_fence_reference() local 419 vmw_fence_reference(vws, ptr, fence); in vmw_fence_ops_fence_reference() [all …]
|
D | vmw_screen_dri.c | 97 struct vmw_winsys_screen *vws; in svga_drm_winsys_screen_create() local 114 vws = vmw_winsys_create(fd); in svga_drm_winsys_screen_create() 115 if (!vws) in svga_drm_winsys_screen_create() 119 vws->base.surface_from_handle = vws->base.have_gb_objects ? in svga_drm_winsys_screen_create() 121 vws->base.surface_get_handle = vmw_drm_surface_get_handle; in svga_drm_winsys_screen_create() 123 return &vws->base; in svga_drm_winsys_screen_create() 148 struct vmw_winsys_screen *vws = vmw_winsys_screen(sws); in vmw_drm_gb_surface_from_handle() local 152 struct pb_manager *provider = vws->pools.gmr; in vmw_drm_gb_surface_from_handle() 163 ret = vmw_ioctl_gb_surface_ref(vws, whandle, &flags, format, in vmw_drm_gb_surface_from_handle() 186 vsrf->screen = vws; in vmw_drm_gb_surface_from_handle() [all …]
|
D | vmw_surface.c | 46 struct vmw_winsys_screen *vws = vsrf->screen; in vmw_svga_winsys_surface_init() local 53 data = vmw_svga_winsys_buffer_map(&vws->base, vsrf->buf, pb_flags); in vmw_svga_winsys_surface_init() 57 provider = vws->pools.mob_fenced; in vmw_svga_winsys_surface_init() 65 data = vmw_svga_winsys_buffer_map(&vws->base, vbuf, pb_flags); in vmw_svga_winsys_surface_init() 69 vmw_svga_winsys_buffer_destroy(&vws->base, vsrf->buf); in vmw_svga_winsys_surface_init() 73 vmw_svga_winsys_buffer_destroy(&vws->base, vbuf); in vmw_svga_winsys_surface_init() 112 struct vmw_winsys_screen *vws = vsrf->screen; in vmw_svga_winsys_surface_map() local 162 data = vmw_svga_winsys_buffer_map(&vws->base, vsrf->buf, in vmw_svga_winsys_surface_map() 171 provider = vws->pools.mob_fenced; in vmw_svga_winsys_surface_map() 179 data = vmw_svga_winsys_buffer_map(&vws->base, vbuf, pb_flags); in vmw_svga_winsys_surface_map() [all …]
|
D | vmw_context.c | 98 struct vmw_winsys_screen *vws; member 183 struct vmw_winsys_screen *vws = vswc->vws; in vmw_swc_flush() local 200 mtx_lock(&vws->cs_mutex); in vmw_swc_flush() 204 cnd_wait(&vws->cs_cond, &vws->cs_mutex); in vmw_swc_flush() 208 cnd_broadcast(&vws->cs_cond); in vmw_swc_flush() 210 mtx_unlock(&vws->cs_mutex); in vmw_swc_flush() 239 vmw_ioctl_command(vws, in vmw_swc_flush() 249 mtx_lock(&vws->cs_mutex); in vmw_swc_flush() 250 cnd_broadcast(&vws->cs_cond); in vmw_swc_flush() 251 mtx_unlock(&vws->cs_mutex); in vmw_swc_flush() [all …]
|
D | vmw_buffer.c | 86 struct vmw_winsys_screen *vws; member 110 assert(buf->mgr->vws->cache_maps); in vmw_gmr_buffer_destroy() 163 if (!--buf->map_count && !buf->mgr->vws->cache_maps) { in vmw_gmr_buffer_unmap() 215 struct vmw_winsys_screen *vws = mgr->vws; in vmw_gmr_bufmgr_create_buffer() local 233 buf->region = vmw_ioctl_region_create(vws, size); in vmw_gmr_bufmgr_create_buffer() 262 vmw_gmr_bufmgr_create(struct vmw_winsys_screen *vws) in vmw_gmr_bufmgr_create() argument 274 mgr->vws = vws; in vmw_gmr_bufmgr_create()
|
D | vmw_fence.h | 44 vmw_fence_finish(struct vmw_winsys_screen *vws, 53 vmw_fence_signalled(struct vmw_winsys_screen *vws, 57 vmw_fence_reference(struct vmw_winsys_screen *vws, 62 vmw_fence_ops_create(struct vmw_winsys_screen *vws);
|
/third_party/mesa3d/src/gallium/winsys/virgl/vtest/ |
D | virgl_vtest_socket.c | 118 static int virgl_vtest_send_init(struct virgl_vtest_winsys *vws) in virgl_vtest_send_init() argument 140 virgl_block_write(vws->sock_fd, &buf, sizeof(buf)); in virgl_vtest_send_init() 141 virgl_block_write(vws->sock_fd, (void *)cmdline, strlen(cmdline) + 1); in virgl_vtest_send_init() 145 static int virgl_vtest_negotiate_version(struct virgl_vtest_winsys *vws) in virgl_vtest_negotiate_version() argument 155 virgl_block_write(vws->sock_fd, &vtest_hdr, sizeof(vtest_hdr)); in virgl_vtest_negotiate_version() 161 virgl_block_write(vws->sock_fd, &vtest_hdr, sizeof(vtest_hdr)); in virgl_vtest_negotiate_version() 162 virgl_block_write(vws->sock_fd, &busy_wait_buf, sizeof(busy_wait_buf)); in virgl_vtest_negotiate_version() 164 ret = virgl_block_read(vws->sock_fd, vtest_hdr, sizeof(vtest_hdr)); in virgl_vtest_negotiate_version() 169 ret = virgl_block_read(vws->sock_fd, vtest_hdr, sizeof(vtest_hdr)); in virgl_vtest_negotiate_version() 171 ret = virgl_block_read(vws->sock_fd, busy_wait_result, sizeof(busy_wait_result)); in virgl_vtest_negotiate_version() [all …]
|
D | virgl_vtest_winsys.c | 39 static void *virgl_vtest_resource_map(struct virgl_winsys *vws, 41 static void virgl_vtest_resource_unmap(struct virgl_winsys *vws, 78 virgl_vtest_transfer_put(struct virgl_winsys *vws, in virgl_vtest_transfer_put() argument 84 struct virgl_vtest_winsys *vtws = virgl_vtest_winsys(vws); in virgl_vtest_transfer_put() 99 ptr = virgl_vtest_resource_map(vws, res); in virgl_vtest_transfer_put() 101 virgl_vtest_resource_unmap(vws, res); in virgl_vtest_transfer_put() 106 virgl_vtest_transfer_get_internal(struct virgl_winsys *vws, in virgl_vtest_transfer_get_internal() argument 113 struct virgl_vtest_winsys *vtws = virgl_vtest_winsys(vws); in virgl_vtest_transfer_get_internal() 142 ptr = virgl_vtest_resource_map(vws, res); in virgl_vtest_transfer_get_internal() 149 virgl_vtest_resource_unmap(vws, res); in virgl_vtest_transfer_get_internal() [all …]
|
D | virgl_vtest_winsys.h | 106 int virgl_vtest_connect(struct virgl_vtest_winsys *vws); 107 int virgl_vtest_send_get_caps(struct virgl_vtest_winsys *vws, 110 int virgl_vtest_send_resource_create(struct virgl_vtest_winsys *vws, 124 int virgl_vtest_send_resource_unref(struct virgl_vtest_winsys *vws, 129 int virgl_vtest_send_transfer_get(struct virgl_vtest_winsys *vws, 137 int virgl_vtest_send_transfer_put(struct virgl_vtest_winsys *vws, 145 int virgl_vtest_send_transfer_put_data(struct virgl_vtest_winsys *vws, 148 int virgl_vtest_recv_transfer_get_data(struct virgl_vtest_winsys *vws, 155 int virgl_vtest_busy_wait(struct virgl_vtest_winsys *vws, int handle,
|
/third_party/mesa3d/src/gallium/drivers/virgl/ |
D | virgl_staging_mgr.c | 37 struct virgl_winsys *vws = staging->vws; in virgl_staging_alloc_buffer() local 42 vws->resource_reference(vws, &staging->hw_res, NULL); in virgl_staging_alloc_buffer() 48 staging->hw_res = vws->resource_create(vws, in virgl_staging_alloc_buffer() 64 staging->map = vws->resource_map(vws, staging->hw_res); in virgl_staging_alloc_buffer() 66 vws->resource_reference(vws, &staging->hw_res, NULL); in virgl_staging_alloc_buffer() 82 staging->vws = virgl_screen(pipe->screen)->vws; in virgl_staging_init() 89 struct virgl_winsys *vws = staging->vws; in virgl_staging_destroy() local 90 vws->resource_reference(vws, &staging->hw_res, NULL); in virgl_staging_destroy() 101 struct virgl_winsys *vws = staging->vws; in virgl_staging_alloc() local 115 vws->resource_reference(vws, outbuf, NULL); in virgl_staging_alloc() [all …]
|
D | virgl_winsys.h | 53 void (*destroy)(struct virgl_winsys *vws); 55 int (*transfer_put)(struct virgl_winsys *vws, 61 int (*transfer_get)(struct virgl_winsys *vws, 67 struct virgl_hw_res *(*resource_create)(struct virgl_winsys *vws, 80 void *(*resource_map)(struct virgl_winsys *vws, struct virgl_hw_res *res); 81 void (*resource_wait)(struct virgl_winsys *vws, struct virgl_hw_res *res); 82 boolean (*resource_is_busy)(struct virgl_winsys *vws, 85 struct virgl_hw_res *(*resource_create_from_handle)(struct virgl_winsys *vws, 92 void (*resource_set_type)(struct virgl_winsys *vws, 101 boolean (*resource_get_handle)(struct virgl_winsys *vws, [all …]
|
D | virgl_resource.c | 118 struct virgl_winsys *vws = virgl_screen(vctx->base.screen)->vws; in virgl_res_needs_flush() local 124 if (!vws->res_is_referenced(vws, vctx->cbuf, res->hw_res)) in virgl_res_needs_flush() 159 struct virgl_winsys *vws = vs->vws; in virgl_resource_transfer_prepare() local 226 wait = (flush || vws->resource_is_busy(vws, res->hw_res)); in virgl_resource_transfer_prepare() 275 (readback || (wait && vws->resource_is_busy(vws, res->hw_res)))) in virgl_resource_transfer_prepare() 283 vws->resource_wait(vws, res->hw_res); in virgl_resource_transfer_prepare() 284 vws->transfer_get(vws, res->hw_res, &xfer->base.box, xfer->base.stride, in virgl_resource_transfer_prepare() 292 vws->resource_wait(vws, res->hw_res); in virgl_resource_transfer_prepare() 413 struct virgl_winsys *vws = vscreen->vws; in virgl_staging_read_map() local 431 vws->resource_wait(vws, vtransfer->copy_src_hw_res); in virgl_staging_read_map() [all …]
|
D | virgl_query.c | 158 host_state = vs->vws->resource_map(vs->vws, query->buf->hw_res); in virgl_end_query() 169 vs->vws->emit_res(vs->vws, vctx->cbuf, query->buf->hw_res, false); in virgl_end_query() 187 if (vs->vws->res_is_referenced(vs->vws, vctx->cbuf, query->buf->hw_res)) in virgl_get_query_result() 191 vs->vws->resource_wait(vs->vws, query->buf->hw_res); in virgl_get_query_result() 192 else if (vs->vws->resource_is_busy(vs->vws, query->buf->hw_res)) in virgl_get_query_result() 195 host_state = vs->vws->resource_map(vs->vws, query->buf->hw_res); in virgl_get_query_result()
|
D | virgl_context.c | 174 struct virgl_winsys *vws = virgl_screen(vctx->base.screen)->vws; in virgl_attach_res_framebuffer() local 183 vws->emit_res(vws, vctx->cbuf, res->hw_res, FALSE); in virgl_attach_res_framebuffer() 192 vws->emit_res(vws, vctx->cbuf, res->hw_res, FALSE); in virgl_attach_res_framebuffer() 202 struct virgl_winsys *vws = virgl_screen(vctx->base.screen)->vws; in virgl_attach_res_sampler_views() local 209 vws->emit_res(vws, vctx->cbuf, res->hw_res, FALSE); in virgl_attach_res_sampler_views() 216 struct virgl_winsys *vws = virgl_screen(vctx->base.screen)->vws; in virgl_attach_res_vertex_buffers() local 223 vws->emit_res(vws, vctx->cbuf, res->hw_res, FALSE); in virgl_attach_res_vertex_buffers() 230 struct virgl_winsys *vws = virgl_screen(vctx->base.screen)->vws; in virgl_attach_res_index_buffer() local 235 vws->emit_res(vws, vctx->cbuf, res->hw_res, FALSE); in virgl_attach_res_index_buffer() 240 struct virgl_winsys *vws = virgl_screen(vctx->base.screen)->vws; in virgl_attach_res_so_targets() local [all …]
|
D | virgl_screen.c | 312 vscreen->vws->supports_coherent && !vscreen->no_coherent; in virgl_get_param() 339 return vscreen->vws->supports_fences; in virgl_get_param() 818 struct virgl_winsys *vws = vscreen->vws; in virgl_flush_frontbuffer() local 822 if (vws->flush_frontbuffer) { in virgl_flush_frontbuffer() 824 vws->flush_frontbuffer(vws, vres->hw_res, level, layer, winsys_drawable_handle, in virgl_flush_frontbuffer() 834 struct virgl_winsys *vws = vscreen->vws; in virgl_fence_reference() local 836 vws->fence_reference(vws, ptr, fence); in virgl_fence_reference() 845 struct virgl_winsys *vws = vscreen->vws; in virgl_fence_finish() local 851 return vws->fence_wait(vws, fence, timeout); in virgl_fence_finish() 858 struct virgl_winsys *vws = vscreen->vws; in virgl_fence_get_fd() local [all …]
|
D | virgl_transfer_queue.c | 187 queue->vs->vws->transfer_put(queue->vs->vws, queued->hw_res, in transfer_put() 248 struct virgl_winsys *vws = queue->vs->vws; in add_internal() local 255 vws->submit_cmd(vws, queue->tbuf, NULL); in add_internal() 276 vs->vws->supports_encoded_transfers) in virgl_transfer_queue_init() 277 queue->tbuf = vs->vws->cmd_buf_create(vs->vws, VIRGL_MAX_TBUF_DWORDS); in virgl_transfer_queue_init() 284 struct virgl_winsys *vws = queue->vs->vws; in virgl_transfer_queue_fini() local 293 vws->cmd_buf_destroy(queue->tbuf); in virgl_transfer_queue_fini()
|
D | virgl_texture.c | 182 struct virgl_winsys *vws = virgl_screen(ctx->screen)->vws; in texture_transfer_map_resolve() local 184 ptr = vws->resource_map(vws, vtex->hw_res); in texture_transfer_map_resolve() 251 struct virgl_winsys *vws = virgl_screen(ctx->screen)->vws; in flush_data() local 252 vws->transfer_put(vws, trans->hw_res, box, in flush_data()
|
D | virgl_streamout.c | 81 struct virgl_winsys *vws = virgl_screen(vctx->base.screen)->vws; in virgl_set_so_targets() local 86 vws->emit_res(vws, vctx->cbuf, res->hw_res, FALSE); in virgl_set_so_targets()
|
/third_party/mesa3d/src/gallium/drivers/virgl/tests/ |
D | virgl_staging_mgr_test.cpp | 44 fake_resource_create(struct virgl_winsys *vws, in fake_resource_create() argument 66 fake_resource_reference(struct virgl_winsys *vws, in fake_resource_reference() argument 81 fake_resource_map(struct virgl_winsys *vws, struct virgl_hw_res *hw_res) in fake_resource_map() argument 91 struct virgl_winsys *vws = CALLOC_STRUCT(virgl_winsys); in fake_virgl_context_create() local 94 vs->vws = vws; in fake_virgl_context_create() 96 vs->vws->resource_create = fake_resource_create; in fake_virgl_context_create() 97 vs->vws->resource_reference = fake_resource_reference; in fake_virgl_context_create() 98 vs->vws->resource_map = fake_resource_map; in fake_virgl_context_create() 109 FREE(vs->vws); in fake_virgl_context_destroy() 318 failing_resource_create(struct virgl_winsys *vws, in failing_resource_create() argument [all …]
|
/third_party/mesa3d/src/gallium/winsys/virgl/drm/ |
D | virgl_drm_winsys.c | 105 static boolean virgl_drm_resource_is_busy(struct virgl_winsys *vws, in virgl_drm_resource_is_busy() argument 108 struct virgl_drm_winsys *vdws = virgl_drm_winsys(vws); in virgl_drm_resource_is_busy() 345 virgl_bo_transfer_put(struct virgl_winsys *vws, in virgl_bo_transfer_put() argument 351 struct virgl_drm_winsys *vdws = virgl_drm_winsys(vws); in virgl_bo_transfer_put() 374 virgl_bo_transfer_get(struct virgl_winsys *vws, in virgl_bo_transfer_get() argument 380 struct virgl_drm_winsys *vdws = virgl_drm_winsys(vws); in virgl_bo_transfer_get() 883 virgl_drm_fence_create(struct virgl_winsys *vws, int fd, bool external) in virgl_drm_fence_create() argument 887 assert(vws->supports_fences); in virgl_drm_fence_create() 910 virgl_drm_fence_create_legacy(struct virgl_winsys *vws) in virgl_drm_fence_create_legacy() argument 914 assert(!vws->supports_fences); in virgl_drm_fence_create_legacy() [all …]
|