Lines Matching refs:cmd

109                    uint32 cmd,       // IN
119 header->id = cmd;
122 swc->last_command = cmd;
168 SVGA3dCmdDefineContext *cmd;
170 cmd = SVGA3D_FIFOReserve(swc,
171 SVGA_3D_CMD_CONTEXT_DEFINE, sizeof *cmd, 0);
172 if (!cmd)
175 cmd->cid = swc->cid;
202 SVGA3dCmdDestroyContext *cmd;
204 cmd = SVGA3D_FIFOReserve(swc,
205 SVGA_3D_CMD_CONTEXT_DESTROY, sizeof *cmd, 0);
206 if (!cmd)
209 cmd->cid = swc->cid;
282 SVGA3dCmdDefineSurface *cmd;
284 cmd = SVGA3D_FIFOReserve(swc,
285 SVGA_3D_CMD_SURFACE_DEFINE, sizeof *cmd +
287 if (!cmd)
290 swc->surface_relocation(swc, &cmd->sid, NULL, sid,
292 cmd->surfaceFlags = flags;
293 cmd->format = format;
295 *faces = &cmd->face[0];
296 *mipSizes = (SVGA3dSize*) &cmd[1];
370 SVGA3dCmdDestroySurface *cmd;
372 cmd = SVGA3D_FIFOReserve(swc,
373 SVGA_3D_CMD_SURFACE_DESTROY, sizeof *cmd, 1);
374 if (!cmd)
377 swc->surface_relocation(swc, &cmd->sid, NULL, sid,
436 SVGA3dCmdSurfaceDMA *cmd;
457 cmd = SVGA3D_FIFOReserve(swc,
459 sizeof *cmd + boxesSize + sizeof *pSuffix,
461 if (!cmd)
464 swc->region_relocation(swc, &cmd->guest.ptr, st->hwbuf, 0, region_flags);
465 cmd->guest.pitch = st->base.stride;
467 swc->surface_relocation(swc, &cmd->host.sid, NULL,
469 cmd->host.face = st->slice; /* PIPE_TEX_FACE_* and SVGA3D_CUBEFACE_* match */
470 cmd->host.mipmap = st->base.level;
472 cmd->transfer = transfer;
474 memcpy(&cmd[1], boxes, boxesSize);
476 pSuffix = (SVGA3dCmdSurfaceDMASuffix *)((uint8_t*)cmd + sizeof *cmd + boxesSize);
498 SVGA3dCmdSurfaceDMA *cmd;
519 cmd = SVGA3D_FIFOReserve(swc,
521 sizeof *cmd + sizeof *box + sizeof *pSuffix,
523 if (!cmd)
526 swc->region_relocation(swc, &cmd->guest.ptr, guest, 0, region_flags);
527 cmd->guest.pitch = 0;
529 swc->surface_relocation(swc, &cmd->host.sid,
531 cmd->host.face = 0;
532 cmd->host.mipmap = 0;
534 cmd->transfer = transfer;
536 box = (SVGA3dCopyBox *)&cmd[1];
547 pSuffix = (SVGA3dCmdSurfaceDMASuffix *)((uint8_t*)cmd + sizeof *cmd + sizeof *box);
592 SVGA3dCmdSetRenderTarget *cmd;
594 cmd = SVGA3D_FIFOReserve(swc,
595 SVGA_3D_CMD_SETRENDERTARGET, sizeof *cmd, 1);
596 if (!cmd)
599 cmd->cid = swc->cid;
600 cmd->type = type;
601 surface_to_surfaceid(swc, surface, &cmd->target, SVGA_RELOC_WRITE);
643 SVGA3dCmdDefineShader *cmd;
647 cmd = SVGA3D_FIFOReserve(swc,
648 SVGA_3D_CMD_SHADER_DEFINE, sizeof *cmd + bytecodeLen,
650 if (!cmd)
653 cmd->cid = swc->cid;
654 cmd->shid = shid;
655 cmd->type = type;
656 memcpy(&cmd[1], bytecode, bytecodeLen);
687 SVGA3dCmdDestroyShader *cmd;
689 cmd = SVGA3D_FIFOReserve(swc,
690 SVGA_3D_CMD_SHADER_DESTROY, sizeof *cmd,
692 if (!cmd)
695 cmd->cid = swc->cid;
696 cmd->shid = shid;
697 cmd->type = type;
734 SVGA3dCmdSetShaderConst *cmd;
736 cmd = SVGA3D_FIFOReserve(swc,
737 SVGA_3D_CMD_SET_SHADER_CONST, sizeof *cmd,
739 if (!cmd)
742 cmd->cid = swc->cid;
743 cmd->reg = reg;
744 cmd->type = type;
745 cmd->ctype = ctype;
751 memcpy(&cmd->values, value, sizeof cmd->values);
755 memset(&cmd->values, 0, sizeof cmd->values);
756 cmd->values[0] = *(uint32*)value;
801 SVGA3dCmdSetShaderConst *cmd;
803 cmd = SVGA3D_FIFOReserve(swc,
805 sizeof *cmd + (numRegs - 1) * sizeof cmd->values,
807 if (!cmd)
810 cmd->cid = swc->cid;
811 cmd->reg = reg;
812 cmd->type = type;
813 cmd->ctype = ctype;
815 memcpy(&cmd->values, values, numRegs * sizeof cmd->values);
851 SVGA3dCmdSetShader *cmd;
855 cmd = SVGA3D_FIFOReserve(swc,
856 SVGA_3D_CMD_SET_SHADER, sizeof *cmd,
858 if (!cmd)
861 cmd->cid = swc->cid;
862 cmd->type = type;
863 cmd->shid = shid;
904 SVGA3dCmdClear *cmd;
906 cmd = SVGA3D_FIFOReserve(swc,
908 sizeof *cmd + sizeof **rects * numRects,
910 if (!cmd)
913 cmd->cid = swc->cid;
914 cmd->clearFlag = flags;
915 cmd->color = color;
916 cmd->depth = depth;
917 cmd->stencil = stencil;
918 *rects = (SVGA3dRect*) &cmd[1];
1001 SVGA3dCmdDrawPrimitives *cmd;
1007 cmd = SVGA3D_FIFOReserve(swc,
1009 sizeof *cmd + declSize + rangeSize,
1011 if (!cmd)
1014 cmd->cid = swc->cid;
1015 cmd->numVertexDecls = numVertexDecls;
1016 cmd->numRanges = numRanges;
1018 declArray = (SVGA3dVertexDecl*) &cmd[1];
1062 SVGA3dCmdSurfaceCopy *cmd;
1065 cmd = SVGA3D_FIFOReserve(swc,
1066 SVGA_3D_CMD_SURFACE_COPY, sizeof *cmd + boxesSize,
1068 if (!cmd)
1071 surface_to_surfaceid(swc, src, &cmd->src, SVGA_RELOC_READ);
1072 surface_to_surfaceid(swc, dest, &cmd->dest, SVGA_RELOC_WRITE);
1073 *boxes = (SVGA3dCopyBox*) &cmd[1];
1106 SVGA3dCmdSurfaceStretchBlt *cmd;
1108 cmd = SVGA3D_FIFOReserve(swc,
1109 SVGA_3D_CMD_SURFACE_STRETCHBLT, sizeof *cmd,
1111 if (!cmd)
1114 surface_to_surfaceid(swc, src, &cmd->src, SVGA_RELOC_READ);
1115 surface_to_surfaceid(swc, dest, &cmd->dest, SVGA_RELOC_WRITE);
1116 cmd->boxSrc = *boxSrc;
1117 cmd->boxDest = *boxDest;
1118 cmd->mode = mode;
1147 SVGA3dCmdSetViewport *cmd;
1149 cmd = SVGA3D_FIFOReserve(swc,
1150 SVGA_3D_CMD_SETVIEWPORT, sizeof *cmd,
1152 if (!cmd)
1155 cmd->cid = swc->cid;
1156 cmd->rect = *rect;
1186 SVGA3dCmdSetScissorRect *cmd;
1188 cmd = SVGA3D_FIFOReserve(swc,
1189 SVGA_3D_CMD_SETSCISSORRECT, sizeof *cmd,
1191 if (!cmd)
1194 cmd->cid = swc->cid;
1195 cmd->rect = *rect;
1223 SVGA3dCmdSetClipPlane *cmd;
1225 cmd = SVGA3D_FIFOReserve(swc,
1226 SVGA_3D_CMD_SETCLIPPLANE, sizeof *cmd,
1228 if (!cmd)
1231 cmd->cid = swc->cid;
1232 cmd->index = index;
1233 cmd->plane[0] = plane[0];
1234 cmd->plane[1] = plane[1];
1235 cmd->plane[2] = plane[2];
1236 cmd->plane[3] = plane[3];
1264 SVGA3dCmdSetZRange *cmd;
1266 cmd = SVGA3D_FIFOReserve(swc,
1267 SVGA_3D_CMD_SETZRANGE, sizeof *cmd,
1269 if (!cmd)
1272 cmd->cid = swc->cid;
1273 cmd->zRange.min = zMin;
1274 cmd->zRange.max = zMax;
1311 SVGA3dCmdSetTextureState *cmd;
1313 cmd = SVGA3D_FIFOReserve(swc,
1315 sizeof *cmd + sizeof **states * numStates,
1317 if (!cmd)
1320 cmd->cid = swc->cid;
1321 *states = (SVGA3dTextureState*) &cmd[1];
1357 SVGA3dCmdSetRenderState *cmd;
1359 cmd = SVGA3D_FIFOReserve(swc,
1361 sizeof *cmd + sizeof **states * numStates,
1363 if (!cmd)
1366 cmd->cid = swc->cid;
1367 *states = (SVGA3dRenderState*) &cmd[1];
1393 SVGA3dCmdBeginGBQuery *cmd;
1395 cmd = SVGA3D_FIFOReserve(swc,
1397 sizeof *cmd,
1399 if (!cmd)
1402 cmd->cid = swc->cid;
1403 cmd->type = type;
1431 SVGA3dCmdBeginQuery *cmd;
1436 cmd = SVGA3D_FIFOReserve(swc,
1438 sizeof *cmd,
1440 if (!cmd)
1443 cmd->cid = swc->cid;
1444 cmd->type = type;
1473 SVGA3dCmdEndGBQuery *cmd;
1475 cmd = SVGA3D_FIFOReserve(swc,
1477 sizeof *cmd,
1479 if (!cmd)
1482 cmd->cid = swc->cid;
1483 cmd->type = type;
1485 swc->mob_relocation(swc, &cmd->mobid, &cmd->offset, buffer,
1515 SVGA3dCmdEndQuery *cmd;
1520 cmd = SVGA3D_FIFOReserve(swc,
1522 sizeof *cmd,
1524 if (!cmd)
1527 cmd->cid = swc->cid;
1528 cmd->type = type;
1530 swc->region_relocation(swc, &cmd->guestResult, buffer, 0,
1560 SVGA3dCmdWaitForGBQuery *cmd;
1562 cmd = SVGA3D_FIFOReserve(swc,
1564 sizeof *cmd,
1566 if (!cmd)
1569 cmd->cid = swc->cid;
1570 cmd->type = type;
1572 swc->mob_relocation(swc, &cmd->mobid, &cmd->offset, buffer,
1607 SVGA3dCmdWaitForQuery *cmd;
1612 cmd = SVGA3D_FIFOReserve(swc,
1614 sizeof *cmd,
1616 if (!cmd)
1619 cmd->cid = swc->cid;
1620 cmd->type = type;
1622 swc->region_relocation(swc, &cmd->guestResult, buffer, 0,
1635 SVGA3dCmdBindGBShader *cmd =
1638 sizeof *cmd,
1641 if (!cmd)
1644 swc->shader_relocation(swc, &cmd->shid, &cmd->mobid,
1645 &cmd->offsetInBytes, gbshader, 0);
1658 SVGA3dCmdSetShader *cmd;
1662 cmd = SVGA3D_FIFOReserve(swc,
1664 sizeof *cmd,
1666 if (!cmd)
1669 cmd->cid = swc->cid;
1670 cmd->type = type;
1672 swc->shader_relocation(swc, &cmd->shid, NULL, NULL, gbshader, 0);
1674 cmd->shid = SVGA_ID_INVALID;
1688 SVGA3dCmdBindGBSurface *cmd =
1691 sizeof *cmd,
1694 if (!cmd)
1697 swc->surface_relocation(swc, &cmd->sid, &cmd->mobid, surface,
1717 SVGA3dCmdUpdateGBImage *cmd =
1720 sizeof *cmd,
1723 if (!cmd)
1726 swc->surface_relocation(swc, &cmd->image.sid, NULL, surface,
1728 cmd->image.face = face;
1729 cmd->image.mipmap = mipLevel;
1730 cmd->box = *box;
1747 SVGA3dCmdUpdateGBSurface *cmd =
1750 sizeof *cmd,
1753 if (!cmd)
1756 swc->surface_relocation(swc, &cmd->sid, NULL, surface,
1775 SVGA3dCmdReadbackGBImage *cmd =
1778 sizeof *cmd,
1781 if (!cmd)
1784 swc->surface_relocation(swc, &cmd->image.sid, NULL, surface,
1786 cmd->image.face = face;
1787 cmd->image.mipmap = mipLevel;
1804 SVGA3dCmdReadbackGBSurface *cmd =
1807 sizeof *cmd,
1810 if (!cmd)
1813 swc->surface_relocation(swc, &cmd->sid, NULL, surface,
1830 SVGA3dCmdReadbackGBImagePartial *cmd =
1833 sizeof *cmd,
1835 if (!cmd)
1838 swc->surface_relocation(swc, &cmd->image.sid, NULL, surface,
1840 cmd->image.face = face;
1841 cmd->image.mipmap = mipLevel;
1842 cmd->box = *box;
1843 cmd->invertBox = invertBox;
1859 SVGA3dCmdInvalidateGBImagePartial *cmd =
1862 sizeof *cmd,
1864 if (!cmd)
1867 swc->surface_relocation(swc, &cmd->image.sid, NULL, surface,
1869 cmd->image.face = face;
1870 cmd->image.mipmap = mipLevel;
1871 cmd->box = *box;
1872 cmd->invertBox = invertBox;
1883 SVGA3dCmdInvalidateGBSurface *cmd =
1886 sizeof *cmd,
1888 if (!cmd)
1891 swc->surface_relocation(swc, &cmd->sid, NULL, surface,
1906 SVGA3dCmdSetGBShaderConstInline *cmd;
1910 cmd = SVGA3D_FIFOReserve(swc,
1912 sizeof *cmd + numRegs * sizeof(float[4]),
1914 if (!cmd)
1917 cmd->cid = swc->cid;
1918 cmd->regStart = regStart;
1919 cmd->shaderType = shaderType;
1920 cmd->constType = constType;
1922 memcpy(&cmd[1], values, numRegs * sizeof(float[4]));