Lines Matching refs:cmd
500 } *cmd; in vmw_binding_scrub_shader() local
502 cmd = vmw_fifo_reserve(dev_priv, sizeof(*cmd)); in vmw_binding_scrub_shader()
503 if (unlikely(cmd == NULL)) { in vmw_binding_scrub_shader()
509 cmd->header.id = SVGA_3D_CMD_SET_SHADER; in vmw_binding_scrub_shader()
510 cmd->header.size = sizeof(cmd->body); in vmw_binding_scrub_shader()
511 cmd->body.cid = bi->ctx->id; in vmw_binding_scrub_shader()
512 cmd->body.type = binding->shader_slot + SVGA3D_SHADERTYPE_MIN; in vmw_binding_scrub_shader()
513 cmd->body.shid = ((rebind) ? bi->res->id : SVGA3D_INVALID_ID); in vmw_binding_scrub_shader()
514 vmw_fifo_commit(dev_priv, sizeof(*cmd)); in vmw_binding_scrub_shader()
535 } *cmd; in vmw_binding_scrub_render_target() local
537 cmd = vmw_fifo_reserve(dev_priv, sizeof(*cmd)); in vmw_binding_scrub_render_target()
538 if (unlikely(cmd == NULL)) { in vmw_binding_scrub_render_target()
544 cmd->header.id = SVGA_3D_CMD_SETRENDERTARGET; in vmw_binding_scrub_render_target()
545 cmd->header.size = sizeof(cmd->body); in vmw_binding_scrub_render_target()
546 cmd->body.cid = bi->ctx->id; in vmw_binding_scrub_render_target()
547 cmd->body.type = binding->slot; in vmw_binding_scrub_render_target()
548 cmd->body.target.sid = ((rebind) ? bi->res->id : SVGA3D_INVALID_ID); in vmw_binding_scrub_render_target()
549 cmd->body.target.face = 0; in vmw_binding_scrub_render_target()
550 cmd->body.target.mipmap = 0; in vmw_binding_scrub_render_target()
551 vmw_fifo_commit(dev_priv, sizeof(*cmd)); in vmw_binding_scrub_render_target()
577 } *cmd; in vmw_binding_scrub_texture() local
579 cmd = vmw_fifo_reserve(dev_priv, sizeof(*cmd)); in vmw_binding_scrub_texture()
580 if (unlikely(cmd == NULL)) { in vmw_binding_scrub_texture()
586 cmd->header.id = SVGA_3D_CMD_SETTEXTURESTATE; in vmw_binding_scrub_texture()
587 cmd->header.size = sizeof(cmd->body); in vmw_binding_scrub_texture()
588 cmd->body.c.cid = bi->ctx->id; in vmw_binding_scrub_texture()
589 cmd->body.s1.stage = binding->texture_stage; in vmw_binding_scrub_texture()
590 cmd->body.s1.name = SVGA3D_TS_BIND_TEXTURE; in vmw_binding_scrub_texture()
591 cmd->body.s1.value = ((rebind) ? bi->res->id : SVGA3D_INVALID_ID); in vmw_binding_scrub_texture()
592 vmw_fifo_commit(dev_priv, sizeof(*cmd)); in vmw_binding_scrub_texture()
611 } *cmd; in vmw_binding_scrub_dx_shader() local
613 cmd = vmw_fifo_reserve_dx(dev_priv, sizeof(*cmd), bi->ctx->id); in vmw_binding_scrub_dx_shader()
614 if (unlikely(cmd == NULL)) { in vmw_binding_scrub_dx_shader()
619 cmd->header.id = SVGA_3D_CMD_DX_SET_SHADER; in vmw_binding_scrub_dx_shader()
620 cmd->header.size = sizeof(cmd->body); in vmw_binding_scrub_dx_shader()
621 cmd->body.type = binding->shader_slot + SVGA3D_SHADERTYPE_MIN; in vmw_binding_scrub_dx_shader()
622 cmd->body.shaderId = ((rebind) ? bi->res->id : SVGA3D_INVALID_ID); in vmw_binding_scrub_dx_shader()
623 vmw_fifo_commit(dev_priv, sizeof(*cmd)); in vmw_binding_scrub_dx_shader()
642 } *cmd; in vmw_binding_scrub_cb() local
644 cmd = vmw_fifo_reserve_dx(dev_priv, sizeof(*cmd), bi->ctx->id); in vmw_binding_scrub_cb()
645 if (unlikely(cmd == NULL)) { in vmw_binding_scrub_cb()
651 cmd->header.id = SVGA_3D_CMD_DX_SET_SINGLE_CONSTANT_BUFFER; in vmw_binding_scrub_cb()
652 cmd->header.size = sizeof(cmd->body); in vmw_binding_scrub_cb()
653 cmd->body.slot = binding->slot; in vmw_binding_scrub_cb()
654 cmd->body.type = binding->shader_slot + SVGA3D_SHADERTYPE_MIN; in vmw_binding_scrub_cb()
656 cmd->body.offsetInBytes = binding->offset; in vmw_binding_scrub_cb()
657 cmd->body.sizeInBytes = binding->size; in vmw_binding_scrub_cb()
658 cmd->body.sid = bi->res->id; in vmw_binding_scrub_cb()
660 cmd->body.offsetInBytes = 0; in vmw_binding_scrub_cb()
661 cmd->body.sizeInBytes = 0; in vmw_binding_scrub_cb()
662 cmd->body.sid = SVGA3D_INVALID_ID; in vmw_binding_scrub_cb()
664 vmw_fifo_commit(dev_priv, sizeof(*cmd)); in vmw_binding_scrub_cb()
759 } *cmd; in vmw_emit_set_sr() local
770 cmd_size = sizeof(*cmd) + view_id_size; in vmw_emit_set_sr()
771 cmd = vmw_fifo_reserve_dx(ctx->dev_priv, cmd_size, ctx->id); in vmw_emit_set_sr()
772 if (unlikely(cmd == NULL)) { in vmw_emit_set_sr()
778 cmd->header.id = SVGA_3D_CMD_DX_SET_SHADER_RESOURCES; in vmw_emit_set_sr()
779 cmd->header.size = sizeof(cmd->body) + view_id_size; in vmw_emit_set_sr()
780 cmd->body.type = shader_slot + SVGA3D_SHADERTYPE_MIN; in vmw_emit_set_sr()
781 cmd->body.startView = cbs->bind_first_slot; in vmw_emit_set_sr()
783 memcpy(&cmd[1], cbs->bind_cmd_buffer, view_id_size); in vmw_emit_set_sr()
803 } *cmd; in vmw_emit_set_rt() local
809 cmd_size = sizeof(*cmd) + view_id_size; in vmw_emit_set_rt()
810 cmd = vmw_fifo_reserve_dx(ctx->dev_priv, cmd_size, ctx->id); in vmw_emit_set_rt()
811 if (unlikely(cmd == NULL)) { in vmw_emit_set_rt()
817 cmd->header.id = SVGA_3D_CMD_DX_SET_RENDERTARGETS; in vmw_emit_set_rt()
818 cmd->header.size = sizeof(cmd->body) + view_id_size; in vmw_emit_set_rt()
821 cmd->body.depthStencilViewId = cbs->ds_view.bi.res->id; in vmw_emit_set_rt()
823 cmd->body.depthStencilViewId = SVGA3D_INVALID_ID; in vmw_emit_set_rt()
825 memcpy(&cmd[1], cbs->bind_cmd_buffer, view_id_size); in vmw_emit_set_rt()
887 } *cmd; in vmw_emit_set_so() local
896 cmd_size = sizeof(*cmd) + so_target_size; in vmw_emit_set_so()
897 cmd = vmw_fifo_reserve_dx(ctx->dev_priv, cmd_size, ctx->id); in vmw_emit_set_so()
898 if (unlikely(cmd == NULL)) { in vmw_emit_set_so()
904 cmd->header.id = SVGA_3D_CMD_DX_SET_SOTARGETS; in vmw_emit_set_so()
905 cmd->header.size = sizeof(cmd->body) + so_target_size; in vmw_emit_set_so()
906 memcpy(&cmd[1], cbs->bind_cmd_buffer, so_target_size); in vmw_emit_set_so()
1003 } *cmd; in vmw_emit_set_vb() local
1013 cmd_size = sizeof(*cmd) + set_vb_size; in vmw_emit_set_vb()
1014 cmd = vmw_fifo_reserve_dx(ctx->dev_priv, cmd_size, ctx->id); in vmw_emit_set_vb()
1015 if (unlikely(cmd == NULL)) { in vmw_emit_set_vb()
1021 cmd->header.id = SVGA_3D_CMD_DX_SET_VERTEX_BUFFERS; in vmw_emit_set_vb()
1022 cmd->header.size = sizeof(cmd->body) + set_vb_size; in vmw_emit_set_vb()
1023 cmd->body.startBuffer = cbs->bind_first_slot; in vmw_emit_set_vb()
1025 memcpy(&cmd[1], cbs->bind_cmd_buffer, set_vb_size); in vmw_emit_set_vb()
1168 } *cmd; in vmw_binding_scrub_ib() local
1170 cmd = vmw_fifo_reserve_dx(dev_priv, sizeof(*cmd), bi->ctx->id); in vmw_binding_scrub_ib()
1171 if (unlikely(cmd == NULL)) { in vmw_binding_scrub_ib()
1176 cmd->header.id = SVGA_3D_CMD_DX_SET_INDEX_BUFFER; in vmw_binding_scrub_ib()
1177 cmd->header.size = sizeof(cmd->body); in vmw_binding_scrub_ib()
1179 cmd->body.sid = bi->res->id; in vmw_binding_scrub_ib()
1180 cmd->body.format = binding->format; in vmw_binding_scrub_ib()
1181 cmd->body.offset = binding->offset; in vmw_binding_scrub_ib()
1183 cmd->body.sid = SVGA3D_INVALID_ID; in vmw_binding_scrub_ib()
1184 cmd->body.format = 0; in vmw_binding_scrub_ib()
1185 cmd->body.offset = 0; in vmw_binding_scrub_ib()
1188 vmw_fifo_commit(dev_priv, sizeof(*cmd)); in vmw_binding_scrub_ib()