Lines Matching refs:cmd
775 } *cmd; in vmw_rebind_all_dx_query() local
783 cmd = vmw_fifo_reserve_dx(dev_priv, sizeof(*cmd), ctx_res->id); in vmw_rebind_all_dx_query()
785 if (cmd == NULL) { in vmw_rebind_all_dx_query()
790 cmd->header.id = SVGA_3D_CMD_DX_BIND_ALL_QUERY; in vmw_rebind_all_dx_query()
791 cmd->header.size = sizeof(cmd->body); in vmw_rebind_all_dx_query()
792 cmd->body.cid = ctx_res->id; in vmw_rebind_all_dx_query()
793 cmd->body.mobid = dx_query_mob->base.mem.start; in vmw_rebind_all_dx_query()
794 vmw_fifo_commit(dev_priv, sizeof(*cmd)); in vmw_rebind_all_dx_query()
914 } *cmd; in vmw_cmd_cid_check() local
916 cmd = container_of(header, struct vmw_cid_cmd, header); in vmw_cmd_cid_check()
918 user_context_converter, &cmd->cid, NULL); in vmw_cmd_cid_check()
928 } *cmd; in vmw_cmd_set_render_target_check() local
933 cmd = container_of(header, struct vmw_sid_cmd, header); in vmw_cmd_set_render_target_check()
935 if (cmd->body.type >= SVGA3D_RT_MAX) { in vmw_cmd_set_render_target_check()
937 (unsigned) cmd->body.type); in vmw_cmd_set_render_target_check()
942 user_context_converter, &cmd->body.cid, in vmw_cmd_set_render_target_check()
949 &cmd->body.target.sid, &res_node); in vmw_cmd_set_render_target_check()
959 binding.slot = cmd->body.type; in vmw_cmd_set_render_target_check()
974 } *cmd; in vmw_cmd_surface_copy_check() local
977 cmd = container_of(header, struct vmw_sid_cmd, header); in vmw_cmd_surface_copy_check()
981 &cmd->body.src.sid, NULL); in vmw_cmd_surface_copy_check()
987 &cmd->body.dest.sid, NULL); in vmw_cmd_surface_copy_check()
997 } *cmd; in vmw_cmd_buffer_copy_check() local
1000 cmd = container_of(header, typeof(*cmd), header); in vmw_cmd_buffer_copy_check()
1003 &cmd->body.src, NULL); in vmw_cmd_buffer_copy_check()
1009 &cmd->body.dest, NULL); in vmw_cmd_buffer_copy_check()
1019 } *cmd; in vmw_cmd_pred_copy_check() local
1022 cmd = container_of(header, typeof(*cmd), header); in vmw_cmd_pred_copy_check()
1025 &cmd->body.srcSid, NULL); in vmw_cmd_pred_copy_check()
1031 &cmd->body.dstSid, NULL); in vmw_cmd_pred_copy_check()
1041 } *cmd; in vmw_cmd_stretch_blt_check() local
1044 cmd = container_of(header, struct vmw_sid_cmd, header); in vmw_cmd_stretch_blt_check()
1047 &cmd->body.src.sid, NULL); in vmw_cmd_stretch_blt_check()
1052 &cmd->body.dest.sid, NULL); in vmw_cmd_stretch_blt_check()
1062 } *cmd; in vmw_cmd_blt_surf_screen_check() local
1064 cmd = container_of(header, struct vmw_sid_cmd, header); in vmw_cmd_blt_surf_screen_check()
1068 &cmd->body.srcImage.sid, NULL); in vmw_cmd_blt_surf_screen_check()
1078 } *cmd; in vmw_cmd_present_check() local
1081 cmd = container_of(header, struct vmw_sid_cmd, header); in vmw_cmd_present_check()
1084 user_surface_converter, &cmd->body.sid, in vmw_cmd_present_check()
1349 } *cmd; in vmw_cmd_dx_define_query() local
1361 cmd = container_of(header, struct vmw_dx_define_query_cmd, header); in vmw_cmd_dx_define_query()
1363 if (cmd->q.type < SVGA3D_QUERYTYPE_MIN || in vmw_cmd_dx_define_query()
1364 cmd->q.type >= SVGA3D_QUERYTYPE_MAX) in vmw_cmd_dx_define_query()
1368 ret = vmw_cotable_notify(cotable_res, cmd->q.queryId); in vmw_cmd_dx_define_query()
1395 } *cmd; in vmw_cmd_dx_bind_query() local
1401 cmd = container_of(header, struct vmw_dx_bind_query_cmd, header); in vmw_cmd_dx_bind_query()
1407 ret = vmw_translate_mob_ptr(dev_priv, sw_context, &cmd->q.mobid, in vmw_cmd_dx_bind_query()
1437 } *cmd; in vmw_cmd_begin_gb_query() local
1439 cmd = container_of(header, struct vmw_begin_gb_query_cmd, in vmw_cmd_begin_gb_query()
1443 user_context_converter, &cmd->q.cid, in vmw_cmd_begin_gb_query()
1461 } *cmd; in vmw_cmd_begin_query() local
1463 cmd = container_of(header, struct vmw_begin_query_cmd, in vmw_cmd_begin_query()
1472 BUG_ON(sizeof(gb_cmd) != sizeof(*cmd)); in vmw_cmd_begin_query()
1475 gb_cmd.header.size = cmd->header.size; in vmw_cmd_begin_query()
1476 gb_cmd.q.cid = cmd->q.cid; in vmw_cmd_begin_query()
1477 gb_cmd.q.type = cmd->q.type; in vmw_cmd_begin_query()
1479 memcpy(cmd, &gb_cmd, sizeof(*cmd)); in vmw_cmd_begin_query()
1484 user_context_converter, &cmd->q.cid, in vmw_cmd_begin_query()
1503 } *cmd; in vmw_cmd_end_gb_query() local
1506 cmd = container_of(header, struct vmw_query_cmd, header); in vmw_cmd_end_gb_query()
1512 &cmd->q.mobid, in vmw_cmd_end_gb_query()
1538 } *cmd; in vmw_cmd_end_query() local
1541 cmd = container_of(header, struct vmw_query_cmd, header); in vmw_cmd_end_query()
1548 BUG_ON(sizeof(gb_cmd) != sizeof(*cmd)); in vmw_cmd_end_query()
1551 gb_cmd.header.size = cmd->header.size; in vmw_cmd_end_query()
1552 gb_cmd.q.cid = cmd->q.cid; in vmw_cmd_end_query()
1553 gb_cmd.q.type = cmd->q.type; in vmw_cmd_end_query()
1554 gb_cmd.q.mobid = cmd->q.guestResult.gmrId; in vmw_cmd_end_query()
1555 gb_cmd.q.offset = cmd->q.guestResult.offset; in vmw_cmd_end_query()
1557 memcpy(cmd, &gb_cmd, sizeof(*cmd)); in vmw_cmd_end_query()
1566 &cmd->q.guestResult, in vmw_cmd_end_query()
1592 } *cmd; in vmw_cmd_wait_gb_query() local
1595 cmd = container_of(header, struct vmw_query_cmd, header); in vmw_cmd_wait_gb_query()
1601 &cmd->q.mobid, in vmw_cmd_wait_gb_query()
1625 } *cmd; in vmw_cmd_wait_query() local
1628 cmd = container_of(header, struct vmw_query_cmd, header); in vmw_cmd_wait_query()
1635 BUG_ON(sizeof(gb_cmd) != sizeof(*cmd)); in vmw_cmd_wait_query()
1638 gb_cmd.header.size = cmd->header.size; in vmw_cmd_wait_query()
1639 gb_cmd.q.cid = cmd->q.cid; in vmw_cmd_wait_query()
1640 gb_cmd.q.type = cmd->q.type; in vmw_cmd_wait_query()
1641 gb_cmd.q.mobid = cmd->q.guestResult.gmrId; in vmw_cmd_wait_query()
1642 gb_cmd.q.offset = cmd->q.guestResult.offset; in vmw_cmd_wait_query()
1644 memcpy(cmd, &gb_cmd, sizeof(*cmd)); in vmw_cmd_wait_query()
1653 &cmd->q.guestResult, in vmw_cmd_wait_query()
1671 } *cmd; in vmw_cmd_dma() local
1676 cmd = container_of(header, struct vmw_dma_cmd, header); in vmw_cmd_dma()
1677 suffix = (SVGA3dCmdSurfaceDMASuffix *)((unsigned long) &cmd->dma + in vmw_cmd_dma()
1687 &cmd->dma.guest.ptr, in vmw_cmd_dma()
1694 if (unlikely(cmd->dma.guest.ptr.offset > bo_size)) { in vmw_cmd_dma()
1699 bo_size -= cmd->dma.guest.ptr.offset; in vmw_cmd_dma()
1704 user_surface_converter, &cmd->dma.host.sid, in vmw_cmd_dma()
1729 } *cmd; in vmw_cmd_draw() local
1731 (unsigned long)header + sizeof(*cmd)); in vmw_cmd_draw()
1741 cmd = container_of(header, struct vmw_draw_cmd, header); in vmw_cmd_draw()
1742 maxnum = (header->size - sizeof(cmd->body)) / sizeof(*decl); in vmw_cmd_draw()
1744 if (unlikely(cmd->body.numVertexDecls > maxnum)) { in vmw_cmd_draw()
1749 for (i = 0; i < cmd->body.numVertexDecls; ++i, ++decl) { in vmw_cmd_draw()
1757 maxnum = (header->size - sizeof(cmd->body) - in vmw_cmd_draw()
1758 cmd->body.numVertexDecls * sizeof(*decl)) / sizeof(*range); in vmw_cmd_draw()
1759 if (unlikely(cmd->body.numRanges > maxnum)) { in vmw_cmd_draw()
1765 for (i = 0; i < cmd->body.numRanges; ++i, ++range) { in vmw_cmd_draw()
1783 } *cmd; in vmw_cmd_tex_state() local
1793 cmd = container_of(header, struct vmw_tex_state_cmd, in vmw_cmd_tex_state()
1797 user_context_converter, &cmd->state.cid, in vmw_cmd_tex_state()
1843 } *cmd = buf; in vmw_cmd_check_define_gmrfb() local
1846 &cmd->body.ptr, in vmw_cmd_check_define_gmrfb()
1949 } *cmd; in vmw_cmd_bind_gb_surface() local
1951 cmd = container_of(header, struct vmw_bind_gb_surface_cmd, header); in vmw_cmd_bind_gb_surface()
1955 &cmd->body.sid, &cmd->body.mobid, in vmw_cmd_bind_gb_surface()
1974 } *cmd; in vmw_cmd_update_gb_image() local
1976 cmd = container_of(header, struct vmw_gb_surface_cmd, header); in vmw_cmd_update_gb_image()
1980 &cmd->body.image.sid, NULL); in vmw_cmd_update_gb_image()
1998 } *cmd; in vmw_cmd_update_gb_surface() local
2000 cmd = container_of(header, struct vmw_gb_surface_cmd, header); in vmw_cmd_update_gb_surface()
2004 &cmd->body.sid, NULL); in vmw_cmd_update_gb_surface()
2022 } *cmd; in vmw_cmd_readback_gb_image() local
2024 cmd = container_of(header, struct vmw_gb_surface_cmd, header); in vmw_cmd_readback_gb_image()
2028 &cmd->body.image.sid, NULL); in vmw_cmd_readback_gb_image()
2046 } *cmd; in vmw_cmd_readback_gb_surface() local
2048 cmd = container_of(header, struct vmw_gb_surface_cmd, header); in vmw_cmd_readback_gb_surface()
2052 &cmd->body.sid, NULL); in vmw_cmd_readback_gb_surface()
2070 } *cmd; in vmw_cmd_invalidate_gb_image() local
2072 cmd = container_of(header, struct vmw_gb_surface_cmd, header); in vmw_cmd_invalidate_gb_image()
2076 &cmd->body.image.sid, NULL); in vmw_cmd_invalidate_gb_image()
2094 } *cmd; in vmw_cmd_invalidate_gb_surface() local
2096 cmd = container_of(header, struct vmw_gb_surface_cmd, header); in vmw_cmd_invalidate_gb_surface()
2100 &cmd->body.sid, NULL); in vmw_cmd_invalidate_gb_surface()
2119 } *cmd; in vmw_cmd_shader_define() local
2124 cmd = container_of(header, struct vmw_shader_define_cmd, in vmw_cmd_shader_define()
2128 user_context_converter, &cmd->body.cid, in vmw_cmd_shader_define()
2136 size = cmd->header.size - sizeof(cmd->body); in vmw_cmd_shader_define()
2139 cmd->body.shid, cmd + 1, in vmw_cmd_shader_define()
2140 cmd->body.type, size, in vmw_cmd_shader_define()
2146 NULL, &cmd->header.id - in vmw_cmd_shader_define()
2167 } *cmd; in vmw_cmd_shader_destroy() local
2171 cmd = container_of(header, struct vmw_shader_destroy_cmd, in vmw_cmd_shader_destroy()
2175 user_context_converter, &cmd->body.cid, in vmw_cmd_shader_destroy()
2184 cmd->body.shid, in vmw_cmd_shader_destroy()
2185 cmd->body.type, in vmw_cmd_shader_destroy()
2191 NULL, &cmd->header.id - in vmw_cmd_shader_destroy()
2212 } *cmd; in vmw_cmd_set_shader() local
2218 cmd = container_of(header, struct vmw_set_shader_cmd, in vmw_cmd_set_shader()
2221 if (cmd->body.type >= SVGA3D_SHADERTYPE_PREDX_MAX) { in vmw_cmd_set_shader()
2223 (unsigned) cmd->body.type); in vmw_cmd_set_shader()
2228 user_context_converter, &cmd->body.cid, in vmw_cmd_set_shader()
2236 if (cmd->body.shid != SVGA3D_INVALID_ID) { in vmw_cmd_set_shader()
2238 cmd->body.shid, in vmw_cmd_set_shader()
2239 cmd->body.type); in vmw_cmd_set_shader()
2243 &cmd->body.shid, res, in vmw_cmd_set_shader()
2255 &cmd->body.shid, &res_node); in vmw_cmd_set_shader()
2263 binding.shader_slot = cmd->body.type - SVGA3D_SHADERTYPE_MIN; in vmw_cmd_set_shader()
2284 } *cmd; in vmw_cmd_set_shader_const() local
2287 cmd = container_of(header, struct vmw_set_shader_const_cmd, in vmw_cmd_set_shader_const()
2291 user_context_converter, &cmd->body.cid, in vmw_cmd_set_shader_const()
2317 } *cmd; in vmw_cmd_bind_gb_shader() local
2319 cmd = container_of(header, struct vmw_bind_gb_shader_cmd, in vmw_cmd_bind_gb_shader()
2324 &cmd->body.shid, &cmd->body.mobid, in vmw_cmd_bind_gb_shader()
2325 cmd->body.offsetInBytes); in vmw_cmd_bind_gb_shader()
2344 } *cmd; in vmw_cmd_dx_set_single_constant_buffer() local
2355 cmd = container_of(header, typeof(*cmd), header); in vmw_cmd_dx_set_single_constant_buffer()
2358 &cmd->body.sid, &res_node); in vmw_cmd_dx_set_single_constant_buffer()
2365 binding.shader_slot = cmd->body.type - SVGA3D_SHADERTYPE_MIN; in vmw_cmd_dx_set_single_constant_buffer()
2366 binding.offset = cmd->body.offsetInBytes; in vmw_cmd_dx_set_single_constant_buffer()
2367 binding.size = cmd->body.sizeInBytes; in vmw_cmd_dx_set_single_constant_buffer()
2368 binding.slot = cmd->body.slot; in vmw_cmd_dx_set_single_constant_buffer()
2373 (unsigned) cmd->body.type, in vmw_cmd_dx_set_single_constant_buffer()
2399 } *cmd = container_of(header, typeof(*cmd), header); in vmw_cmd_dx_set_shader_res() local
2400 u32 num_sr_view = (cmd->header.size - sizeof(cmd->body)) / in vmw_cmd_dx_set_shader_res()
2403 if ((u64) cmd->body.startView + (u64) num_sr_view > in vmw_cmd_dx_set_shader_res()
2405 cmd->body.type >= SVGA3D_SHADERTYPE_DX10_MAX) { in vmw_cmd_dx_set_shader_res()
2412 cmd->body.type - SVGA3D_SHADERTYPE_MIN, in vmw_cmd_dx_set_shader_res()
2413 (void *) &cmd[1], num_sr_view, in vmw_cmd_dx_set_shader_res()
2414 cmd->body.startView); in vmw_cmd_dx_set_shader_res()
2432 } *cmd; in vmw_cmd_dx_set_shader() local
2443 cmd = container_of(header, typeof(*cmd), header); in vmw_cmd_dx_set_shader()
2445 if (cmd->body.type >= SVGA3D_SHADERTYPE_DX10_MAX) { in vmw_cmd_dx_set_shader()
2447 (unsigned) cmd->body.type); in vmw_cmd_dx_set_shader()
2451 if (cmd->body.shaderId != SVGA3D_INVALID_ID) { in vmw_cmd_dx_set_shader()
2452 res = vmw_shader_lookup(sw_context->man, cmd->body.shaderId, 0); in vmw_cmd_dx_set_shader()
2466 binding.shader_slot = cmd->body.type - SVGA3D_SHADERTYPE_MIN; in vmw_cmd_dx_set_shader()
2496 } *cmd; in vmw_cmd_dx_set_vertex_buffers() local
2504 cmd = container_of(header, typeof(*cmd), header); in vmw_cmd_dx_set_vertex_buffers()
2505 num = (cmd->header.size - sizeof(cmd->body)) / in vmw_cmd_dx_set_vertex_buffers()
2507 if ((u64)num + (u64)cmd->body.startBuffer > in vmw_cmd_dx_set_vertex_buffers()
2516 &cmd->buf[i].sid, &res_node); in vmw_cmd_dx_set_vertex_buffers()
2523 binding.offset = cmd->buf[i].offset; in vmw_cmd_dx_set_vertex_buffers()
2524 binding.stride = cmd->buf[i].stride; in vmw_cmd_dx_set_vertex_buffers()
2525 binding.slot = i + cmd->body.startBuffer; in vmw_cmd_dx_set_vertex_buffers()
2552 } *cmd; in vmw_cmd_dx_set_index_buffer() local
2560 cmd = container_of(header, typeof(*cmd), header); in vmw_cmd_dx_set_index_buffer()
2563 &cmd->body.sid, &res_node); in vmw_cmd_dx_set_index_buffer()
2570 binding.offset = cmd->body.offset; in vmw_cmd_dx_set_index_buffer()
2571 binding.format = cmd->body.format; in vmw_cmd_dx_set_index_buffer()
2593 } *cmd = container_of(header, typeof(*cmd), header); in vmw_cmd_dx_set_rendertargets() local
2595 u32 num_rt_view = (cmd->header.size - sizeof(cmd->body)) / in vmw_cmd_dx_set_rendertargets()
2605 &cmd->body.depthStencilViewId, 1, 0); in vmw_cmd_dx_set_rendertargets()
2611 (void *)&cmd[1], num_rt_view, 0); in vmw_cmd_dx_set_rendertargets()
2629 } *cmd = container_of(header, typeof(*cmd), header); in vmw_cmd_dx_clear_rendertarget_view() local
2632 cmd->body.renderTargetViewId); in vmw_cmd_dx_clear_rendertarget_view()
2650 } *cmd = container_of(header, typeof(*cmd), header); in vmw_cmd_dx_clear_depthstencil_view() local
2653 cmd->body.depthStencilViewId); in vmw_cmd_dx_clear_depthstencil_view()
2673 } *cmd; in vmw_cmd_dx_view_define() local
2681 cmd = container_of(header, typeof(*cmd), header); in vmw_cmd_dx_view_define()
2684 &cmd->sid, &srf_node); in vmw_cmd_dx_view_define()
2689 ret = vmw_cotable_notify(res, cmd->defined_id); in vmw_cmd_dx_view_define()
2698 cmd->defined_id, in vmw_cmd_dx_view_define()
2723 } *cmd; in vmw_cmd_dx_set_so_targets() local
2731 cmd = container_of(header, typeof(*cmd), header); in vmw_cmd_dx_set_so_targets()
2732 num = (cmd->header.size - sizeof(cmd->body)) / in vmw_cmd_dx_set_so_targets()
2743 &cmd->targets[i].sid, &res_node); in vmw_cmd_dx_set_so_targets()
2750 binding.offset = cmd->targets[i].offset; in vmw_cmd_dx_set_so_targets()
2751 binding.size = cmd->targets[i].sizeInBytes; in vmw_cmd_dx_set_so_targets()
2774 } *cmd; in vmw_cmd_dx_so_define() local
2785 cmd = container_of(header, typeof(*cmd), header); in vmw_cmd_dx_so_define()
2786 ret = vmw_cotable_notify(res, cmd->defined_id); in vmw_cmd_dx_so_define()
2812 } *cmd; in vmw_cmd_dx_check_subresource() local
2814 BUILD_BUG_ON(offsetof(typeof(*cmd), r_body.sid) != in vmw_cmd_dx_check_subresource()
2815 offsetof(typeof(*cmd), sid)); in vmw_cmd_dx_check_subresource()
2816 BUILD_BUG_ON(offsetof(typeof(*cmd), i_body.sid) != in vmw_cmd_dx_check_subresource()
2817 offsetof(typeof(*cmd), sid)); in vmw_cmd_dx_check_subresource()
2818 BUILD_BUG_ON(offsetof(typeof(*cmd), u_body.sid) != in vmw_cmd_dx_check_subresource()
2819 offsetof(typeof(*cmd), sid)); in vmw_cmd_dx_check_subresource()
2821 cmd = container_of(header, typeof(*cmd), header); in vmw_cmd_dx_check_subresource()
2825 &cmd->sid, NULL); in vmw_cmd_dx_check_subresource()
2862 } *cmd = container_of(header, typeof(*cmd), header); in vmw_cmd_dx_view_remove() local
2873 cmd->body.view_id, view_type, in vmw_cmd_dx_view_remove()
2903 } *cmd = container_of(header, typeof(*cmd), header); in vmw_cmd_dx_define_shader() local
2912 ret = vmw_cotable_notify(res, cmd->body.shaderId); in vmw_cmd_dx_define_shader()
2918 cmd->body.shaderId, cmd->body.type, in vmw_cmd_dx_define_shader()
2938 } *cmd = container_of(header, typeof(*cmd), header); in vmw_cmd_dx_destroy_shader() local
2946 ret = vmw_shader_remove(sw_context->man, cmd->body.shaderId, 0, in vmw_cmd_dx_destroy_shader()
2972 } *cmd = container_of(header, typeof(*cmd), header); in vmw_cmd_dx_bind_shader() local
2975 if (cmd->body.cid != SVGA3D_INVALID_ID) { in vmw_cmd_dx_bind_shader()
2978 &cmd->body.cid, &ctx_node); in vmw_cmd_dx_bind_shader()
2990 cmd->body.shid, 0); in vmw_cmd_dx_bind_shader()
3004 &cmd->body.mobid, in vmw_cmd_dx_bind_shader()
3005 cmd->body.offsetInBytes); in vmw_cmd_dx_bind_shader()
3750 void *cmd; in vmw_execbuf_submit_fifo() local
3753 cmd = vmw_fifo_reserve_dx(dev_priv, command_size, in vmw_execbuf_submit_fifo()
3756 cmd = vmw_fifo_reserve(dev_priv, command_size); in vmw_execbuf_submit_fifo()
3757 if (!cmd) { in vmw_execbuf_submit_fifo()
3763 memcpy(cmd, kernel_commands, command_size); in vmw_execbuf_submit_fifo()
3764 vmw_resource_relocations_apply(cmd, &sw_context->res_relocations); in vmw_execbuf_submit_fifo()
3790 void *cmd = vmw_cmdbuf_reserve(dev_priv->cman, command_size, in vmw_execbuf_submit_cmdbuf() local
3794 vmw_resource_relocations_apply(cmd, &sw_context->res_relocations); in vmw_execbuf_submit_cmdbuf()