Changeset 88787 in vbox for trunk/src/VBox/Devices/Graphics/DevVGA-SVGA-cmd.cpp
- Timestamp:
- Apr 29, 2021 3:51:13 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Graphics/DevVGA-SVGA-cmd.cpp
r87028 r88787 342 342 343 343 344 #if !defined(VMSVGA3D_DX)345 # ifdef VBOX_WITH_VMSVGA3D346 /*347 * Stub for old backends.348 */349 int vmsvga3dQueryInterface(PVGASTATECC pThisCC, char const *pszInterfaceName, void *pvInterfaceFuncs, size_t cbInterfaceFuncs)350 {351 RT_NOREF(pThisCC, pszInterfaceName, pvInterfaceFuncs, cbInterfaceFuncs);352 return VERR_NOT_IMPLEMENTED;353 }354 # endif355 #endif356 357 358 344 /* 359 345 * … … 599 585 pGbo->paDescriptors = paDescriptors; 600 586 587 #if 1 /// @todo PGMHandlerPhysicalRegister asserts deep in PGM code with enmKind of a page being out of range. 588 fWriteProtected = false; 589 #endif 601 590 if (fWriteProtected) 602 591 { … … 632 621 } 633 622 623 /** @todo static void vmsvgaR3GboWriteProtect(PVMSVGAR3STATE pSvgaR3State, PVMSVGAGBO pGbo, bool fWriteProtect) */ 634 624 635 625 typedef enum VMSVGAGboTransferDirection … … 717 707 VMSVGAGboTransferDirection_Read); 718 708 } 709 710 711 static void vmsvgaR3GboBackingStoreDelete(PVMSVGAR3STATE pSvgaR3State, PVMSVGAGBO pGbo) 712 { 713 AssertReturnVoid(pGbo->fGboFlags & VMSVGAGBO_F_HOST_BACKED); 714 vmsvgaR3GboWrite(pSvgaR3State, pGbo, 0, pGbo->pvHost, pGbo->cbTotal); 715 RTMemFree(pGbo->pvHost); 716 pGbo->pvHost = NULL; 717 pGbo->fGboFlags &= ~VMSVGAGBO_F_HOST_BACKED; 718 } 719 720 721 static int vmsvgaR3GboBackingStoreCreate(PVMSVGAR3STATE pSvgaR3State, PVMSVGAGBO pGbo, uint32_t cbValid) 722 { 723 int rc; 724 725 /* Just reread the data if pvHost has been allocated already. */ 726 if (!(pGbo->fGboFlags & VMSVGAGBO_F_HOST_BACKED)) 727 pGbo->pvHost = RTMemAllocZ(pGbo->cbTotal); 728 729 if (pGbo->pvHost) 730 { 731 rc = vmsvgaR3GboRead(pSvgaR3State, pGbo, 0, pGbo->pvHost, cbValid); 732 } 733 else 734 rc = VERR_NO_MEMORY; 735 736 if (RT_SUCCESS(rc)) 737 pGbo->fGboFlags |= VMSVGAGBO_F_HOST_BACKED; 738 else 739 { 740 RTMemFree(pGbo->pvHost); 741 pGbo->pvHost = NULL; 742 } 743 return rc; 744 } 745 719 746 720 747 … … 831 858 832 859 833 static PVMSVGAMOB vmsvgaR3MobGet(PVMSVGAR3STATE pSvgaR3State, SVGAMobId mobid) 834 { 860 static PVMSVGAMOB vmsvgaR3MobGet(PVMSVGAR3STATE pSvgaR3State, SVGAMobId RT_UNTRUSTED_GUEST mobid) 861 { 862 if (mobid == SVGA_ID_INVALID) 863 return NULL; 864 835 865 PVMSVGAMOB pMob = (PVMSVGAMOB)RTAvlU32Get(&pSvgaR3State->MOBTree, mobid); 836 866 if (pMob) … … 840 870 RTListPrepend(&pSvgaR3State->MOBLRUList, &pMob->nodeLRU); 841 871 } 872 else 873 ASSERT_GUEST_FAILED(); 842 874 843 875 return pMob; 844 876 } 877 878 879 /** Create a host ring-3 pointer to the MOB data. 880 * Current approach is to allocate a host memory buffer and copy the guest MOB data if necessary. 881 * @param pMob The MOB. 882 * @param cbValid How many bytes of the guest backing memory contain valid data. 883 * @return VBox status. 884 */ 885 /** @todo uint32_t cbValid -> uint32_t offStart, uint32_t cbData */ 886 int vmsvgaR3MobBackingStoreCreate(PVMSVGAR3STATE pSvgaR3State, PVMSVGAMOB pMob, uint32_t cbValid) 887 { 888 AssertReturn(pMob, VERR_INVALID_PARAMETER); 889 return vmsvgaR3GboBackingStoreCreate(pSvgaR3State, &pMob->Gbo, cbValid); 890 } 891 892 893 void vmsvgaR3MobBackingStoreDelete(PVMSVGAR3STATE pSvgaR3State, PVMSVGAMOB pMob) 894 { 895 if (pMob) 896 vmsvgaR3GboBackingStoreDelete(pSvgaR3State, &pMob->Gbo); 897 } 898 899 900 void *vmsvgaR3MobBackingStoreGet(PVMSVGAMOB pMob, uint32_t off) 901 { 902 if (pMob && (pMob->Gbo.fGboFlags & VMSVGAGBO_F_HOST_BACKED)) 903 { 904 if (off <= pMob->Gbo.cbTotal) 905 return (uint8_t *)pMob->Gbo.pvHost + off; 906 } 907 return NULL; 908 } 909 910 911 #ifdef VBOX_WITH_VMSVGA3D 912 int vmsvgaR3UpdateGBSurface(PVGASTATECC pThisCC, SVGA3dSurfaceImageId const *pImageId, SVGA3dBox const *pBox) 913 { 914 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 915 916 SVGAOTableSurfaceEntry entrySurface; 917 int rc = vmsvgaR3OTableRead(pSvgaR3State, &pSvgaR3State->aGboOTables[SVGA_OTABLE_SURFACE], 918 pImageId->sid, SVGA3D_OTABLE_SURFACE_ENTRY_SIZE, &entrySurface, sizeof(entrySurface)); 919 if (RT_SUCCESS(rc)) 920 { 921 PVMSVGAMOB pMob = vmsvgaR3MobGet(pSvgaR3State, entrySurface.mobid); 922 if (pMob) 923 { 924 VMSVGA3D_MAPPED_SURFACE map; 925 rc = pSvgaR3State->pFuncsMap->pfnSurfaceMap(pThisCC, pImageId, pBox, VMSVGA3D_SURFACE_MAP_WRITE_DISCARD, &map); 926 if (RT_SUCCESS(rc)) 927 { 928 /* Copy MOB -> mapped surface. */ 929 uint32_t offSrc = pBox->x * map.cbPixel 930 + pBox->y * entrySurface.size.width * map.cbPixel 931 + pBox->z * entrySurface.size.height * entrySurface.size.width * map.cbPixel; 932 uint8_t *pu8Dst = (uint8_t *)map.pvData; 933 for (uint32_t z = 0; z < pBox->d; ++z) 934 { 935 for (uint32_t y = 0; y < pBox->h; ++y) 936 { 937 rc = vmsvgaR3GboRead(pSvgaR3State, &pMob->Gbo, offSrc, pu8Dst, pBox->w * map.cbPixel); 938 if (RT_FAILURE(rc)) 939 break; 940 941 pu8Dst += map.cbRowPitch; 942 offSrc += entrySurface.size.width * map.cbPixel; 943 } 944 945 pu8Dst += map.cbDepthPitch; 946 offSrc += entrySurface.size.height * entrySurface.size.width * map.cbPixel; 947 } 948 949 pSvgaR3State->pFuncsMap->pfnSurfaceUnmap(pThisCC, pImageId, &map, /* fWritten= */ true); 950 } 951 } 952 else 953 rc = VERR_INVALID_STATE; 954 } 955 956 return rc; 957 } 958 959 960 int vmsvgaR3UpdateGBSurfaceEx(PVGASTATECC pThisCC, SVGA3dSurfaceImageId const *pImageId, SVGA3dBox const *pBoxDst, SVGA3dPoint const *pPtSrc) 961 { 962 /* pPtSrc must be verified by the caller. */ 963 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 964 965 SVGAOTableSurfaceEntry entrySurface; 966 int rc = vmsvgaR3OTableRead(pSvgaR3State, &pSvgaR3State->aGboOTables[SVGA_OTABLE_SURFACE], 967 pImageId->sid, SVGA3D_OTABLE_SURFACE_ENTRY_SIZE, &entrySurface, sizeof(entrySurface)); 968 if (RT_SUCCESS(rc)) 969 { 970 PVMSVGAMOB pMob = vmsvgaR3MobGet(pSvgaR3State, entrySurface.mobid); 971 if (pMob) 972 { 973 VMSVGA3D_MAPPED_SURFACE map; 974 rc = pSvgaR3State->pFuncsMap->pfnSurfaceMap(pThisCC, pImageId, pBoxDst, VMSVGA3D_SURFACE_MAP_WRITE_DISCARD, &map); 975 if (RT_SUCCESS(rc)) 976 { 977 /* Copy MOB -> mapped surface. */ 978 uint32_t offSrc = pPtSrc->x * map.cbPixel 979 + pPtSrc->y * entrySurface.size.width * map.cbPixel 980 + pPtSrc->z * entrySurface.size.height * entrySurface.size.width * map.cbPixel; 981 uint8_t *pu8Dst = (uint8_t *)map.pvData; 982 for (uint32_t z = 0; z < pBoxDst->d; ++z) 983 { 984 for (uint32_t y = 0; y < pBoxDst->h; ++y) 985 { 986 rc = vmsvgaR3GboRead(pSvgaR3State, &pMob->Gbo, offSrc, pu8Dst, pBoxDst->w * map.cbPixel); 987 if (RT_FAILURE(rc)) 988 break; 989 990 pu8Dst += map.cbRowPitch; 991 offSrc += entrySurface.size.width * map.cbPixel; 992 } 993 994 pu8Dst += map.cbDepthPitch; 995 offSrc += entrySurface.size.height * entrySurface.size.width * map.cbPixel; 996 } 997 998 pSvgaR3State->pFuncsMap->pfnSurfaceUnmap(pThisCC, pImageId, &map, /* fWritten= */ true); 999 } 1000 } 1001 else 1002 rc = VERR_INVALID_STATE; 1003 } 1004 1005 return rc; 1006 } 1007 #endif /* VBOX_WITH_VMSVGA3D */ 1008 845 1009 846 1010 /* … … 1185 1349 // ASMBreakpoint(); 1186 1350 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 1187 RT_NOREF(pCmd, pSvgaR3State);1188 1351 1189 1352 /* Assign the mobid to the surface. */ … … 1325 1488 1326 1489 1490 /* SVGA_3D_CMD_INVALIDATE_GB_IMAGE 1105 */ 1491 static void vmsvga3dCmdInvalidateGBImage(PVGASTATECC pThisCC, SVGA3dCmdInvalidateGBImage const *pCmd) 1492 { 1493 // ASMBreakpoint(); 1494 vmsvga3dSurfaceInvalidate(pThisCC, pCmd->image.sid, pCmd->image.face, pCmd->image.mipmap); 1495 } 1496 1497 1327 1498 /* SVGA_3D_CMD_INVALIDATE_GB_SURFACE 1106 */ 1328 1499 static void vmsvga3dCmdInvalidateGBSurface(PVGASTATECC pThisCC, SVGA3dCmdInvalidateGBSurface const *pCmd) 1329 1500 { 1330 // ASMBreakpoint(); 1331 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 1332 RT_NOREF(pSvgaR3State, pCmd); 1333 /** @todo Implement. */ 1501 // ASMBreakpoint(); 1502 vmsvga3dSurfaceInvalidate(pThisCC, pCmd->sid, SVGA_ID_INVALID, SVGA_ID_INVALID); 1334 1503 } 1335 1504 … … 1382 1551 // entry.image.face = 0; 1383 1552 // entry.image.mipmap = 0; 1384 entry.width = pCmd->width; 1385 entry.height = pCmd->height; 1386 entry.xRoot = pCmd->xRoot; 1387 entry.yRoot = pCmd->yRoot; 1388 entry.flags = pCmd->flags; 1389 entry.dpi = pCmd->dpi; 1553 entry.width = pCmd->width; 1554 entry.height = pCmd->height; 1555 entry.xRoot = pCmd->xRoot; 1556 entry.yRoot = pCmd->yRoot; 1557 entry.flags = pCmd->flags; 1558 entry.dpi = pCmd->dpi; 1559 1390 1560 int rc = vmsvgaR3OTableWrite(pSvgaR3State, &pSvgaR3State->aGboOTables[SVGA_OTABLE_SCREENTARGET], 1391 1561 pCmd->stid, SVGA3D_OTABLE_SCREEN_TARGET_ENTRY_SIZE, &entry, sizeof(entry)); … … 1405 1575 pScreen->cWidth = pCmd->width; 1406 1576 pScreen->cHeight = pCmd->height; 1407 pScreen->offVRAM = 0; /* Alwaysfor screen targets, they use either a separate memory buffer or a host window. */1577 pScreen->offVRAM = 0; /* Not applicable for screen targets, they use either a separate memory buffer or a host window. */ 1408 1578 pScreen->cbPitch = pCmd->width * 4; 1409 1579 pScreen->cBpp = 32; … … 1569 1739 1570 1740 1741 /* SVGA_3D_CMD_DEFINE_GB_SURFACE_V2 1134 */ 1742 static void vmsvga3dCmdDefineGBSurface_v2(PVGASTATECC pThisCC, SVGA3dCmdDefineGBSurface_v2 const *pCmd) 1743 { 1744 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 1745 1746 /* Update the entry in the pSvgaR3State->pGboOTableSurface. */ 1747 SVGAOTableSurfaceEntry entry; 1748 RT_ZERO(entry); 1749 entry.format = pCmd->format; 1750 entry.surface1Flags = pCmd->surfaceFlags; 1751 entry.numMipLevels = pCmd->numMipLevels; 1752 entry.multisampleCount = pCmd->multisampleCount; 1753 entry.autogenFilter = pCmd->autogenFilter; 1754 entry.size = pCmd->size; 1755 entry.mobid = SVGA_ID_INVALID; 1756 entry.arraySize = pCmd->arraySize; 1757 // entry.mobPitch = 0; 1758 int rc = vmsvgaR3OTableWrite(pSvgaR3State, &pSvgaR3State->aGboOTables[SVGA_OTABLE_SURFACE], 1759 pCmd->sid, SVGA3D_OTABLE_SURFACE_ENTRY_SIZE, &entry, sizeof(entry)); 1760 if (RT_SUCCESS(rc)) 1761 { 1762 /* Create the host surface. */ 1763 /** @todo fGBO = true flag. */ 1764 vmsvga3dSurfaceDefine(pThisCC, pCmd->sid, pCmd->surfaceFlags, pCmd->format, 1765 pCmd->multisampleCount, pCmd->autogenFilter, 1766 pCmd->numMipLevels, &pCmd->size); 1767 } 1768 } 1769 1770 1571 1771 /* SVGA_3D_CMD_DEFINE_GB_MOB64 1135 */ 1572 1772 static void vmsvga3dCmdDefineGBMob64(PVGASTATECC pThisCC, SVGA3dCmdDefineGBMob64 const *pCmd) … … 1593 1793 1594 1794 /* SVGA_3D_CMD_DX_DEFINE_CONTEXT 1143 */ 1595 static void vmsvga3dCmdDXDefineContext(PVGASTATECC pThisCC, SVGA3dCmdDXDefineContext const *pCmd) 1596 { 1597 ASMBreakpoint(); 1598 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 1599 if (pSvgaR3State->pFuncsDX) 1600 { 1601 RT_NOREF(pCmd); 1602 pSvgaR3State->pFuncsDX->pfnDXDefineContext(pThisCC->svga.p3dState); 1603 } 1795 static int vmsvga3dCmdDXDefineContext(PVGASTATECC pThisCC, SVGA3dCmdDXDefineContext const *pCmd, uint32_t cbCmd) 1796 { 1797 #ifdef VMSVGA3D_DX 1798 //ASMBreakpoint(); 1799 RT_NOREF(cbCmd); 1800 1801 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 1802 1803 /* Update the entry in the pSvgaR3State->pGboOTable[SVGA_OTABLE_DXCONTEXT]. */ 1804 SVGAOTableDXContextEntry entry; 1805 RT_ZERO(entry); 1806 entry.cid = pCmd->cid; 1807 entry.mobid = SVGA_ID_INVALID; 1808 int rc = vmsvgaR3OTableWrite(pSvgaR3State, &pSvgaR3State->aGboOTables[SVGA_OTABLE_DXCONTEXT], 1809 pCmd->cid, sizeof(SVGAOTableDXContextEntry), &entry, sizeof(entry)); 1810 if (RT_SUCCESS(rc)) 1811 { 1812 /* Create the host context. */ 1813 rc = vmsvga3dDXDefineContext(pThisCC, pCmd->cid); 1814 } 1815 1816 return rc; 1817 #else 1818 RT_NOREF(pThisCC, pCmd, cbCmd); 1819 return VERR_NOT_SUPPORTED; 1820 #endif 1604 1821 } 1605 1822 1606 1823 1607 1824 /* SVGA_3D_CMD_DX_DESTROY_CONTEXT 1144 */ 1608 static void vmsvga3dCmdDXDestroyContext(PVGASTATECC pThisCC, SVGA3dCmdDXDestroyContext const *pCmd) 1609 { 1610 ASMBreakpoint(); 1611 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 1612 if (pSvgaR3State->pFuncsDX) 1613 { 1614 RT_NOREF(pCmd); 1615 pSvgaR3State->pFuncsDX->pfnDXDestroyContext(pThisCC->svga.p3dState); 1616 } 1825 static int vmsvga3dCmdDXDestroyContext(PVGASTATECC pThisCC, SVGA3dCmdDXDestroyContext const *pCmd, uint32_t cbCmd) 1826 { 1827 #ifdef VMSVGA3D_DX 1828 //ASMBreakpoint(); 1829 RT_NOREF(cbCmd); 1830 1831 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 1832 1833 /* Update the entry in the pSvgaR3State->pGboOTable[SVGA_OTABLE_DXCONTEXT]. */ 1834 SVGAOTableDXContextEntry entry; 1835 RT_ZERO(entry); 1836 vmsvgaR3OTableWrite(pSvgaR3State, &pSvgaR3State->aGboOTables[SVGA_OTABLE_DXCONTEXT], 1837 pCmd->cid, sizeof(SVGAOTableDXContextEntry), &entry, sizeof(entry)); 1838 1839 return vmsvga3dDXDestroyContext(pThisCC, pCmd->cid); 1840 #else 1841 RT_NOREF(pThisCC, pCmd, cbCmd); 1842 return VERR_NOT_SUPPORTED; 1843 #endif 1617 1844 } 1618 1845 1619 1846 1620 1847 /* SVGA_3D_CMD_DX_BIND_CONTEXT 1145 */ 1621 static void vmsvga3dCmdDXBindContext(PVGASTATECC pThisCC, SVGA3dCmdDXBindContext const *pCmd) 1622 { 1623 ASMBreakpoint(); 1624 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 1625 if (pSvgaR3State->pFuncsDX) 1626 { 1627 RT_NOREF(pCmd); 1628 pSvgaR3State->pFuncsDX->pfnDXBindContext(pThisCC->svga.p3dState); 1629 } 1848 static int vmsvga3dCmdDXBindContext(PVGASTATECC pThisCC, SVGA3dCmdDXBindContext const *pCmd, uint32_t cbCmd) 1849 { 1850 #ifdef VMSVGA3D_DX 1851 //ASMBreakpoint(); 1852 RT_NOREF(cbCmd); 1853 1854 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 1855 1856 /* Assign a mobid to a cid. */ 1857 int rc = VINF_SUCCESS; 1858 if (pCmd->mobid != SVGA_ID_INVALID) 1859 rc = vmsvgaR3OTableVerifyIndex(pSvgaR3State, &pSvgaR3State->aGboOTables[SVGA_OTABLE_MOB], 1860 pCmd->mobid, SVGA3D_OTABLE_MOB_ENTRY_SIZE); 1861 if (RT_SUCCESS(rc)) 1862 { 1863 SVGAOTableDXContextEntry entry; 1864 rc = vmsvgaR3OTableRead(pSvgaR3State, &pSvgaR3State->aGboOTables[SVGA_OTABLE_DXCONTEXT], 1865 pCmd->cid, sizeof(SVGAOTableDXContextEntry), &entry, sizeof(entry)); 1866 if (RT_SUCCESS(rc)) 1867 { 1868 SVGADXContextMobFormat *pSvgaDXContext = NULL; 1869 if (pCmd->mobid != entry.mobid && entry.mobid != SVGA_ID_INVALID) 1870 { 1871 /* Unbind notification to the DX backend. Copy the context data to the guest backing memory. */ 1872 pSvgaDXContext = (SVGADXContextMobFormat *)RTMemAlloc(sizeof(SVGADXContextMobFormat)); 1873 if (pSvgaDXContext) 1874 { 1875 rc = vmsvga3dDXUnbindContext(pThisCC, pCmd->cid, pSvgaDXContext); 1876 if (RT_SUCCESS(rc)) 1877 { 1878 PVMSVGAMOB pMob = vmsvgaR3MobGet(pSvgaR3State, entry.mobid); 1879 if (pMob) 1880 { 1881 rc = vmsvgaR3GboWrite(pSvgaR3State, &pMob->Gbo, 0, pSvgaDXContext, sizeof(SVGADXContextMobFormat)); 1882 } 1883 } 1884 1885 RTMemFree(pSvgaDXContext); 1886 pSvgaDXContext = NULL; 1887 } 1888 } 1889 1890 if (pCmd->mobid != SVGA_ID_INVALID) 1891 { 1892 /* Bind a new context. Copy existing data from the guyest backing memory. */ 1893 if (pCmd->validContents) 1894 { 1895 PVMSVGAMOB pMob = vmsvgaR3MobGet(pSvgaR3State, pCmd->mobid); 1896 if (pMob) 1897 { 1898 pSvgaDXContext = (SVGADXContextMobFormat *)RTMemAlloc(sizeof(SVGADXContextMobFormat)); 1899 if (pSvgaDXContext) 1900 { 1901 rc = vmsvgaR3GboRead(pSvgaR3State, &pMob->Gbo, 0, pSvgaDXContext, sizeof(SVGADXContextMobFormat)); 1902 if (RT_FAILURE(rc)) 1903 { 1904 RTMemFree(pSvgaDXContext); 1905 pSvgaDXContext = NULL; 1906 } 1907 } 1908 } 1909 } 1910 1911 rc = vmsvga3dDXBindContext(pThisCC, pCmd->cid, pSvgaDXContext); 1912 1913 RTMemFree(pSvgaDXContext); 1914 } 1915 1916 /* Update the object table. */ 1917 entry.mobid = pCmd->mobid; 1918 rc = vmsvgaR3OTableWrite(pSvgaR3State, &pSvgaR3State->aGboOTables[SVGA_OTABLE_DXCONTEXT], 1919 pCmd->cid, sizeof(SVGAOTableDXContextEntry), &entry, sizeof(entry)); 1920 } 1921 } 1922 1923 return rc; 1924 #else 1925 RT_NOREF(pThisCC, pCmd, cbCmd); 1926 return VERR_NOT_SUPPORTED; 1927 #endif 1630 1928 } 1631 1929 1632 1930 1633 1931 /* SVGA_3D_CMD_DX_READBACK_CONTEXT 1146 */ 1634 static void vmsvga3dCmdDXReadbackContext(PVGASTATECC pThisCC, SVGA3dCmdDXReadbackContext const *pCmd) 1635 { 1636 ASMBreakpoint(); 1637 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 1638 if (pSvgaR3State->pFuncsDX) 1639 { 1640 RT_NOREF(pCmd); 1641 pSvgaR3State->pFuncsDX->pfnDXReadbackContext(pThisCC->svga.p3dState); 1642 } 1932 static int vmsvga3dCmdDXReadbackContext(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXReadbackContext const *pCmd, uint32_t cbCmd) 1933 { 1934 #ifdef VMSVGA3D_DX 1935 ASMBreakpoint(); 1936 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 1937 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 1938 return vmsvga3dDXReadbackContext(pThisCC, idDXContext); 1939 #else 1940 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 1941 return VERR_NOT_SUPPORTED; 1942 #endif 1643 1943 } 1644 1944 1645 1945 1646 1946 /* SVGA_3D_CMD_DX_INVALIDATE_CONTEXT 1147 */ 1647 static void vmsvga3dCmdDXInvalidateContext(PVGASTATECC pThisCC, SVGA3dCmdDXInvalidateContext const *pCmd) 1648 { 1649 ASMBreakpoint(); 1650 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 1651 if (pSvgaR3State->pFuncsDX) 1652 { 1653 RT_NOREF(pCmd); 1654 pSvgaR3State->pFuncsDX->pfnDXInvalidateContext(pThisCC->svga.p3dState); 1655 } 1947 static int vmsvga3dCmdDXInvalidateContext(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXInvalidateContext const *pCmd, uint32_t cbCmd) 1948 { 1949 #ifdef VMSVGA3D_DX 1950 ASMBreakpoint(); 1951 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 1952 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 1953 return vmsvga3dDXInvalidateContext(pThisCC, idDXContext); 1954 #else 1955 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 1956 return VERR_NOT_SUPPORTED; 1957 #endif 1656 1958 } 1657 1959 1658 1960 1659 1961 /* SVGA_3D_CMD_DX_SET_SINGLE_CONSTANT_BUFFER 1148 */ 1660 static void vmsvga3dCmdDXSetSingleConstantBuffer(PVGASTATECC pThisCC, SVGA3dCmdDXSetSingleConstantBuffer const *pCmd) 1661 { 1662 ASMBreakpoint(); 1663 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 1664 if (pSvgaR3State->pFuncsDX) 1665 { 1666 RT_NOREF(pCmd); 1667 pSvgaR3State->pFuncsDX->pfnDXSetSingleConstantBuffer(pThisCC->svga.p3dState); 1668 } 1962 static int vmsvga3dCmdDXSetSingleConstantBuffer(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXSetSingleConstantBuffer const *pCmd, uint32_t cbCmd) 1963 { 1964 #ifdef VMSVGA3D_DX 1965 //ASMBreakpoint(); 1966 RT_NOREF(cbCmd); 1967 return vmsvga3dDXSetSingleConstantBuffer(pThisCC, idDXContext, pCmd); 1968 #else 1969 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 1970 return VERR_NOT_SUPPORTED; 1971 #endif 1669 1972 } 1670 1973 1671 1974 1672 1975 /* SVGA_3D_CMD_DX_SET_SHADER_RESOURCES 1149 */ 1673 static void vmsvga3dCmdDXSetShaderResources(PVGASTATECC pThisCC, SVGA3dCmdDXSetShaderResources const *pCmd) 1674 { 1675 ASMBreakpoint(); 1676 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 1677 if (pSvgaR3State->pFuncsDX) 1678 { 1679 RT_NOREF(pCmd); 1680 pSvgaR3State->pFuncsDX->pfnDXSetShaderResources(pThisCC->svga.p3dState); 1681 } 1976 static int vmsvga3dCmdDXSetShaderResources(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXSetShaderResources const *pCmd, uint32_t cbCmd) 1977 { 1978 #ifdef VMSVGA3D_DX 1979 ASMBreakpoint(); 1980 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 1981 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 1982 return vmsvga3dDXSetShaderResources(pThisCC, idDXContext); 1983 #else 1984 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 1985 return VERR_NOT_SUPPORTED; 1986 #endif 1682 1987 } 1683 1988 1684 1989 1685 1990 /* SVGA_3D_CMD_DX_SET_SHADER 1150 */ 1686 static void vmsvga3dCmdDXSetShader(PVGASTATECC pThisCC, SVGA3dCmdDXSetShader const *pCmd) 1687 { 1688 ASMBreakpoint(); 1689 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 1690 if (pSvgaR3State->pFuncsDX) 1691 { 1692 RT_NOREF(pCmd); 1693 pSvgaR3State->pFuncsDX->pfnDXSetShader(pThisCC->svga.p3dState); 1694 } 1991 static int vmsvga3dCmdDXSetShader(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXSetShader const *pCmd, uint32_t cbCmd) 1992 { 1993 #ifdef VMSVGA3D_DX 1994 //ASMBreakpoint(); 1995 RT_NOREF(cbCmd); 1996 return vmsvga3dDXSetShader(pThisCC, idDXContext, pCmd); 1997 #else 1998 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 1999 return VERR_NOT_SUPPORTED; 2000 #endif 1695 2001 } 1696 2002 1697 2003 1698 2004 /* SVGA_3D_CMD_DX_SET_SAMPLERS 1151 */ 1699 static void vmsvga3dCmdDXSetSamplers(PVGASTATECC pThisCC, SVGA3dCmdDXSetSamplers const *pCmd) 1700 { 1701 ASMBreakpoint(); 1702 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 1703 if (pSvgaR3State->pFuncsDX) 1704 { 1705 RT_NOREF(pCmd); 1706 pSvgaR3State->pFuncsDX->pfnDXSetSamplers(pThisCC->svga.p3dState); 1707 } 2005 static int vmsvga3dCmdDXSetSamplers(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXSetSamplers const *pCmd, uint32_t cbCmd) 2006 { 2007 #ifdef VMSVGA3D_DX 2008 //ASMBreakpoint(); 2009 SVGA3dSamplerId const *paSamplerId = (SVGA3dSamplerId *)&pCmd[1]; 2010 uint32_t const cSamplerId = (cbCmd - sizeof(*pCmd)) / sizeof(SVGA3dSamplerId); 2011 return vmsvga3dDXSetSamplers(pThisCC, idDXContext, pCmd->startSampler, pCmd->type, cSamplerId, paSamplerId); 2012 #else 2013 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 2014 return VERR_NOT_SUPPORTED; 2015 #endif 1708 2016 } 1709 2017 1710 2018 1711 2019 /* SVGA_3D_CMD_DX_DRAW 1152 */ 1712 static void vmsvga3dCmdDXDraw(PVGASTATECC pThisCC, SVGA3dCmdDXDraw const *pCmd) 1713 { 1714 ASMBreakpoint(); 1715 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 1716 if (pSvgaR3State->pFuncsDX) 1717 { 1718 RT_NOREF(pCmd); 1719 pSvgaR3State->pFuncsDX->pfnDXDraw(pThisCC->svga.p3dState); 1720 } 2020 static int vmsvga3dCmdDXDraw(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXDraw const *pCmd, uint32_t cbCmd) 2021 { 2022 #ifdef VMSVGA3D_DX 2023 //ASMBreakpoint(); 2024 RT_NOREF(cbCmd); 2025 return vmsvga3dDXDraw(pThisCC, idDXContext, pCmd); 2026 #else 2027 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 2028 return VERR_NOT_SUPPORTED; 2029 #endif 1721 2030 } 1722 2031 1723 2032 1724 2033 /* SVGA_3D_CMD_DX_DRAW_INDEXED 1153 */ 1725 static void vmsvga3dCmdDXDrawIndexed(PVGASTATECC pThisCC, SVGA3dCmdDXDrawIndexed const *pCmd) 1726 { 1727 ASMBreakpoint(); 1728 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 1729 if (pSvgaR3State->pFuncsDX) 1730 { 1731 RT_NOREF(pCmd); 1732 pSvgaR3State->pFuncsDX->pfnDXDrawIndexed(pThisCC->svga.p3dState); 1733 } 2034 static int vmsvga3dCmdDXDrawIndexed(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXDrawIndexed const *pCmd, uint32_t cbCmd) 2035 { 2036 #ifdef VMSVGA3D_DX 2037 ASMBreakpoint(); 2038 RT_NOREF(cbCmd); 2039 return vmsvga3dDXDrawIndexed(pThisCC, idDXContext, pCmd); 2040 #else 2041 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 2042 return VERR_NOT_SUPPORTED; 2043 #endif 1734 2044 } 1735 2045 1736 2046 1737 2047 /* SVGA_3D_CMD_DX_DRAW_INSTANCED 1154 */ 1738 static void vmsvga3dCmdDXDrawInstanced(PVGASTATECC pThisCC, SVGA3dCmdDXDrawInstanced const *pCmd) 1739 { 1740 ASMBreakpoint(); 1741 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 1742 if (pSvgaR3State->pFuncsDX) 1743 { 1744 RT_NOREF(pCmd); 1745 pSvgaR3State->pFuncsDX->pfnDXDrawInstanced(pThisCC->svga.p3dState); 1746 } 2048 static int vmsvga3dCmdDXDrawInstanced(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXDrawInstanced const *pCmd, uint32_t cbCmd) 2049 { 2050 #ifdef VMSVGA3D_DX 2051 ASMBreakpoint(); 2052 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2053 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 2054 return vmsvga3dDXDrawInstanced(pThisCC, idDXContext); 2055 #else 2056 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 2057 return VERR_NOT_SUPPORTED; 2058 #endif 1747 2059 } 1748 2060 1749 2061 1750 2062 /* SVGA_3D_CMD_DX_DRAW_INDEXED_INSTANCED 1155 */ 1751 static void vmsvga3dCmdDXDrawIndexedInstanced(PVGASTATECC pThisCC, SVGA3dCmdDXDrawIndexedInstanced const *pCmd) 1752 { 1753 ASMBreakpoint(); 1754 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 1755 if (pSvgaR3State->pFuncsDX) 1756 { 1757 RT_NOREF(pCmd); 1758 pSvgaR3State->pFuncsDX->pfnDXDrawIndexedInstanced(pThisCC->svga.p3dState); 1759 } 2063 static int vmsvga3dCmdDXDrawIndexedInstanced(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXDrawIndexedInstanced const *pCmd, uint32_t cbCmd) 2064 { 2065 #ifdef VMSVGA3D_DX 2066 ASMBreakpoint(); 2067 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2068 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 2069 return vmsvga3dDXDrawIndexedInstanced(pThisCC, idDXContext); 2070 #else 2071 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 2072 return VERR_NOT_SUPPORTED; 2073 #endif 1760 2074 } 1761 2075 1762 2076 1763 2077 /* SVGA_3D_CMD_DX_DRAW_AUTO 1156 */ 1764 static void vmsvga3dCmdDXDrawAuto(PVGASTATECC pThisCC, SVGA3dCmdDXDrawAuto const *pCmd) 1765 { 1766 ASMBreakpoint(); 1767 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 1768 if (pSvgaR3State->pFuncsDX) 1769 { 1770 RT_NOREF(pCmd); 1771 pSvgaR3State->pFuncsDX->pfnDXDrawAuto(pThisCC->svga.p3dState); 1772 } 2078 static int vmsvga3dCmdDXDrawAuto(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXDrawAuto const *pCmd, uint32_t cbCmd) 2079 { 2080 #ifdef VMSVGA3D_DX 2081 ASMBreakpoint(); 2082 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2083 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 2084 return vmsvga3dDXDrawAuto(pThisCC, idDXContext); 2085 #else 2086 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 2087 return VERR_NOT_SUPPORTED; 2088 #endif 1773 2089 } 1774 2090 1775 2091 1776 2092 /* SVGA_3D_CMD_DX_SET_INPUT_LAYOUT 1157 */ 1777 static void vmsvga3dCmdDXSetInputLayout(PVGASTATECC pThisCC, SVGA3dCmdDXSetInputLayout const *pCmd) 1778 { 1779 ASMBreakpoint(); 1780 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 1781 if (pSvgaR3State->pFuncsDX) 1782 { 1783 RT_NOREF(pCmd); 1784 pSvgaR3State->pFuncsDX->pfnDXSetInputLayout(pThisCC->svga.p3dState); 1785 } 2093 static int vmsvga3dCmdDXSetInputLayout(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXSetInputLayout const *pCmd, uint32_t cbCmd) 2094 { 2095 #ifdef VMSVGA3D_DX 2096 //ASMBreakpoint(); 2097 RT_NOREF(cbCmd); 2098 return vmsvga3dDXSetInputLayout(pThisCC, idDXContext, pCmd->elementLayoutId); 2099 #else 2100 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 2101 return VERR_NOT_SUPPORTED; 2102 #endif 1786 2103 } 1787 2104 1788 2105 1789 2106 /* SVGA_3D_CMD_DX_SET_VERTEX_BUFFERS 1158 */ 1790 static void vmsvga3dCmdDXSetVertexBuffers(PVGASTATECC pThisCC, SVGA3dCmdDXSetVertexBuffers const *pCmd) 1791 { 1792 ASMBreakpoint(); 1793 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 1794 if (pSvgaR3State->pFuncsDX) 1795 { 1796 RT_NOREF(pCmd); 1797 pSvgaR3State->pFuncsDX->pfnDXSetVertexBuffers(pThisCC->svga.p3dState); 1798 } 2107 static int vmsvga3dCmdDXSetVertexBuffers(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXSetVertexBuffers const *pCmd, uint32_t cbCmd) 2108 { 2109 #ifdef VMSVGA3D_DX 2110 //ASMBreakpoint(); 2111 SVGA3dVertexBuffer const *paVertexBuffer = (SVGA3dVertexBuffer *)&pCmd[1]; 2112 uint32_t const cVertexBuffer = (cbCmd - sizeof(*pCmd)) / sizeof(SVGA3dVertexBuffer); 2113 return vmsvga3dDXSetVertexBuffers(pThisCC, idDXContext, pCmd->startBuffer, cVertexBuffer, paVertexBuffer); 2114 #else 2115 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 2116 return VERR_NOT_SUPPORTED; 2117 #endif 1799 2118 } 1800 2119 1801 2120 1802 2121 /* SVGA_3D_CMD_DX_SET_INDEX_BUFFER 1159 */ 1803 static void vmsvga3dCmdDXSetIndexBuffer(PVGASTATECC pThisCC, SVGA3dCmdDXSetIndexBuffer const *pCmd) 1804 { 1805 ASMBreakpoint(); 1806 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 1807 if (pSvgaR3State->pFuncsDX) 1808 { 1809 RT_NOREF(pCmd); 1810 pSvgaR3State->pFuncsDX->pfnDXSetIndexBuffer(pThisCC->svga.p3dState); 1811 } 2122 static int vmsvga3dCmdDXSetIndexBuffer(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXSetIndexBuffer const *pCmd, uint32_t cbCmd) 2123 { 2124 #ifdef VMSVGA3D_DX 2125 //ASMBreakpoint(); 2126 RT_NOREF(cbCmd); 2127 return vmsvga3dDXSetIndexBuffer(pThisCC, idDXContext, pCmd); 2128 #else 2129 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 2130 return VERR_NOT_SUPPORTED; 2131 #endif 1812 2132 } 1813 2133 1814 2134 1815 2135 /* SVGA_3D_CMD_DX_SET_TOPOLOGY 1160 */ 1816 static void vmsvga3dCmdDXSetTopology(PVGASTATECC pThisCC, SVGA3dCmdDXSetTopology const *pCmd) 1817 { 1818 ASMBreakpoint(); 1819 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 1820 if (pSvgaR3State->pFuncsDX) 1821 { 1822 RT_NOREF(pCmd); 1823 pSvgaR3State->pFuncsDX->pfnDXSetTopology(pThisCC->svga.p3dState); 1824 } 2136 static int vmsvga3dCmdDXSetTopology(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXSetTopology const *pCmd, uint32_t cbCmd) 2137 { 2138 #ifdef VMSVGA3D_DX 2139 //ASMBreakpoint(); 2140 RT_NOREF(cbCmd); 2141 return vmsvga3dDXSetTopology(pThisCC, idDXContext, pCmd->topology); 2142 #else 2143 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 2144 return VERR_NOT_SUPPORTED; 2145 #endif 1825 2146 } 1826 2147 1827 2148 1828 2149 /* SVGA_3D_CMD_DX_SET_RENDERTARGETS 1161 */ 1829 static void vmsvga3dCmdDXSetRenderTargets(PVGASTATECC pThisCC, SVGA3dCmdDXSetRenderTargets const *pCmd) 1830 { 1831 ASMBreakpoint(); 1832 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 1833 if (pSvgaR3State->pFuncsDX) 1834 { 1835 RT_NOREF(pCmd); 1836 pSvgaR3State->pFuncsDX->pfnDXSetRenderTargets(pThisCC->svga.p3dState); 1837 } 2150 static int vmsvga3dCmdDXSetRenderTargets(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXSetRenderTargets const *pCmd, uint32_t cbCmd) 2151 { 2152 #ifdef VMSVGA3D_DX 2153 //ASMBreakpoint(); 2154 SVGA3dRenderTargetViewId const *paRenderTargetViewId = (SVGA3dRenderTargetViewId *)&pCmd[1]; 2155 uint32_t const cRenderTargetViewId = (cbCmd - sizeof(*pCmd)) / sizeof(SVGA3dRenderTargetViewId); 2156 return vmsvga3dDXSetRenderTargets(pThisCC, idDXContext, pCmd->depthStencilViewId, cRenderTargetViewId, paRenderTargetViewId); 2157 #else 2158 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 2159 return VERR_NOT_SUPPORTED; 2160 #endif 1838 2161 } 1839 2162 1840 2163 1841 2164 /* SVGA_3D_CMD_DX_SET_BLEND_STATE 1162 */ 1842 static void vmsvga3dCmdDXSetBlendState(PVGASTATECC pThisCC, SVGA3dCmdDXSetBlendState const *pCmd) 1843 { 1844 ASMBreakpoint(); 1845 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 1846 if (pSvgaR3State->pFuncsDX) 1847 { 1848 RT_NOREF(pCmd); 1849 pSvgaR3State->pFuncsDX->pfnDXSetBlendState(pThisCC->svga.p3dState); 1850 } 2165 static int vmsvga3dCmdDXSetBlendState(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXSetBlendState const *pCmd, uint32_t cbCmd) 2166 { 2167 #ifdef VMSVGA3D_DX 2168 //ASMBreakpoint(); 2169 RT_NOREF(cbCmd); 2170 return vmsvga3dDXSetBlendState(pThisCC, idDXContext, pCmd); 2171 #else 2172 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 2173 return VERR_NOT_SUPPORTED; 2174 #endif 1851 2175 } 1852 2176 1853 2177 1854 2178 /* SVGA_3D_CMD_DX_SET_DEPTHSTENCIL_STATE 1163 */ 1855 static void vmsvga3dCmdDXSetDepthStencilState(PVGASTATECC pThisCC, SVGA3dCmdDXSetDepthStencilState const *pCmd) 1856 { 1857 ASMBreakpoint(); 1858 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 1859 if (pSvgaR3State->pFuncsDX) 1860 { 1861 RT_NOREF(pCmd); 1862 pSvgaR3State->pFuncsDX->pfnDXSetDepthStencilState(pThisCC->svga.p3dState); 1863 } 2179 static int vmsvga3dCmdDXSetDepthStencilState(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXSetDepthStencilState const *pCmd, uint32_t cbCmd) 2180 { 2181 #ifdef VMSVGA3D_DX 2182 //ASMBreakpoint(); 2183 RT_NOREF(cbCmd); 2184 return vmsvga3dDXSetDepthStencilState(pThisCC, idDXContext, pCmd); 2185 #else 2186 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 2187 return VERR_NOT_SUPPORTED; 2188 #endif 1864 2189 } 1865 2190 1866 2191 1867 2192 /* SVGA_3D_CMD_DX_SET_RASTERIZER_STATE 1164 */ 1868 static void vmsvga3dCmdDXSetRasterizerState(PVGASTATECC pThisCC, SVGA3dCmdDXSetRasterizerState const *pCmd) 1869 { 1870 ASMBreakpoint(); 1871 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 1872 if (pSvgaR3State->pFuncsDX) 1873 { 1874 RT_NOREF(pCmd); 1875 pSvgaR3State->pFuncsDX->pfnDXSetRasterizerState(pThisCC->svga.p3dState); 1876 } 2193 static int vmsvga3dCmdDXSetRasterizerState(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXSetRasterizerState const *pCmd, uint32_t cbCmd) 2194 { 2195 #ifdef VMSVGA3D_DX 2196 //ASMBreakpoint(); 2197 RT_NOREF(cbCmd); 2198 return vmsvga3dDXSetRasterizerState(pThisCC, idDXContext, pCmd->rasterizerId); 2199 #else 2200 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 2201 return VERR_NOT_SUPPORTED; 2202 #endif 1877 2203 } 1878 2204 1879 2205 1880 2206 /* SVGA_3D_CMD_DX_DEFINE_QUERY 1165 */ 1881 static void vmsvga3dCmdDXDefineQuery(PVGASTATECC pThisCC, SVGA3dCmdDXDefineQuery const *pCmd) 1882 { 1883 ASMBreakpoint(); 1884 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 1885 if (pSvgaR3State->pFuncsDX) 1886 { 1887 RT_NOREF(pCmd); 1888 pSvgaR3State->pFuncsDX->pfnDXDefineQuery(pThisCC->svga.p3dState); 1889 } 2207 static int vmsvga3dCmdDXDefineQuery(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXDefineQuery const *pCmd, uint32_t cbCmd) 2208 { 2209 #ifdef VMSVGA3D_DX 2210 ASMBreakpoint(); 2211 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2212 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 2213 return vmsvga3dDXDefineQuery(pThisCC, idDXContext); 2214 #else 2215 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 2216 return VERR_NOT_SUPPORTED; 2217 #endif 1890 2218 } 1891 2219 1892 2220 1893 2221 /* SVGA_3D_CMD_DX_DESTROY_QUERY 1166 */ 1894 static void vmsvga3dCmdDXDestroyQuery(PVGASTATECC pThisCC, SVGA3dCmdDXDestroyQuery const *pCmd) 1895 { 1896 ASMBreakpoint(); 1897 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 1898 if (pSvgaR3State->pFuncsDX) 1899 { 1900 RT_NOREF(pCmd); 1901 pSvgaR3State->pFuncsDX->pfnDXDestroyQuery(pThisCC->svga.p3dState); 1902 } 2222 static int vmsvga3dCmdDXDestroyQuery(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXDestroyQuery const *pCmd, uint32_t cbCmd) 2223 { 2224 #ifdef VMSVGA3D_DX 2225 ASMBreakpoint(); 2226 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2227 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 2228 return vmsvga3dDXDestroyQuery(pThisCC, idDXContext); 2229 #else 2230 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 2231 return VERR_NOT_SUPPORTED; 2232 #endif 1903 2233 } 1904 2234 1905 2235 1906 2236 /* SVGA_3D_CMD_DX_BIND_QUERY 1167 */ 1907 static void vmsvga3dCmdDXBindQuery(PVGASTATECC pThisCC, SVGA3dCmdDXBindQuery const *pCmd) 1908 { 1909 ASMBreakpoint(); 1910 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 1911 if (pSvgaR3State->pFuncsDX) 1912 { 1913 RT_NOREF(pCmd); 1914 pSvgaR3State->pFuncsDX->pfnDXBindQuery(pThisCC->svga.p3dState); 1915 } 2237 static int vmsvga3dCmdDXBindQuery(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXBindQuery const *pCmd, uint32_t cbCmd) 2238 { 2239 #ifdef VMSVGA3D_DX 2240 ASMBreakpoint(); 2241 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2242 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 2243 return vmsvga3dDXBindQuery(pThisCC, idDXContext); 2244 #else 2245 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 2246 return VERR_NOT_SUPPORTED; 2247 #endif 1916 2248 } 1917 2249 1918 2250 1919 2251 /* SVGA_3D_CMD_DX_SET_QUERY_OFFSET 1168 */ 1920 static void vmsvga3dCmdDXSetQueryOffset(PVGASTATECC pThisCC, SVGA3dCmdDXSetQueryOffset const *pCmd) 1921 { 1922 ASMBreakpoint(); 1923 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 1924 if (pSvgaR3State->pFuncsDX) 1925 { 1926 RT_NOREF(pCmd); 1927 pSvgaR3State->pFuncsDX->pfnDXSetQueryOffset(pThisCC->svga.p3dState); 1928 } 2252 static int vmsvga3dCmdDXSetQueryOffset(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXSetQueryOffset const *pCmd, uint32_t cbCmd) 2253 { 2254 #ifdef VMSVGA3D_DX 2255 ASMBreakpoint(); 2256 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2257 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 2258 return vmsvga3dDXSetQueryOffset(pThisCC, idDXContext); 2259 #else 2260 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 2261 return VERR_NOT_SUPPORTED; 2262 #endif 1929 2263 } 1930 2264 1931 2265 1932 2266 /* SVGA_3D_CMD_DX_BEGIN_QUERY 1169 */ 1933 static void vmsvga3dCmdDXBeginQuery(PVGASTATECC pThisCC, SVGA3dCmdDXBeginQuery const *pCmd) 1934 { 1935 ASMBreakpoint(); 1936 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 1937 if (pSvgaR3State->pFuncsDX) 1938 { 1939 RT_NOREF(pCmd); 1940 pSvgaR3State->pFuncsDX->pfnDXBeginQuery(pThisCC->svga.p3dState); 1941 } 2267 static int vmsvga3dCmdDXBeginQuery(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXBeginQuery const *pCmd, uint32_t cbCmd) 2268 { 2269 #ifdef VMSVGA3D_DX 2270 ASMBreakpoint(); 2271 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2272 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 2273 return vmsvga3dDXBeginQuery(pThisCC, idDXContext); 2274 #else 2275 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 2276 return VERR_NOT_SUPPORTED; 2277 #endif 1942 2278 } 1943 2279 1944 2280 1945 2281 /* SVGA_3D_CMD_DX_END_QUERY 1170 */ 1946 static void vmsvga3dCmdDXEndQuery(PVGASTATECC pThisCC, SVGA3dCmdDXEndQuery const *pCmd) 1947 { 1948 ASMBreakpoint(); 1949 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 1950 if (pSvgaR3State->pFuncsDX) 1951 { 1952 RT_NOREF(pCmd); 1953 pSvgaR3State->pFuncsDX->pfnDXEndQuery(pThisCC->svga.p3dState); 1954 } 2282 static int vmsvga3dCmdDXEndQuery(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXEndQuery const *pCmd, uint32_t cbCmd) 2283 { 2284 #ifdef VMSVGA3D_DX 2285 ASMBreakpoint(); 2286 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2287 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 2288 return vmsvga3dDXEndQuery(pThisCC, idDXContext); 2289 #else 2290 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 2291 return VERR_NOT_SUPPORTED; 2292 #endif 1955 2293 } 1956 2294 1957 2295 1958 2296 /* SVGA_3D_CMD_DX_READBACK_QUERY 1171 */ 1959 static void vmsvga3dCmdDXReadbackQuery(PVGASTATECC pThisCC, SVGA3dCmdDXReadbackQuery const *pCmd) 1960 { 1961 ASMBreakpoint(); 1962 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 1963 if (pSvgaR3State->pFuncsDX) 1964 { 1965 RT_NOREF(pCmd); 1966 pSvgaR3State->pFuncsDX->pfnDXReadbackQuery(pThisCC->svga.p3dState); 1967 } 2297 static int vmsvga3dCmdDXReadbackQuery(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXReadbackQuery const *pCmd, uint32_t cbCmd) 2298 { 2299 #ifdef VMSVGA3D_DX 2300 ASMBreakpoint(); 2301 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2302 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 2303 return vmsvga3dDXReadbackQuery(pThisCC, idDXContext); 2304 #else 2305 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 2306 return VERR_NOT_SUPPORTED; 2307 #endif 1968 2308 } 1969 2309 1970 2310 1971 2311 /* SVGA_3D_CMD_DX_SET_PREDICATION 1172 */ 1972 static void vmsvga3dCmdDXSetPredication(PVGASTATECC pThisCC, SVGA3dCmdDXSetPredication const *pCmd) 1973 { 1974 ASMBreakpoint(); 1975 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 1976 if (pSvgaR3State->pFuncsDX) 1977 { 1978 RT_NOREF(pCmd); 1979 pSvgaR3State->pFuncsDX->pfnDXSetPredication(pThisCC->svga.p3dState); 1980 } 2312 static int vmsvga3dCmdDXSetPredication(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXSetPredication const *pCmd, uint32_t cbCmd) 2313 { 2314 #ifdef VMSVGA3D_DX 2315 ASMBreakpoint(); 2316 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2317 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 2318 return vmsvga3dDXSetPredication(pThisCC, idDXContext); 2319 #else 2320 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 2321 return VERR_NOT_SUPPORTED; 2322 #endif 1981 2323 } 1982 2324 1983 2325 1984 2326 /* SVGA_3D_CMD_DX_SET_SOTARGETS 1173 */ 1985 static void vmsvga3dCmdDXSetSOTargets(PVGASTATECC pThisCC, SVGA3dCmdDXSetSOTargets const *pCmd) 1986 { 1987 ASMBreakpoint(); 1988 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 1989 if (pSvgaR3State->pFuncsDX) 1990 { 1991 RT_NOREF(pCmd); 1992 pSvgaR3State->pFuncsDX->pfnDXSetSOTargets(pThisCC->svga.p3dState); 1993 } 2327 static int vmsvga3dCmdDXSetSOTargets(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXSetSOTargets const *pCmd, uint32_t cbCmd) 2328 { 2329 #ifdef VMSVGA3D_DX 2330 ASMBreakpoint(); 2331 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2332 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 2333 return vmsvga3dDXSetSOTargets(pThisCC, idDXContext); 2334 #else 2335 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 2336 return VERR_NOT_SUPPORTED; 2337 #endif 1994 2338 } 1995 2339 1996 2340 1997 2341 /* SVGA_3D_CMD_DX_SET_VIEWPORTS 1174 */ 1998 static void vmsvga3dCmdDXSetViewports(PVGASTATECC pThisCC, SVGA3dCmdDXSetViewports const *pCmd) 1999 { 2000 ASMBreakpoint(); 2001 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2002 if (pSvgaR3State->pFuncsDX) 2003 { 2004 RT_NOREF(pCmd); 2005 pSvgaR3State->pFuncsDX->pfnDXSetViewports(pThisCC->svga.p3dState); 2006 } 2342 static int vmsvga3dCmdDXSetViewports(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXSetViewports const *pCmd, uint32_t cbCmd) 2343 { 2344 #ifdef VMSVGA3D_DX 2345 //ASMBreakpoint(); 2346 SVGA3dViewport const *paViewport = (SVGA3dViewport *)&pCmd[1]; 2347 uint32_t const cViewport = (cbCmd - sizeof(*pCmd)) / sizeof(SVGA3dViewport); 2348 return vmsvga3dDXSetViewports(pThisCC, idDXContext, cViewport, paViewport); 2349 #else 2350 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 2351 return VERR_NOT_SUPPORTED; 2352 #endif 2007 2353 } 2008 2354 2009 2355 2010 2356 /* SVGA_3D_CMD_DX_SET_SCISSORRECTS 1175 */ 2011 static void vmsvga3dCmdDXSetScissorRects(PVGASTATECC pThisCC, SVGA3dCmdDXSetScissorRects const *pCmd) 2012 { 2013 ASMBreakpoint(); 2014 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2015 if (pSvgaR3State->pFuncsDX) 2016 { 2017 RT_NOREF(pCmd); 2018 pSvgaR3State->pFuncsDX->pfnDXSetScissorRects(pThisCC->svga.p3dState); 2019 } 2357 static int vmsvga3dCmdDXSetScissorRects(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXSetScissorRects const *pCmd, uint32_t cbCmd) 2358 { 2359 #ifdef VMSVGA3D_DX 2360 //ASMBreakpoint(); 2361 SVGASignedRect const *paRect = (SVGASignedRect *)&pCmd[1]; 2362 uint32_t const cRect = (cbCmd - sizeof(*pCmd)) / sizeof(SVGASignedRect); 2363 return vmsvga3dDXSetScissorRects(pThisCC, idDXContext, cRect, paRect); 2364 #else 2365 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 2366 return VERR_NOT_SUPPORTED; 2367 #endif 2020 2368 } 2021 2369 2022 2370 2023 2371 /* SVGA_3D_CMD_DX_CLEAR_RENDERTARGET_VIEW 1176 */ 2024 static void vmsvga3dCmdDXClearRenderTargetView(PVGASTATECC pThisCC, SVGA3dCmdDXClearRenderTargetView const *pCmd) 2025 { 2026 ASMBreakpoint(); 2027 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2028 if (pSvgaR3State->pFuncsDX) 2029 { 2030 RT_NOREF(pCmd); 2031 pSvgaR3State->pFuncsDX->pfnDXClearRenderTargetView(pThisCC->svga.p3dState); 2032 } 2372 static int vmsvga3dCmdDXClearRenderTargetView(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXClearRenderTargetView const *pCmd, uint32_t cbCmd) 2373 { 2374 #ifdef VMSVGA3D_DX 2375 ASMBreakpoint(); 2376 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2377 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 2378 return vmsvga3dDXClearRenderTargetView(pThisCC, idDXContext); 2379 #else 2380 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 2381 return VERR_NOT_SUPPORTED; 2382 #endif 2033 2383 } 2034 2384 2035 2385 2036 2386 /* SVGA_3D_CMD_DX_CLEAR_DEPTHSTENCIL_VIEW 1177 */ 2037 static void vmsvga3dCmdDXClearDepthStencilView(PVGASTATECC pThisCC, SVGA3dCmdDXClearDepthStencilView const *pCmd) 2038 { 2039 ASMBreakpoint(); 2040 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2041 if (pSvgaR3State->pFuncsDX) 2042 { 2043 RT_NOREF(pCmd); 2044 pSvgaR3State->pFuncsDX->pfnDXClearDepthStencilView(pThisCC->svga.p3dState); 2045 } 2387 static int vmsvga3dCmdDXClearDepthStencilView(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXClearDepthStencilView const *pCmd, uint32_t cbCmd) 2388 { 2389 #ifdef VMSVGA3D_DX 2390 ASMBreakpoint(); 2391 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2392 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 2393 return vmsvga3dDXClearDepthStencilView(pThisCC, idDXContext); 2394 #else 2395 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 2396 return VERR_NOT_SUPPORTED; 2397 #endif 2046 2398 } 2047 2399 2048 2400 2049 2401 /* SVGA_3D_CMD_DX_PRED_COPY_REGION 1178 */ 2050 static void vmsvga3dCmdDXPredCopyRegion(PVGASTATECC pThisCC, SVGA3dCmdDXPredCopyRegion const *pCmd) 2051 { 2052 ASMBreakpoint(); 2053 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2054 if (pSvgaR3State->pFuncsDX) 2055 { 2056 RT_NOREF(pCmd); 2057 pSvgaR3State->pFuncsDX->pfnDXPredCopyRegion(pThisCC->svga.p3dState); 2058 } 2402 static int vmsvga3dCmdDXPredCopyRegion(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXPredCopyRegion const *pCmd, uint32_t cbCmd) 2403 { 2404 #ifdef VMSVGA3D_DX 2405 ASMBreakpoint(); 2406 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2407 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 2408 return vmsvga3dDXPredCopyRegion(pThisCC, idDXContext); 2409 #else 2410 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 2411 return VERR_NOT_SUPPORTED; 2412 #endif 2059 2413 } 2060 2414 2061 2415 2062 2416 /* SVGA_3D_CMD_DX_PRED_COPY 1179 */ 2063 static void vmsvga3dCmdDXPredCopy(PVGASTATECC pThisCC, SVGA3dCmdDXPredCopy const *pCmd) 2064 { 2065 ASMBreakpoint(); 2066 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2067 if (pSvgaR3State->pFuncsDX) 2068 { 2069 RT_NOREF(pCmd); 2070 pSvgaR3State->pFuncsDX->pfnDXPredCopy(pThisCC->svga.p3dState); 2071 } 2417 static int vmsvga3dCmdDXPredCopy(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXPredCopy const *pCmd, uint32_t cbCmd) 2418 { 2419 #ifdef VMSVGA3D_DX 2420 ASMBreakpoint(); 2421 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2422 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 2423 return vmsvga3dDXPredCopy(pThisCC, idDXContext); 2424 #else 2425 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 2426 return VERR_NOT_SUPPORTED; 2427 #endif 2072 2428 } 2073 2429 2074 2430 2075 2431 /* SVGA_3D_CMD_DX_PRESENTBLT 1180 */ 2076 static void vmsvga3dCmdDXPresentBlt(PVGASTATECC pThisCC, SVGA3dCmdDXPresentBlt const *pCmd) 2077 { 2078 ASMBreakpoint(); 2079 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2080 if (pSvgaR3State->pFuncsDX) 2081 { 2082 RT_NOREF(pCmd); 2083 pSvgaR3State->pFuncsDX->pfnDXPresentBlt(pThisCC->svga.p3dState); 2084 } 2432 static int vmsvga3dCmdDXPresentBlt(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXPresentBlt const *pCmd, uint32_t cbCmd) 2433 { 2434 #ifdef VMSVGA3D_DX 2435 ASMBreakpoint(); 2436 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2437 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 2438 return vmsvga3dDXPresentBlt(pThisCC, idDXContext); 2439 #else 2440 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 2441 return VERR_NOT_SUPPORTED; 2442 #endif 2085 2443 } 2086 2444 2087 2445 2088 2446 /* SVGA_3D_CMD_DX_GENMIPS 1181 */ 2089 static void vmsvga3dCmdDXGenMips(PVGASTATECC pThisCC, SVGA3dCmdDXGenMips const *pCmd) 2090 { 2091 ASMBreakpoint(); 2092 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2093 if (pSvgaR3State->pFuncsDX) 2094 { 2095 RT_NOREF(pCmd); 2096 pSvgaR3State->pFuncsDX->pfnDXGenMips(pThisCC->svga.p3dState); 2097 } 2447 static int vmsvga3dCmdDXGenMips(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXGenMips const *pCmd, uint32_t cbCmd) 2448 { 2449 #ifdef VMSVGA3D_DX 2450 ASMBreakpoint(); 2451 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2452 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 2453 return vmsvga3dDXGenMips(pThisCC, idDXContext); 2454 #else 2455 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 2456 return VERR_NOT_SUPPORTED; 2457 #endif 2098 2458 } 2099 2459 2100 2460 2101 2461 /* SVGA_3D_CMD_DX_UPDATE_SUBRESOURCE 1182 */ 2102 static void vmsvga3dCmdDXUpdateSubResource(PVGASTATECC pThisCC, SVGA3dCmdDXUpdateSubResource const *pCmd) 2103 { 2104 ASMBreakpoint(); 2105 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2106 if (pSvgaR3State->pFuncsDX) 2107 { 2108 RT_NOREF(pCmd); 2109 pSvgaR3State->pFuncsDX->pfnDXUpdateSubResource(pThisCC->svga.p3dState); 2110 } 2462 static int vmsvga3dCmdDXUpdateSubResource(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXUpdateSubResource const *pCmd, uint32_t cbCmd) 2463 { 2464 #ifdef VMSVGA3D_DX 2465 ASMBreakpoint(); 2466 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2467 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 2468 return vmsvga3dDXUpdateSubResource(pThisCC, idDXContext); 2469 #else 2470 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 2471 return VERR_NOT_SUPPORTED; 2472 #endif 2111 2473 } 2112 2474 2113 2475 2114 2476 /* SVGA_3D_CMD_DX_READBACK_SUBRESOURCE 1183 */ 2115 static void vmsvga3dCmdDXReadbackSubResource(PVGASTATECC pThisCC, SVGA3dCmdDXReadbackSubResource const *pCmd) 2116 { 2117 ASMBreakpoint(); 2118 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2119 if (pSvgaR3State->pFuncsDX) 2120 { 2121 RT_NOREF(pCmd); 2122 pSvgaR3State->pFuncsDX->pfnDXReadbackSubResource(pThisCC->svga.p3dState); 2123 } 2477 static int vmsvga3dCmdDXReadbackSubResource(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXReadbackSubResource const *pCmd, uint32_t cbCmd) 2478 { 2479 #ifdef VMSVGA3D_DX 2480 ASMBreakpoint(); 2481 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2482 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 2483 return vmsvga3dDXReadbackSubResource(pThisCC, idDXContext); 2484 #else 2485 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 2486 return VERR_NOT_SUPPORTED; 2487 #endif 2124 2488 } 2125 2489 2126 2490 2127 2491 /* SVGA_3D_CMD_DX_INVALIDATE_SUBRESOURCE 1184 */ 2128 static void vmsvga3dCmdDXInvalidateSubResource(PVGASTATECC pThisCC, SVGA3dCmdDXInvalidateSubResource const *pCmd) 2129 { 2130 ASMBreakpoint(); 2131 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2132 if (pSvgaR3State->pFuncsDX) 2133 { 2134 RT_NOREF(pCmd); 2135 pSvgaR3State->pFuncsDX->pfnDXInvalidateSubResource(pThisCC->svga.p3dState); 2136 } 2492 static int vmsvga3dCmdDXInvalidateSubResource(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXInvalidateSubResource const *pCmd, uint32_t cbCmd) 2493 { 2494 #ifdef VMSVGA3D_DX 2495 ASMBreakpoint(); 2496 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2497 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 2498 return vmsvga3dDXInvalidateSubResource(pThisCC, idDXContext); 2499 #else 2500 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 2501 return VERR_NOT_SUPPORTED; 2502 #endif 2137 2503 } 2138 2504 2139 2505 2140 2506 /* SVGA_3D_CMD_DX_DEFINE_SHADERRESOURCE_VIEW 1185 */ 2141 static void vmsvga3dCmdDXDefineShaderResourceView(PVGASTATECC pThisCC, SVGA3dCmdDXDefineShaderResourceView const *pCmd) 2142 { 2143 ASMBreakpoint(); 2144 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2145 if (pSvgaR3State->pFuncsDX) 2146 { 2147 RT_NOREF(pCmd); 2148 pSvgaR3State->pFuncsDX->pfnDXDefineShaderResourceView(pThisCC->svga.p3dState); 2149 } 2507 static int vmsvga3dCmdDXDefineShaderResourceView(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXDefineShaderResourceView const *pCmd, uint32_t cbCmd) 2508 { 2509 #ifdef VMSVGA3D_DX 2510 ASMBreakpoint(); 2511 RT_NOREF(cbCmd); 2512 return vmsvga3dDXDefineShaderResourceView(pThisCC, idDXContext, pCmd); 2513 #else 2514 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 2515 return VERR_NOT_SUPPORTED; 2516 #endif 2150 2517 } 2151 2518 2152 2519 2153 2520 /* SVGA_3D_CMD_DX_DESTROY_SHADERRESOURCE_VIEW 1186 */ 2154 static void vmsvga3dCmdDXDestroyShaderResourceView(PVGASTATECC pThisCC, SVGA3dCmdDXDestroyShaderResourceView const *pCmd) 2155 { 2156 ASMBreakpoint(); 2157 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2158 if (pSvgaR3State->pFuncsDX) 2159 { 2160 RT_NOREF(pCmd); 2161 pSvgaR3State->pFuncsDX->pfnDXDestroyShaderResourceView(pThisCC->svga.p3dState); 2162 } 2521 static int vmsvga3dCmdDXDestroyShaderResourceView(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXDestroyShaderResourceView const *pCmd, uint32_t cbCmd) 2522 { 2523 #ifdef VMSVGA3D_DX 2524 ASMBreakpoint(); 2525 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2526 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 2527 return vmsvga3dDXDestroyShaderResourceView(pThisCC, idDXContext); 2528 #else 2529 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 2530 return VERR_NOT_SUPPORTED; 2531 #endif 2163 2532 } 2164 2533 2165 2534 2166 2535 /* SVGA_3D_CMD_DX_DEFINE_RENDERTARGET_VIEW 1187 */ 2167 static void vmsvga3dCmdDXDefineRenderTargetView(PVGASTATECC pThisCC, SVGA3dCmdDXDefineRenderTargetView const *pCmd) 2168 { 2169 ASMBreakpoint(); 2170 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2171 if (pSvgaR3State->pFuncsDX) 2172 { 2173 RT_NOREF(pCmd); 2174 pSvgaR3State->pFuncsDX->pfnDXDefineRenderTargetView(pThisCC->svga.p3dState); 2175 } 2536 static int vmsvga3dCmdDXDefineRenderTargetView(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXDefineRenderTargetView const *pCmd, uint32_t cbCmd) 2537 { 2538 #ifdef VMSVGA3D_DX 2539 //ASMBreakpoint(); 2540 RT_NOREF(cbCmd); 2541 return vmsvga3dDXDefineRenderTargetView(pThisCC, idDXContext, pCmd); 2542 #else 2543 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 2544 return VERR_NOT_SUPPORTED; 2545 #endif 2176 2546 } 2177 2547 2178 2548 2179 2549 /* SVGA_3D_CMD_DX_DESTROY_RENDERTARGET_VIEW 1188 */ 2180 static void vmsvga3dCmdDXDestroyRenderTargetView(PVGASTATECC pThisCC, SVGA3dCmdDXDestroyRenderTargetView const *pCmd) 2181 { 2182 ASMBreakpoint(); 2183 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2184 if (pSvgaR3State->pFuncsDX) 2185 { 2186 RT_NOREF(pCmd); 2187 pSvgaR3State->pFuncsDX->pfnDXDestroyRenderTargetView(pThisCC->svga.p3dState); 2188 } 2550 static int vmsvga3dCmdDXDestroyRenderTargetView(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXDestroyRenderTargetView const *pCmd, uint32_t cbCmd) 2551 { 2552 #ifdef VMSVGA3D_DX 2553 ASMBreakpoint(); 2554 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2555 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 2556 return vmsvga3dDXDestroyRenderTargetView(pThisCC, idDXContext); 2557 #else 2558 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 2559 return VERR_NOT_SUPPORTED; 2560 #endif 2189 2561 } 2190 2562 2191 2563 2192 2564 /* SVGA_3D_CMD_DX_DEFINE_DEPTHSTENCIL_VIEW 1189 */ 2193 static void vmsvga3dCmdDXDefineDepthStencilView(PVGASTATECC pThisCC, SVGA3dCmdDXDefineDepthStencilView const *pCmd) 2194 { 2195 ASMBreakpoint(); 2196 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2197 if (pSvgaR3State->pFuncsDX) 2198 { 2199 RT_NOREF(pCmd); 2200 pSvgaR3State->pFuncsDX->pfnDXDefineDepthStencilView(pThisCC->svga.p3dState); 2201 } 2565 static int vmsvga3dCmdDXDefineDepthStencilView(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXDefineDepthStencilView const *pCmd, uint32_t cbCmd) 2566 { 2567 #ifdef VMSVGA3D_DX 2568 ASMBreakpoint(); 2569 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2570 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 2571 return vmsvga3dDXDefineDepthStencilView(pThisCC, idDXContext); 2572 #else 2573 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 2574 return VERR_NOT_SUPPORTED; 2575 #endif 2202 2576 } 2203 2577 2204 2578 2205 2579 /* SVGA_3D_CMD_DX_DESTROY_DEPTHSTENCIL_VIEW 1190 */ 2206 static void vmsvga3dCmdDXDestroyDepthStencilView(PVGASTATECC pThisCC, SVGA3dCmdDXDestroyDepthStencilView const *pCmd) 2207 { 2208 ASMBreakpoint(); 2209 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2210 if (pSvgaR3State->pFuncsDX) 2211 { 2212 RT_NOREF(pCmd); 2213 pSvgaR3State->pFuncsDX->pfnDXDestroyDepthStencilView(pThisCC->svga.p3dState); 2214 } 2580 static int vmsvga3dCmdDXDestroyDepthStencilView(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXDestroyDepthStencilView const *pCmd, uint32_t cbCmd) 2581 { 2582 #ifdef VMSVGA3D_DX 2583 ASMBreakpoint(); 2584 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2585 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 2586 return vmsvga3dDXDestroyDepthStencilView(pThisCC, idDXContext); 2587 #else 2588 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 2589 return VERR_NOT_SUPPORTED; 2590 #endif 2215 2591 } 2216 2592 2217 2593 2218 2594 /* SVGA_3D_CMD_DX_DEFINE_ELEMENTLAYOUT 1191 */ 2219 static void vmsvga3dCmdDXDefineElementLayout(PVGASTATECC pThisCC, SVGA3dCmdDXDefineElementLayout const *pCmd) 2220 { 2221 ASMBreakpoint(); 2222 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2223 if (pSvgaR3State->pFuncsDX) 2224 { 2225 RT_NOREF(pCmd); 2226 pSvgaR3State->pFuncsDX->pfnDXDefineElementLayout(pThisCC->svga.p3dState); 2227 } 2595 static int vmsvga3dCmdDXDefineElementLayout(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXDefineElementLayout const *pCmd, uint32_t cbCmd) 2596 { 2597 #ifdef VMSVGA3D_DX 2598 //ASMBreakpoint(); 2599 SVGA3dInputElementDesc const *paDesc = (SVGA3dInputElementDesc *)&pCmd[1]; 2600 uint32_t const cDesc = (cbCmd - sizeof(*pCmd)) / sizeof(SVGA3dInputElementDesc); 2601 return vmsvga3dDXDefineElementLayout(pThisCC, idDXContext, pCmd->elementLayoutId, cDesc, paDesc); 2602 #else 2603 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 2604 return VERR_NOT_SUPPORTED; 2605 #endif 2228 2606 } 2229 2607 2230 2608 2231 2609 /* SVGA_3D_CMD_DX_DESTROY_ELEMENTLAYOUT 1192 */ 2232 static void vmsvga3dCmdDXDestroyElementLayout(PVGASTATECC pThisCC, SVGA3dCmdDXDestroyElementLayout const *pCmd) 2233 { 2234 ASMBreakpoint(); 2235 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2236 if (pSvgaR3State->pFuncsDX) 2237 { 2238 RT_NOREF(pCmd); 2239 pSvgaR3State->pFuncsDX->pfnDXDestroyElementLayout(pThisCC->svga.p3dState); 2240 } 2610 static int vmsvga3dCmdDXDestroyElementLayout(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXDestroyElementLayout const *pCmd, uint32_t cbCmd) 2611 { 2612 #ifdef VMSVGA3D_DX 2613 ASMBreakpoint(); 2614 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2615 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 2616 return vmsvga3dDXDestroyElementLayout(pThisCC, idDXContext); 2617 #else 2618 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 2619 return VERR_NOT_SUPPORTED; 2620 #endif 2241 2621 } 2242 2622 2243 2623 2244 2624 /* SVGA_3D_CMD_DX_DEFINE_BLEND_STATE 1193 */ 2245 static void vmsvga3dCmdDXDefineBlendState(PVGASTATECC pThisCC, SVGA3dCmdDXDefineBlendState const *pCmd) 2246 { 2247 ASMBreakpoint(); 2248 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2249 if (pSvgaR3State->pFuncsDX) 2250 { 2251 RT_NOREF(pCmd); 2252 pSvgaR3State->pFuncsDX->pfnDXDefineBlendState(pThisCC->svga.p3dState); 2253 } 2625 static int vmsvga3dCmdDXDefineBlendState(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXDefineBlendState const *pCmd, uint32_t cbCmd) 2626 { 2627 #ifdef VMSVGA3D_DX 2628 //ASMBreakpoint(); 2629 RT_NOREF(cbCmd); 2630 return vmsvga3dDXDefineBlendState(pThisCC, idDXContext, pCmd); 2631 #else 2632 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 2633 return VERR_NOT_SUPPORTED; 2634 #endif 2254 2635 } 2255 2636 2256 2637 2257 2638 /* SVGA_3D_CMD_DX_DESTROY_BLEND_STATE 1194 */ 2258 static void vmsvga3dCmdDXDestroyBlendState(PVGASTATECC pThisCC, SVGA3dCmdDXDestroyBlendState const *pCmd) 2259 { 2260 ASMBreakpoint(); 2261 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2262 if (pSvgaR3State->pFuncsDX) 2263 { 2264 RT_NOREF(pCmd); 2265 pSvgaR3State->pFuncsDX->pfnDXDestroyBlendState(pThisCC->svga.p3dState); 2266 } 2639 static int vmsvga3dCmdDXDestroyBlendState(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXDestroyBlendState const *pCmd, uint32_t cbCmd) 2640 { 2641 #ifdef VMSVGA3D_DX 2642 ASMBreakpoint(); 2643 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2644 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 2645 return vmsvga3dDXDestroyBlendState(pThisCC, idDXContext); 2646 #else 2647 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 2648 return VERR_NOT_SUPPORTED; 2649 #endif 2267 2650 } 2268 2651 2269 2652 2270 2653 /* SVGA_3D_CMD_DX_DEFINE_DEPTHSTENCIL_STATE 1195 */ 2271 static void vmsvga3dCmdDXDefineDepthStencilState(PVGASTATECC pThisCC, SVGA3dCmdDXDefineDepthStencilState const *pCmd) 2272 { 2273 ASMBreakpoint(); 2274 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2275 if (pSvgaR3State->pFuncsDX) 2276 { 2277 RT_NOREF(pCmd); 2278 pSvgaR3State->pFuncsDX->pfnDXDefineDepthStencilState(pThisCC->svga.p3dState); 2279 } 2654 static int vmsvga3dCmdDXDefineDepthStencilState(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXDefineDepthStencilState const *pCmd, uint32_t cbCmd) 2655 { 2656 #ifdef VMSVGA3D_DX 2657 //ASMBreakpoint(); 2658 RT_NOREF(cbCmd); 2659 return vmsvga3dDXDefineDepthStencilState(pThisCC, idDXContext, pCmd); 2660 #else 2661 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 2662 return VERR_NOT_SUPPORTED; 2663 #endif 2280 2664 } 2281 2665 2282 2666 2283 2667 /* SVGA_3D_CMD_DX_DESTROY_DEPTHSTENCIL_STATE 1196 */ 2284 static void vmsvga3dCmdDXDestroyDepthStencilState(PVGASTATECC pThisCC, SVGA3dCmdDXDestroyDepthStencilState const *pCmd) 2285 { 2286 ASMBreakpoint(); 2287 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2288 if (pSvgaR3State->pFuncsDX) 2289 { 2290 RT_NOREF(pCmd); 2291 pSvgaR3State->pFuncsDX->pfnDXDestroyDepthStencilState(pThisCC->svga.p3dState); 2292 } 2668 static int vmsvga3dCmdDXDestroyDepthStencilState(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXDestroyDepthStencilState const *pCmd, uint32_t cbCmd) 2669 { 2670 #ifdef VMSVGA3D_DX 2671 ASMBreakpoint(); 2672 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2673 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 2674 return vmsvga3dDXDestroyDepthStencilState(pThisCC, idDXContext); 2675 #else 2676 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 2677 return VERR_NOT_SUPPORTED; 2678 #endif 2293 2679 } 2294 2680 2295 2681 2296 2682 /* SVGA_3D_CMD_DX_DEFINE_RASTERIZER_STATE 1197 */ 2297 static void vmsvga3dCmdDXDefineRasterizerState(PVGASTATECC pThisCC, SVGA3dCmdDXDefineRasterizerState const *pCmd) 2298 { 2299 ASMBreakpoint(); 2300 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2301 if (pSvgaR3State->pFuncsDX) 2302 { 2303 RT_NOREF(pCmd); 2304 pSvgaR3State->pFuncsDX->pfnDXDefineRasterizerState(pThisCC->svga.p3dState); 2305 } 2683 static int vmsvga3dCmdDXDefineRasterizerState(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXDefineRasterizerState const *pCmd, uint32_t cbCmd) 2684 { 2685 #ifdef VMSVGA3D_DX 2686 //ASMBreakpoint(); 2687 RT_NOREF(cbCmd); 2688 return vmsvga3dDXDefineRasterizerState(pThisCC, idDXContext, pCmd); 2689 #else 2690 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 2691 return VERR_NOT_SUPPORTED; 2692 #endif 2306 2693 } 2307 2694 2308 2695 2309 2696 /* SVGA_3D_CMD_DX_DESTROY_RASTERIZER_STATE 1198 */ 2310 static void vmsvga3dCmdDXDestroyRasterizerState(PVGASTATECC pThisCC, SVGA3dCmdDXDestroyRasterizerState const *pCmd) 2311 { 2312 ASMBreakpoint(); 2313 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2314 if (pSvgaR3State->pFuncsDX) 2315 { 2316 RT_NOREF(pCmd); 2317 pSvgaR3State->pFuncsDX->pfnDXDestroyRasterizerState(pThisCC->svga.p3dState); 2318 } 2697 static int vmsvga3dCmdDXDestroyRasterizerState(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXDestroyRasterizerState const *pCmd, uint32_t cbCmd) 2698 { 2699 #ifdef VMSVGA3D_DX 2700 ASMBreakpoint(); 2701 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2702 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 2703 return vmsvga3dDXDestroyRasterizerState(pThisCC, idDXContext); 2704 #else 2705 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 2706 return VERR_NOT_SUPPORTED; 2707 #endif 2319 2708 } 2320 2709 2321 2710 2322 2711 /* SVGA_3D_CMD_DX_DEFINE_SAMPLER_STATE 1199 */ 2323 static void vmsvga3dCmdDXDefineSamplerState(PVGASTATECC pThisCC, SVGA3dCmdDXDefineSamplerState const *pCmd) 2324 { 2325 ASMBreakpoint(); 2326 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2327 if (pSvgaR3State->pFuncsDX) 2328 { 2329 RT_NOREF(pCmd); 2330 pSvgaR3State->pFuncsDX->pfnDXDefineSamplerState(pThisCC->svga.p3dState); 2331 } 2712 static int vmsvga3dCmdDXDefineSamplerState(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXDefineSamplerState const *pCmd, uint32_t cbCmd) 2713 { 2714 #ifdef VMSVGA3D_DX 2715 //ASMBreakpoint(); 2716 RT_NOREF(cbCmd); 2717 return vmsvga3dDXDefineSamplerState(pThisCC, idDXContext, pCmd); 2718 #else 2719 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 2720 return VERR_NOT_SUPPORTED; 2721 #endif 2332 2722 } 2333 2723 2334 2724 2335 2725 /* SVGA_3D_CMD_DX_DESTROY_SAMPLER_STATE 1200 */ 2336 static void vmsvga3dCmdDXDestroySamplerState(PVGASTATECC pThisCC, SVGA3dCmdDXDestroySamplerState const *pCmd) 2337 { 2338 ASMBreakpoint(); 2339 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2340 if (pSvgaR3State->pFuncsDX) 2341 { 2342 RT_NOREF(pCmd); 2343 pSvgaR3State->pFuncsDX->pfnDXDestroySamplerState(pThisCC->svga.p3dState); 2344 } 2726 static int vmsvga3dCmdDXDestroySamplerState(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXDestroySamplerState const *pCmd, uint32_t cbCmd) 2727 { 2728 #ifdef VMSVGA3D_DX 2729 ASMBreakpoint(); 2730 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2731 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 2732 return vmsvga3dDXDestroySamplerState(pThisCC, idDXContext); 2733 #else 2734 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 2735 return VERR_NOT_SUPPORTED; 2736 #endif 2345 2737 } 2346 2738 2347 2739 2348 2740 /* SVGA_3D_CMD_DX_DEFINE_SHADER 1201 */ 2349 static void vmsvga3dCmdDXDefineShader(PVGASTATECC pThisCC, SVGA3dCmdDXDefineShader const *pCmd) 2350 { 2351 ASMBreakpoint(); 2352 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2353 if (pSvgaR3State->pFuncsDX) 2354 { 2355 RT_NOREF(pCmd); 2356 pSvgaR3State->pFuncsDX->pfnDXDefineShader(pThisCC->svga.p3dState); 2357 } 2741 static int vmsvga3dCmdDXDefineShader(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXDefineShader const *pCmd, uint32_t cbCmd) 2742 { 2743 #ifdef VMSVGA3D_DX 2744 //ASMBreakpoint(); 2745 RT_NOREF(cbCmd); 2746 return vmsvga3dDXDefineShader(pThisCC, idDXContext, pCmd); 2747 #else 2748 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 2749 return VERR_NOT_SUPPORTED; 2750 #endif 2358 2751 } 2359 2752 2360 2753 2361 2754 /* SVGA_3D_CMD_DX_DESTROY_SHADER 1202 */ 2362 static void vmsvga3dCmdDXDestroyShader(PVGASTATECC pThisCC, SVGA3dCmdDXDestroyShader const *pCmd) 2363 { 2364 ASMBreakpoint(); 2365 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2366 if (pSvgaR3State->pFuncsDX) 2367 { 2368 RT_NOREF(pCmd); 2369 pSvgaR3State->pFuncsDX->pfnDXDestroyShader(pThisCC->svga.p3dState); 2370 } 2755 static int vmsvga3dCmdDXDestroyShader(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXDestroyShader const *pCmd, uint32_t cbCmd) 2756 { 2757 #ifdef VMSVGA3D_DX 2758 ASMBreakpoint(); 2759 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2760 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 2761 return vmsvga3dDXDestroyShader(pThisCC, idDXContext); 2762 #else 2763 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 2764 return VERR_NOT_SUPPORTED; 2765 #endif 2371 2766 } 2372 2767 2373 2768 2374 2769 /* SVGA_3D_CMD_DX_BIND_SHADER 1203 */ 2375 static void vmsvga3dCmdDXBindShader(PVGASTATECC pThisCC, SVGA3dCmdDXBindShader const *pCmd) 2376 { 2377 ASMBreakpoint(); 2378 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2379 if (pSvgaR3State->pFuncsDX) 2380 { 2381 RT_NOREF(pCmd); 2382 pSvgaR3State->pFuncsDX->pfnDXBindShader(pThisCC->svga.p3dState); 2383 } 2770 static int vmsvga3dCmdDXBindShader(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXBindShader const *pCmd, uint32_t cbCmd) 2771 { 2772 #ifdef VMSVGA3D_DX 2773 //ASMBreakpoint(); 2774 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2775 RT_NOREF(cbCmd); 2776 ASSERT_GUEST_LOGREL_MSG(idDXContext == pCmd->cid, ("idDXContext = %u, pCmd->cid = %u\n", idDXContext, pCmd->cid)); 2777 /* This returns NULL if mob does not exist. If the guest sends a wrong mob id, the current mob will be unbound. */ 2778 PVMSVGAMOB pMob = vmsvgaR3MobGet(pSvgaR3State, pCmd->mobid); 2779 return vmsvga3dDXBindShader(pThisCC, pCmd->cid, pMob, pCmd->shid, pCmd->offsetInBytes); 2780 #else 2781 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 2782 return VERR_NOT_SUPPORTED; 2783 #endif 2384 2784 } 2385 2785 2386 2786 2387 2787 /* SVGA_3D_CMD_DX_DEFINE_STREAMOUTPUT 1204 */ 2388 static void vmsvga3dCmdDXDefineStreamOutput(PVGASTATECC pThisCC, SVGA3dCmdDXDefineStreamOutput const *pCmd) 2389 { 2390 ASMBreakpoint(); 2391 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2392 if (pSvgaR3State->pFuncsDX) 2393 { 2394 RT_NOREF(pCmd); 2395 pSvgaR3State->pFuncsDX->pfnDXDefineStreamOutput(pThisCC->svga.p3dState); 2396 } 2788 static int vmsvga3dCmdDXDefineStreamOutput(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXDefineStreamOutput const *pCmd, uint32_t cbCmd) 2789 { 2790 #ifdef VMSVGA3D_DX 2791 ASMBreakpoint(); 2792 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2793 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 2794 return vmsvga3dDXDefineStreamOutput(pThisCC, idDXContext); 2795 #else 2796 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 2797 return VERR_NOT_SUPPORTED; 2798 #endif 2397 2799 } 2398 2800 2399 2801 2400 2802 /* SVGA_3D_CMD_DX_DESTROY_STREAMOUTPUT 1205 */ 2401 static void vmsvga3dCmdDXDestroyStreamOutput(PVGASTATECC pThisCC, SVGA3dCmdDXDestroyStreamOutput const *pCmd) 2402 { 2403 ASMBreakpoint(); 2404 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2405 if (pSvgaR3State->pFuncsDX) 2406 { 2407 RT_NOREF(pCmd); 2408 pSvgaR3State->pFuncsDX->pfnDXDestroyStreamOutput(pThisCC->svga.p3dState); 2409 } 2803 static int vmsvga3dCmdDXDestroyStreamOutput(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXDestroyStreamOutput const *pCmd, uint32_t cbCmd) 2804 { 2805 #ifdef VMSVGA3D_DX 2806 ASMBreakpoint(); 2807 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2808 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 2809 return vmsvga3dDXDestroyStreamOutput(pThisCC, idDXContext); 2810 #else 2811 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 2812 return VERR_NOT_SUPPORTED; 2813 #endif 2410 2814 } 2411 2815 2412 2816 2413 2817 /* SVGA_3D_CMD_DX_SET_STREAMOUTPUT 1206 */ 2414 static void vmsvga3dCmdDXSetStreamOutput(PVGASTATECC pThisCC, SVGA3dCmdDXSetStreamOutput const *pCmd) 2415 { 2416 ASMBreakpoint(); 2417 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2418 if (pSvgaR3State->pFuncsDX) 2419 { 2420 RT_NOREF(pCmd); 2421 pSvgaR3State->pFuncsDX->pfnDXSetStreamOutput(pThisCC->svga.p3dState); 2422 } 2818 static int vmsvga3dCmdDXSetStreamOutput(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXSetStreamOutput const *pCmd, uint32_t cbCmd) 2819 { 2820 #ifdef VMSVGA3D_DX 2821 ASMBreakpoint(); 2822 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2823 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 2824 return vmsvga3dDXSetStreamOutput(pThisCC, idDXContext); 2825 #else 2826 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 2827 return VERR_NOT_SUPPORTED; 2828 #endif 2423 2829 } 2424 2830 2425 2831 2426 2832 /* SVGA_3D_CMD_DX_SET_COTABLE 1207 */ 2427 static void vmsvga3dCmdDXSetCOTable(PVGASTATECC pThisCC, SVGA3dCmdDXSetCOTable const *pCmd) 2428 { 2429 ASMBreakpoint(); 2430 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2431 if (pSvgaR3State->pFuncsDX) 2432 { 2433 RT_NOREF(pCmd); 2434 pSvgaR3State->pFuncsDX->pfnDXSetCOTable(pThisCC->svga.p3dState); 2435 } 2833 static int vmsvga3dCmdDXSetCOTable(PVGASTATECC pThisCC, SVGA3dCmdDXSetCOTable const *pCmd, uint32_t cbCmd) 2834 { 2835 #ifdef VMSVGA3D_DX 2836 //ASMBreakpoint(); 2837 RT_NOREF(cbCmd); 2838 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2839 /* This returns NULL if mob does not exist. If the guest sends a wrong mob id, the current mob will be unbound. */ 2840 PVMSVGAMOB pMob = vmsvgaR3MobGet(pSvgaR3State, pCmd->mobid); 2841 return vmsvga3dDXSetCOTable(pThisCC, pCmd->cid, pMob, pCmd->type, pCmd->validSizeInBytes); 2842 #else 2843 RT_NOREF(pThisCC, pCmd, cbCmd); 2844 return VERR_NOT_SUPPORTED; 2845 #endif 2436 2846 } 2437 2847 2438 2848 2439 2849 /* SVGA_3D_CMD_DX_READBACK_COTABLE 1208 */ 2440 static void vmsvga3dCmdDXReadbackCOTable(PVGASTATECC pThisCC, SVGA3dCmdDXReadbackCOTable const *pCmd) 2441 { 2442 ASMBreakpoint(); 2443 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2444 if (pSvgaR3State->pFuncsDX) 2445 { 2446 RT_NOREF(pCmd); 2447 pSvgaR3State->pFuncsDX->pfnDXReadbackCOTable(pThisCC->svga.p3dState); 2448 } 2850 static int vmsvga3dCmdDXReadbackCOTable(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXReadbackCOTable const *pCmd, uint32_t cbCmd) 2851 { 2852 #ifdef VMSVGA3D_DX 2853 ASMBreakpoint(); 2854 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2855 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 2856 return vmsvga3dDXReadbackCOTable(pThisCC, idDXContext); 2857 #else 2858 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 2859 return VERR_NOT_SUPPORTED; 2860 #endif 2449 2861 } 2450 2862 2451 2863 2452 2864 /* SVGA_3D_CMD_DX_BUFFER_COPY 1209 */ 2453 static void vmsvga3dCmdDXBufferCopy(PVGASTATECC pThisCC, SVGA3dCmdDXBufferCopy const *pCmd) 2454 { 2455 ASMBreakpoint(); 2456 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2457 if (pSvgaR3State->pFuncsDX) 2458 { 2459 RT_NOREF(pCmd); 2460 pSvgaR3State->pFuncsDX->pfnDXBufferCopy(pThisCC->svga.p3dState); 2461 } 2865 static int vmsvga3dCmdDXBufferCopy(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXBufferCopy const *pCmd, uint32_t cbCmd) 2866 { 2867 #ifdef VMSVGA3D_DX 2868 ASMBreakpoint(); 2869 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2870 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 2871 return vmsvga3dDXBufferCopy(pThisCC, idDXContext); 2872 #else 2873 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 2874 return VERR_NOT_SUPPORTED; 2875 #endif 2462 2876 } 2463 2877 2464 2878 2465 2879 /* SVGA_3D_CMD_DX_TRANSFER_FROM_BUFFER 1210 */ 2466 static void vmsvga3dCmdDXTransferFromBuffer(PVGASTATECC pThisCC, SVGA3dCmdDXTransferFromBuffer const *pCmd) 2467 { 2468 ASMBreakpoint(); 2469 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2470 if (pSvgaR3State->pFuncsDX) 2471 { 2472 RT_NOREF(pCmd); 2473 pSvgaR3State->pFuncsDX->pfnDXTransferFromBuffer(pThisCC->svga.p3dState); 2474 } 2880 static int vmsvga3dCmdDXTransferFromBuffer(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXTransferFromBuffer const *pCmd, uint32_t cbCmd) 2881 { 2882 #ifdef VMSVGA3D_DX 2883 ASMBreakpoint(); 2884 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2885 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 2886 return vmsvga3dDXTransferFromBuffer(pThisCC, idDXContext); 2887 #else 2888 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 2889 return VERR_NOT_SUPPORTED; 2890 #endif 2475 2891 } 2476 2892 2477 2893 2478 2894 /* SVGA_3D_CMD_DX_SURFACE_COPY_AND_READBACK 1211 */ 2479 static void vmsvga3dCmdDXSurfaceCopyAndReadback(PVGASTATECC pThisCC, SVGA3dCmdDXSurfaceCopyAndReadback const *pCmd) 2480 { 2481 ASMBreakpoint(); 2482 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2483 if (pSvgaR3State->pFuncsDX) 2484 { 2485 RT_NOREF(pCmd); 2486 pSvgaR3State->pFuncsDX->pfnDXSurfaceCopyAndReadback(pThisCC->svga.p3dState); 2487 } 2895 static int vmsvga3dCmdDXSurfaceCopyAndReadback(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXSurfaceCopyAndReadback const *pCmd, uint32_t cbCmd) 2896 { 2897 #ifdef VMSVGA3D_DX 2898 ASMBreakpoint(); 2899 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2900 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 2901 return vmsvga3dDXSurfaceCopyAndReadback(pThisCC, idDXContext); 2902 #else 2903 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 2904 return VERR_NOT_SUPPORTED; 2905 #endif 2488 2906 } 2489 2907 2490 2908 2491 2909 /* SVGA_3D_CMD_DX_MOVE_QUERY 1212 */ 2492 static void vmsvga3dCmdDXMoveQuery(PVGASTATECC pThisCC, SVGA3dCmdDXMoveQuery const *pCmd) 2493 { 2494 ASMBreakpoint(); 2495 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2496 if (pSvgaR3State->pFuncsDX) 2497 { 2498 RT_NOREF(pCmd); 2499 pSvgaR3State->pFuncsDX->pfnDXMoveQuery(pThisCC->svga.p3dState); 2500 } 2910 static int vmsvga3dCmdDXMoveQuery(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXMoveQuery const *pCmd, uint32_t cbCmd) 2911 { 2912 #ifdef VMSVGA3D_DX 2913 ASMBreakpoint(); 2914 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2915 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 2916 return vmsvga3dDXMoveQuery(pThisCC, idDXContext); 2917 #else 2918 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 2919 return VERR_NOT_SUPPORTED; 2920 #endif 2501 2921 } 2502 2922 2503 2923 2504 2924 /* SVGA_3D_CMD_DX_BIND_ALL_QUERY 1213 */ 2505 static void vmsvga3dCmdDXBindAllQuery(PVGASTATECC pThisCC, SVGA3dCmdDXBindAllQuery const *pCmd) 2506 { 2507 ASMBreakpoint(); 2508 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2509 if (pSvgaR3State->pFuncsDX) 2510 { 2511 RT_NOREF(pCmd); 2512 pSvgaR3State->pFuncsDX->pfnDXBindAllQuery(pThisCC->svga.p3dState); 2513 } 2925 static int vmsvga3dCmdDXBindAllQuery(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXBindAllQuery const *pCmd, uint32_t cbCmd) 2926 { 2927 #ifdef VMSVGA3D_DX 2928 ASMBreakpoint(); 2929 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2930 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 2931 return vmsvga3dDXBindAllQuery(pThisCC, idDXContext); 2932 #else 2933 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 2934 return VERR_NOT_SUPPORTED; 2935 #endif 2514 2936 } 2515 2937 2516 2938 2517 2939 /* SVGA_3D_CMD_DX_READBACK_ALL_QUERY 1214 */ 2518 static void vmsvga3dCmdDXReadbackAllQuery(PVGASTATECC pThisCC, SVGA3dCmdDXReadbackAllQuery const *pCmd) 2519 { 2520 ASMBreakpoint(); 2521 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2522 if (pSvgaR3State->pFuncsDX) 2523 { 2524 RT_NOREF(pCmd); 2525 pSvgaR3State->pFuncsDX->pfnDXReadbackAllQuery(pThisCC->svga.p3dState); 2526 } 2940 static int vmsvga3dCmdDXReadbackAllQuery(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXReadbackAllQuery const *pCmd, uint32_t cbCmd) 2941 { 2942 #ifdef VMSVGA3D_DX 2943 ASMBreakpoint(); 2944 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2945 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 2946 return vmsvga3dDXReadbackAllQuery(pThisCC, idDXContext); 2947 #else 2948 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 2949 return VERR_NOT_SUPPORTED; 2950 #endif 2527 2951 } 2528 2952 2529 2953 2530 2954 /* SVGA_3D_CMD_DX_PRED_TRANSFER_FROM_BUFFER 1215 */ 2531 static void vmsvga3dCmdDXPredTransferFromBuffer(PVGASTATECC pThisCC, SVGA3dCmdDXPredTransferFromBuffer const *pCmd) 2532 { 2533 ASMBreakpoint(); 2534 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2535 if (pSvgaR3State->pFuncsDX) 2536 { 2537 RT_NOREF(pCmd); 2538 pSvgaR3State->pFuncsDX->pfnDXPredTransferFromBuffer(pThisCC->svga.p3dState); 2539 } 2955 static int vmsvga3dCmdDXPredTransferFromBuffer(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXPredTransferFromBuffer const *pCmd, uint32_t cbCmd) 2956 { 2957 #ifdef VMSVGA3D_DX 2958 ASMBreakpoint(); 2959 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2960 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 2961 return vmsvga3dDXPredTransferFromBuffer(pThisCC, idDXContext); 2962 #else 2963 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 2964 return VERR_NOT_SUPPORTED; 2965 #endif 2540 2966 } 2541 2967 2542 2968 2543 2969 /* SVGA_3D_CMD_DX_MOB_FENCE_64 1216 */ 2544 static void vmsvga3dCmdDXMobFence64(PVGASTATECC pThisCC, SVGA3dCmdDXMobFence64 const *pCmd) 2545 { 2546 ASMBreakpoint(); 2547 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2548 if (pSvgaR3State->pFuncsDX) 2549 { 2550 RT_NOREF(pCmd); 2551 pSvgaR3State->pFuncsDX->pfnDXMobFence64(pThisCC->svga.p3dState); 2552 } 2970 static int vmsvga3dCmdDXMobFence64(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXMobFence64 const *pCmd, uint32_t cbCmd) 2971 { 2972 #ifdef VMSVGA3D_DX 2973 ASMBreakpoint(); 2974 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2975 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 2976 return vmsvga3dDXMobFence64(pThisCC, idDXContext); 2977 #else 2978 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 2979 return VERR_NOT_SUPPORTED; 2980 #endif 2553 2981 } 2554 2982 2555 2983 2556 2984 /* SVGA_3D_CMD_DX_BIND_ALL_SHADER 1217 */ 2557 static void vmsvga3dCmdDXBindAllShader(PVGASTATECC pThisCC, SVGA3dCmdDXBindAllShader const *pCmd) 2558 { 2559 ASMBreakpoint(); 2560 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2561 if (pSvgaR3State->pFuncsDX) 2562 { 2563 RT_NOREF(pCmd); 2564 pSvgaR3State->pFuncsDX->pfnDXBindAllShader(pThisCC->svga.p3dState); 2565 } 2985 static int vmsvga3dCmdDXBindAllShader(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXBindAllShader const *pCmd, uint32_t cbCmd) 2986 { 2987 #ifdef VMSVGA3D_DX 2988 ASMBreakpoint(); 2989 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2990 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 2991 return vmsvga3dDXBindAllShader(pThisCC, idDXContext); 2992 #else 2993 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 2994 return VERR_NOT_SUPPORTED; 2995 #endif 2566 2996 } 2567 2997 2568 2998 2569 2999 /* SVGA_3D_CMD_DX_HINT 1218 */ 2570 static void vmsvga3dCmdDXHint(PVGASTATECC pThisCC, SVGA3dCmdDXHint const *pCmd) 2571 { 2572 ASMBreakpoint(); 2573 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2574 if (pSvgaR3State->pFuncsDX) 2575 { 2576 RT_NOREF(pCmd); 2577 pSvgaR3State->pFuncsDX->pfnDXHint(pThisCC->svga.p3dState); 2578 } 3000 static int vmsvga3dCmdDXHint(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXHint const *pCmd, uint32_t cbCmd) 3001 { 3002 #ifdef VMSVGA3D_DX 3003 ASMBreakpoint(); 3004 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 3005 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 3006 return vmsvga3dDXHint(pThisCC, idDXContext); 3007 #else 3008 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 3009 return VERR_NOT_SUPPORTED; 3010 #endif 2579 3011 } 2580 3012 2581 3013 2582 3014 /* SVGA_3D_CMD_DX_BUFFER_UPDATE 1219 */ 2583 static void vmsvga3dCmdDXBufferUpdate(PVGASTATECC pThisCC, SVGA3dCmdDXBufferUpdate const *pCmd) 2584 { 2585 ASMBreakpoint(); 2586 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2587 if (pSvgaR3State->pFuncsDX) 2588 { 2589 RT_NOREF(pCmd); 2590 pSvgaR3State->pFuncsDX->pfnDXBufferUpdate(pThisCC->svga.p3dState); 2591 } 3015 static int vmsvga3dCmdDXBufferUpdate(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXBufferUpdate const *pCmd, uint32_t cbCmd) 3016 { 3017 #ifdef VMSVGA3D_DX 3018 ASMBreakpoint(); 3019 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 3020 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 3021 return vmsvga3dDXBufferUpdate(pThisCC, idDXContext); 3022 #else 3023 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 3024 return VERR_NOT_SUPPORTED; 3025 #endif 2592 3026 } 2593 3027 2594 3028 2595 3029 /* SVGA_3D_CMD_DX_SET_VS_CONSTANT_BUFFER_OFFSET 1220 */ 2596 static void vmsvga3dCmdDXSetVSConstantBufferOffset(PVGASTATECC pThisCC, SVGA3dCmdDXSetVSConstantBufferOffset const *pCmd) 2597 { 2598 ASMBreakpoint(); 2599 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2600 if (pSvgaR3State->pFuncsDX) 2601 { 2602 RT_NOREF(pCmd); 2603 pSvgaR3State->pFuncsDX->pfnDXSetVSConstantBufferOffset(pThisCC->svga.p3dState); 2604 } 3030 static int vmsvga3dCmdDXSetVSConstantBufferOffset(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXSetVSConstantBufferOffset const *pCmd, uint32_t cbCmd) 3031 { 3032 #ifdef VMSVGA3D_DX 3033 ASMBreakpoint(); 3034 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 3035 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 3036 return vmsvga3dDXSetVSConstantBufferOffset(pThisCC, idDXContext); 3037 #else 3038 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 3039 return VERR_NOT_SUPPORTED; 3040 #endif 2605 3041 } 2606 3042 2607 3043 2608 3044 /* SVGA_3D_CMD_DX_SET_PS_CONSTANT_BUFFER_OFFSET 1221 */ 2609 static void vmsvga3dCmdDXSetPSConstantBufferOffset(PVGASTATECC pThisCC, SVGA3dCmdDXSetPSConstantBufferOffset const *pCmd) 2610 { 2611 ASMBreakpoint(); 2612 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2613 if (pSvgaR3State->pFuncsDX) 2614 { 2615 RT_NOREF(pCmd); 2616 pSvgaR3State->pFuncsDX->pfnDXSetPSConstantBufferOffset(pThisCC->svga.p3dState); 2617 } 3045 static int vmsvga3dCmdDXSetPSConstantBufferOffset(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXSetPSConstantBufferOffset const *pCmd, uint32_t cbCmd) 3046 { 3047 #ifdef VMSVGA3D_DX 3048 ASMBreakpoint(); 3049 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 3050 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 3051 return vmsvga3dDXSetPSConstantBufferOffset(pThisCC, idDXContext); 3052 #else 3053 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 3054 return VERR_NOT_SUPPORTED; 3055 #endif 2618 3056 } 2619 3057 2620 3058 2621 3059 /* SVGA_3D_CMD_DX_SET_GS_CONSTANT_BUFFER_OFFSET 1222 */ 2622 static void vmsvga3dCmdDXSetGSConstantBufferOffset(PVGASTATECC pThisCC, SVGA3dCmdDXSetGSConstantBufferOffset const *pCmd) 2623 { 2624 ASMBreakpoint(); 2625 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2626 if (pSvgaR3State->pFuncsDX) 2627 { 2628 RT_NOREF(pCmd); 2629 pSvgaR3State->pFuncsDX->pfnDXSetGSConstantBufferOffset(pThisCC->svga.p3dState); 2630 } 3060 static int vmsvga3dCmdDXSetGSConstantBufferOffset(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXSetGSConstantBufferOffset const *pCmd, uint32_t cbCmd) 3061 { 3062 #ifdef VMSVGA3D_DX 3063 ASMBreakpoint(); 3064 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 3065 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 3066 return vmsvga3dDXSetGSConstantBufferOffset(pThisCC, idDXContext); 3067 #else 3068 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 3069 return VERR_NOT_SUPPORTED; 3070 #endif 2631 3071 } 2632 3072 2633 3073 2634 3074 /* SVGA_3D_CMD_DX_SET_HS_CONSTANT_BUFFER_OFFSET 1223 */ 2635 static void vmsvga3dCmdDXSetHSConstantBufferOffset(PVGASTATECC pThisCC, SVGA3dCmdDXSetHSConstantBufferOffset const *pCmd) 2636 { 2637 ASMBreakpoint(); 2638 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2639 if (pSvgaR3State->pFuncsDX) 2640 { 2641 RT_NOREF(pCmd); 2642 pSvgaR3State->pFuncsDX->pfnDXSetHSConstantBufferOffset(pThisCC->svga.p3dState); 2643 } 3075 static int vmsvga3dCmdDXSetHSConstantBufferOffset(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXSetHSConstantBufferOffset const *pCmd, uint32_t cbCmd) 3076 { 3077 #ifdef VMSVGA3D_DX 3078 ASMBreakpoint(); 3079 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 3080 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 3081 return vmsvga3dDXSetHSConstantBufferOffset(pThisCC, idDXContext); 3082 #else 3083 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 3084 return VERR_NOT_SUPPORTED; 3085 #endif 2644 3086 } 2645 3087 2646 3088 2647 3089 /* SVGA_3D_CMD_DX_SET_DS_CONSTANT_BUFFER_OFFSET 1224 */ 2648 static void vmsvga3dCmdDXSetDSConstantBufferOffset(PVGASTATECC pThisCC, SVGA3dCmdDXSetDSConstantBufferOffset const *pCmd) 2649 { 2650 ASMBreakpoint(); 2651 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2652 if (pSvgaR3State->pFuncsDX) 2653 { 2654 RT_NOREF(pCmd); 2655 pSvgaR3State->pFuncsDX->pfnDXSetDSConstantBufferOffset(pThisCC->svga.p3dState); 2656 } 3090 static int vmsvga3dCmdDXSetDSConstantBufferOffset(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXSetDSConstantBufferOffset const *pCmd, uint32_t cbCmd) 3091 { 3092 #ifdef VMSVGA3D_DX 3093 ASMBreakpoint(); 3094 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 3095 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 3096 return vmsvga3dDXSetDSConstantBufferOffset(pThisCC, idDXContext); 3097 #else 3098 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 3099 return VERR_NOT_SUPPORTED; 3100 #endif 2657 3101 } 2658 3102 2659 3103 2660 3104 /* SVGA_3D_CMD_DX_SET_CS_CONSTANT_BUFFER_OFFSET 1225 */ 2661 static void vmsvga3dCmdDXSetCSConstantBufferOffset(PVGASTATECC pThisCC, SVGA3dCmdDXSetCSConstantBufferOffset const *pCmd) 2662 { 2663 ASMBreakpoint(); 2664 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2665 if (pSvgaR3State->pFuncsDX) 2666 { 2667 RT_NOREF(pCmd); 2668 pSvgaR3State->pFuncsDX->pfnDXSetCSConstantBufferOffset(pThisCC->svga.p3dState); 2669 } 3105 static int vmsvga3dCmdDXSetCSConstantBufferOffset(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXSetCSConstantBufferOffset const *pCmd, uint32_t cbCmd) 3106 { 3107 #ifdef VMSVGA3D_DX 3108 ASMBreakpoint(); 3109 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 3110 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 3111 return vmsvga3dDXSetCSConstantBufferOffset(pThisCC, idDXContext); 3112 #else 3113 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 3114 return VERR_NOT_SUPPORTED; 3115 #endif 2670 3116 } 2671 3117 2672 3118 2673 3119 /* SVGA_3D_CMD_DX_COND_BIND_ALL_SHADER 1226 */ 2674 static void vmsvga3dCmdDXCondBindAllShader(PVGASTATECC pThisCC, SVGA3dCmdDXCondBindAllShader const *pCmd) 2675 { 2676 ASMBreakpoint(); 2677 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2678 if (pSvgaR3State->pFuncsDX) 2679 { 2680 RT_NOREF(pCmd); 2681 pSvgaR3State->pFuncsDX->pfnDXCondBindAllShader(pThisCC->svga.p3dState); 2682 } 3120 static int vmsvga3dCmdDXCondBindAllShader(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXCondBindAllShader const *pCmd, uint32_t cbCmd) 3121 { 3122 #ifdef VMSVGA3D_DX 3123 ASMBreakpoint(); 3124 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 3125 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 3126 return vmsvga3dDXCondBindAllShader(pThisCC, idDXContext); 3127 #else 3128 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 3129 return VERR_NOT_SUPPORTED; 3130 #endif 2683 3131 } 2684 3132 2685 3133 2686 3134 /* SVGA_3D_CMD_SCREEN_COPY 1227 */ 2687 static void vmsvga3dCmdScreenCopy(PVGASTATECC pThisCC, SVGA3dCmdScreenCopy const *pCmd) 2688 { 2689 ASMBreakpoint(); 2690 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2691 if (pSvgaR3State->pFuncsDX) 2692 { 2693 RT_NOREF(pCmd); 2694 pSvgaR3State->pFuncsDX->pfnScreenCopy(pThisCC->svga.p3dState); 2695 } 3135 static int vmsvga3dCmdScreenCopy(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdScreenCopy const *pCmd, uint32_t cbCmd) 3136 { 3137 #ifdef VMSVGA3D_DX 3138 ASMBreakpoint(); 3139 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 3140 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 3141 return vmsvga3dScreenCopy(pThisCC, idDXContext); 3142 #else 3143 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 3144 return VERR_NOT_SUPPORTED; 3145 #endif 2696 3146 } 2697 3147 2698 3148 2699 3149 /* SVGA_3D_CMD_GROW_OTABLE 1236 */ 2700 static void vmsvga3dCmdGrowOTable(PVGASTATECC pThisCC, SVGA3dCmdGrowOTable const *pCmd) 2701 { 2702 ASMBreakpoint(); 2703 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2704 if (pSvgaR3State->pFuncsDX) 2705 { 2706 RT_NOREF(pCmd); 2707 pSvgaR3State->pFuncsDX->pfnGrowOTable(pThisCC->svga.p3dState); 2708 } 3150 static int vmsvga3dCmdGrowOTable(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdGrowOTable const *pCmd, uint32_t cbCmd) 3151 { 3152 #ifdef VMSVGA3D_DX 3153 ASMBreakpoint(); 3154 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 3155 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 3156 return vmsvga3dGrowOTable(pThisCC, idDXContext); 3157 #else 3158 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 3159 return VERR_NOT_SUPPORTED; 3160 #endif 2709 3161 } 2710 3162 2711 3163 2712 3164 /* SVGA_3D_CMD_DX_GROW_COTABLE 1237 */ 2713 static void vmsvga3dCmdDXGrowCOTable(PVGASTATECC pThisCC, SVGA3dCmdDXGrowCOTable const *pCmd) 2714 { 2715 ASMBreakpoint(); 2716 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2717 if (pSvgaR3State->pFuncsDX) 2718 { 2719 RT_NOREF(pCmd); 2720 pSvgaR3State->pFuncsDX->pfnDXGrowCOTable(pThisCC->svga.p3dState); 2721 } 3165 static int vmsvga3dCmdDXGrowCOTable(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXGrowCOTable const *pCmd, uint32_t cbCmd) 3166 { 3167 #ifdef VMSVGA3D_DX 3168 ASMBreakpoint(); 3169 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 3170 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 3171 return vmsvga3dDXGrowCOTable(pThisCC, idDXContext); 3172 #else 3173 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 3174 return VERR_NOT_SUPPORTED; 3175 #endif 2722 3176 } 2723 3177 2724 3178 2725 3179 /* SVGA_3D_CMD_INTRA_SURFACE_COPY 1238 */ 2726 static void vmsvga3dCmdIntraSurfaceCopy(PVGASTATECC pThisCC, SVGA3dCmdIntraSurfaceCopy const *pCmd) 2727 { 2728 ASMBreakpoint(); 2729 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2730 if (pSvgaR3State->pFuncsDX) 2731 { 2732 RT_NOREF(pCmd); 2733 pSvgaR3State->pFuncsDX->pfnIntraSurfaceCopy(pThisCC->svga.p3dState); 2734 } 3180 static int vmsvga3dCmdIntraSurfaceCopy(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdIntraSurfaceCopy const *pCmd, uint32_t cbCmd) 3181 { 3182 #ifdef VMSVGA3D_DX 3183 ASMBreakpoint(); 3184 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 3185 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 3186 return vmsvga3dIntraSurfaceCopy(pThisCC, idDXContext); 3187 #else 3188 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 3189 return VERR_NOT_SUPPORTED; 3190 #endif 2735 3191 } 2736 3192 2737 3193 2738 3194 /* SVGA_3D_CMD_DEFINE_GB_SURFACE_V3 1239 */ 2739 static void vmsvga3dCmdDefineGBSurface_v3(PVGASTATECC pThisCC, SVGA3dCmdDefineGBSurface_v3 const *pCmd) 2740 { 2741 ASMBreakpoint(); 2742 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2743 if (pSvgaR3State->pFuncsDX) 2744 { 2745 RT_NOREF(pCmd); 2746 pSvgaR3State->pFuncsDX->pfnDefineGBSurface_v3(pThisCC->svga.p3dState); 2747 } 3195 static int vmsvga3dCmdDefineGBSurface_v3(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDefineGBSurface_v3 const *pCmd, uint32_t cbCmd) 3196 { 3197 #ifdef VMSVGA3D_DX 3198 ASMBreakpoint(); 3199 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 3200 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 3201 return vmsvga3dDefineGBSurface_v3(pThisCC, idDXContext); 3202 #else 3203 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 3204 return VERR_NOT_SUPPORTED; 3205 #endif 2748 3206 } 2749 3207 2750 3208 2751 3209 /* SVGA_3D_CMD_DX_RESOLVE_COPY 1240 */ 2752 static void vmsvga3dCmdDXResolveCopy(PVGASTATECC pThisCC, SVGA3dCmdDXResolveCopy const *pCmd) 2753 { 2754 ASMBreakpoint(); 2755 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2756 if (pSvgaR3State->pFuncsDX) 2757 { 2758 RT_NOREF(pCmd); 2759 pSvgaR3State->pFuncsDX->pfnDXResolveCopy(pThisCC->svga.p3dState); 2760 } 3210 static int vmsvga3dCmdDXResolveCopy(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXResolveCopy const *pCmd, uint32_t cbCmd) 3211 { 3212 #ifdef VMSVGA3D_DX 3213 ASMBreakpoint(); 3214 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 3215 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 3216 return vmsvga3dDXResolveCopy(pThisCC, idDXContext); 3217 #else 3218 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 3219 return VERR_NOT_SUPPORTED; 3220 #endif 2761 3221 } 2762 3222 2763 3223 2764 3224 /* SVGA_3D_CMD_DX_PRED_RESOLVE_COPY 1241 */ 2765 static void vmsvga3dCmdDXPredResolveCopy(PVGASTATECC pThisCC, SVGA3dCmdDXPredResolveCopy const *pCmd) 2766 { 2767 ASMBreakpoint(); 2768 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2769 if (pSvgaR3State->pFuncsDX) 2770 { 2771 RT_NOREF(pCmd); 2772 pSvgaR3State->pFuncsDX->pfnDXPredResolveCopy(pThisCC->svga.p3dState); 2773 } 3225 static int vmsvga3dCmdDXPredResolveCopy(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXPredResolveCopy const *pCmd, uint32_t cbCmd) 3226 { 3227 #ifdef VMSVGA3D_DX 3228 ASMBreakpoint(); 3229 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 3230 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 3231 return vmsvga3dDXPredResolveCopy(pThisCC, idDXContext); 3232 #else 3233 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 3234 return VERR_NOT_SUPPORTED; 3235 #endif 2774 3236 } 2775 3237 2776 3238 2777 3239 /* SVGA_3D_CMD_DX_PRED_CONVERT_REGION 1242 */ 2778 static void vmsvga3dCmdDXPredConvertRegion(PVGASTATECC pThisCC, SVGA3dCmdDXPredConvertRegion const *pCmd) 2779 { 2780 ASMBreakpoint(); 2781 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2782 if (pSvgaR3State->pFuncsDX) 2783 { 2784 RT_NOREF(pCmd); 2785 pSvgaR3State->pFuncsDX->pfnDXPredConvertRegion(pThisCC->svga.p3dState); 2786 } 3240 static int vmsvga3dCmdDXPredConvertRegion(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXPredConvertRegion const *pCmd, uint32_t cbCmd) 3241 { 3242 #ifdef VMSVGA3D_DX 3243 ASMBreakpoint(); 3244 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 3245 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 3246 return vmsvga3dDXPredConvertRegion(pThisCC, idDXContext); 3247 #else 3248 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 3249 return VERR_NOT_SUPPORTED; 3250 #endif 2787 3251 } 2788 3252 2789 3253 2790 3254 /* SVGA_3D_CMD_DX_PRED_CONVERT 1243 */ 2791 static void vmsvga3dCmdDXPredConvert(PVGASTATECC pThisCC, SVGA3dCmdDXPredConvert const *pCmd) 2792 { 2793 ASMBreakpoint(); 2794 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2795 if (pSvgaR3State->pFuncsDX) 2796 { 2797 RT_NOREF(pCmd); 2798 pSvgaR3State->pFuncsDX->pfnDXPredConvert(pThisCC->svga.p3dState); 2799 } 3255 static int vmsvga3dCmdDXPredConvert(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXPredConvert const *pCmd, uint32_t cbCmd) 3256 { 3257 #ifdef VMSVGA3D_DX 3258 ASMBreakpoint(); 3259 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 3260 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 3261 return vmsvga3dDXPredConvert(pThisCC, idDXContext); 3262 #else 3263 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 3264 return VERR_NOT_SUPPORTED; 3265 #endif 2800 3266 } 2801 3267 2802 3268 2803 3269 /* SVGA_3D_CMD_WHOLE_SURFACE_COPY 1244 */ 2804 static void vmsvga3dCmdWholeSurfaceCopy(PVGASTATECC pThisCC, SVGA3dCmdWholeSurfaceCopy const *pCmd) 2805 { 2806 ASMBreakpoint(); 2807 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2808 if (pSvgaR3State->pFuncsDX) 2809 { 2810 RT_NOREF(pCmd); 2811 pSvgaR3State->pFuncsDX->pfnWholeSurfaceCopy(pThisCC->svga.p3dState); 2812 } 3270 static int vmsvga3dCmdWholeSurfaceCopy(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdWholeSurfaceCopy const *pCmd, uint32_t cbCmd) 3271 { 3272 #ifdef VMSVGA3D_DX 3273 ASMBreakpoint(); 3274 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 3275 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 3276 return vmsvga3dWholeSurfaceCopy(pThisCC, idDXContext); 3277 #else 3278 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 3279 return VERR_NOT_SUPPORTED; 3280 #endif 2813 3281 } 2814 3282 2815 3283 2816 3284 /* SVGA_3D_CMD_DX_DEFINE_UA_VIEW 1245 */ 2817 static void vmsvga3dCmdDXDefineUAView(PVGASTATECC pThisCC, SVGA3dCmdDXDefineUAView const *pCmd) 2818 { 2819 ASMBreakpoint(); 2820 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2821 if (pSvgaR3State->pFuncsDX) 2822 { 2823 RT_NOREF(pCmd); 2824 pSvgaR3State->pFuncsDX->pfnDXDefineUAView(pThisCC->svga.p3dState); 2825 } 3285 static int vmsvga3dCmdDXDefineUAView(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXDefineUAView const *pCmd, uint32_t cbCmd) 3286 { 3287 #ifdef VMSVGA3D_DX 3288 ASMBreakpoint(); 3289 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 3290 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 3291 return vmsvga3dDXDefineUAView(pThisCC, idDXContext); 3292 #else 3293 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 3294 return VERR_NOT_SUPPORTED; 3295 #endif 2826 3296 } 2827 3297 2828 3298 2829 3299 /* SVGA_3D_CMD_DX_DESTROY_UA_VIEW 1246 */ 2830 static void vmsvga3dCmdDXDestroyUAView(PVGASTATECC pThisCC, SVGA3dCmdDXDestroyUAView const *pCmd) 2831 { 2832 ASMBreakpoint(); 2833 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2834 if (pSvgaR3State->pFuncsDX) 2835 { 2836 RT_NOREF(pCmd); 2837 pSvgaR3State->pFuncsDX->pfnDXDestroyUAView(pThisCC->svga.p3dState); 2838 } 3300 static int vmsvga3dCmdDXDestroyUAView(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXDestroyUAView const *pCmd, uint32_t cbCmd) 3301 { 3302 #ifdef VMSVGA3D_DX 3303 ASMBreakpoint(); 3304 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 3305 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 3306 return vmsvga3dDXDestroyUAView(pThisCC, idDXContext); 3307 #else 3308 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 3309 return VERR_NOT_SUPPORTED; 3310 #endif 2839 3311 } 2840 3312 2841 3313 2842 3314 /* SVGA_3D_CMD_DX_CLEAR_UA_VIEW_UINT 1247 */ 2843 static void vmsvga3dCmdDXClearUAViewUint(PVGASTATECC pThisCC, SVGA3dCmdDXClearUAViewUint const *pCmd) 2844 { 2845 ASMBreakpoint(); 2846 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2847 if (pSvgaR3State->pFuncsDX) 2848 { 2849 RT_NOREF(pCmd); 2850 pSvgaR3State->pFuncsDX->pfnDXClearUAViewUint(pThisCC->svga.p3dState); 2851 } 3315 static int vmsvga3dCmdDXClearUAViewUint(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXClearUAViewUint const *pCmd, uint32_t cbCmd) 3316 { 3317 #ifdef VMSVGA3D_DX 3318 ASMBreakpoint(); 3319 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 3320 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 3321 return vmsvga3dDXClearUAViewUint(pThisCC, idDXContext); 3322 #else 3323 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 3324 return VERR_NOT_SUPPORTED; 3325 #endif 2852 3326 } 2853 3327 2854 3328 2855 3329 /* SVGA_3D_CMD_DX_CLEAR_UA_VIEW_FLOAT 1248 */ 2856 static void vmsvga3dCmdDXClearUAViewFloat(PVGASTATECC pThisCC, SVGA3dCmdDXClearUAViewFloat const *pCmd) 2857 { 2858 ASMBreakpoint(); 2859 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2860 if (pSvgaR3State->pFuncsDX) 2861 { 2862 RT_NOREF(pCmd); 2863 pSvgaR3State->pFuncsDX->pfnDXClearUAViewFloat(pThisCC->svga.p3dState); 2864 } 3330 static int vmsvga3dCmdDXClearUAViewFloat(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXClearUAViewFloat const *pCmd, uint32_t cbCmd) 3331 { 3332 #ifdef VMSVGA3D_DX 3333 ASMBreakpoint(); 3334 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 3335 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 3336 return vmsvga3dDXClearUAViewFloat(pThisCC, idDXContext); 3337 #else 3338 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 3339 return VERR_NOT_SUPPORTED; 3340 #endif 2865 3341 } 2866 3342 2867 3343 2868 3344 /* SVGA_3D_CMD_DX_COPY_STRUCTURE_COUNT 1249 */ 2869 static void vmsvga3dCmdDXCopyStructureCount(PVGASTATECC pThisCC, SVGA3dCmdDXCopyStructureCount const *pCmd) 2870 { 2871 ASMBreakpoint(); 2872 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2873 if (pSvgaR3State->pFuncsDX) 2874 { 2875 RT_NOREF(pCmd); 2876 pSvgaR3State->pFuncsDX->pfnDXCopyStructureCount(pThisCC->svga.p3dState); 2877 } 3345 static int vmsvga3dCmdDXCopyStructureCount(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXCopyStructureCount const *pCmd, uint32_t cbCmd) 3346 { 3347 #ifdef VMSVGA3D_DX 3348 ASMBreakpoint(); 3349 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 3350 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 3351 return vmsvga3dDXCopyStructureCount(pThisCC, idDXContext); 3352 #else 3353 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 3354 return VERR_NOT_SUPPORTED; 3355 #endif 2878 3356 } 2879 3357 2880 3358 2881 3359 /* SVGA_3D_CMD_DX_SET_UA_VIEWS 1250 */ 2882 static void vmsvga3dCmdDXSetUAViews(PVGASTATECC pThisCC, SVGA3dCmdDXSetUAViews const *pCmd) 2883 { 2884 ASMBreakpoint(); 2885 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2886 if (pSvgaR3State->pFuncsDX) 2887 { 2888 RT_NOREF(pCmd); 2889 pSvgaR3State->pFuncsDX->pfnDXSetUAViews(pThisCC->svga.p3dState); 2890 } 3360 static int vmsvga3dCmdDXSetUAViews(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXSetUAViews const *pCmd, uint32_t cbCmd) 3361 { 3362 #ifdef VMSVGA3D_DX 3363 ASMBreakpoint(); 3364 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 3365 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 3366 return vmsvga3dDXSetUAViews(pThisCC, idDXContext); 3367 #else 3368 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 3369 return VERR_NOT_SUPPORTED; 3370 #endif 2891 3371 } 2892 3372 2893 3373 2894 3374 /* SVGA_3D_CMD_DX_DRAW_INDEXED_INSTANCED_INDIRECT 1251 */ 2895 static void vmsvga3dCmdDXDrawIndexedInstancedIndirect(PVGASTATECC pThisCC, SVGA3dCmdDXDrawIndexedInstancedIndirect const *pCmd) 2896 { 2897 ASMBreakpoint(); 2898 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2899 if (pSvgaR3State->pFuncsDX) 2900 { 2901 RT_NOREF(pCmd); 2902 pSvgaR3State->pFuncsDX->pfnDXDrawIndexedInstancedIndirect(pThisCC->svga.p3dState); 2903 } 3375 static int vmsvga3dCmdDXDrawIndexedInstancedIndirect(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXDrawIndexedInstancedIndirect const *pCmd, uint32_t cbCmd) 3376 { 3377 #ifdef VMSVGA3D_DX 3378 ASMBreakpoint(); 3379 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 3380 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 3381 return vmsvga3dDXDrawIndexedInstancedIndirect(pThisCC, idDXContext); 3382 #else 3383 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 3384 return VERR_NOT_SUPPORTED; 3385 #endif 2904 3386 } 2905 3387 2906 3388 2907 3389 /* SVGA_3D_CMD_DX_DRAW_INSTANCED_INDIRECT 1252 */ 2908 static void vmsvga3dCmdDXDrawInstancedIndirect(PVGASTATECC pThisCC, SVGA3dCmdDXDrawInstancedIndirect const *pCmd) 2909 { 2910 ASMBreakpoint(); 2911 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2912 if (pSvgaR3State->pFuncsDX) 2913 { 2914 RT_NOREF(pCmd); 2915 pSvgaR3State->pFuncsDX->pfnDXDrawInstancedIndirect(pThisCC->svga.p3dState); 2916 } 3390 static int vmsvga3dCmdDXDrawInstancedIndirect(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXDrawInstancedIndirect const *pCmd, uint32_t cbCmd) 3391 { 3392 #ifdef VMSVGA3D_DX 3393 ASMBreakpoint(); 3394 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 3395 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 3396 return vmsvga3dDXDrawInstancedIndirect(pThisCC, idDXContext); 3397 #else 3398 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 3399 return VERR_NOT_SUPPORTED; 3400 #endif 2917 3401 } 2918 3402 2919 3403 2920 3404 /* SVGA_3D_CMD_DX_DISPATCH 1253 */ 2921 static void vmsvga3dCmdDXDispatch(PVGASTATECC pThisCC, SVGA3dCmdDXDispatch const *pCmd) 2922 { 2923 ASMBreakpoint(); 2924 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2925 if (pSvgaR3State->pFuncsDX) 2926 { 2927 RT_NOREF(pCmd); 2928 pSvgaR3State->pFuncsDX->pfnDXDispatch(pThisCC->svga.p3dState); 2929 } 3405 static int vmsvga3dCmdDXDispatch(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXDispatch const *pCmd, uint32_t cbCmd) 3406 { 3407 #ifdef VMSVGA3D_DX 3408 ASMBreakpoint(); 3409 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 3410 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 3411 return vmsvga3dDXDispatch(pThisCC, idDXContext); 3412 #else 3413 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 3414 return VERR_NOT_SUPPORTED; 3415 #endif 2930 3416 } 2931 3417 2932 3418 2933 3419 /* SVGA_3D_CMD_DX_DISPATCH_INDIRECT 1254 */ 2934 static void vmsvga3dCmdDXDispatchIndirect(PVGASTATECC pThisCC, SVGA3dCmdDXDispatchIndirect const *pCmd) 2935 { 2936 ASMBreakpoint(); 2937 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2938 if (pSvgaR3State->pFuncsDX) 2939 { 2940 RT_NOREF(pCmd); 2941 pSvgaR3State->pFuncsDX->pfnDXDispatchIndirect(pThisCC->svga.p3dState); 2942 } 3420 static int vmsvga3dCmdDXDispatchIndirect(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXDispatchIndirect const *pCmd, uint32_t cbCmd) 3421 { 3422 #ifdef VMSVGA3D_DX 3423 ASMBreakpoint(); 3424 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 3425 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 3426 return vmsvga3dDXDispatchIndirect(pThisCC, idDXContext); 3427 #else 3428 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 3429 return VERR_NOT_SUPPORTED; 3430 #endif 2943 3431 } 2944 3432 2945 3433 2946 3434 /* SVGA_3D_CMD_WRITE_ZERO_SURFACE 1255 */ 2947 static void vmsvga3dCmdWriteZeroSurface(PVGASTATECC pThisCC, SVGA3dCmdWriteZeroSurface const *pCmd) 2948 { 2949 ASMBreakpoint(); 2950 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2951 if (pSvgaR3State->pFuncsDX) 2952 { 2953 RT_NOREF(pCmd); 2954 pSvgaR3State->pFuncsDX->pfnWriteZeroSurface(pThisCC->svga.p3dState); 2955 } 3435 static int vmsvga3dCmdWriteZeroSurface(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdWriteZeroSurface const *pCmd, uint32_t cbCmd) 3436 { 3437 #ifdef VMSVGA3D_DX 3438 ASMBreakpoint(); 3439 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 3440 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 3441 return vmsvga3dWriteZeroSurface(pThisCC, idDXContext); 3442 #else 3443 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 3444 return VERR_NOT_SUPPORTED; 3445 #endif 2956 3446 } 2957 3447 2958 3448 2959 3449 /* SVGA_3D_CMD_HINT_ZERO_SURFACE 1256 */ 2960 static void vmsvga3dCmdHintZeroSurface(PVGASTATECC pThisCC, SVGA3dCmdHintZeroSurface const *pCmd) 2961 { 2962 ASMBreakpoint(); 2963 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2964 if (pSvgaR3State->pFuncsDX) 2965 { 2966 RT_NOREF(pCmd); 2967 pSvgaR3State->pFuncsDX->pfnHintZeroSurface(pThisCC->svga.p3dState); 2968 } 3450 static int vmsvga3dCmdHintZeroSurface(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdHintZeroSurface const *pCmd, uint32_t cbCmd) 3451 { 3452 #ifdef VMSVGA3D_DX 3453 ASMBreakpoint(); 3454 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 3455 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 3456 return vmsvga3dHintZeroSurface(pThisCC, idDXContext); 3457 #else 3458 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 3459 return VERR_NOT_SUPPORTED; 3460 #endif 2969 3461 } 2970 3462 2971 3463 2972 3464 /* SVGA_3D_CMD_DX_TRANSFER_TO_BUFFER 1257 */ 2973 static void vmsvga3dCmdDXTransferToBuffer(PVGASTATECC pThisCC, SVGA3dCmdDXTransferToBuffer const *pCmd) 2974 { 2975 ASMBreakpoint(); 2976 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2977 if (pSvgaR3State->pFuncsDX) 2978 { 2979 RT_NOREF(pCmd); 2980 pSvgaR3State->pFuncsDX->pfnDXTransferToBuffer(pThisCC->svga.p3dState); 2981 } 3465 static int vmsvga3dCmdDXTransferToBuffer(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXTransferToBuffer const *pCmd, uint32_t cbCmd) 3466 { 3467 #ifdef VMSVGA3D_DX 3468 ASMBreakpoint(); 3469 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 3470 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 3471 return vmsvga3dDXTransferToBuffer(pThisCC, idDXContext); 3472 #else 3473 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 3474 return VERR_NOT_SUPPORTED; 3475 #endif 2982 3476 } 2983 3477 2984 3478 2985 3479 /* SVGA_3D_CMD_DX_SET_STRUCTURE_COUNT 1258 */ 2986 static void vmsvga3dCmdDXSetStructureCount(PVGASTATECC pThisCC, SVGA3dCmdDXSetStructureCount const *pCmd) 2987 { 2988 ASMBreakpoint(); 2989 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 2990 if (pSvgaR3State->pFuncsDX) 2991 { 2992 RT_NOREF(pCmd); 2993 pSvgaR3State->pFuncsDX->pfnDXSetStructureCount(pThisCC->svga.p3dState); 2994 } 3480 static int vmsvga3dCmdDXSetStructureCount(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXSetStructureCount const *pCmd, uint32_t cbCmd) 3481 { 3482 #ifdef VMSVGA3D_DX 3483 ASMBreakpoint(); 3484 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 3485 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 3486 return vmsvga3dDXSetStructureCount(pThisCC, idDXContext); 3487 #else 3488 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 3489 return VERR_NOT_SUPPORTED; 3490 #endif 2995 3491 } 2996 3492 2997 3493 2998 3494 /* SVGA_3D_CMD_LOGICOPS_BITBLT 1259 */ 2999 static void vmsvga3dCmdLogicOpsBitBlt(PVGASTATECC pThisCC, SVGA3dCmdLogicOpsBitBlt const *pCmd) 3000 { 3001 ASMBreakpoint(); 3002 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 3003 if (pSvgaR3State->pFuncsDX) 3004 { 3005 RT_NOREF(pCmd); 3006 pSvgaR3State->pFuncsDX->pfnLogicOpsBitBlt(pThisCC->svga.p3dState); 3007 } 3495 static int vmsvga3dCmdLogicOpsBitBlt(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdLogicOpsBitBlt const *pCmd, uint32_t cbCmd) 3496 { 3497 #ifdef VMSVGA3D_DX 3498 ASMBreakpoint(); 3499 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 3500 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 3501 return vmsvga3dLogicOpsBitBlt(pThisCC, idDXContext); 3502 #else 3503 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 3504 return VERR_NOT_SUPPORTED; 3505 #endif 3008 3506 } 3009 3507 3010 3508 3011 3509 /* SVGA_3D_CMD_LOGICOPS_TRANSBLT 1260 */ 3012 static void vmsvga3dCmdLogicOpsTransBlt(PVGASTATECC pThisCC, SVGA3dCmdLogicOpsTransBlt const *pCmd) 3013 { 3014 ASMBreakpoint(); 3015 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 3016 if (pSvgaR3State->pFuncsDX) 3017 { 3018 RT_NOREF(pCmd); 3019 pSvgaR3State->pFuncsDX->pfnLogicOpsTransBlt(pThisCC->svga.p3dState); 3020 } 3510 static int vmsvga3dCmdLogicOpsTransBlt(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdLogicOpsTransBlt const *pCmd, uint32_t cbCmd) 3511 { 3512 #ifdef VMSVGA3D_DX 3513 ASMBreakpoint(); 3514 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 3515 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 3516 return vmsvga3dLogicOpsTransBlt(pThisCC, idDXContext); 3517 #else 3518 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 3519 return VERR_NOT_SUPPORTED; 3520 #endif 3021 3521 } 3022 3522 3023 3523 3024 3524 /* SVGA_3D_CMD_LOGICOPS_STRETCHBLT 1261 */ 3025 static void vmsvga3dCmdLogicOpsStretchBlt(PVGASTATECC pThisCC, SVGA3dCmdLogicOpsStretchBlt const *pCmd) 3026 { 3027 ASMBreakpoint(); 3028 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 3029 if (pSvgaR3State->pFuncsDX) 3030 { 3031 RT_NOREF(pCmd); 3032 pSvgaR3State->pFuncsDX->pfnLogicOpsStretchBlt(pThisCC->svga.p3dState); 3033 } 3525 static int vmsvga3dCmdLogicOpsStretchBlt(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdLogicOpsStretchBlt const *pCmd, uint32_t cbCmd) 3526 { 3527 #ifdef VMSVGA3D_DX 3528 ASMBreakpoint(); 3529 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 3530 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 3531 return vmsvga3dLogicOpsStretchBlt(pThisCC, idDXContext); 3532 #else 3533 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 3534 return VERR_NOT_SUPPORTED; 3535 #endif 3034 3536 } 3035 3537 3036 3538 3037 3539 /* SVGA_3D_CMD_LOGICOPS_COLORFILL 1262 */ 3038 static void vmsvga3dCmdLogicOpsColorFill(PVGASTATECC pThisCC, SVGA3dCmdLogicOpsColorFill const *pCmd) 3039 { 3040 ASMBreakpoint(); 3041 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 3042 if (pSvgaR3State->pFuncsDX) 3043 { 3044 RT_NOREF(pCmd); 3045 pSvgaR3State->pFuncsDX->pfnLogicOpsColorFill(pThisCC->svga.p3dState); 3046 } 3540 static int vmsvga3dCmdLogicOpsColorFill(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdLogicOpsColorFill const *pCmd, uint32_t cbCmd) 3541 { 3542 #ifdef VMSVGA3D_DX 3543 ASMBreakpoint(); 3544 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 3545 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 3546 return vmsvga3dLogicOpsColorFill(pThisCC, idDXContext); 3547 #else 3548 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 3549 return VERR_NOT_SUPPORTED; 3550 #endif 3047 3551 } 3048 3552 3049 3553 3050 3554 /* SVGA_3D_CMD_LOGICOPS_ALPHABLEND 1263 */ 3051 static void vmsvga3dCmdLogicOpsAlphaBlend(PVGASTATECC pThisCC, SVGA3dCmdLogicOpsAlphaBlend const *pCmd) 3052 { 3053 ASMBreakpoint(); 3054 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 3055 if (pSvgaR3State->pFuncsDX) 3056 { 3057 RT_NOREF(pCmd); 3058 pSvgaR3State->pFuncsDX->pfnLogicOpsAlphaBlend(pThisCC->svga.p3dState); 3059 } 3555 static int vmsvga3dCmdLogicOpsAlphaBlend(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdLogicOpsAlphaBlend const *pCmd, uint32_t cbCmd) 3556 { 3557 #ifdef VMSVGA3D_DX 3558 ASMBreakpoint(); 3559 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 3560 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 3561 return vmsvga3dLogicOpsAlphaBlend(pThisCC, idDXContext); 3562 #else 3563 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 3564 return VERR_NOT_SUPPORTED; 3565 #endif 3060 3566 } 3061 3567 3062 3568 3063 3569 /* SVGA_3D_CMD_LOGICOPS_CLEARTYPEBLEND 1264 */ 3064 static void vmsvga3dCmdLogicOpsClearTypeBlend(PVGASTATECC pThisCC, SVGA3dCmdLogicOpsClearTypeBlend const *pCmd) 3065 { 3066 ASMBreakpoint(); 3067 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 3068 if (pSvgaR3State->pFuncsDX) 3069 { 3070 RT_NOREF(pCmd); 3071 pSvgaR3State->pFuncsDX->pfnLogicOpsClearTypeBlend(pThisCC->svga.p3dState); 3072 } 3570 static int vmsvga3dCmdLogicOpsClearTypeBlend(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdLogicOpsClearTypeBlend const *pCmd, uint32_t cbCmd) 3571 { 3572 #ifdef VMSVGA3D_DX 3573 ASMBreakpoint(); 3574 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 3575 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 3576 return vmsvga3dLogicOpsClearTypeBlend(pThisCC, idDXContext); 3577 #else 3578 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 3579 return VERR_NOT_SUPPORTED; 3580 #endif 3073 3581 } 3074 3582 3075 3583 3076 3584 /* SVGA_3D_CMD_DEFINE_GB_SURFACE_V4 1267 */ 3077 static void vmsvga3dCmdDefineGBSurface_v4(PVGASTATECC pThisCC, SVGA3dCmdDefineGBSurface_v4 const *pCmd) 3078 { 3079 ASMBreakpoint(); 3080 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 3081 if (pSvgaR3State->pFuncsDX) 3082 { 3083 RT_NOREF(pCmd); 3084 pSvgaR3State->pFuncsDX->pfnDefineGBSurface_v4(pThisCC->svga.p3dState); 3085 } 3585 static int vmsvga3dCmdDefineGBSurface_v4(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDefineGBSurface_v4 const *pCmd, uint32_t cbCmd) 3586 { 3587 #ifdef VMSVGA3D_DX 3588 ASMBreakpoint(); 3589 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 3590 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 3591 return vmsvga3dDefineGBSurface_v4(pThisCC, idDXContext); 3592 #else 3593 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 3594 return VERR_NOT_SUPPORTED; 3595 #endif 3086 3596 } 3087 3597 3088 3598 3089 3599 /* SVGA_3D_CMD_DX_SET_CS_UA_VIEWS 1268 */ 3090 static void vmsvga3dCmdDXSetCSUAViews(PVGASTATECC pThisCC, SVGA3dCmdDXSetCSUAViews const *pCmd) 3091 { 3092 ASMBreakpoint(); 3093 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 3094 if (pSvgaR3State->pFuncsDX) 3095 { 3096 RT_NOREF(pCmd); 3097 pSvgaR3State->pFuncsDX->pfnDXSetCSUAViews(pThisCC->svga.p3dState); 3098 } 3600 static int vmsvga3dCmdDXSetCSUAViews(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXSetCSUAViews const *pCmd, uint32_t cbCmd) 3601 { 3602 #ifdef VMSVGA3D_DX 3603 ASMBreakpoint(); 3604 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 3605 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 3606 return vmsvga3dDXSetCSUAViews(pThisCC, idDXContext); 3607 #else 3608 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 3609 return VERR_NOT_SUPPORTED; 3610 #endif 3099 3611 } 3100 3612 3101 3613 3102 3614 /* SVGA_3D_CMD_DX_SET_MIN_LOD 1269 */ 3103 static void vmsvga3dCmdDXSetMinLOD(PVGASTATECC pThisCC, SVGA3dCmdDXSetMinLOD const *pCmd) 3104 { 3105 ASMBreakpoint(); 3106 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 3107 if (pSvgaR3State->pFuncsDX) 3108 { 3109 RT_NOREF(pCmd); 3110 pSvgaR3State->pFuncsDX->pfnDXSetMinLOD(pThisCC->svga.p3dState); 3111 } 3615 static int vmsvga3dCmdDXSetMinLOD(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXSetMinLOD const *pCmd, uint32_t cbCmd) 3616 { 3617 #ifdef VMSVGA3D_DX 3618 ASMBreakpoint(); 3619 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 3620 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 3621 return vmsvga3dDXSetMinLOD(pThisCC, idDXContext); 3622 #else 3623 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 3624 return VERR_NOT_SUPPORTED; 3625 #endif 3112 3626 } 3113 3627 3114 3628 3115 3629 /* SVGA_3D_CMD_DX_DEFINE_DEPTHSTENCIL_VIEW_V2 1272 */ 3116 static void vmsvga3dCmdDXDefineDepthStencilView_v2(PVGASTATECC pThisCC, SVGA3dCmdDXDefineDepthStencilView_v2 const *pCmd) 3117 { 3118 ASMBreakpoint(); 3119 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 3120 if (pSvgaR3State->pFuncsDX) 3121 { 3122 RT_NOREF(pCmd); 3123 pSvgaR3State->pFuncsDX->pfnDXDefineDepthStencilView_v2(pThisCC->svga.p3dState); 3124 } 3630 static int vmsvga3dCmdDXDefineDepthStencilView_v2(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXDefineDepthStencilView_v2 const *pCmd, uint32_t cbCmd) 3631 { 3632 #ifdef VMSVGA3D_DX 3633 ASMBreakpoint(); 3634 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 3635 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 3636 return vmsvga3dDXDefineDepthStencilView_v2(pThisCC, idDXContext); 3637 #else 3638 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 3639 return VERR_NOT_SUPPORTED; 3640 #endif 3125 3641 } 3126 3642 3127 3643 3128 3644 /* SVGA_3D_CMD_DX_DEFINE_STREAMOUTPUT_WITH_MOB 1273 */ 3129 static void vmsvga3dCmdDXDefineStreamOutputWithMob(PVGASTATECC pThisCC, SVGA3dCmdDXDefineStreamOutputWithMob const *pCmd) 3130 { 3131 ASMBreakpoint(); 3132 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 3133 if (pSvgaR3State->pFuncsDX) 3134 { 3135 RT_NOREF(pCmd); 3136 pSvgaR3State->pFuncsDX->pfnDXDefineStreamOutputWithMob(pThisCC->svga.p3dState); 3137 } 3645 static int vmsvga3dCmdDXDefineStreamOutputWithMob(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXDefineStreamOutputWithMob const *pCmd, uint32_t cbCmd) 3646 { 3647 #ifdef VMSVGA3D_DX 3648 ASMBreakpoint(); 3649 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 3650 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 3651 return vmsvga3dDXDefineStreamOutputWithMob(pThisCC, idDXContext); 3652 #else 3653 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 3654 return VERR_NOT_SUPPORTED; 3655 #endif 3138 3656 } 3139 3657 3140 3658 3141 3659 /* SVGA_3D_CMD_DX_SET_SHADER_IFACE 1274 */ 3142 static void vmsvga3dCmdDXSetShaderIface(PVGASTATECC pThisCC, SVGA3dCmdDXSetShaderIface const *pCmd) 3143 { 3144 ASMBreakpoint(); 3145 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 3146 if (pSvgaR3State->pFuncsDX) 3147 { 3148 RT_NOREF(pCmd); 3149 pSvgaR3State->pFuncsDX->pfnDXSetShaderIface(pThisCC->svga.p3dState); 3150 } 3660 static int vmsvga3dCmdDXSetShaderIface(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXSetShaderIface const *pCmd, uint32_t cbCmd) 3661 { 3662 #ifdef VMSVGA3D_DX 3663 ASMBreakpoint(); 3664 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 3665 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 3666 return vmsvga3dDXSetShaderIface(pThisCC, idDXContext); 3667 #else 3668 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 3669 return VERR_NOT_SUPPORTED; 3670 #endif 3151 3671 } 3152 3672 3153 3673 3154 3674 /* SVGA_3D_CMD_DX_BIND_STREAMOUTPUT 1275 */ 3155 static void vmsvga3dCmdDXBindStreamOutput(PVGASTATECC pThisCC, SVGA3dCmdDXBindStreamOutput const *pCmd) 3156 { 3157 ASMBreakpoint(); 3158 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 3159 if (pSvgaR3State->pFuncsDX) 3160 { 3161 RT_NOREF(pCmd); 3162 pSvgaR3State->pFuncsDX->pfnDXBindStreamOutput(pThisCC->svga.p3dState); 3163 } 3675 static int vmsvga3dCmdDXBindStreamOutput(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXBindStreamOutput const *pCmd, uint32_t cbCmd) 3676 { 3677 #ifdef VMSVGA3D_DX 3678 ASMBreakpoint(); 3679 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 3680 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 3681 return vmsvga3dDXBindStreamOutput(pThisCC, idDXContext); 3682 #else 3683 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 3684 return VERR_NOT_SUPPORTED; 3685 #endif 3164 3686 } 3165 3687 3166 3688 3167 3689 /* SVGA_3D_CMD_SURFACE_STRETCHBLT_NON_MS_TO_MS 1276 */ 3168 static void vmsvga3dCmdSurfaceStretchBltNonMSToMS(PVGASTATECC pThisCC, SVGA3dCmdSurfaceStretchBltNonMSToMS const *pCmd) 3169 { 3170 ASMBreakpoint(); 3171 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 3172 if (pSvgaR3State->pFuncsDX) 3173 { 3174 RT_NOREF(pCmd); 3175 pSvgaR3State->pFuncsDX->pfnSurfaceStretchBltNonMSToMS(pThisCC->svga.p3dState); 3176 } 3690 static int vmsvga3dCmdSurfaceStretchBltNonMSToMS(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdSurfaceStretchBltNonMSToMS const *pCmd, uint32_t cbCmd) 3691 { 3692 #ifdef VMSVGA3D_DX 3693 ASMBreakpoint(); 3694 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 3695 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 3696 return vmsvga3dSurfaceStretchBltNonMSToMS(pThisCC, idDXContext); 3697 #else 3698 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 3699 return VERR_NOT_SUPPORTED; 3700 #endif 3177 3701 } 3178 3702 3179 3703 3180 3704 /* SVGA_3D_CMD_DX_BIND_SHADER_IFACE 1277 */ 3181 static void vmsvga3dCmdDXBindShaderIface(PVGASTATECC pThisCC, SVGA3dCmdDXBindShaderIface const *pCmd) 3182 { 3183 ASMBreakpoint(); 3184 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 3185 if (pSvgaR3State->pFuncsDX) 3186 { 3187 RT_NOREF(pCmd); 3188 pSvgaR3State->pFuncsDX->pfnDXBindShaderIface(pThisCC->svga.p3dState); 3189 } 3705 static int vmsvga3dCmdDXBindShaderIface(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXBindShaderIface const *pCmd, uint32_t cbCmd) 3706 { 3707 #ifdef VMSVGA3D_DX 3708 ASMBreakpoint(); 3709 PVMSVGAR3STATE const pSvgaR3State = pThisCC->svga.pSvgaR3State; 3710 RT_NOREF(pSvgaR3State, pCmd, cbCmd); 3711 return vmsvga3dDXBindShaderIface(pThisCC, idDXContext); 3712 #else 3713 RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd); 3714 return VERR_NOT_SUPPORTED; 3715 #endif 3190 3716 } 3191 3717 … … 3211 3737 * @param pThis The shared VGA/VMSVGA state. 3212 3738 * @param pThisCC The VGA/VMSVGA state for the current context. 3739 * @param idDXContext VGPU10 DX context of the commands or SVGA3D_INVALID_ID if they are not for a specific context. 3213 3740 * @param enmCmdId SVGA_3D_CMD_* command identifier. 3214 3741 * @param cbCmd Size of the command in bytes. … … 3216 3743 * @returns VBox status code if an error was detected parsing a command. 3217 3744 */ 3218 int vmsvgaR3Process3dCmd(PVGASTATE pThis, PVGASTATECC pThisCC, SVGAFifo3dCmdId enmCmdId, uint32_t cbCmd, void const *pvCmd)3745 int vmsvgaR3Process3dCmd(PVGASTATE pThis, PVGASTATECC pThisCC, uint32_t idDXContext, SVGAFifo3dCmdId enmCmdId, uint32_t cbCmd, void const *pvCmd) 3219 3746 { 3220 3747 if (enmCmdId > SVGA_3D_CMD_MAX) … … 3785 4312 SVGA3dCmdInvalidateGBImage *pCmd = (SVGA3dCmdInvalidateGBImage *)pvCmd; 3786 4313 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 3787 VMSVGA_3D_CMD_NOTIMPL(); RT_NOREF(pCmd);4314 vmsvga3dCmdInvalidateGBImage(pThisCC, pCmd); 3788 4315 break; 3789 4316 } … … 4012 4539 case SVGA_3D_CMD_DEFINE_GB_SURFACE_V2: 4013 4540 { 4014 /// @todo SVGA3dCmdDefineGBSurface_v2 is not defined in Mesa 17 header. Mesa 20 has it. 4015 //SVGA3dCmdDefineGBSurface_v2 *pCmd = (SVGA3dCmdDefineGBSurface_v2 *)pvCmd; 4016 //VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4017 VMSVGA_3D_CMD_NOTIMPL(); 4541 SVGA3dCmdDefineGBSurface_v2 *pCmd = (SVGA3dCmdDefineGBSurface_v2 *)pvCmd; 4542 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4543 vmsvga3dCmdDefineGBSurface_v2(pThisCC, pCmd); 4018 4544 break; 4019 4545 } … … 4083 4609 SVGA3dCmdDXDefineContext *pCmd = (SVGA3dCmdDXDefineContext *)pvCmd; 4084 4610 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4085 vmsvga3dCmdDXDefineContext(pThisCC, pCmd);4611 rcParse = vmsvga3dCmdDXDefineContext(pThisCC, pCmd, cbCmd); 4086 4612 break; 4087 4613 } … … 4091 4617 SVGA3dCmdDXDestroyContext *pCmd = (SVGA3dCmdDXDestroyContext *)pvCmd; 4092 4618 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4093 vmsvga3dCmdDXDestroyContext(pThisCC, pCmd);4619 rcParse = vmsvga3dCmdDXDestroyContext(pThisCC, pCmd, cbCmd); 4094 4620 break; 4095 4621 } … … 4099 4625 SVGA3dCmdDXBindContext *pCmd = (SVGA3dCmdDXBindContext *)pvCmd; 4100 4626 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4101 vmsvga3dCmdDXBindContext(pThisCC, pCmd);4627 rcParse = vmsvga3dCmdDXBindContext(pThisCC, pCmd, cbCmd); 4102 4628 break; 4103 4629 } … … 4107 4633 SVGA3dCmdDXReadbackContext *pCmd = (SVGA3dCmdDXReadbackContext *)pvCmd; 4108 4634 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4109 vmsvga3dCmdDXReadbackContext(pThisCC, pCmd);4635 rcParse = vmsvga3dCmdDXReadbackContext(pThisCC, idDXContext, pCmd, cbCmd); 4110 4636 break; 4111 4637 } … … 4115 4641 SVGA3dCmdDXInvalidateContext *pCmd = (SVGA3dCmdDXInvalidateContext *)pvCmd; 4116 4642 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4117 vmsvga3dCmdDXInvalidateContext(pThisCC, pCmd);4643 rcParse = vmsvga3dCmdDXInvalidateContext(pThisCC, idDXContext, pCmd, cbCmd); 4118 4644 break; 4119 4645 } … … 4123 4649 SVGA3dCmdDXSetSingleConstantBuffer *pCmd = (SVGA3dCmdDXSetSingleConstantBuffer *)pvCmd; 4124 4650 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4125 vmsvga3dCmdDXSetSingleConstantBuffer(pThisCC, pCmd);4651 rcParse = vmsvga3dCmdDXSetSingleConstantBuffer(pThisCC, idDXContext, pCmd, cbCmd); 4126 4652 break; 4127 4653 } … … 4131 4657 SVGA3dCmdDXSetShaderResources *pCmd = (SVGA3dCmdDXSetShaderResources *)pvCmd; 4132 4658 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4133 vmsvga3dCmdDXSetShaderResources(pThisCC, pCmd);4659 rcParse = vmsvga3dCmdDXSetShaderResources(pThisCC, idDXContext, pCmd, cbCmd); 4134 4660 break; 4135 4661 } … … 4139 4665 SVGA3dCmdDXSetShader *pCmd = (SVGA3dCmdDXSetShader *)pvCmd; 4140 4666 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4141 vmsvga3dCmdDXSetShader(pThisCC, pCmd);4667 rcParse = vmsvga3dCmdDXSetShader(pThisCC, idDXContext, pCmd, cbCmd); 4142 4668 break; 4143 4669 } … … 4147 4673 SVGA3dCmdDXSetSamplers *pCmd = (SVGA3dCmdDXSetSamplers *)pvCmd; 4148 4674 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4149 vmsvga3dCmdDXSetSamplers(pThisCC, pCmd);4675 rcParse = vmsvga3dCmdDXSetSamplers(pThisCC, idDXContext, pCmd, cbCmd); 4150 4676 break; 4151 4677 } … … 4155 4681 SVGA3dCmdDXDraw *pCmd = (SVGA3dCmdDXDraw *)pvCmd; 4156 4682 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4157 vmsvga3dCmdDXDraw(pThisCC, pCmd);4683 rcParse = vmsvga3dCmdDXDraw(pThisCC, idDXContext, pCmd, cbCmd); 4158 4684 break; 4159 4685 } … … 4163 4689 SVGA3dCmdDXDrawIndexed *pCmd = (SVGA3dCmdDXDrawIndexed *)pvCmd; 4164 4690 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4165 vmsvga3dCmdDXDrawIndexed(pThisCC, pCmd);4691 rcParse = vmsvga3dCmdDXDrawIndexed(pThisCC, idDXContext, pCmd, cbCmd); 4166 4692 break; 4167 4693 } … … 4171 4697 SVGA3dCmdDXDrawInstanced *pCmd = (SVGA3dCmdDXDrawInstanced *)pvCmd; 4172 4698 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4173 vmsvga3dCmdDXDrawInstanced(pThisCC, pCmd);4699 rcParse = vmsvga3dCmdDXDrawInstanced(pThisCC, idDXContext, pCmd, cbCmd); 4174 4700 break; 4175 4701 } … … 4179 4705 SVGA3dCmdDXDrawIndexedInstanced *pCmd = (SVGA3dCmdDXDrawIndexedInstanced *)pvCmd; 4180 4706 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4181 vmsvga3dCmdDXDrawIndexedInstanced(pThisCC, pCmd);4707 rcParse = vmsvga3dCmdDXDrawIndexedInstanced(pThisCC, idDXContext, pCmd, cbCmd); 4182 4708 break; 4183 4709 } … … 4187 4713 SVGA3dCmdDXDrawAuto *pCmd = (SVGA3dCmdDXDrawAuto *)pvCmd; 4188 4714 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4189 vmsvga3dCmdDXDrawAuto(pThisCC, pCmd);4715 rcParse = vmsvga3dCmdDXDrawAuto(pThisCC, idDXContext, pCmd, cbCmd); 4190 4716 break; 4191 4717 } … … 4195 4721 SVGA3dCmdDXSetInputLayout *pCmd = (SVGA3dCmdDXSetInputLayout *)pvCmd; 4196 4722 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4197 vmsvga3dCmdDXSetInputLayout(pThisCC, pCmd);4723 rcParse = vmsvga3dCmdDXSetInputLayout(pThisCC, idDXContext, pCmd, cbCmd); 4198 4724 break; 4199 4725 } … … 4203 4729 SVGA3dCmdDXSetVertexBuffers *pCmd = (SVGA3dCmdDXSetVertexBuffers *)pvCmd; 4204 4730 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4205 vmsvga3dCmdDXSetVertexBuffers(pThisCC, pCmd);4731 rcParse = vmsvga3dCmdDXSetVertexBuffers(pThisCC, idDXContext, pCmd, cbCmd); 4206 4732 break; 4207 4733 } … … 4211 4737 SVGA3dCmdDXSetIndexBuffer *pCmd = (SVGA3dCmdDXSetIndexBuffer *)pvCmd; 4212 4738 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4213 vmsvga3dCmdDXSetIndexBuffer(pThisCC, pCmd);4739 rcParse = vmsvga3dCmdDXSetIndexBuffer(pThisCC, idDXContext, pCmd, cbCmd); 4214 4740 break; 4215 4741 } … … 4219 4745 SVGA3dCmdDXSetTopology *pCmd = (SVGA3dCmdDXSetTopology *)pvCmd; 4220 4746 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4221 vmsvga3dCmdDXSetTopology(pThisCC, pCmd);4747 rcParse = vmsvga3dCmdDXSetTopology(pThisCC, idDXContext, pCmd, cbCmd); 4222 4748 break; 4223 4749 } … … 4227 4753 SVGA3dCmdDXSetRenderTargets *pCmd = (SVGA3dCmdDXSetRenderTargets *)pvCmd; 4228 4754 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4229 vmsvga3dCmdDXSetRenderTargets(pThisCC, pCmd);4755 rcParse = vmsvga3dCmdDXSetRenderTargets(pThisCC, idDXContext, pCmd, cbCmd); 4230 4756 break; 4231 4757 } … … 4235 4761 SVGA3dCmdDXSetBlendState *pCmd = (SVGA3dCmdDXSetBlendState *)pvCmd; 4236 4762 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4237 vmsvga3dCmdDXSetBlendState(pThisCC, pCmd);4763 rcParse = vmsvga3dCmdDXSetBlendState(pThisCC, idDXContext, pCmd, cbCmd); 4238 4764 break; 4239 4765 } … … 4243 4769 SVGA3dCmdDXSetDepthStencilState *pCmd = (SVGA3dCmdDXSetDepthStencilState *)pvCmd; 4244 4770 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4245 vmsvga3dCmdDXSetDepthStencilState(pThisCC, pCmd);4771 rcParse = vmsvga3dCmdDXSetDepthStencilState(pThisCC, idDXContext, pCmd, cbCmd); 4246 4772 break; 4247 4773 } … … 4251 4777 SVGA3dCmdDXSetRasterizerState *pCmd = (SVGA3dCmdDXSetRasterizerState *)pvCmd; 4252 4778 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4253 vmsvga3dCmdDXSetRasterizerState(pThisCC, pCmd);4779 rcParse = vmsvga3dCmdDXSetRasterizerState(pThisCC, idDXContext, pCmd, cbCmd); 4254 4780 break; 4255 4781 } … … 4259 4785 SVGA3dCmdDXDefineQuery *pCmd = (SVGA3dCmdDXDefineQuery *)pvCmd; 4260 4786 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4261 vmsvga3dCmdDXDefineQuery(pThisCC, pCmd);4787 rcParse = vmsvga3dCmdDXDefineQuery(pThisCC, idDXContext, pCmd, cbCmd); 4262 4788 break; 4263 4789 } … … 4267 4793 SVGA3dCmdDXDestroyQuery *pCmd = (SVGA3dCmdDXDestroyQuery *)pvCmd; 4268 4794 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4269 vmsvga3dCmdDXDestroyQuery(pThisCC, pCmd);4795 rcParse = vmsvga3dCmdDXDestroyQuery(pThisCC, idDXContext, pCmd, cbCmd); 4270 4796 break; 4271 4797 } … … 4275 4801 SVGA3dCmdDXBindQuery *pCmd = (SVGA3dCmdDXBindQuery *)pvCmd; 4276 4802 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4277 vmsvga3dCmdDXBindQuery(pThisCC, pCmd);4803 rcParse = vmsvga3dCmdDXBindQuery(pThisCC, idDXContext, pCmd, cbCmd); 4278 4804 break; 4279 4805 } … … 4283 4809 SVGA3dCmdDXSetQueryOffset *pCmd = (SVGA3dCmdDXSetQueryOffset *)pvCmd; 4284 4810 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4285 vmsvga3dCmdDXSetQueryOffset(pThisCC, pCmd);4811 rcParse = vmsvga3dCmdDXSetQueryOffset(pThisCC, idDXContext, pCmd, cbCmd); 4286 4812 break; 4287 4813 } … … 4291 4817 SVGA3dCmdDXBeginQuery *pCmd = (SVGA3dCmdDXBeginQuery *)pvCmd; 4292 4818 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4293 vmsvga3dCmdDXBeginQuery(pThisCC, pCmd);4819 rcParse = vmsvga3dCmdDXBeginQuery(pThisCC, idDXContext, pCmd, cbCmd); 4294 4820 break; 4295 4821 } … … 4299 4825 SVGA3dCmdDXEndQuery *pCmd = (SVGA3dCmdDXEndQuery *)pvCmd; 4300 4826 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4301 vmsvga3dCmdDXEndQuery(pThisCC, pCmd);4827 rcParse = vmsvga3dCmdDXEndQuery(pThisCC, idDXContext, pCmd, cbCmd); 4302 4828 break; 4303 4829 } … … 4307 4833 SVGA3dCmdDXReadbackQuery *pCmd = (SVGA3dCmdDXReadbackQuery *)pvCmd; 4308 4834 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4309 vmsvga3dCmdDXReadbackQuery(pThisCC, pCmd);4835 rcParse = vmsvga3dCmdDXReadbackQuery(pThisCC, idDXContext, pCmd, cbCmd); 4310 4836 break; 4311 4837 } … … 4315 4841 SVGA3dCmdDXSetPredication *pCmd = (SVGA3dCmdDXSetPredication *)pvCmd; 4316 4842 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4317 vmsvga3dCmdDXSetPredication(pThisCC, pCmd);4843 rcParse = vmsvga3dCmdDXSetPredication(pThisCC, idDXContext, pCmd, cbCmd); 4318 4844 break; 4319 4845 } … … 4323 4849 SVGA3dCmdDXSetSOTargets *pCmd = (SVGA3dCmdDXSetSOTargets *)pvCmd; 4324 4850 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4325 vmsvga3dCmdDXSetSOTargets(pThisCC, pCmd);4851 rcParse = vmsvga3dCmdDXSetSOTargets(pThisCC, idDXContext, pCmd, cbCmd); 4326 4852 break; 4327 4853 } … … 4331 4857 SVGA3dCmdDXSetViewports *pCmd = (SVGA3dCmdDXSetViewports *)pvCmd; 4332 4858 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4333 vmsvga3dCmdDXSetViewports(pThisCC, pCmd);4859 rcParse = vmsvga3dCmdDXSetViewports(pThisCC, idDXContext, pCmd, cbCmd); 4334 4860 break; 4335 4861 } … … 4339 4865 SVGA3dCmdDXSetScissorRects *pCmd = (SVGA3dCmdDXSetScissorRects *)pvCmd; 4340 4866 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4341 vmsvga3dCmdDXSetScissorRects(pThisCC, pCmd);4867 rcParse = vmsvga3dCmdDXSetScissorRects(pThisCC, idDXContext, pCmd, cbCmd); 4342 4868 break; 4343 4869 } … … 4347 4873 SVGA3dCmdDXClearRenderTargetView *pCmd = (SVGA3dCmdDXClearRenderTargetView *)pvCmd; 4348 4874 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4349 vmsvga3dCmdDXClearRenderTargetView(pThisCC, pCmd);4875 rcParse = vmsvga3dCmdDXClearRenderTargetView(pThisCC, idDXContext, pCmd, cbCmd); 4350 4876 break; 4351 4877 } … … 4355 4881 SVGA3dCmdDXClearDepthStencilView *pCmd = (SVGA3dCmdDXClearDepthStencilView *)pvCmd; 4356 4882 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4357 vmsvga3dCmdDXClearDepthStencilView(pThisCC, pCmd);4883 rcParse = vmsvga3dCmdDXClearDepthStencilView(pThisCC, idDXContext, pCmd, cbCmd); 4358 4884 break; 4359 4885 } … … 4363 4889 SVGA3dCmdDXPredCopyRegion *pCmd = (SVGA3dCmdDXPredCopyRegion *)pvCmd; 4364 4890 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4365 vmsvga3dCmdDXPredCopyRegion(pThisCC, pCmd);4891 rcParse = vmsvga3dCmdDXPredCopyRegion(pThisCC, idDXContext, pCmd, cbCmd); 4366 4892 break; 4367 4893 } … … 4371 4897 SVGA3dCmdDXPredCopy *pCmd = (SVGA3dCmdDXPredCopy *)pvCmd; 4372 4898 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4373 vmsvga3dCmdDXPredCopy(pThisCC, pCmd);4899 rcParse = vmsvga3dCmdDXPredCopy(pThisCC, idDXContext, pCmd, cbCmd); 4374 4900 break; 4375 4901 } … … 4379 4905 SVGA3dCmdDXPresentBlt *pCmd = (SVGA3dCmdDXPresentBlt *)pvCmd; 4380 4906 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4381 vmsvga3dCmdDXPresentBlt(pThisCC, pCmd);4907 rcParse = vmsvga3dCmdDXPresentBlt(pThisCC, idDXContext, pCmd, cbCmd); 4382 4908 break; 4383 4909 } … … 4387 4913 SVGA3dCmdDXGenMips *pCmd = (SVGA3dCmdDXGenMips *)pvCmd; 4388 4914 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4389 vmsvga3dCmdDXGenMips(pThisCC, pCmd);4915 rcParse = vmsvga3dCmdDXGenMips(pThisCC, idDXContext, pCmd, cbCmd); 4390 4916 break; 4391 4917 } … … 4395 4921 SVGA3dCmdDXUpdateSubResource *pCmd = (SVGA3dCmdDXUpdateSubResource *)pvCmd; 4396 4922 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4397 vmsvga3dCmdDXUpdateSubResource(pThisCC, pCmd);4923 rcParse = vmsvga3dCmdDXUpdateSubResource(pThisCC, idDXContext, pCmd, cbCmd); 4398 4924 break; 4399 4925 } … … 4403 4929 SVGA3dCmdDXReadbackSubResource *pCmd = (SVGA3dCmdDXReadbackSubResource *)pvCmd; 4404 4930 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4405 vmsvga3dCmdDXReadbackSubResource(pThisCC, pCmd);4931 rcParse = vmsvga3dCmdDXReadbackSubResource(pThisCC, idDXContext, pCmd, cbCmd); 4406 4932 break; 4407 4933 } … … 4411 4937 SVGA3dCmdDXInvalidateSubResource *pCmd = (SVGA3dCmdDXInvalidateSubResource *)pvCmd; 4412 4938 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4413 vmsvga3dCmdDXInvalidateSubResource(pThisCC, pCmd);4939 rcParse = vmsvga3dCmdDXInvalidateSubResource(pThisCC, idDXContext, pCmd, cbCmd); 4414 4940 break; 4415 4941 } … … 4419 4945 SVGA3dCmdDXDefineShaderResourceView *pCmd = (SVGA3dCmdDXDefineShaderResourceView *)pvCmd; 4420 4946 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4421 vmsvga3dCmdDXDefineShaderResourceView(pThisCC, pCmd);4947 rcParse = vmsvga3dCmdDXDefineShaderResourceView(pThisCC, idDXContext, pCmd, cbCmd); 4422 4948 break; 4423 4949 } … … 4427 4953 SVGA3dCmdDXDestroyShaderResourceView *pCmd = (SVGA3dCmdDXDestroyShaderResourceView *)pvCmd; 4428 4954 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4429 vmsvga3dCmdDXDestroyShaderResourceView(pThisCC, pCmd);4955 rcParse = vmsvga3dCmdDXDestroyShaderResourceView(pThisCC, idDXContext, pCmd, cbCmd); 4430 4956 break; 4431 4957 } … … 4435 4961 SVGA3dCmdDXDefineRenderTargetView *pCmd = (SVGA3dCmdDXDefineRenderTargetView *)pvCmd; 4436 4962 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4437 vmsvga3dCmdDXDefineRenderTargetView(pThisCC, pCmd);4963 rcParse = vmsvga3dCmdDXDefineRenderTargetView(pThisCC, idDXContext, pCmd, cbCmd); 4438 4964 break; 4439 4965 } … … 4443 4969 SVGA3dCmdDXDestroyRenderTargetView *pCmd = (SVGA3dCmdDXDestroyRenderTargetView *)pvCmd; 4444 4970 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4445 vmsvga3dCmdDXDestroyRenderTargetView(pThisCC, pCmd);4971 rcParse = vmsvga3dCmdDXDestroyRenderTargetView(pThisCC, idDXContext, pCmd, cbCmd); 4446 4972 break; 4447 4973 } … … 4451 4977 SVGA3dCmdDXDefineDepthStencilView *pCmd = (SVGA3dCmdDXDefineDepthStencilView *)pvCmd; 4452 4978 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4453 vmsvga3dCmdDXDefineDepthStencilView(pThisCC, pCmd);4979 rcParse = vmsvga3dCmdDXDefineDepthStencilView(pThisCC, idDXContext, pCmd, cbCmd); 4454 4980 break; 4455 4981 } … … 4459 4985 SVGA3dCmdDXDestroyDepthStencilView *pCmd = (SVGA3dCmdDXDestroyDepthStencilView *)pvCmd; 4460 4986 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4461 vmsvga3dCmdDXDestroyDepthStencilView(pThisCC, pCmd);4987 rcParse = vmsvga3dCmdDXDestroyDepthStencilView(pThisCC, idDXContext, pCmd, cbCmd); 4462 4988 break; 4463 4989 } … … 4467 4993 SVGA3dCmdDXDefineElementLayout *pCmd = (SVGA3dCmdDXDefineElementLayout *)pvCmd; 4468 4994 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4469 vmsvga3dCmdDXDefineElementLayout(pThisCC, pCmd);4995 rcParse = vmsvga3dCmdDXDefineElementLayout(pThisCC, idDXContext, pCmd, cbCmd); 4470 4996 break; 4471 4997 } … … 4475 5001 SVGA3dCmdDXDestroyElementLayout *pCmd = (SVGA3dCmdDXDestroyElementLayout *)pvCmd; 4476 5002 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4477 vmsvga3dCmdDXDestroyElementLayout(pThisCC, pCmd);5003 rcParse = vmsvga3dCmdDXDestroyElementLayout(pThisCC, idDXContext, pCmd, cbCmd); 4478 5004 break; 4479 5005 } … … 4483 5009 SVGA3dCmdDXDefineBlendState *pCmd = (SVGA3dCmdDXDefineBlendState *)pvCmd; 4484 5010 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4485 vmsvga3dCmdDXDefineBlendState(pThisCC, pCmd);5011 rcParse = vmsvga3dCmdDXDefineBlendState(pThisCC, idDXContext, pCmd, cbCmd); 4486 5012 break; 4487 5013 } … … 4491 5017 SVGA3dCmdDXDestroyBlendState *pCmd = (SVGA3dCmdDXDestroyBlendState *)pvCmd; 4492 5018 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4493 vmsvga3dCmdDXDestroyBlendState(pThisCC, pCmd);5019 rcParse = vmsvga3dCmdDXDestroyBlendState(pThisCC, idDXContext, pCmd, cbCmd); 4494 5020 break; 4495 5021 } … … 4499 5025 SVGA3dCmdDXDefineDepthStencilState *pCmd = (SVGA3dCmdDXDefineDepthStencilState *)pvCmd; 4500 5026 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4501 vmsvga3dCmdDXDefineDepthStencilState(pThisCC, pCmd);5027 rcParse = vmsvga3dCmdDXDefineDepthStencilState(pThisCC, idDXContext, pCmd, cbCmd); 4502 5028 break; 4503 5029 } … … 4507 5033 SVGA3dCmdDXDestroyDepthStencilState *pCmd = (SVGA3dCmdDXDestroyDepthStencilState *)pvCmd; 4508 5034 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4509 vmsvga3dCmdDXDestroyDepthStencilState(pThisCC, pCmd);5035 rcParse = vmsvga3dCmdDXDestroyDepthStencilState(pThisCC, idDXContext, pCmd, cbCmd); 4510 5036 break; 4511 5037 } … … 4515 5041 SVGA3dCmdDXDefineRasterizerState *pCmd = (SVGA3dCmdDXDefineRasterizerState *)pvCmd; 4516 5042 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4517 vmsvga3dCmdDXDefineRasterizerState(pThisCC, pCmd);5043 rcParse = vmsvga3dCmdDXDefineRasterizerState(pThisCC, idDXContext, pCmd, cbCmd); 4518 5044 break; 4519 5045 } … … 4523 5049 SVGA3dCmdDXDestroyRasterizerState *pCmd = (SVGA3dCmdDXDestroyRasterizerState *)pvCmd; 4524 5050 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4525 vmsvga3dCmdDXDestroyRasterizerState(pThisCC, pCmd);5051 rcParse = vmsvga3dCmdDXDestroyRasterizerState(pThisCC, idDXContext, pCmd, cbCmd); 4526 5052 break; 4527 5053 } … … 4531 5057 SVGA3dCmdDXDefineSamplerState *pCmd = (SVGA3dCmdDXDefineSamplerState *)pvCmd; 4532 5058 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4533 vmsvga3dCmdDXDefineSamplerState(pThisCC, pCmd);5059 rcParse = vmsvga3dCmdDXDefineSamplerState(pThisCC, idDXContext, pCmd, cbCmd); 4534 5060 break; 4535 5061 } … … 4539 5065 SVGA3dCmdDXDestroySamplerState *pCmd = (SVGA3dCmdDXDestroySamplerState *)pvCmd; 4540 5066 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4541 vmsvga3dCmdDXDestroySamplerState(pThisCC, pCmd);5067 rcParse = vmsvga3dCmdDXDestroySamplerState(pThisCC, idDXContext, pCmd, cbCmd); 4542 5068 break; 4543 5069 } … … 4547 5073 SVGA3dCmdDXDefineShader *pCmd = (SVGA3dCmdDXDefineShader *)pvCmd; 4548 5074 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4549 vmsvga3dCmdDXDefineShader(pThisCC, pCmd);5075 rcParse = vmsvga3dCmdDXDefineShader(pThisCC, idDXContext, pCmd, cbCmd); 4550 5076 break; 4551 5077 } … … 4555 5081 SVGA3dCmdDXDestroyShader *pCmd = (SVGA3dCmdDXDestroyShader *)pvCmd; 4556 5082 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4557 vmsvga3dCmdDXDestroyShader(pThisCC, pCmd);5083 rcParse = vmsvga3dCmdDXDestroyShader(pThisCC, idDXContext, pCmd, cbCmd); 4558 5084 break; 4559 5085 } … … 4563 5089 SVGA3dCmdDXBindShader *pCmd = (SVGA3dCmdDXBindShader *)pvCmd; 4564 5090 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4565 vmsvga3dCmdDXBindShader(pThisCC, pCmd);5091 rcParse = vmsvga3dCmdDXBindShader(pThisCC, idDXContext, pCmd, cbCmd); 4566 5092 break; 4567 5093 } … … 4571 5097 SVGA3dCmdDXDefineStreamOutput *pCmd = (SVGA3dCmdDXDefineStreamOutput *)pvCmd; 4572 5098 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4573 vmsvga3dCmdDXDefineStreamOutput(pThisCC, pCmd);5099 rcParse = vmsvga3dCmdDXDefineStreamOutput(pThisCC, idDXContext, pCmd, cbCmd); 4574 5100 break; 4575 5101 } … … 4579 5105 SVGA3dCmdDXDestroyStreamOutput *pCmd = (SVGA3dCmdDXDestroyStreamOutput *)pvCmd; 4580 5106 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4581 vmsvga3dCmdDXDestroyStreamOutput(pThisCC, pCmd);5107 rcParse = vmsvga3dCmdDXDestroyStreamOutput(pThisCC, idDXContext, pCmd, cbCmd); 4582 5108 break; 4583 5109 } … … 4587 5113 SVGA3dCmdDXSetStreamOutput *pCmd = (SVGA3dCmdDXSetStreamOutput *)pvCmd; 4588 5114 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4589 vmsvga3dCmdDXSetStreamOutput(pThisCC, pCmd);5115 rcParse = vmsvga3dCmdDXSetStreamOutput(pThisCC, idDXContext, pCmd, cbCmd); 4590 5116 break; 4591 5117 } … … 4595 5121 SVGA3dCmdDXSetCOTable *pCmd = (SVGA3dCmdDXSetCOTable *)pvCmd; 4596 5122 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4597 vmsvga3dCmdDXSetCOTable(pThisCC, pCmd);5123 rcParse = vmsvga3dCmdDXSetCOTable(pThisCC, pCmd, cbCmd); 4598 5124 break; 4599 5125 } … … 4603 5129 SVGA3dCmdDXReadbackCOTable *pCmd = (SVGA3dCmdDXReadbackCOTable *)pvCmd; 4604 5130 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4605 vmsvga3dCmdDXReadbackCOTable(pThisCC, pCmd);5131 rcParse = vmsvga3dCmdDXReadbackCOTable(pThisCC, idDXContext, pCmd, cbCmd); 4606 5132 break; 4607 5133 } … … 4611 5137 SVGA3dCmdDXBufferCopy *pCmd = (SVGA3dCmdDXBufferCopy *)pvCmd; 4612 5138 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4613 vmsvga3dCmdDXBufferCopy(pThisCC, pCmd);5139 rcParse = vmsvga3dCmdDXBufferCopy(pThisCC, idDXContext, pCmd, cbCmd); 4614 5140 break; 4615 5141 } … … 4619 5145 SVGA3dCmdDXTransferFromBuffer *pCmd = (SVGA3dCmdDXTransferFromBuffer *)pvCmd; 4620 5146 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4621 vmsvga3dCmdDXTransferFromBuffer(pThisCC, pCmd);5147 rcParse = vmsvga3dCmdDXTransferFromBuffer(pThisCC, idDXContext, pCmd, cbCmd); 4622 5148 break; 4623 5149 } … … 4627 5153 SVGA3dCmdDXSurfaceCopyAndReadback *pCmd = (SVGA3dCmdDXSurfaceCopyAndReadback *)pvCmd; 4628 5154 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4629 vmsvga3dCmdDXSurfaceCopyAndReadback(pThisCC, pCmd);5155 rcParse = vmsvga3dCmdDXSurfaceCopyAndReadback(pThisCC, idDXContext, pCmd, cbCmd); 4630 5156 break; 4631 5157 } … … 4635 5161 SVGA3dCmdDXMoveQuery *pCmd = (SVGA3dCmdDXMoveQuery *)pvCmd; 4636 5162 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4637 vmsvga3dCmdDXMoveQuery(pThisCC, pCmd);5163 rcParse = vmsvga3dCmdDXMoveQuery(pThisCC, idDXContext, pCmd, cbCmd); 4638 5164 break; 4639 5165 } … … 4643 5169 SVGA3dCmdDXBindAllQuery *pCmd = (SVGA3dCmdDXBindAllQuery *)pvCmd; 4644 5170 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4645 vmsvga3dCmdDXBindAllQuery(pThisCC, pCmd);5171 rcParse = vmsvga3dCmdDXBindAllQuery(pThisCC, idDXContext, pCmd, cbCmd); 4646 5172 break; 4647 5173 } … … 4651 5177 SVGA3dCmdDXReadbackAllQuery *pCmd = (SVGA3dCmdDXReadbackAllQuery *)pvCmd; 4652 5178 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4653 vmsvga3dCmdDXReadbackAllQuery(pThisCC, pCmd);5179 rcParse = vmsvga3dCmdDXReadbackAllQuery(pThisCC, idDXContext, pCmd, cbCmd); 4654 5180 break; 4655 5181 } … … 4659 5185 SVGA3dCmdDXPredTransferFromBuffer *pCmd = (SVGA3dCmdDXPredTransferFromBuffer *)pvCmd; 4660 5186 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4661 vmsvga3dCmdDXPredTransferFromBuffer(pThisCC, pCmd);5187 rcParse = vmsvga3dCmdDXPredTransferFromBuffer(pThisCC, idDXContext, pCmd, cbCmd); 4662 5188 break; 4663 5189 } … … 4667 5193 SVGA3dCmdDXMobFence64 *pCmd = (SVGA3dCmdDXMobFence64 *)pvCmd; 4668 5194 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4669 vmsvga3dCmdDXMobFence64(pThisCC, pCmd);5195 rcParse = vmsvga3dCmdDXMobFence64(pThisCC, idDXContext, pCmd, cbCmd); 4670 5196 break; 4671 5197 } … … 4675 5201 SVGA3dCmdDXBindAllShader *pCmd = (SVGA3dCmdDXBindAllShader *)pvCmd; 4676 5202 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4677 vmsvga3dCmdDXBindAllShader(pThisCC, pCmd);5203 rcParse = vmsvga3dCmdDXBindAllShader(pThisCC, idDXContext, pCmd, cbCmd); 4678 5204 break; 4679 5205 } … … 4683 5209 SVGA3dCmdDXHint *pCmd = (SVGA3dCmdDXHint *)pvCmd; 4684 5210 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4685 vmsvga3dCmdDXHint(pThisCC, pCmd);5211 rcParse = vmsvga3dCmdDXHint(pThisCC, idDXContext, pCmd, cbCmd); 4686 5212 break; 4687 5213 } … … 4691 5217 SVGA3dCmdDXBufferUpdate *pCmd = (SVGA3dCmdDXBufferUpdate *)pvCmd; 4692 5218 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4693 vmsvga3dCmdDXBufferUpdate(pThisCC, pCmd);5219 rcParse = vmsvga3dCmdDXBufferUpdate(pThisCC, idDXContext, pCmd, cbCmd); 4694 5220 break; 4695 5221 } … … 4699 5225 SVGA3dCmdDXSetVSConstantBufferOffset *pCmd = (SVGA3dCmdDXSetVSConstantBufferOffset *)pvCmd; 4700 5226 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4701 vmsvga3dCmdDXSetVSConstantBufferOffset(pThisCC, pCmd);5227 rcParse = vmsvga3dCmdDXSetVSConstantBufferOffset(pThisCC, idDXContext, pCmd, cbCmd); 4702 5228 break; 4703 5229 } … … 4707 5233 SVGA3dCmdDXSetPSConstantBufferOffset *pCmd = (SVGA3dCmdDXSetPSConstantBufferOffset *)pvCmd; 4708 5234 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4709 vmsvga3dCmdDXSetPSConstantBufferOffset(pThisCC, pCmd);5235 rcParse = vmsvga3dCmdDXSetPSConstantBufferOffset(pThisCC, idDXContext, pCmd, cbCmd); 4710 5236 break; 4711 5237 } … … 4715 5241 SVGA3dCmdDXSetGSConstantBufferOffset *pCmd = (SVGA3dCmdDXSetGSConstantBufferOffset *)pvCmd; 4716 5242 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4717 vmsvga3dCmdDXSetGSConstantBufferOffset(pThisCC, pCmd);5243 rcParse = vmsvga3dCmdDXSetGSConstantBufferOffset(pThisCC, idDXContext, pCmd, cbCmd); 4718 5244 break; 4719 5245 } … … 4723 5249 SVGA3dCmdDXSetHSConstantBufferOffset *pCmd = (SVGA3dCmdDXSetHSConstantBufferOffset *)pvCmd; 4724 5250 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4725 vmsvga3dCmdDXSetHSConstantBufferOffset(pThisCC, pCmd);5251 rcParse = vmsvga3dCmdDXSetHSConstantBufferOffset(pThisCC, idDXContext, pCmd, cbCmd); 4726 5252 break; 4727 5253 } … … 4731 5257 SVGA3dCmdDXSetDSConstantBufferOffset *pCmd = (SVGA3dCmdDXSetDSConstantBufferOffset *)pvCmd; 4732 5258 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4733 vmsvga3dCmdDXSetDSConstantBufferOffset(pThisCC, pCmd);5259 rcParse = vmsvga3dCmdDXSetDSConstantBufferOffset(pThisCC, idDXContext, pCmd, cbCmd); 4734 5260 break; 4735 5261 } … … 4739 5265 SVGA3dCmdDXSetCSConstantBufferOffset *pCmd = (SVGA3dCmdDXSetCSConstantBufferOffset *)pvCmd; 4740 5266 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4741 vmsvga3dCmdDXSetCSConstantBufferOffset(pThisCC, pCmd);5267 rcParse = vmsvga3dCmdDXSetCSConstantBufferOffset(pThisCC, idDXContext, pCmd, cbCmd); 4742 5268 break; 4743 5269 } … … 4747 5273 SVGA3dCmdDXCondBindAllShader *pCmd = (SVGA3dCmdDXCondBindAllShader *)pvCmd; 4748 5274 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4749 vmsvga3dCmdDXCondBindAllShader(pThisCC, pCmd);5275 rcParse = vmsvga3dCmdDXCondBindAllShader(pThisCC, idDXContext, pCmd, cbCmd); 4750 5276 break; 4751 5277 } … … 4755 5281 SVGA3dCmdScreenCopy *pCmd = (SVGA3dCmdScreenCopy *)pvCmd; 4756 5282 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4757 vmsvga3dCmdScreenCopy(pThisCC, pCmd);5283 rcParse = vmsvga3dCmdScreenCopy(pThisCC, idDXContext, pCmd, cbCmd); 4758 5284 break; 4759 5285 } … … 4811 5337 SVGA3dCmdGrowOTable *pCmd = (SVGA3dCmdGrowOTable *)pvCmd; 4812 5338 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4813 vmsvga3dCmdGrowOTable(pThisCC, pCmd);5339 rcParse = vmsvga3dCmdGrowOTable(pThisCC, idDXContext, pCmd, cbCmd); 4814 5340 break; 4815 5341 } … … 4819 5345 SVGA3dCmdDXGrowCOTable *pCmd = (SVGA3dCmdDXGrowCOTable *)pvCmd; 4820 5346 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4821 vmsvga3dCmdDXGrowCOTable(pThisCC, pCmd);5347 rcParse = vmsvga3dCmdDXGrowCOTable(pThisCC, idDXContext, pCmd, cbCmd); 4822 5348 break; 4823 5349 } … … 4827 5353 SVGA3dCmdIntraSurfaceCopy *pCmd = (SVGA3dCmdIntraSurfaceCopy *)pvCmd; 4828 5354 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4829 vmsvga3dCmdIntraSurfaceCopy(pThisCC, pCmd);5355 rcParse = vmsvga3dCmdIntraSurfaceCopy(pThisCC, idDXContext, pCmd, cbCmd); 4830 5356 break; 4831 5357 } … … 4835 5361 SVGA3dCmdDefineGBSurface_v3 *pCmd = (SVGA3dCmdDefineGBSurface_v3 *)pvCmd; 4836 5362 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4837 vmsvga3dCmdDefineGBSurface_v3(pThisCC, pCmd);5363 rcParse = vmsvga3dCmdDefineGBSurface_v3(pThisCC, idDXContext, pCmd, cbCmd); 4838 5364 break; 4839 5365 } … … 4843 5369 SVGA3dCmdDXResolveCopy *pCmd = (SVGA3dCmdDXResolveCopy *)pvCmd; 4844 5370 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4845 vmsvga3dCmdDXResolveCopy(pThisCC, pCmd);5371 rcParse = vmsvga3dCmdDXResolveCopy(pThisCC, idDXContext, pCmd, cbCmd); 4846 5372 break; 4847 5373 } … … 4851 5377 SVGA3dCmdDXPredResolveCopy *pCmd = (SVGA3dCmdDXPredResolveCopy *)pvCmd; 4852 5378 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4853 vmsvga3dCmdDXPredResolveCopy(pThisCC, pCmd);5379 rcParse = vmsvga3dCmdDXPredResolveCopy(pThisCC, idDXContext, pCmd, cbCmd); 4854 5380 break; 4855 5381 } … … 4859 5385 SVGA3dCmdDXPredConvertRegion *pCmd = (SVGA3dCmdDXPredConvertRegion *)pvCmd; 4860 5386 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4861 vmsvga3dCmdDXPredConvertRegion(pThisCC, pCmd);5387 rcParse = vmsvga3dCmdDXPredConvertRegion(pThisCC, idDXContext, pCmd, cbCmd); 4862 5388 break; 4863 5389 } … … 4867 5393 SVGA3dCmdDXPredConvert *pCmd = (SVGA3dCmdDXPredConvert *)pvCmd; 4868 5394 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4869 vmsvga3dCmdDXPredConvert(pThisCC, pCmd);5395 rcParse = vmsvga3dCmdDXPredConvert(pThisCC, idDXContext, pCmd, cbCmd); 4870 5396 break; 4871 5397 } … … 4875 5401 SVGA3dCmdWholeSurfaceCopy *pCmd = (SVGA3dCmdWholeSurfaceCopy *)pvCmd; 4876 5402 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4877 vmsvga3dCmdWholeSurfaceCopy(pThisCC, pCmd);5403 rcParse = vmsvga3dCmdWholeSurfaceCopy(pThisCC, idDXContext, pCmd, cbCmd); 4878 5404 break; 4879 5405 } … … 4883 5409 SVGA3dCmdDXDefineUAView *pCmd = (SVGA3dCmdDXDefineUAView *)pvCmd; 4884 5410 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4885 vmsvga3dCmdDXDefineUAView(pThisCC, pCmd);5411 rcParse = vmsvga3dCmdDXDefineUAView(pThisCC, idDXContext, pCmd, cbCmd); 4886 5412 break; 4887 5413 } … … 4891 5417 SVGA3dCmdDXDestroyUAView *pCmd = (SVGA3dCmdDXDestroyUAView *)pvCmd; 4892 5418 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4893 vmsvga3dCmdDXDestroyUAView(pThisCC, pCmd);5419 rcParse = vmsvga3dCmdDXDestroyUAView(pThisCC, idDXContext, pCmd, cbCmd); 4894 5420 break; 4895 5421 } … … 4899 5425 SVGA3dCmdDXClearUAViewUint *pCmd = (SVGA3dCmdDXClearUAViewUint *)pvCmd; 4900 5426 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4901 vmsvga3dCmdDXClearUAViewUint(pThisCC, pCmd);5427 rcParse = vmsvga3dCmdDXClearUAViewUint(pThisCC, idDXContext, pCmd, cbCmd); 4902 5428 break; 4903 5429 } … … 4907 5433 SVGA3dCmdDXClearUAViewFloat *pCmd = (SVGA3dCmdDXClearUAViewFloat *)pvCmd; 4908 5434 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4909 vmsvga3dCmdDXClearUAViewFloat(pThisCC, pCmd);5435 rcParse = vmsvga3dCmdDXClearUAViewFloat(pThisCC, idDXContext, pCmd, cbCmd); 4910 5436 break; 4911 5437 } … … 4915 5441 SVGA3dCmdDXCopyStructureCount *pCmd = (SVGA3dCmdDXCopyStructureCount *)pvCmd; 4916 5442 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4917 vmsvga3dCmdDXCopyStructureCount(pThisCC, pCmd);5443 rcParse = vmsvga3dCmdDXCopyStructureCount(pThisCC, idDXContext, pCmd, cbCmd); 4918 5444 break; 4919 5445 } … … 4923 5449 SVGA3dCmdDXSetUAViews *pCmd = (SVGA3dCmdDXSetUAViews *)pvCmd; 4924 5450 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4925 vmsvga3dCmdDXSetUAViews(pThisCC, pCmd);5451 rcParse = vmsvga3dCmdDXSetUAViews(pThisCC, idDXContext, pCmd, cbCmd); 4926 5452 break; 4927 5453 } … … 4931 5457 SVGA3dCmdDXDrawIndexedInstancedIndirect *pCmd = (SVGA3dCmdDXDrawIndexedInstancedIndirect *)pvCmd; 4932 5458 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4933 vmsvga3dCmdDXDrawIndexedInstancedIndirect(pThisCC, pCmd);5459 rcParse = vmsvga3dCmdDXDrawIndexedInstancedIndirect(pThisCC, idDXContext, pCmd, cbCmd); 4934 5460 break; 4935 5461 } … … 4939 5465 SVGA3dCmdDXDrawInstancedIndirect *pCmd = (SVGA3dCmdDXDrawInstancedIndirect *)pvCmd; 4940 5466 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4941 vmsvga3dCmdDXDrawInstancedIndirect(pThisCC, pCmd);5467 rcParse = vmsvga3dCmdDXDrawInstancedIndirect(pThisCC, idDXContext, pCmd, cbCmd); 4942 5468 break; 4943 5469 } … … 4947 5473 SVGA3dCmdDXDispatch *pCmd = (SVGA3dCmdDXDispatch *)pvCmd; 4948 5474 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4949 vmsvga3dCmdDXDispatch(pThisCC, pCmd);5475 rcParse = vmsvga3dCmdDXDispatch(pThisCC, idDXContext, pCmd, cbCmd); 4950 5476 break; 4951 5477 } … … 4955 5481 SVGA3dCmdDXDispatchIndirect *pCmd = (SVGA3dCmdDXDispatchIndirect *)pvCmd; 4956 5482 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4957 vmsvga3dCmdDXDispatchIndirect(pThisCC, pCmd);5483 rcParse = vmsvga3dCmdDXDispatchIndirect(pThisCC, idDXContext, pCmd, cbCmd); 4958 5484 break; 4959 5485 } … … 4963 5489 SVGA3dCmdWriteZeroSurface *pCmd = (SVGA3dCmdWriteZeroSurface *)pvCmd; 4964 5490 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4965 vmsvga3dCmdWriteZeroSurface(pThisCC, pCmd);5491 rcParse = vmsvga3dCmdWriteZeroSurface(pThisCC, idDXContext, pCmd, cbCmd); 4966 5492 break; 4967 5493 } … … 4971 5497 SVGA3dCmdHintZeroSurface *pCmd = (SVGA3dCmdHintZeroSurface *)pvCmd; 4972 5498 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4973 vmsvga3dCmdHintZeroSurface(pThisCC, pCmd);5499 rcParse = vmsvga3dCmdHintZeroSurface(pThisCC, idDXContext, pCmd, cbCmd); 4974 5500 break; 4975 5501 } … … 4979 5505 SVGA3dCmdDXTransferToBuffer *pCmd = (SVGA3dCmdDXTransferToBuffer *)pvCmd; 4980 5506 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4981 vmsvga3dCmdDXTransferToBuffer(pThisCC, pCmd);5507 rcParse = vmsvga3dCmdDXTransferToBuffer(pThisCC, idDXContext, pCmd, cbCmd); 4982 5508 break; 4983 5509 } … … 4987 5513 SVGA3dCmdDXSetStructureCount *pCmd = (SVGA3dCmdDXSetStructureCount *)pvCmd; 4988 5514 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4989 vmsvga3dCmdDXSetStructureCount(pThisCC, pCmd);5515 rcParse = vmsvga3dCmdDXSetStructureCount(pThisCC, idDXContext, pCmd, cbCmd); 4990 5516 break; 4991 5517 } … … 4995 5521 SVGA3dCmdLogicOpsBitBlt *pCmd = (SVGA3dCmdLogicOpsBitBlt *)pvCmd; 4996 5522 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 4997 vmsvga3dCmdLogicOpsBitBlt(pThisCC, pCmd);5523 rcParse = vmsvga3dCmdLogicOpsBitBlt(pThisCC, idDXContext, pCmd, cbCmd); 4998 5524 break; 4999 5525 } … … 5003 5529 SVGA3dCmdLogicOpsTransBlt *pCmd = (SVGA3dCmdLogicOpsTransBlt *)pvCmd; 5004 5530 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 5005 vmsvga3dCmdLogicOpsTransBlt(pThisCC, pCmd);5531 rcParse = vmsvga3dCmdLogicOpsTransBlt(pThisCC, idDXContext, pCmd, cbCmd); 5006 5532 break; 5007 5533 } … … 5011 5537 SVGA3dCmdLogicOpsStretchBlt *pCmd = (SVGA3dCmdLogicOpsStretchBlt *)pvCmd; 5012 5538 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 5013 vmsvga3dCmdLogicOpsStretchBlt(pThisCC, pCmd);5539 rcParse = vmsvga3dCmdLogicOpsStretchBlt(pThisCC, idDXContext, pCmd, cbCmd); 5014 5540 break; 5015 5541 } … … 5019 5545 SVGA3dCmdLogicOpsColorFill *pCmd = (SVGA3dCmdLogicOpsColorFill *)pvCmd; 5020 5546 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 5021 vmsvga3dCmdLogicOpsColorFill(pThisCC, pCmd);5547 rcParse = vmsvga3dCmdLogicOpsColorFill(pThisCC, idDXContext, pCmd, cbCmd); 5022 5548 break; 5023 5549 } … … 5027 5553 SVGA3dCmdLogicOpsAlphaBlend *pCmd = (SVGA3dCmdLogicOpsAlphaBlend *)pvCmd; 5028 5554 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 5029 vmsvga3dCmdLogicOpsAlphaBlend(pThisCC, pCmd);5555 rcParse = vmsvga3dCmdLogicOpsAlphaBlend(pThisCC, idDXContext, pCmd, cbCmd); 5030 5556 break; 5031 5557 } … … 5035 5561 SVGA3dCmdLogicOpsClearTypeBlend *pCmd = (SVGA3dCmdLogicOpsClearTypeBlend *)pvCmd; 5036 5562 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 5037 vmsvga3dCmdLogicOpsClearTypeBlend(pThisCC, pCmd);5563 rcParse = vmsvga3dCmdLogicOpsClearTypeBlend(pThisCC, idDXContext, pCmd, cbCmd); 5038 5564 break; 5039 5565 } … … 5055 5581 SVGA3dCmdDefineGBSurface_v4 *pCmd = (SVGA3dCmdDefineGBSurface_v4 *)pvCmd; 5056 5582 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 5057 vmsvga3dCmdDefineGBSurface_v4(pThisCC, pCmd);5583 rcParse = vmsvga3dCmdDefineGBSurface_v4(pThisCC, idDXContext, pCmd, cbCmd); 5058 5584 break; 5059 5585 } … … 5063 5589 SVGA3dCmdDXSetCSUAViews *pCmd = (SVGA3dCmdDXSetCSUAViews *)pvCmd; 5064 5590 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 5065 vmsvga3dCmdDXSetCSUAViews(pThisCC, pCmd);5591 rcParse = vmsvga3dCmdDXSetCSUAViews(pThisCC, idDXContext, pCmd, cbCmd); 5066 5592 break; 5067 5593 } … … 5071 5597 SVGA3dCmdDXSetMinLOD *pCmd = (SVGA3dCmdDXSetMinLOD *)pvCmd; 5072 5598 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 5073 vmsvga3dCmdDXSetMinLOD(pThisCC, pCmd);5599 rcParse = vmsvga3dCmdDXSetMinLOD(pThisCC, idDXContext, pCmd, cbCmd); 5074 5600 break; 5075 5601 } … … 5091 5617 SVGA3dCmdDXDefineDepthStencilView_v2 *pCmd = (SVGA3dCmdDXDefineDepthStencilView_v2 *)pvCmd; 5092 5618 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 5093 vmsvga3dCmdDXDefineDepthStencilView_v2(pThisCC, pCmd);5619 rcParse = vmsvga3dCmdDXDefineDepthStencilView_v2(pThisCC, idDXContext, pCmd, cbCmd); 5094 5620 break; 5095 5621 } … … 5099 5625 SVGA3dCmdDXDefineStreamOutputWithMob *pCmd = (SVGA3dCmdDXDefineStreamOutputWithMob *)pvCmd; 5100 5626 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 5101 vmsvga3dCmdDXDefineStreamOutputWithMob(pThisCC, pCmd);5627 rcParse = vmsvga3dCmdDXDefineStreamOutputWithMob(pThisCC, idDXContext, pCmd, cbCmd); 5102 5628 break; 5103 5629 } … … 5107 5633 SVGA3dCmdDXSetShaderIface *pCmd = (SVGA3dCmdDXSetShaderIface *)pvCmd; 5108 5634 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 5109 vmsvga3dCmdDXSetShaderIface(pThisCC, pCmd);5635 rcParse = vmsvga3dCmdDXSetShaderIface(pThisCC, idDXContext, pCmd, cbCmd); 5110 5636 break; 5111 5637 } … … 5115 5641 SVGA3dCmdDXBindStreamOutput *pCmd = (SVGA3dCmdDXBindStreamOutput *)pvCmd; 5116 5642 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 5117 vmsvga3dCmdDXBindStreamOutput(pThisCC, pCmd);5643 rcParse = vmsvga3dCmdDXBindStreamOutput(pThisCC, idDXContext, pCmd, cbCmd); 5118 5644 break; 5119 5645 } … … 5123 5649 SVGA3dCmdSurfaceStretchBltNonMSToMS *pCmd = (SVGA3dCmdSurfaceStretchBltNonMSToMS *)pvCmd; 5124 5650 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 5125 vmsvga3dCmdSurfaceStretchBltNonMSToMS(pThisCC, pCmd);5651 rcParse = vmsvga3dCmdSurfaceStretchBltNonMSToMS(pThisCC, idDXContext, pCmd, cbCmd); 5126 5652 break; 5127 5653 } … … 5131 5657 SVGA3dCmdDXBindShaderIface *pCmd = (SVGA3dCmdDXBindShaderIface *)pvCmd; 5132 5658 VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd)); 5133 vmsvga3dCmdDXBindShaderIface(pThisCC, pCmd);5659 rcParse = vmsvga3dCmdDXBindShaderIface(pThisCC, idDXContext, pCmd, cbCmd); 5134 5660 break; 5135 5661 } … … 5156 5682 } 5157 5683 5158 return rcParse; 5684 return VINF_SUCCESS; 5685 // return rcParse; 5159 5686 } 5160 5687 # undef VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK
Note:
See TracChangeset
for help on using the changeset viewer.