Changeset 88787 in vbox for trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d-win-dx.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-SVGA3d-win-dx.cpp
r86905 r88787 39 39 #include "DevVGA-SVGA3d.h" 40 40 #include "DevVGA-SVGA3d-internal.h" 41 #include "DevVGA-SVGA3d-dx-shader.h" 41 42 42 43 #include <d3d11.h> 43 44 45 #define DX_RELEASE_ARRAY(a_Count, a_papArray) do { \ 46 for (uint32_t i = 0; i < (a_Count); ++i) \ 47 D3D_RELEASE((a_papArray)[i]); \ 48 } while (0) 49 50 typedef struct DXDEVICE 51 { 52 ID3D11Device *pDevice; /* Device. */ 53 ID3D11DeviceContext *pImmediateContext; /* Corresponding context. */ 54 IDXGIFactory *pDxgiFactory; /* DXGI Factory. */ 55 D3D_FEATURE_LEVEL FeatureLevel; 56 } DXDEVICE; 44 57 45 58 /* What kind of resource has been created for the VMSVGA3D surface. */ … … 52 65 VMSVGA3D_RESTYPE_CUBE_TEXTURE = 4, 53 66 VMSVGA3D_RESTYPE_VOLUME_TEXTURE = 5, 54 VMSVGA3D_RESTYPE_VERTEX_BUFFER = 6, 55 VMSVGA3D_RESTYPE_INDEX_BUFFER = 7, 67 VMSVGA3D_RESTYPE_BUFFER = 6, 56 68 } VMSVGA3DBACKRESTYPE; 57 69 58 struct VMSVGA3DBACKENDSURFACE70 typedef struct VMSVGA3DBACKENDSURFACE 59 71 { 60 72 VMSVGA3DBACKRESTYPE enmResType; 73 DXGI_FORMAT enmDxgiFormat; 61 74 union 62 75 { … … 69 82 struct 70 83 { 84 ID3D11Texture2D *pTexture; /* The texture for the screen content. */ 85 ID3D11Texture2D *pDynamicTexture; /* For screen updates from memory. */ /** @todo One for all screens. */ 86 ID3D11Texture2D *pStagingTexture; /* For Reading the screen content. */ /** @todo One for all screens. */ 71 87 } Texture; 88 struct 89 { 90 ID3D11Buffer *pBuffer; 91 } Buffer; 72 92 } u; 73 93 } VMSVGA3DBACKENDSURFACE; … … 82 102 } VMSVGAHWSCREEN; 83 103 84 struct VMSVGA3DBACKEND 104 105 typedef struct DXELEMENTLAYOUT 106 { 107 ID3D11InputLayout *pElementLayout; 108 uint32_t cElementDesc; 109 D3D11_INPUT_ELEMENT_DESC aElementDesc[32]; 110 } DXELEMENTLAYOUT; 111 112 typedef struct DXSHADER 113 { 114 SVGA3dShaderType enmShaderType; 115 union 116 { 117 ID3D11DeviceChild *pShader; /* All. */ 118 ID3D11VertexShader *pVertexShader; /* SVGA3D_SHADERTYPE_VS */ 119 ID3D11PixelShader *pPixelShader; /* SVGA3D_SHADERTYPE_PS */ 120 ID3D11GeometryShader *pGeometryShader; /* SVGA3D_SHADERTYPE_GS */ 121 ID3D11HullShader *pHullShader; /* SVGA3D_SHADERTYPE_HS */ 122 ID3D11DomainShader *pDomainShader; /* SVGA3D_SHADERTYPE_DS */ 123 ID3D11ComputeShader *pComputeShader; /* SVGA3D_SHADERTYPE_CS */ 124 }; 125 void *pvDXBC; 126 uint32_t cbDXBC; 127 } DXSHADER; 128 129 typedef struct VMSVGA3DBACKENDDXCONTEXT 130 { 131 DXDEVICE device; /* Device for the this context operation. */ 132 133 /* Arrays for Context-Object Tables. Number of entries depends on COTable size. */ 134 uint32_t cBlendState; /* Number of entries in the papBlendState array. */ 135 uint32_t cDepthStencilState; /* papDepthStencilState */ 136 uint32_t cSamplerState; /* papSamplerState */ 137 uint32_t cRasterizerState; /* papRasterizerState */ 138 uint32_t cElementLayout; /* papElementLayout */ 139 uint32_t cRenderTargetView; /* papRenderTargetView */ 140 uint32_t cDepthStencilView; /* papDepthStencilView */ 141 uint32_t cShaderResourceView; /* papShaderResourceView */ 142 uint32_t cQuery; /* papQuery */ 143 uint32_t cShader; /* papShader */ 144 ID3D11BlendState **papBlendState; 145 ID3D11DepthStencilState **papDepthStencilState; 146 ID3D11SamplerState **papSamplerState; 147 ID3D11RasterizerState **papRasterizerState; 148 DXELEMENTLAYOUT *paElementLayout; 149 ID3D11RenderTargetView **papRenderTargetView; 150 ID3D11DepthStencilView **papDepthStencilView; 151 ID3D11ShaderResourceView **papShaderResourceView; 152 ID3D11Query **papQuery; 153 DXSHADER *paShader; 154 } VMSVGA3DBACKENDDXCONTEXT; 155 156 typedef struct VMSVGA3DBACKEND 85 157 { 86 158 RTLDRMOD hD3D11; … … 98 170 switch (format) 99 171 { 100 /** @todo More formats required?*/172 /** @todo More formats. */ 101 173 case SVGA3D_X8R8G8B8: return DXGI_FORMAT_B8G8R8A8_UNORM; 102 174 case SVGA3D_A8R8G8B8: return DXGI_FORMAT_B8G8R8A8_UNORM; 175 case SVGA3D_B8G8R8X8_UNORM: return DXGI_FORMAT_B8G8R8A8_UNORM; 103 176 default: 104 177 AssertFailed(); … … 486 559 case SVGA3D_DEVCAP_DXFMT_BC4_UNORM: return SVGA3D_BC4_UNORM; 487 560 case SVGA3D_DEVCAP_DXFMT_BC5_UNORM: return SVGA3D_BC5_UNORM; 561 case SVGA3D_DEVCAP_DXFMT_BC6H_TYPELESS: return SVGA3D_BC6H_TYPELESS; 562 case SVGA3D_DEVCAP_DXFMT_BC6H_UF16: return SVGA3D_BC6H_UF16; 563 case SVGA3D_DEVCAP_DXFMT_BC6H_SF16: return SVGA3D_BC6H_SF16; 564 case SVGA3D_DEVCAP_DXFMT_BC7_TYPELESS: return SVGA3D_BC7_TYPELESS; 565 case SVGA3D_DEVCAP_DXFMT_BC7_UNORM: return SVGA3D_BC7_UNORM; 566 case SVGA3D_DEVCAP_DXFMT_BC7_UNORM_SRGB: return SVGA3D_BC7_UNORM_SRGB; 488 567 default: 489 568 AssertFailed(); … … 557 636 } 558 637 else 559 rc = VERR_NOT_SUPPORTED;638 AssertFailedStmt(rc = VERR_NOT_SUPPORTED); 560 639 } 561 640 else 562 641 rc = VERR_NOT_SUPPORTED; 563 642 return rc; 643 } 644 645 646 static int dxDeviceCreate(PVMSVGA3DBACKEND pBackend, DXDEVICE *pDevice) 647 { 648 int rc = VINF_SUCCESS; 649 650 IDXGIAdapter *pAdapter = NULL; /* Default adapter. */ 651 static D3D_FEATURE_LEVEL const s_aFeatureLevels[] = 652 { 653 /// @todo Requires a Windows 8+ _SDKS: D3D_FEATURE_LEVEL_11_1, 654 D3D_FEATURE_LEVEL_11_0 655 }; 656 UINT Flags = D3D11_CREATE_DEVICE_BGRA_SUPPORT; 657 #ifdef DEBUG 658 Flags |= D3D11_CREATE_DEVICE_DEBUG; 659 #endif 660 661 HRESULT hr = pBackend->pfnD3D11CreateDevice(pAdapter, 662 D3D_DRIVER_TYPE_HARDWARE, 663 NULL, 664 Flags, 665 s_aFeatureLevels, 666 RT_ELEMENTS(s_aFeatureLevels), 667 D3D11_SDK_VERSION, 668 &pDevice->pDevice, 669 &pDevice->FeatureLevel, 670 &pDevice->pImmediateContext); 671 if (SUCCEEDED(hr)) 672 { 673 LogRel(("VMSVGA: Feature level %#x\n", pDevice->FeatureLevel)); 674 675 IDXGIDevice *pDxgiDevice = 0; 676 hr = pBackend->pDevice->QueryInterface(__uuidof(IDXGIDevice), (void**)&pDxgiDevice); 677 if (SUCCEEDED(hr)) 678 { 679 IDXGIAdapter *pDxgiAdapter = 0; 680 hr = pDxgiDevice->GetParent(__uuidof(IDXGIAdapter), (void**)&pDxgiAdapter); 681 if (SUCCEEDED(hr)) 682 { 683 hr = pDxgiAdapter->GetParent(__uuidof(IDXGIFactory), (void**)&pDevice->pDxgiFactory); 684 D3D_RELEASE(pDxgiAdapter); 685 } 686 687 D3D_RELEASE(pDxgiDevice); 688 } 689 } 690 691 if (FAILED(hr)) 692 rc = VERR_NOT_SUPPORTED; 693 694 return rc; 695 } 696 697 698 static void dxDeviceDestroy(PVMSVGA3DBACKEND pBackend, DXDEVICE *pDevice) 699 { 700 RT_NOREF(pBackend); 701 D3D_RELEASE(pDevice->pDevice); 702 D3D_RELEASE(pDevice->pImmediateContext); 703 D3D_RELEASE(pDevice->pDxgiFactory); 704 RT_ZERO(*pDevice); 705 } 706 707 708 /** @todo AssertCompile for types like D3D11_COMPARISON_FUNC and SVGA3dComparisonFunc */ 709 static HRESULT dxBlendStateCreate(DXDEVICE *pDevice, SVGACOTableDXBlendStateEntry const *pEntry, ID3D11BlendState **pp) 710 { 711 D3D11_BLEND_DESC BlendDesc; 712 BlendDesc.AlphaToCoverageEnable = RT_BOOL(pEntry->alphaToCoverageEnable); 713 BlendDesc.IndependentBlendEnable = RT_BOOL(pEntry->independentBlendEnable); 714 for (int i = 0; i < SVGA3D_MAX_RENDER_TARGETS; ++i) 715 { 716 BlendDesc.RenderTarget[i].BlendEnable = RT_BOOL(pEntry->perRT[i].blendEnable); 717 BlendDesc.RenderTarget[i].SrcBlend = (D3D11_BLEND)pEntry->perRT[i].srcBlend; 718 BlendDesc.RenderTarget[i].DestBlend = (D3D11_BLEND)pEntry->perRT[i].destBlend; 719 BlendDesc.RenderTarget[i].BlendOp = (D3D11_BLEND_OP)pEntry->perRT[i].blendOp; 720 BlendDesc.RenderTarget[i].SrcBlendAlpha = (D3D11_BLEND)pEntry->perRT[i].srcBlendAlpha; 721 BlendDesc.RenderTarget[i].DestBlendAlpha = (D3D11_BLEND)pEntry->perRT[i].destBlendAlpha; 722 BlendDesc.RenderTarget[i].BlendOpAlpha = (D3D11_BLEND_OP)pEntry->perRT[i].blendOpAlpha; 723 BlendDesc.RenderTarget[i].RenderTargetWriteMask = pEntry->perRT[i].renderTargetWriteMask; 724 /** @todo logicOpEnable and logicOp */ 725 } 726 727 HRESULT hr = pDevice->pDevice->CreateBlendState(&BlendDesc, pp); 728 Assert(SUCCEEDED(hr)); 729 return hr; 730 } 731 732 733 static HRESULT dxDepthStencilStateCreate(DXDEVICE *pDevice, SVGACOTableDXDepthStencilEntry const *pEntry, ID3D11DepthStencilState **pp) 734 { 735 D3D11_DEPTH_STENCIL_DESC desc; 736 desc.DepthEnable = pEntry->depthEnable; 737 desc.DepthWriteMask = (D3D11_DEPTH_WRITE_MASK)pEntry->depthWriteMask; 738 desc.DepthFunc = (D3D11_COMPARISON_FUNC)pEntry->depthFunc; 739 desc.StencilEnable = pEntry->stencilEnable; 740 desc.StencilReadMask = pEntry->stencilReadMask; 741 desc.StencilWriteMask = pEntry->stencilWriteMask; 742 desc.FrontFace.StencilFailOp = (D3D11_STENCIL_OP)pEntry->frontStencilFailOp; 743 desc.FrontFace.StencilDepthFailOp = (D3D11_STENCIL_OP)pEntry->frontStencilDepthFailOp; 744 desc.FrontFace.StencilPassOp = (D3D11_STENCIL_OP)pEntry->frontStencilPassOp; 745 desc.FrontFace.StencilFunc = (D3D11_COMPARISON_FUNC)pEntry->frontStencilFunc; 746 desc.BackFace.StencilFailOp = (D3D11_STENCIL_OP)pEntry->backStencilFailOp; 747 desc.BackFace.StencilDepthFailOp = (D3D11_STENCIL_OP)pEntry->backStencilDepthFailOp; 748 desc.BackFace.StencilPassOp = (D3D11_STENCIL_OP)pEntry->backStencilPassOp; 749 desc.BackFace.StencilFunc = (D3D11_COMPARISON_FUNC)pEntry->backStencilFunc; 750 /** @todo frontEnable, backEnable */ 751 752 HRESULT hr = pDevice->pDevice->CreateDepthStencilState(&desc, pp); 753 Assert(SUCCEEDED(hr)); 754 return hr; 755 } 756 757 758 static HRESULT dxSamplerStateCreate(DXDEVICE *pDevice, SVGACOTableDXSamplerEntry const *pEntry, ID3D11SamplerState **pp) 759 { 760 D3D11_SAMPLER_DESC desc; 761 desc.Filter = (D3D11_FILTER)pEntry->filter; 762 desc.AddressU = (D3D11_TEXTURE_ADDRESS_MODE)pEntry->addressU; 763 desc.AddressV = (D3D11_TEXTURE_ADDRESS_MODE)pEntry->addressV; 764 desc.AddressW = (D3D11_TEXTURE_ADDRESS_MODE)pEntry->addressW; 765 desc.MipLODBias = pEntry->mipLODBias; 766 desc.MaxAnisotropy = RT_CLAMP(pEntry->maxAnisotropy, 1, 16); /* "Valid values are between 1 and 16" */ 767 desc.ComparisonFunc = (D3D11_COMPARISON_FUNC)pEntry->comparisonFunc; 768 desc.BorderColor[0] = pEntry->borderColor.value[0]; 769 desc.BorderColor[1] = pEntry->borderColor.value[1]; 770 desc.BorderColor[2] = pEntry->borderColor.value[2]; 771 desc.BorderColor[3] = pEntry->borderColor.value[3]; 772 desc.MinLOD = pEntry->minLOD; 773 desc.MaxLOD = pEntry->maxLOD; 774 775 HRESULT hr = pDevice->pDevice->CreateSamplerState(&desc, pp); 776 Assert(SUCCEEDED(hr)); 777 return hr; 778 } 779 780 781 static HRESULT dxRasterizerStateCreate(DXDEVICE *pDevice, SVGACOTableDXRasterizerStateEntry const *pEntry, ID3D11RasterizerState **pp) 782 { 783 D3D11_RASTERIZER_DESC desc; 784 desc.FillMode = (D3D11_FILL_MODE)pEntry->fillMode; 785 desc.CullMode = (D3D11_CULL_MODE)pEntry->cullMode; 786 desc.FrontCounterClockwise = pEntry->frontCounterClockwise; 787 /** provokingVertexLast */ 788 desc.DepthBias = pEntry->depthBias; 789 desc.DepthBiasClamp = pEntry->depthBiasClamp; 790 desc.SlopeScaledDepthBias = pEntry->slopeScaledDepthBias; 791 desc.DepthClipEnable = pEntry->depthClipEnable; 792 desc.ScissorEnable = pEntry->scissorEnable; 793 desc.MultisampleEnable = pEntry->multisampleEnable; 794 desc.AntialiasedLineEnable = pEntry->antialiasedLineEnable; 795 /** @todo lineWidth lineStippleEnable lineStippleFactor lineStipplePattern forcedSampleCount */ 796 797 HRESULT hr = pDevice->pDevice->CreateRasterizerState(&desc, pp); 798 Assert(SUCCEEDED(hr)); 799 return hr; 800 } 801 802 803 static HRESULT dxRenderTargetViewCreate(DXDEVICE *pDevice, SVGACOTableDXRTViewEntry const *pEntry, VMSVGA3DBACKENDSURFACE *pBackendSurface, ID3D11RenderTargetView **pp) 804 { 805 ID3D11Resource *pResource = pBackendSurface->u.Texture.pTexture; 806 807 D3D11_RENDER_TARGET_VIEW_DESC desc; 808 RT_ZERO(desc); 809 desc.Format = vmsvgaDXSurfaceFormat2Dxgi(pEntry->format); 810 AssertReturn(desc.Format != DXGI_FORMAT_UNKNOWN, E_FAIL); 811 switch (pEntry->resourceDimension) 812 { 813 case SVGA3D_RESOURCE_BUFFER: 814 desc.ViewDimension = D3D11_RTV_DIMENSION_BUFFER; 815 desc.Buffer.FirstElement = pEntry->desc.buffer.firstElement; 816 desc.Buffer.NumElements = pEntry->desc.buffer.numElements; 817 break; 818 case SVGA3D_RESOURCE_TEXTURE1D: 819 if (pEntry->desc.tex.arraySize <= 1) 820 { 821 desc.ViewDimension = D3D11_RTV_DIMENSION_TEXTURE1D; 822 desc.Texture1D.MipSlice = pEntry->desc.tex.mipSlice; 823 } 824 else 825 { 826 desc.ViewDimension = D3D11_RTV_DIMENSION_TEXTURE1DARRAY; 827 desc.Texture1DArray.MipSlice = pEntry->desc.tex.mipSlice; 828 desc.Texture1DArray.FirstArraySlice = pEntry->desc.tex.firstArraySlice; 829 desc.Texture1DArray.ArraySize = pEntry->desc.tex.arraySize; 830 } 831 break; 832 case SVGA3D_RESOURCE_TEXTURE2D: 833 if (pEntry->desc.tex.arraySize <= 1) 834 { 835 desc.ViewDimension = D3D11_RTV_DIMENSION_TEXTURE2D; 836 desc.Texture2D.MipSlice = pEntry->desc.tex.mipSlice; 837 } 838 else 839 { 840 desc.ViewDimension = D3D11_RTV_DIMENSION_TEXTURE2DARRAY; 841 desc.Texture2DArray.MipSlice = pEntry->desc.tex.mipSlice; 842 desc.Texture2DArray.FirstArraySlice = pEntry->desc.tex.firstArraySlice; 843 desc.Texture2DArray.ArraySize = pEntry->desc.tex.arraySize; 844 } 845 break; 846 case SVGA3D_RESOURCE_TEXTURE3D: 847 desc.ViewDimension = D3D11_RTV_DIMENSION_TEXTURE3D; 848 desc.Texture3D.MipSlice = pEntry->desc.tex3D.mipSlice; 849 desc.Texture3D.FirstWSlice = pEntry->desc.tex3D.firstW; 850 desc.Texture3D.WSize = pEntry->desc.tex3D.wSize; 851 break; 852 case SVGA3D_RESOURCE_TEXTURECUBE: 853 AssertFailed(); /** @todo test. Probably not applicable to a render target view. */ 854 desc.ViewDimension = D3D11_RTV_DIMENSION_TEXTURE2DARRAY; 855 desc.Texture2DArray.MipSlice = pEntry->desc.tex.mipSlice; 856 desc.Texture2DArray.FirstArraySlice = 0; 857 desc.Texture2DArray.ArraySize = 6; 858 break; 859 case SVGA3D_RESOURCE_BUFFEREX: 860 AssertFailed(); /** @todo test. Probably not applicable to a render target view. */ 861 desc.ViewDimension = D3D11_RTV_DIMENSION_BUFFER; 862 desc.Buffer.FirstElement = pEntry->desc.buffer.firstElement; 863 desc.Buffer.NumElements = pEntry->desc.buffer.numElements; 864 break; 865 default: 866 ASSERT_GUEST_FAILED_RETURN(E_INVALIDARG); 867 } 868 869 HRESULT hr = pDevice->pDevice->CreateRenderTargetView(pResource, &desc, pp); 870 Assert(SUCCEEDED(hr)); 871 return hr; 872 } 873 874 875 static HRESULT dxShaderResourceViewCreate(DXDEVICE *pDevice, SVGACOTableDXSRViewEntry const *pEntry, VMSVGA3DBACKENDSURFACE *pBackendSurface, ID3D11ShaderResourceView **pp) 876 { 877 ID3D11Resource *pResource = pBackendSurface->u.Texture.pTexture; 878 879 D3D11_SHADER_RESOURCE_VIEW_DESC desc; 880 RT_ZERO(desc); 881 desc.Format = vmsvgaDXSurfaceFormat2Dxgi(pEntry->format); 882 AssertReturn(desc.Format != DXGI_FORMAT_UNKNOWN, E_FAIL); 883 884 switch (pEntry->resourceDimension) 885 { 886 case SVGA3D_RESOURCE_BUFFER: 887 desc.ViewDimension = D3D11_SRV_DIMENSION_BUFFER; 888 desc.Buffer.FirstElement = pEntry->desc.buffer.firstElement; 889 desc.Buffer.NumElements = pEntry->desc.buffer.numElements; 890 break; 891 case SVGA3D_RESOURCE_TEXTURE1D: 892 if (pEntry->desc.tex.arraySize <= 1) 893 { 894 desc.ViewDimension = D3D11_SRV_DIMENSION_TEXTURE1D; 895 desc.Texture1D.MostDetailedMip = pEntry->desc.tex.mostDetailedMip; 896 desc.Texture1D.MipLevels = pEntry->desc.tex.mipLevels; 897 } 898 else 899 { 900 desc.ViewDimension = D3D11_SRV_DIMENSION_TEXTURE1DARRAY; 901 desc.Texture1DArray.MostDetailedMip = pEntry->desc.tex.mostDetailedMip; 902 desc.Texture1DArray.MipLevels = pEntry->desc.tex.mipLevels; 903 desc.Texture1DArray.FirstArraySlice = pEntry->desc.tex.firstArraySlice; 904 desc.Texture1DArray.ArraySize = pEntry->desc.tex.arraySize; 905 } 906 break; 907 case SVGA3D_RESOURCE_TEXTURE2D: 908 if (pEntry->desc.tex.arraySize <= 1) 909 { 910 desc.ViewDimension = D3D11_SRV_DIMENSION_TEXTURE2D; 911 desc.Texture2D.MostDetailedMip = pEntry->desc.tex.mostDetailedMip; 912 desc.Texture2D.MipLevels = pEntry->desc.tex.mipLevels; 913 } 914 else 915 { 916 desc.ViewDimension = D3D11_SRV_DIMENSION_TEXTURE2DARRAY; 917 desc.Texture2DArray.MostDetailedMip = pEntry->desc.tex.mostDetailedMip; 918 desc.Texture2DArray.MipLevels = pEntry->desc.tex.mipLevels; 919 desc.Texture2DArray.FirstArraySlice = pEntry->desc.tex.firstArraySlice; 920 desc.Texture2DArray.ArraySize = pEntry->desc.tex.arraySize; 921 } 922 break; 923 case SVGA3D_RESOURCE_TEXTURE3D: 924 desc.ViewDimension = D3D11_SRV_DIMENSION_TEXTURE3D; 925 desc.Texture3D.MostDetailedMip = pEntry->desc.tex.mostDetailedMip; 926 desc.Texture3D.MipLevels = pEntry->desc.tex.mipLevels; 927 break; 928 case SVGA3D_RESOURCE_TEXTURECUBE: 929 AssertFailed(); /** @todo test. */ 930 desc.ViewDimension = D3D11_SRV_DIMENSION_TEXTURECUBE; 931 desc.TextureCube.MostDetailedMip = pEntry->desc.tex.mostDetailedMip; 932 desc.TextureCube.MipLevels = pEntry->desc.tex.mipLevels; 933 break; 934 case SVGA3D_RESOURCE_BUFFEREX: 935 AssertFailed(); /** @todo test. */ 936 desc.ViewDimension = D3D11_SRV_DIMENSION_BUFFEREX; 937 desc.BufferEx.FirstElement = pEntry->desc.bufferex.firstElement; 938 desc.BufferEx.NumElements = pEntry->desc.bufferex.numElements; 939 desc.BufferEx.Flags = pEntry->desc.bufferex.flags; 940 break; 941 default: 942 ASSERT_GUEST_FAILED_RETURN(E_INVALIDARG); 943 } 944 945 HRESULT hr = pDevice->pDevice->CreateShaderResourceView(pResource, &desc, pp); 946 Assert(SUCCEEDED(hr)); 947 return hr; 948 } 949 950 951 static HRESULT dxShaderCreate(DXDEVICE *pDevice, PVMSVGA3DSHADER pShader, DXSHADER *pDXShader) 952 { 953 HRESULT hr = S_OK; 954 955 switch (pShader->type) 956 { 957 case SVGA3D_SHADERTYPE_VS: 958 hr = pDevice->pDevice->CreateVertexShader(pDXShader->pvDXBC, pDXShader->cbDXBC, NULL, &pDXShader->pVertexShader); 959 Assert(SUCCEEDED(hr)); 960 break; 961 case SVGA3D_SHADERTYPE_PS: 962 hr = pDevice->pDevice->CreatePixelShader(pDXShader->pvDXBC, pDXShader->cbDXBC, NULL, &pDXShader->pPixelShader); 963 Assert(SUCCEEDED(hr)); 964 break; 965 case SVGA3D_SHADERTYPE_GS: 966 case SVGA3D_SHADERTYPE_HS: 967 case SVGA3D_SHADERTYPE_DS: 968 case SVGA3D_SHADERTYPE_CS: 969 default: 970 ASSERT_GUEST_FAILED_RETURN(E_INVALIDARG); 971 } 972 973 return hr; 974 } 975 976 977 static void dxShaderSet(DXDEVICE *pDevice, PVMSVGA3DSHADER pShader, DXSHADER *pDXShader) 978 { 979 switch (pShader->type) 980 { 981 case SVGA3D_SHADERTYPE_VS: 982 pDevice->pImmediateContext->VSSetShader(pDXShader->pVertexShader, NULL, 0); 983 break; 984 case SVGA3D_SHADERTYPE_PS: 985 pDevice->pImmediateContext->PSSetShader(pDXShader->pPixelShader, NULL, 0); 986 break; 987 case SVGA3D_SHADERTYPE_GS: 988 case SVGA3D_SHADERTYPE_HS: 989 case SVGA3D_SHADERTYPE_DS: 990 case SVGA3D_SHADERTYPE_CS: 991 default: 992 ASSERT_GUEST_FAILED_RETURN_VOID(); 993 } 994 } 995 996 997 static void dxConstantBufferSet(DXDEVICE *pDevice, uint32_t slot, SVGA3dShaderType type, ID3D11Buffer *pConstantBuffer) 998 { 999 switch (type) 1000 { 1001 case SVGA3D_SHADERTYPE_VS: 1002 pDevice->pImmediateContext->VSSetConstantBuffers(slot, 1, &pConstantBuffer); 1003 break; 1004 case SVGA3D_SHADERTYPE_PS: 1005 pDevice->pImmediateContext->PSSetConstantBuffers(slot, 1, &pConstantBuffer); 1006 break; 1007 case SVGA3D_SHADERTYPE_GS: 1008 case SVGA3D_SHADERTYPE_HS: 1009 case SVGA3D_SHADERTYPE_DS: 1010 case SVGA3D_SHADERTYPE_CS: 1011 default: 1012 ASSERT_GUEST_FAILED_RETURN_VOID(); 1013 } 1014 } 1015 1016 1017 static void dxSamplerSet(DXDEVICE *pDevice, SVGA3dShaderType type, uint32_t startSampler, uint32_t cSampler, ID3D11SamplerState * const *papSampler) 1018 { 1019 switch (type) 1020 { 1021 case SVGA3D_SHADERTYPE_VS: 1022 pDevice->pImmediateContext->VSSetSamplers(startSampler, cSampler, papSampler); 1023 break; 1024 case SVGA3D_SHADERTYPE_PS: 1025 pDevice->pImmediateContext->PSSetSamplers(startSampler, cSampler, papSampler); 1026 break; 1027 case SVGA3D_SHADERTYPE_GS: 1028 case SVGA3D_SHADERTYPE_HS: 1029 case SVGA3D_SHADERTYPE_DS: 1030 case SVGA3D_SHADERTYPE_CS: 1031 default: 1032 ASSERT_GUEST_FAILED_RETURN_VOID(); 1033 } 1034 } 1035 1036 1037 static int vmsvga3dBackSurfaceCreateScreenTarget(PVMSVGA3DSTATE pState, PVMSVGA3DSURFACE pSurface) 1038 { 1039 PVMSVGA3DBACKEND pBackend = pState->pBackend; 1040 AssertReturn(pBackend, VERR_INVALID_STATE); 1041 AssertReturn(pBackend->pDevice, VERR_INVALID_STATE); 1042 1043 /* Surface must have SCREEN_TARGET flag. */ 1044 ASSERT_GUEST_RETURN(RT_BOOL(pSurface->surfaceFlags & SVGA3D_SURFACE_SCREENTARGET), VERR_INVALID_PARAMETER); 1045 1046 if (VMSVGA3DSURFACE_HAS_HW_SURFACE(pSurface)) 1047 { 1048 AssertFailed(); /* Should the function not be used like that? */ 1049 vmsvga3dBackSurfaceDestroy(pState, pSurface); 1050 } 1051 1052 PVMSVGA3DBACKENDSURFACE pBackendSurface = (PVMSVGA3DBACKENDSURFACE)RTMemAllocZ(sizeof(VMSVGA3DBACKENDSURFACE)); 1053 AssertPtrReturn(pBackendSurface, VERR_NO_MEMORY); 1054 1055 D3D11_TEXTURE2D_DESC td; 1056 RT_ZERO(td); 1057 td.Width = pSurface->paMipmapLevels[0].mipmapSize.width; 1058 td.Height = pSurface->paMipmapLevels[0].mipmapSize.height; 1059 Assert(pSurface->cLevels == 1); 1060 td.MipLevels = 1; 1061 td.ArraySize = 1; 1062 td.Format = vmsvgaDXScreenTargetFormat2Dxgi(pSurface->format); // DXGI_FORMAT_B8G8R8A8_UNORM; 1063 td.SampleDesc.Count = 1; 1064 td.SampleDesc.Quality = 0; 1065 td.Usage = D3D11_USAGE_DEFAULT; 1066 td.BindFlags = D3D11_BIND_RENDER_TARGET | D3D11_BIND_SHADER_RESOURCE; 1067 td.CPUAccessFlags = 0; 1068 td.MiscFlags = 0; 1069 1070 HRESULT hr = pBackend->pDevice->CreateTexture2D(&td, 0, &pBackendSurface->u.ScreenTarget.pTexture); 1071 Assert(SUCCEEDED(hr)); 1072 if (SUCCEEDED(hr)) 1073 { 1074 /* Map-able texture. */ 1075 td.Usage = D3D11_USAGE_DYNAMIC; 1076 td.BindFlags = D3D11_BIND_SHADER_RESOURCE; /* Have to specify a supported flag, otherwise E_INVALIDARG will be returned. */ 1077 td.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE; 1078 td.MiscFlags = 0; 1079 hr = pBackend->pDevice->CreateTexture2D(&td, 0, &pBackendSurface->u.ScreenTarget.pDynamicTexture); 1080 Assert(SUCCEEDED(hr)); 1081 } 1082 1083 if (SUCCEEDED(hr)) 1084 { 1085 /* Staging texture. */ 1086 td.Usage = D3D11_USAGE_STAGING; 1087 td.BindFlags = 0; /* No flags allowed. */ 1088 td.CPUAccessFlags = D3D11_CPU_ACCESS_READ; 1089 td.MiscFlags = 0; 1090 hr = pBackend->pDevice->CreateTexture2D(&td, 0, &pBackendSurface->u.ScreenTarget.pStagingTexture); 1091 Assert(SUCCEEDED(hr)); 1092 } 1093 1094 if (SUCCEEDED(hr)) 1095 { 1096 /* 1097 * Success. 1098 */ 1099 pBackendSurface->enmResType = VMSVGA3D_RESTYPE_SCREEN_TARGET; 1100 pBackendSurface->enmDxgiFormat = td.Format; 1101 pSurface->pBackendSurface = pBackendSurface; 1102 pSurface->idAssociatedContext = SVGA_ID_INVALID; 1103 pSurface->fDirty = true; 1104 return VINF_SUCCESS; 1105 } 1106 1107 /* Failure. */ 1108 D3D_RELEASE(pBackendSurface->u.ScreenTarget.pStagingTexture); 1109 D3D_RELEASE(pBackendSurface->u.ScreenTarget.pDynamicTexture); 1110 D3D_RELEASE(pBackendSurface->u.ScreenTarget.pTexture); 1111 RTMemFree(pBackendSurface); 1112 return VERR_NO_MEMORY; 1113 } 1114 1115 1116 static int vmsvga3dBackSurfaceCreateRenderTarget(PVMSVGA3DSTATE p3dState, PVMSVGA3DDXCONTEXT pDXContext, PVMSVGA3DSURFACE pSurface) 1117 { 1118 DXDEVICE *pDevice = &pDXContext->pBackendDXContext->device; 1119 AssertReturn(pDevice->pDevice, VERR_INVALID_STATE); 1120 1121 if (pSurface->pBackendSurface != NULL) 1122 { 1123 AssertFailed(); /** @todo Should the function not be used like that? */ 1124 vmsvga3dBackSurfaceDestroy(p3dState, pSurface); 1125 } 1126 1127 /** @todo Various texture types. */ 1128 1129 PVMSVGA3DBACKENDSURFACE pBackendSurface = (PVMSVGA3DBACKENDSURFACE)RTMemAllocZ(sizeof(VMSVGA3DBACKENDSURFACE)); 1130 AssertPtrReturn(pBackendSurface, VERR_NO_MEMORY); 1131 1132 D3D11_TEXTURE2D_DESC td; 1133 RT_ZERO(td); 1134 td.Width = pSurface->paMipmapLevels[0].mipmapSize.width; 1135 td.Height = pSurface->paMipmapLevels[0].mipmapSize.height; 1136 Assert(pSurface->cLevels == 1); 1137 td.MipLevels = 1; 1138 td.ArraySize = 1; 1139 td.Format = vmsvgaDXSurfaceFormat2Dxgi(pSurface->format); // DXGI_FORMAT_B8G8R8A8_UNORM; 1140 AssertReturn(td.Format != DXGI_FORMAT_UNKNOWN, E_FAIL); 1141 td.SampleDesc.Count = 1; 1142 td.SampleDesc.Quality = 0; 1143 td.Usage = D3D11_USAGE_DEFAULT; 1144 td.BindFlags = D3D11_BIND_RENDER_TARGET | D3D11_BIND_SHADER_RESOURCE; 1145 td.CPUAccessFlags = 0; 1146 td.MiscFlags = 0; 1147 1148 HRESULT hr = pDevice->pDevice->CreateTexture2D(&td, 0, &pBackendSurface->u.Texture.pTexture); 1149 Assert(SUCCEEDED(hr)); 1150 if (SUCCEEDED(hr)) 1151 { 1152 /* Map-able texture. */ 1153 td.Usage = D3D11_USAGE_DYNAMIC; 1154 td.BindFlags = D3D11_BIND_SHADER_RESOURCE; /* Have to specify a supported flag, otherwise E_INVALIDARG will be returned. */ 1155 td.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE; 1156 td.MiscFlags = 0; 1157 hr = pDevice->pDevice->CreateTexture2D(&td, 0, &pBackendSurface->u.Texture.pDynamicTexture); 1158 Assert(SUCCEEDED(hr)); 1159 } 1160 1161 if (SUCCEEDED(hr)) 1162 { 1163 /* Staging texture. */ 1164 td.Usage = D3D11_USAGE_STAGING; 1165 td.BindFlags = 0; /* No flags allowed. */ 1166 td.CPUAccessFlags = D3D11_CPU_ACCESS_READ; 1167 td.MiscFlags = 0; 1168 hr = pDevice->pDevice->CreateTexture2D(&td, 0, &pBackendSurface->u.Texture.pStagingTexture); 1169 Assert(SUCCEEDED(hr)); 1170 } 1171 1172 if (SUCCEEDED(hr)) 1173 { 1174 /* 1175 * Success. 1176 */ 1177 pBackendSurface->enmResType = VMSVGA3D_RESTYPE_TEXTURE; 1178 pBackendSurface->enmDxgiFormat = td.Format; 1179 pSurface->pBackendSurface = pBackendSurface; 1180 pSurface->idAssociatedContext = pDXContext->cid; 1181 pSurface->fDirty = true; 1182 return VINF_SUCCESS; 1183 } 1184 1185 /* Failure. */ 1186 D3D_RELEASE(pBackendSurface->u.Texture.pStagingTexture); 1187 D3D_RELEASE(pBackendSurface->u.Texture.pDynamicTexture); 1188 D3D_RELEASE(pBackendSurface->u.Texture.pTexture); 1189 RTMemFree(pBackendSurface); 1190 return VERR_NO_MEMORY; 1191 } 1192 1193 1194 static int vmsvga3dBackSurfaceCreateTexture(PVMSVGA3DSTATE p3dState, PVMSVGA3DDXCONTEXT pDXContext, PVMSVGA3DSURFACE pSurface) 1195 { 1196 DXDEVICE *pDevice = &pDXContext->pBackendDXContext->device; 1197 AssertReturn(pDevice->pDevice, VERR_INVALID_STATE); 1198 1199 if (pSurface->pBackendSurface != NULL) 1200 { 1201 AssertFailed(); /** @todo Should the function not be used like that? */ 1202 vmsvga3dBackSurfaceDestroy(p3dState, pSurface); 1203 } 1204 1205 /** @todo Various texture types. */ 1206 1207 PVMSVGA3DBACKENDSURFACE pBackendSurface = (PVMSVGA3DBACKENDSURFACE)RTMemAllocZ(sizeof(VMSVGA3DBACKENDSURFACE)); 1208 AssertPtrReturn(pBackendSurface, VERR_NO_MEMORY); 1209 1210 RTMemFree(pBackendSurface); 1211 return VERR_NOT_IMPLEMENTED; 1212 } 1213 1214 1215 static int vmsvga3dBackSurfaceCreateBuffer(PVMSVGA3DSTATE p3dState, PVMSVGA3DDXCONTEXT pDXContext, PVMSVGA3DSURFACE pSurface) 1216 { 1217 DXDEVICE *pDevice = &pDXContext->pBackendDXContext->device; 1218 AssertReturn(pDevice->pDevice, VERR_INVALID_STATE); 1219 1220 /* Buffers should be created as such. */ 1221 AssertReturn(RT_BOOL(pSurface->surfaceFlags & ( SVGA3D_SURFACE_HINT_INDEXBUFFER 1222 | SVGA3D_SURFACE_HINT_VERTEXBUFFER 1223 | SVGA3D_SURFACE_BIND_VERTEX_BUFFER 1224 | SVGA3D_SURFACE_BIND_INDEX_BUFFER 1225 /// @todo only for constant buffers| SVGA3D_SURFACE_BIND_CONSTANT_BUFFER 1226 //| SVGA3D_SURFACE_BIND_STREAM_OUTPUT 1227 )), VERR_INVALID_PARAMETER); 1228 1229 if (pSurface->pBackendSurface != NULL) 1230 { 1231 AssertFailed(); /** @todo Should the function not be used like that? */ 1232 vmsvga3dBackSurfaceDestroy(p3dState, pSurface); 1233 } 1234 1235 PVMSVGA3DBACKENDSURFACE pBackendSurface = (PVMSVGA3DBACKENDSURFACE)RTMemAllocZ(sizeof(VMSVGA3DBACKENDSURFACE)); 1236 AssertPtrReturn(pBackendSurface, VERR_NO_MEMORY); 1237 1238 D3D11_BUFFER_DESC bd; 1239 RT_ZERO(bd); 1240 bd.ByteWidth = pSurface->paMipmapLevels[0].cbSurface; 1241 bd.Usage = D3D11_USAGE_DYNAMIC; 1242 bd.BindFlags = D3D11_BIND_VERTEX_BUFFER 1243 | D3D11_BIND_INDEX_BUFFER 1244 //| D3D11_BIND_CONSTANT_BUFFER 1245 //| D3D11_BIND_STREAM_OUTPUT 1246 ; 1247 bd.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE; 1248 bd.MiscFlags = 0; 1249 bd.StructureByteStride = 0; 1250 1251 HRESULT hr = pDevice->pDevice->CreateBuffer(&bd, 0, &pBackendSurface->u.Buffer.pBuffer); 1252 if (SUCCEEDED(hr)) 1253 { 1254 /* 1255 * Success. 1256 */ 1257 pBackendSurface->enmResType = VMSVGA3D_RESTYPE_BUFFER; 1258 pBackendSurface->enmDxgiFormat = DXGI_FORMAT_UNKNOWN; 1259 pSurface->pBackendSurface = pBackendSurface; 1260 pSurface->idAssociatedContext = pDXContext->cid; 1261 pSurface->fDirty = true; 1262 return VINF_SUCCESS; 1263 } 1264 1265 /* Failure. */ 1266 D3D_RELEASE(pBackendSurface->u.Buffer.pBuffer); 1267 RTMemFree(pBackendSurface); 1268 return VERR_NO_MEMORY; 1269 } 1270 1271 1272 static int vmsvga3dBackSurfaceCreateConstantBuffer(PVMSVGA3DSTATE p3dState, PVMSVGA3DDXCONTEXT pDXContext, PVMSVGA3DSURFACE pSurface) 1273 { 1274 DXDEVICE *pDevice = &pDXContext->pBackendDXContext->device; 1275 AssertReturn(pDevice->pDevice, VERR_INVALID_STATE); 1276 1277 /* Buffers should be created as such. */ 1278 AssertReturn(RT_BOOL(pSurface->surfaceFlags & ( SVGA3D_SURFACE_BIND_CONSTANT_BUFFER)), VERR_INVALID_PARAMETER); 1279 1280 if (pSurface->pBackendSurface != NULL) 1281 { 1282 AssertFailed(); /** @todo Should the function not be used like that? */ 1283 vmsvga3dBackSurfaceDestroy(p3dState, pSurface); 1284 } 1285 1286 PVMSVGA3DBACKENDSURFACE pBackendSurface = (PVMSVGA3DBACKENDSURFACE)RTMemAllocZ(sizeof(VMSVGA3DBACKENDSURFACE)); 1287 AssertPtrReturn(pBackendSurface, VERR_NO_MEMORY); 1288 1289 D3D11_BUFFER_DESC bd; 1290 RT_ZERO(bd); 1291 bd.ByteWidth = pSurface->paMipmapLevels[0].cbSurface; 1292 bd.Usage = D3D11_USAGE_DYNAMIC; 1293 bd.BindFlags = D3D11_BIND_CONSTANT_BUFFER; 1294 bd.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE; 1295 bd.MiscFlags = 0; 1296 bd.StructureByteStride = 0; 1297 1298 HRESULT hr = pDevice->pDevice->CreateBuffer(&bd, 0, &pBackendSurface->u.Buffer.pBuffer); 1299 if (SUCCEEDED(hr)) 1300 { 1301 /* 1302 * Success. 1303 */ 1304 pBackendSurface->enmResType = VMSVGA3D_RESTYPE_BUFFER; 1305 pBackendSurface->enmDxgiFormat = DXGI_FORMAT_UNKNOWN; 1306 pSurface->pBackendSurface = pBackendSurface; 1307 pSurface->idAssociatedContext = pDXContext->cid; 1308 pSurface->fDirty = true; 1309 return VINF_SUCCESS; 1310 } 1311 1312 /* Failure. */ 1313 D3D_RELEASE(pBackendSurface->u.Buffer.pBuffer); 1314 RTMemFree(pBackendSurface); 1315 return VERR_NO_MEMORY; 564 1316 } 565 1317 … … 916 1668 if (!pBackendSurface) 917 1669 return VERR_INVALID_PARAMETER; 1670 1671 PVMSVGA3DDXCONTEXT pDXContext; 1672 vmsvga3dDXContextFromCid(pState, pSurface->idAssociatedContext, &pDXContext); 1673 1674 DXDEVICE *pDevice = NULL; 1675 if (pDXContext) 1676 { 1677 pDevice = &pDXContext->pBackendDXContext->device; 1678 AssertReturn(pDevice->pDevice, VERR_INVALID_STATE); 1679 } 918 1680 919 1681 SVGA3dBox clipBox; … … 981 1743 rc = VERR_NOT_SUPPORTED; 982 1744 } 1745 else if (pBackendSurface->enmResType == VMSVGA3D_RESTYPE_TEXTURE) 1746 { 1747 AssertReturn(pDevice && pDevice->pDevice, VERR_INTERNAL_ERROR); 1748 ASMBreakpoint(); 1749 ID3D11Texture2D *pMappedTexture; 1750 if (enmMapType == VMSVGA3D_SURFACE_MAP_READ) 1751 { 1752 pMappedTexture = pBackendSurface->u.ScreenTarget.pStagingTexture; 1753 1754 /* Copy the texture content to the staging texture. */ 1755 pDevice->pImmediateContext->CopyResource(pBackendSurface->u.ScreenTarget.pStagingTexture, pBackendSurface->u.ScreenTarget.pTexture); 1756 } 1757 else 1758 pMappedTexture = pBackendSurface->u.ScreenTarget.pDynamicTexture; 1759 1760 UINT const Subresource = 0; /* Screen target surfaces have only one subresource. */ 1761 HRESULT hr = pDevice->pImmediateContext->Map(pMappedTexture, Subresource, 1762 d3d11MapType, /* MapFlags = */ 0, &mappedResource); 1763 if (SUCCEEDED(hr)) 1764 { 1765 pMap->enmMapType = enmMapType; 1766 pMap->box = clipBox; 1767 pMap->cbPixel = pSurface->cbBlock; 1768 pMap->cbRowPitch = mappedResource.RowPitch; 1769 pMap->cbDepthPitch = mappedResource.DepthPitch; 1770 pMap->pvData = (uint8_t *)mappedResource.pData 1771 + pMap->box.x * pMap->cbPixel 1772 + pMap->box.y * pMap->cbRowPitch 1773 + pMap->box.z * pMap->cbDepthPitch; 1774 } 1775 else 1776 rc = VERR_NOT_SUPPORTED; 1777 } 1778 else if (pBackendSurface->enmResType == VMSVGA3D_RESTYPE_BUFFER) 1779 { 1780 UINT const Subresource = 0; /* Buffers have only one subresource. */ 1781 HRESULT hr = pDevice->pImmediateContext->Map(pSurface->pBackendSurface->u.Buffer.pBuffer, Subresource, 1782 d3d11MapType, /* MapFlags = */ 0, &mappedResource); 1783 if (SUCCEEDED(hr)) 1784 { 1785 pMap->enmMapType = enmMapType; 1786 pMap->box = clipBox; 1787 pMap->cbPixel = pSurface->cbBlock; 1788 pMap->cbRowPitch = mappedResource.RowPitch; 1789 pMap->cbDepthPitch = mappedResource.DepthPitch; 1790 pMap->pvData = (uint8_t *)mappedResource.pData 1791 + pMap->box.x * pMap->cbPixel 1792 + pMap->box.y * pMap->cbRowPitch 1793 + pMap->box.z * pMap->cbDepthPitch; 1794 } 1795 else 1796 rc = VERR_NOT_SUPPORTED; 1797 } 983 1798 else 984 1799 { … … 1009 1824 PVMSVGA3DBACKENDSURFACE pBackendSurface = pSurface->pBackendSurface; 1010 1825 AssertReturn(pBackendSurface, VERR_INVALID_PARAMETER); 1826 1827 PVMSVGA3DDXCONTEXT pDXContext; 1828 vmsvga3dDXContextFromCid(pState, pSurface->idAssociatedContext, &pDXContext); 1829 1830 DXDEVICE *pDevice = NULL; 1831 if (pDXContext) 1832 { 1833 pDevice = &pDXContext->pBackendDXContext->device; 1834 AssertReturn(pDevice->pDevice, VERR_INVALID_STATE); 1835 } 1011 1836 1012 1837 if (pBackendSurface->enmResType == VMSVGA3D_RESTYPE_SCREEN_TARGET) … … 1044 1869 } 1045 1870 } 1871 else if (pBackendSurface->enmResType == VMSVGA3D_RESTYPE_TEXTURE) 1872 { 1873 AssertReturn(pDevice && pDevice->pDevice, VERR_INTERNAL_ERROR); 1874 ASMBreakpoint(); 1875 ID3D11Texture2D *pMappedTexture; 1876 if (pMap->enmMapType == VMSVGA3D_SURFACE_MAP_READ) 1877 pMappedTexture = pBackendSurface->u.ScreenTarget.pStagingTexture; 1878 else 1879 pMappedTexture = pBackendSurface->u.ScreenTarget.pDynamicTexture; 1880 1881 UINT const Subresource = 0; /* Screen target surfaces have only one subresource. */ 1882 pDevice->pImmediateContext->Unmap(pMappedTexture, Subresource); 1883 1884 if ( fWritten 1885 && ( pMap->enmMapType == VMSVGA3D_SURFACE_MAP_WRITE 1886 || pMap->enmMapType == VMSVGA3D_SURFACE_MAP_READ_WRITE 1887 || pMap->enmMapType == VMSVGA3D_SURFACE_MAP_WRITE_DISCARD)) 1888 { 1889 ID3D11Resource *pDstResource = pBackendSurface->u.ScreenTarget.pTexture; 1890 UINT DstSubresource = Subresource; 1891 UINT DstX = pMap->box.x; 1892 UINT DstY = pMap->box.y; 1893 UINT DstZ = pMap->box.z; 1894 ID3D11Resource *pSrcResource = pBackendSurface->u.ScreenTarget.pDynamicTexture; 1895 UINT SrcSubresource = Subresource; 1896 D3D11_BOX SrcBox; 1897 SrcBox.left = pMap->box.x; 1898 SrcBox.top = pMap->box.y; 1899 SrcBox.front = pMap->box.z; 1900 SrcBox.right = pMap->box.x + pMap->box.w; 1901 SrcBox.bottom = pMap->box.y + pMap->box.h; 1902 SrcBox.back = pMap->box.z + pMap->box.d; 1903 pDevice->pImmediateContext->CopySubresourceRegion(pDstResource, DstSubresource, DstX, DstY, DstZ, 1904 pSrcResource, SrcSubresource, &SrcBox); 1905 } 1906 } 1907 else if (pBackendSurface->enmResType == VMSVGA3D_RESTYPE_BUFFER) 1908 { 1909 UINT const Subresource = 0; /* Buffers have only one subresource. */ 1910 pDevice->pImmediateContext->Unmap(pBackendSurface->u.Buffer.pBuffer, Subresource); 1911 } 1046 1912 else 1047 1913 { … … 1051 1917 1052 1918 return rc; 1053 }1054 1055 1056 int vmsvga3dBackSurfaceCreateScreenTarget(PVMSVGA3DSTATE pState, PVMSVGA3DSURFACE pSurface)1057 {1058 PVMSVGA3DBACKEND pBackend = pState->pBackend;1059 AssertReturn(pBackend, VERR_INVALID_STATE);1060 AssertReturn(pBackend->pDevice, VERR_INVALID_STATE);1061 1062 /* Surface must have SCREEN_TARGET flag. */1063 ASSERT_GUEST_RETURN(RT_BOOL(pSurface->surfaceFlags & SVGA3D_SURFACE_SCREENTARGET), VERR_INVALID_PARAMETER);1064 1065 if (VMSVGA3DSURFACE_HAS_HW_SURFACE(pSurface))1066 {1067 AssertFailed(); /* Should the function not be used like that? */1068 vmsvga3dBackSurfaceDestroy(pState, pSurface);1069 }1070 1071 PVMSVGA3DBACKENDSURFACE pBackendSurface = (PVMSVGA3DBACKENDSURFACE)RTMemAllocZ(sizeof(VMSVGA3DBACKENDSURFACE));1072 AssertPtrReturn(pBackendSurface, VERR_NO_MEMORY);1073 1074 D3D11_TEXTURE2D_DESC td;1075 RT_ZERO(td);1076 td.Width = pSurface->paMipmapLevels[0].mipmapSize.width;1077 td.Height = pSurface->paMipmapLevels[0].mipmapSize.height;1078 Assert(pSurface->cLevels == 1);1079 td.MipLevels = 1;1080 td.ArraySize = 1;1081 td.Format = vmsvgaDXScreenTargetFormat2Dxgi(pSurface->format); // DXGI_FORMAT_B8G8R8A8_UNORM;1082 td.SampleDesc.Count = 1;1083 td.SampleDesc.Quality = 0;1084 td.Usage = D3D11_USAGE_DEFAULT;1085 td.BindFlags = D3D11_BIND_RENDER_TARGET | D3D11_BIND_SHADER_RESOURCE;1086 td.CPUAccessFlags = 0;1087 td.MiscFlags = 0;1088 1089 HRESULT hr = pBackend->pDevice->CreateTexture2D(&td, 0, &pBackendSurface->u.ScreenTarget.pTexture);1090 1091 if (SUCCEEDED(hr))1092 {1093 /* Map-able texture. */1094 td.Usage = D3D11_USAGE_DYNAMIC;1095 td.BindFlags = D3D11_BIND_SHADER_RESOURCE; /* Have to specify a supported flag, otherwise E_INVALIDARG will be returned. */1096 td.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;1097 td.MiscFlags = 0;1098 hr = pBackend->pDevice->CreateTexture2D(&td, 0, &pBackendSurface->u.ScreenTarget.pDynamicTexture);1099 }1100 1101 if (SUCCEEDED(hr))1102 {1103 /* Staging texture. */1104 td.Usage = D3D11_USAGE_STAGING;1105 td.BindFlags = 0; /* No flags allowed. */1106 td.CPUAccessFlags = D3D11_CPU_ACCESS_READ;1107 td.MiscFlags = 0;1108 hr = pBackend->pDevice->CreateTexture2D(&td, 0, &pBackendSurface->u.ScreenTarget.pStagingTexture);1109 }1110 1111 if (SUCCEEDED(hr))1112 {1113 /*1114 * Success.1115 */1116 pBackendSurface->enmResType = VMSVGA3D_RESTYPE_SCREEN_TARGET;1117 pSurface->pBackendSurface = pBackendSurface;1118 return VINF_SUCCESS;1119 }1120 1121 /* Failure. */1122 D3D_RELEASE(pBackendSurface->u.ScreenTarget.pStagingTexture);1123 D3D_RELEASE(pBackendSurface->u.ScreenTarget.pDynamicTexture);1124 D3D_RELEASE(pBackendSurface->u.ScreenTarget.pTexture);1125 RTMemFree(pBackendSurface);1126 return VERR_NO_MEMORY;1127 1919 } 1128 1920 … … 2110 2902 /* The caller should not use the function for system memory surfaces. */ 2111 2903 PVMSVGA3DBACKENDSURFACE pBackendSurface = pSurface->pBackendSurface; 2112 AssertReturnVoid(pBackendSurface); 2904 if (!pBackendSurface) 2905 return; 2113 2906 pSurface->pBackendSurface = NULL; 2114 2907 … … 2118 2911 D3D_RELEASE(pBackendSurface->u.ScreenTarget.pDynamicTexture); 2119 2912 D3D_RELEASE(pBackendSurface->u.ScreenTarget.pTexture); 2913 } 2914 else if (pBackendSurface->enmResType == VMSVGA3D_RESTYPE_TEXTURE) 2915 { 2916 D3D_RELEASE(pBackendSurface->u.Texture.pStagingTexture); 2917 D3D_RELEASE(pBackendSurface->u.Texture.pDynamicTexture); 2918 D3D_RELEASE(pBackendSurface->u.Texture.pTexture); 2919 } 2920 else if (pBackendSurface->enmResType == VMSVGA3D_RESTYPE_BUFFER) 2921 { 2922 D3D_RELEASE(pBackendSurface->u.Buffer.pBuffer); 2120 2923 } 2121 2924 else … … 2336 3139 2337 3140 2338 static DECLCALLBACK(void) vmsvga3dDXDefineContext(PVMSVGA3DSTATE p3dState) 2339 { 2340 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 2341 3141 /* 3142 * DX callbacks. 3143 */ 3144 3145 static DECLCALLBACK(int) vmsvga3dBackDXDefineContext(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 3146 { 3147 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 3148 3149 /* Allocate a backend specific context structure. */ 3150 PVMSVGA3DBACKENDDXCONTEXT pBackendDXContext = (PVMSVGA3DBACKENDDXCONTEXT)RTMemAllocZ(sizeof(VMSVGA3DBACKENDDXCONTEXT)); 3151 AssertPtrReturn(pBackendDXContext, VERR_NO_MEMORY); 3152 pDXContext->pBackendDXContext = pBackendDXContext; 3153 3154 int rc = dxDeviceCreate(pBackend, &pBackendDXContext->device); 3155 return rc; 3156 } 3157 3158 3159 static DECLCALLBACK(int) vmsvga3dBackDXDestroyContext(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 3160 { 3161 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 3162 3163 if (pDXContext->pBackendDXContext) 3164 { 3165 dxDeviceDestroy(pBackend, &pDXContext->pBackendDXContext->device); 3166 3167 RTMemFree(pDXContext->pBackendDXContext); 3168 pDXContext->pBackendDXContext = NULL; 3169 } 3170 return VINF_SUCCESS; 3171 } 3172 3173 3174 static DECLCALLBACK(int) vmsvga3dBackDXBindContext(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 3175 { 3176 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 3177 RT_NOREF(pBackend, pDXContext); 3178 return VINF_SUCCESS; 3179 } 3180 3181 3182 static DECLCALLBACK(int) vmsvga3dBackDXReadbackContext(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 3183 { 3184 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 3185 3186 RT_NOREF(pBackend, pDXContext); 3187 AssertFailed(); /** @todo Implement */ 3188 return VERR_NOT_IMPLEMENTED; 3189 } 3190 3191 3192 static DECLCALLBACK(int) vmsvga3dBackDXInvalidateContext(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 3193 { 3194 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 3195 3196 RT_NOREF(pBackend, pDXContext); 3197 AssertFailed(); /** @todo Implement */ 3198 return VERR_NOT_IMPLEMENTED; 3199 } 3200 3201 3202 static DECLCALLBACK(int) vmsvga3dBackDXSetSingleConstantBuffer(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, uint32_t slot, SVGA3dShaderType type, SVGA3dSurfaceId sid, uint32_t offsetInBytes, uint32_t sizeInBytes) 3203 { 3204 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 2342 3205 RT_NOREF(pBackend); 2343 AssertFailed(); /** @todo Implement */ 2344 } 2345 2346 2347 static DECLCALLBACK(void) vmsvga3dDXDestroyContext(PVMSVGA3DSTATE p3dState) 2348 { 2349 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 2350 3206 3207 DXDEVICE *pDevice = &pDXContext->pBackendDXContext->device; 3208 AssertReturn(pDevice->pDevice, VERR_INVALID_STATE); 3209 3210 PVMSVGA3DSURFACE pSurface; 3211 int rc = vmsvga3dSurfaceFromSid(pThisCC->svga.p3dState, sid, &pSurface); 3212 AssertRCReturn(rc, rc); 3213 3214 uint32_t const cbSurface = pSurface->paMipmapLevels[0].cbSurface; 3215 ASSERT_GUEST_RETURN( offsetInBytes < cbSurface 3216 && sizeInBytes <= cbSurface - offsetInBytes, VERR_INVALID_PARAMETER); 3217 3218 if (pSurface->pBackendSurface == NULL) 3219 { 3220 /* Create the resource. */ 3221 rc = vmsvga3dBackSurfaceCreateConstantBuffer(pThisCC->svga.p3dState, pDXContext, pSurface); 3222 AssertRCReturn(rc, rc); 3223 } 3224 3225 if (pSurface->fDirty) 3226 { 3227 /* Get mobid for the surface and read from the MOB. */ 3228 SVGA3dSurfaceImageId imageId; 3229 imageId.sid = sid; 3230 imageId.face = 0; 3231 imageId.mipmap = 0; 3232 3233 SVGA3dPoint ptSrc; 3234 ptSrc.x = offsetInBytes / pSurface->cbBlock; 3235 ptSrc.y = 0; 3236 ptSrc.z = 0; 3237 3238 SVGA3dBox boxDst; 3239 boxDst.x = 0; 3240 boxDst.y = 0; 3241 boxDst.z = 0; 3242 boxDst.w = sizeInBytes / pSurface->cbBlock; 3243 boxDst.h = 1; 3244 boxDst.d = 1; 3245 3246 rc = vmsvgaR3UpdateGBSurfaceEx(pThisCC, &imageId, &boxDst, &ptSrc); 3247 AssertRCReturn(rc, rc); 3248 } 3249 3250 dxConstantBufferSet(pDevice, slot, type, pSurface->pBackendSurface->u.Buffer.pBuffer); 3251 3252 uint32_t const idxShaderState = type - SVGA3D_SHADERTYPE_MIN; 3253 SVGA3dConstantBufferBinding *pCBB = &pDXContext->svgaDXContext.shaderState[idxShaderState].constantBuffers[slot]; 3254 pCBB->sid = sid; 3255 pCBB->offsetInBytes = offsetInBytes; 3256 pCBB->sizeInBytes = sizeInBytes; 3257 return VINF_SUCCESS; 3258 } 3259 3260 3261 static DECLCALLBACK(int) vmsvga3dBackDXSetShaderResources(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 3262 { 3263 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 3264 3265 RT_NOREF(pBackend, pDXContext); 3266 AssertFailed(); /** @todo Implement */ 3267 return VERR_NOT_IMPLEMENTED; 3268 } 3269 3270 3271 static DECLCALLBACK(int) vmsvga3dBackDXSetShader(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, PVMSVGA3DSHADER pShader) 3272 { 3273 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 2351 3274 RT_NOREF(pBackend); 2352 AssertFailed(); /** @todo Implement */ 2353 } 2354 2355 2356 static DECLCALLBACK(void) vmsvga3dDXBindContext(PVMSVGA3DSTATE p3dState) 2357 { 2358 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 2359 3275 3276 DXDEVICE *pDevice = &pDXContext->pBackendDXContext->device; 3277 AssertReturn(pDevice->pDevice, VERR_INVALID_STATE); 3278 3279 DXSHADER *pDXShader = &pDXContext->pBackendDXContext->paShader[pShader->id]; 3280 uint32_t const idxShaderState = pDXShader->enmShaderType - SVGA3D_SHADERTYPE_MIN; 3281 pDXContext->svgaDXContext.shaderState[idxShaderState].shaderId = pShader->id; 3282 3283 dxShaderSet(pDevice, pShader, pDXShader); 3284 return VINF_SUCCESS; 3285 } 3286 3287 3288 static DECLCALLBACK(int) vmsvga3dBackDXSetSamplers(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, uint32_t startSampler, SVGA3dShaderType type, uint32_t cSamplerId, SVGA3dSamplerId const *paSamplerId) 3289 { 3290 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 2360 3291 RT_NOREF(pBackend); 2361 AssertFailed(); /** @todo Implement */ 2362 } 2363 2364 2365 static DECLCALLBACK(void) vmsvga3dDXReadbackContext(PVMSVGA3DSTATE p3dState) 2366 { 2367 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 2368 3292 3293 DXDEVICE *pDevice = &pDXContext->pBackendDXContext->device; 3294 AssertReturn(pDevice->pDevice, VERR_INVALID_STATE); 3295 3296 uint32_t const idxShaderState = type - SVGA3D_SHADERTYPE_MIN; 3297 ID3D11SamplerState *aSamplerState[SVGA3D_DX_MAX_SAMPLERS]; 3298 for (uint32_t i = 0; i < cSamplerId; ++i) 3299 { 3300 SVGA3dSamplerId samplerId = paSamplerId[i]; 3301 if (samplerId != SVGA3D_INVALID_ID) 3302 { 3303 ASSERT_GUEST_RETURN(samplerId < pDXContext->pBackendDXContext->cSamplerState, VERR_INVALID_PARAMETER); 3304 aSamplerState[i] = pDXContext->pBackendDXContext->papSamplerState[samplerId]; 3305 } 3306 else 3307 aSamplerState[i] = NULL; 3308 3309 pDXContext->svgaDXContext.shaderState[idxShaderState].samplers[startSampler + i] = samplerId; 3310 } 3311 3312 dxSamplerSet(pDevice, type, startSampler, cSamplerId, aSamplerState); 3313 return VINF_SUCCESS; 3314 } 3315 3316 3317 static DECLCALLBACK(int) vmsvga3dBackDXDraw(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, uint32_t vertexCount, uint32_t startVertexLocation) 3318 { 3319 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 2369 3320 RT_NOREF(pBackend); 2370 AssertFailed(); /** @todo Implement */ 2371 } 2372 2373 2374 static DECLCALLBACK(void) vmsvga3dDXInvalidateContext(PVMSVGA3DSTATE p3dState) 2375 { 2376 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 2377 3321 3322 DXDEVICE *pDevice = &pDXContext->pBackendDXContext->device; 3323 AssertReturn(pDevice->pDevice, VERR_INVALID_STATE); 3324 3325 pDevice->pImmediateContext->Draw(vertexCount, startVertexLocation); 3326 return VINF_SUCCESS; 3327 } 3328 3329 3330 static DECLCALLBACK(int) vmsvga3dBackDXDrawIndexed(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, uint32_t indexCount, uint32_t startIndexLocation, int32_t baseVertexLocation) 3331 { 3332 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 2378 3333 RT_NOREF(pBackend); 2379 AssertFailed(); /** @todo Implement */ 2380 } 2381 2382 2383 static DECLCALLBACK(void) vmsvga3dDXSetSingleConstantBuffer(PVMSVGA3DSTATE p3dState) 2384 { 2385 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 2386 3334 3335 DXDEVICE *pDevice = &pDXContext->pBackendDXContext->device; 3336 AssertReturn(pDevice->pDevice, VERR_INVALID_STATE); 3337 3338 pDevice->pImmediateContext->DrawIndexed(indexCount, startIndexLocation, baseVertexLocation); 3339 return VINF_SUCCESS; 3340 } 3341 3342 3343 static DECLCALLBACK(int) vmsvga3dBackDXDrawInstanced(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 3344 { 3345 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 3346 3347 RT_NOREF(pBackend, pDXContext); 3348 AssertFailed(); /** @todo Implement */ 3349 return VERR_NOT_IMPLEMENTED; 3350 } 3351 3352 3353 static DECLCALLBACK(int) vmsvga3dBackDXDrawIndexedInstanced(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 3354 { 3355 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 3356 3357 RT_NOREF(pBackend, pDXContext); 3358 AssertFailed(); /** @todo Implement */ 3359 return VERR_NOT_IMPLEMENTED; 3360 } 3361 3362 3363 static DECLCALLBACK(int) vmsvga3dBackDXDrawAuto(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 3364 { 3365 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 3366 3367 RT_NOREF(pBackend, pDXContext); 3368 AssertFailed(); /** @todo Implement */ 3369 return VERR_NOT_IMPLEMENTED; 3370 } 3371 3372 3373 static DECLCALLBACK(int) vmsvga3dBackDXSetInputLayout(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGA3dElementLayoutId elementLayoutId) 3374 { 3375 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 2387 3376 RT_NOREF(pBackend); 2388 AssertFailed(); /** @todo Implement */ 2389 } 2390 2391 2392 static DECLCALLBACK(void) vmsvga3dDXSetShaderResources(PVMSVGA3DSTATE p3dState) 2393 { 2394 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 2395 3377 3378 DXDEVICE *pDevice = &pDXContext->pBackendDXContext->device; 3379 AssertReturn(pDevice->pDevice, VERR_INVALID_STATE); 3380 3381 pDXContext->svgaDXContext.inputAssembly.layoutId = elementLayoutId; 3382 3383 DXELEMENTLAYOUT *pDXElementLayout = &pDXContext->pBackendDXContext->paElementLayout[elementLayoutId]; 3384 if (!pDXElementLayout->pElementLayout) 3385 { 3386 uint32_t const idxShaderState = SVGA3D_SHADERTYPE_VS - SVGA3D_SHADERTYPE_MIN; 3387 uint32_t const shid = pDXContext->svgaDXContext.shaderState[idxShaderState].shaderId; 3388 AssertReturnStmt(shid < pDXContext->pBackendDXContext->cShader, 3389 LogRelMax(16, ("VMSVGA: DX shader is not set in DXSetInputLayout: shid = 0x%x\n", shid)), 3390 VERR_INVALID_STATE); 3391 DXSHADER *pDXShader = &pDXContext->pBackendDXContext->paShader[shid]; 3392 AssertReturnStmt(pDXShader->pvDXBC, 3393 LogRelMax(16, ("VMSVGA: DX shader bytecode is not available in DXSetInputLayout: shid = %u\n", shid)), 3394 VERR_INVALID_STATE); 3395 HRESULT hr = pDevice->pDevice->CreateInputLayout(pDXElementLayout->aElementDesc, 3396 pDXElementLayout->cElementDesc, 3397 pDXShader->pvDXBC, 3398 pDXShader->cbDXBC, 3399 &pDXElementLayout->pElementLayout); 3400 AssertReturn(SUCCEEDED(hr), VERR_NO_MEMORY); 3401 } 3402 3403 pDevice->pImmediateContext->IASetInputLayout(pDXElementLayout->pElementLayout); 3404 return VINF_SUCCESS; 3405 } 3406 3407 3408 static DECLCALLBACK(int) vmsvga3dBackDXSetVertexBuffers(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, uint32_t startBuffer, uint32_t cVertexBuffer, SVGA3dVertexBuffer const *paVertexBuffer) 3409 { 3410 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 2396 3411 RT_NOREF(pBackend); 2397 AssertFailed(); /** @todo Implement */ 2398 } 2399 2400 2401 static DECLCALLBACK(void) vmsvga3dDXSetShader(PVMSVGA3DSTATE p3dState) 2402 { 2403 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 2404 3412 3413 DXDEVICE *pDevice = &pDXContext->pBackendDXContext->device; 3414 AssertReturn(pDevice->pDevice, VERR_INVALID_STATE); 3415 3416 /* For each paVertexBuffer[i]: 3417 * If the vertex buffer object does not exist then create it. 3418 * If the surface has been updated by the guest then update the buffer object. 3419 * Use IASetVertexBuffers to set the buffers. 3420 */ 3421 3422 ID3D11Buffer *paResources[SVGA3D_DX_MAX_VERTEXBUFFERS]; 3423 UINT paStride[SVGA3D_DX_MAX_VERTEXBUFFERS]; 3424 UINT paOffset[SVGA3D_DX_MAX_VERTEXBUFFERS]; 3425 3426 for (uint32_t i = 0; i < cVertexBuffer; ++i) 3427 { 3428 uint32_t const idxVertexBuffer = startBuffer + i; 3429 3430 /* Get corresponding resource. Create the buffer if does not yet exist. */ 3431 if (paVertexBuffer[i].sid != SVGA_ID_INVALID) 3432 { 3433 PVMSVGA3DSURFACE pSurface; 3434 int rc = vmsvga3dSurfaceFromSid(pThisCC->svga.p3dState, paVertexBuffer[i].sid, &pSurface); 3435 AssertRCReturn(rc, rc); 3436 3437 if (pSurface->pBackendSurface == NULL) 3438 { 3439 /* Create the resource. */ 3440 rc = vmsvga3dBackSurfaceCreateBuffer(pThisCC->svga.p3dState, pDXContext, pSurface); 3441 AssertRCReturn(rc, rc); 3442 } 3443 3444 if (pSurface->fDirty) 3445 { 3446 /* Get mobid for the surface and read from the MOB. */ 3447 SVGA3dSurfaceImageId imageId; 3448 imageId.sid = paVertexBuffer[i].sid; 3449 imageId.face = 0; 3450 imageId.mipmap = 0; 3451 3452 SVGA3dBox box; 3453 box.x = 0; 3454 box.y = 0; 3455 box.z = 0; 3456 box.w = pSurface->paMipmapLevels[0].mipmapSize.width; 3457 box.h = 1; 3458 box.d = 1; 3459 3460 rc = vmsvgaR3UpdateGBSurface(pThisCC, &imageId, &box); 3461 AssertRCReturn(rc, rc); 3462 } 3463 3464 paResources[idxVertexBuffer] = pSurface->pBackendSurface->u.Buffer.pBuffer; 3465 paStride[idxVertexBuffer] = paVertexBuffer[i].stride; 3466 paOffset[idxVertexBuffer] = paVertexBuffer[i].offset; 3467 } 3468 else 3469 { 3470 paResources[idxVertexBuffer] = NULL; 3471 paStride[idxVertexBuffer] = 0; 3472 paOffset[idxVertexBuffer] = 0; 3473 } 3474 3475 pDXContext->svgaDXContext.inputAssembly.vertexBuffers[idxVertexBuffer].bufferId = paVertexBuffer[i].sid; 3476 pDXContext->svgaDXContext.inputAssembly.vertexBuffers[idxVertexBuffer].stride = paVertexBuffer[i].stride; 3477 pDXContext->svgaDXContext.inputAssembly.vertexBuffers[idxVertexBuffer].offset = paVertexBuffer[i].offset; 3478 } 3479 3480 pDevice->pImmediateContext->IASetVertexBuffers(startBuffer, cVertexBuffer, paResources, paStride, paOffset); 3481 3482 return VINF_SUCCESS; 3483 } 3484 3485 3486 static DECLCALLBACK(int) vmsvga3dBackDXSetIndexBuffer(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGA3dSurfaceId sid, SVGA3dSurfaceFormat format, uint32_t offset) 3487 { 3488 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 2405 3489 RT_NOREF(pBackend); 2406 AssertFailed(); /** @todo Implement */ 2407 } 2408 2409 2410 static DECLCALLBACK(void) vmsvga3dDXSetSamplers(PVMSVGA3DSTATE p3dState) 2411 { 2412 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 2413 3490 3491 DXDEVICE *pDevice = &pDXContext->pBackendDXContext->device; 3492 AssertReturn(pDevice->pDevice, VERR_INVALID_STATE); 3493 3494 /* Get corresponding resource. Create the buffer if does not yet exist. */ 3495 ID3D11Buffer *pResource; 3496 DXGI_FORMAT enmDxgiFormat; 3497 3498 if (sid != SVGA_ID_INVALID) 3499 { 3500 PVMSVGA3DSURFACE pSurface; 3501 int rc = vmsvga3dSurfaceFromSid(pThisCC->svga.p3dState, sid, &pSurface); 3502 AssertRCReturn(rc, rc); 3503 3504 if (pSurface->pBackendSurface == NULL) 3505 { 3506 /* Create the resource. */ 3507 rc = vmsvga3dBackSurfaceCreateBuffer(pThisCC->svga.p3dState, pDXContext, pSurface); 3508 AssertRCReturn(rc, rc); 3509 } 3510 3511 if (pSurface->fDirty) 3512 { 3513 /* Get mobid for the surface and read from the MOB. */ 3514 SVGA3dSurfaceImageId imageId; 3515 imageId.sid = sid; 3516 imageId.face = 0; 3517 imageId.mipmap = 0; 3518 3519 SVGA3dBox box; 3520 box.x = 0; 3521 box.y = 0; 3522 box.z = 0; 3523 box.w = pSurface->paMipmapLevels[0].mipmapSize.width; 3524 box.h = 1; 3525 box.d = 1; 3526 3527 rc = vmsvgaR3UpdateGBSurface(pThisCC, &imageId, &box); 3528 AssertRCReturn(rc, rc); 3529 } 3530 3531 pResource = pSurface->pBackendSurface->u.Buffer.pBuffer; 3532 enmDxgiFormat = vmsvgaDXSurfaceFormat2Dxgi(format); 3533 AssertReturn(enmDxgiFormat == DXGI_FORMAT_R16_UINT || enmDxgiFormat == DXGI_FORMAT_R32_UINT, VERR_INVALID_PARAMETER); 3534 } 3535 else 3536 { 3537 pResource = NULL; 3538 enmDxgiFormat = DXGI_FORMAT_UNKNOWN; 3539 } 3540 3541 pDevice->pImmediateContext->IASetIndexBuffer(pResource, enmDxgiFormat, offset); 3542 3543 pDXContext->svgaDXContext.inputAssembly.indexBufferSid = sid; 3544 pDXContext->svgaDXContext.inputAssembly.indexBufferOffset = offset; 3545 pDXContext->svgaDXContext.inputAssembly.indexBufferFormat = format; 3546 3547 return VINF_SUCCESS; 3548 } 3549 3550 static D3D11_PRIMITIVE_TOPOLOGY dxTopology(SVGA3dPrimitiveType primitiveType) 3551 { 3552 static D3D11_PRIMITIVE_TOPOLOGY const aD3D11PrimitiveTopology[SVGA3D_PRIMITIVE_MAX] = 3553 { 3554 D3D11_PRIMITIVE_TOPOLOGY_UNDEFINED, 3555 D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST, 3556 D3D11_PRIMITIVE_TOPOLOGY_POINTLIST, 3557 D3D11_PRIMITIVE_TOPOLOGY_LINELIST, 3558 D3D11_PRIMITIVE_TOPOLOGY_LINESTRIP, 3559 D3D11_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP, 3560 D3D11_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP, /* SVGA3D_PRIMITIVE_TRIANGLEFAN: No FAN in D3D11 */ 3561 D3D11_PRIMITIVE_TOPOLOGY_LINELIST_ADJ, 3562 D3D11_PRIMITIVE_TOPOLOGY_LINESTRIP_ADJ, 3563 D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST_ADJ, 3564 D3D11_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP_ADJ, 3565 D3D11_PRIMITIVE_TOPOLOGY_1_CONTROL_POINT_PATCHLIST, 3566 D3D11_PRIMITIVE_TOPOLOGY_2_CONTROL_POINT_PATCHLIST, 3567 D3D11_PRIMITIVE_TOPOLOGY_3_CONTROL_POINT_PATCHLIST, 3568 D3D11_PRIMITIVE_TOPOLOGY_4_CONTROL_POINT_PATCHLIST, 3569 D3D11_PRIMITIVE_TOPOLOGY_5_CONTROL_POINT_PATCHLIST, 3570 D3D11_PRIMITIVE_TOPOLOGY_6_CONTROL_POINT_PATCHLIST, 3571 D3D11_PRIMITIVE_TOPOLOGY_7_CONTROL_POINT_PATCHLIST, 3572 D3D11_PRIMITIVE_TOPOLOGY_8_CONTROL_POINT_PATCHLIST, 3573 D3D11_PRIMITIVE_TOPOLOGY_9_CONTROL_POINT_PATCHLIST, 3574 D3D11_PRIMITIVE_TOPOLOGY_10_CONTROL_POINT_PATCHLIST, 3575 D3D11_PRIMITIVE_TOPOLOGY_11_CONTROL_POINT_PATCHLIST, 3576 D3D11_PRIMITIVE_TOPOLOGY_12_CONTROL_POINT_PATCHLIST, 3577 D3D11_PRIMITIVE_TOPOLOGY_13_CONTROL_POINT_PATCHLIST, 3578 D3D11_PRIMITIVE_TOPOLOGY_14_CONTROL_POINT_PATCHLIST, 3579 D3D11_PRIMITIVE_TOPOLOGY_15_CONTROL_POINT_PATCHLIST, 3580 D3D11_PRIMITIVE_TOPOLOGY_16_CONTROL_POINT_PATCHLIST, 3581 D3D11_PRIMITIVE_TOPOLOGY_17_CONTROL_POINT_PATCHLIST, 3582 D3D11_PRIMITIVE_TOPOLOGY_18_CONTROL_POINT_PATCHLIST, 3583 D3D11_PRIMITIVE_TOPOLOGY_19_CONTROL_POINT_PATCHLIST, 3584 D3D11_PRIMITIVE_TOPOLOGY_20_CONTROL_POINT_PATCHLIST, 3585 D3D11_PRIMITIVE_TOPOLOGY_21_CONTROL_POINT_PATCHLIST, 3586 D3D11_PRIMITIVE_TOPOLOGY_22_CONTROL_POINT_PATCHLIST, 3587 D3D11_PRIMITIVE_TOPOLOGY_23_CONTROL_POINT_PATCHLIST, 3588 D3D11_PRIMITIVE_TOPOLOGY_24_CONTROL_POINT_PATCHLIST, 3589 D3D11_PRIMITIVE_TOPOLOGY_25_CONTROL_POINT_PATCHLIST, 3590 D3D11_PRIMITIVE_TOPOLOGY_26_CONTROL_POINT_PATCHLIST, 3591 D3D11_PRIMITIVE_TOPOLOGY_27_CONTROL_POINT_PATCHLIST, 3592 D3D11_PRIMITIVE_TOPOLOGY_28_CONTROL_POINT_PATCHLIST, 3593 D3D11_PRIMITIVE_TOPOLOGY_29_CONTROL_POINT_PATCHLIST, 3594 D3D11_PRIMITIVE_TOPOLOGY_30_CONTROL_POINT_PATCHLIST, 3595 D3D11_PRIMITIVE_TOPOLOGY_31_CONTROL_POINT_PATCHLIST, 3596 D3D11_PRIMITIVE_TOPOLOGY_32_CONTROL_POINT_PATCHLIST, 3597 }; 3598 return aD3D11PrimitiveTopology[primitiveType]; 3599 } 3600 3601 static DECLCALLBACK(int) vmsvga3dBackDXSetTopology(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGA3dPrimitiveType topology) 3602 { 3603 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 2414 3604 RT_NOREF(pBackend); 2415 AssertFailed(); /** @todo Implement */ 2416 } 2417 2418 2419 static DECLCALLBACK(void) vmsvga3dDXDraw(PVMSVGA3DSTATE p3dState) 2420 { 2421 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 2422 3605 3606 DXDEVICE *pDevice = &pDXContext->pBackendDXContext->device; 3607 AssertReturn(pDevice->pDevice, VERR_INVALID_STATE); 3608 3609 D3D11_PRIMITIVE_TOPOLOGY enmTopology = dxTopology(topology); 3610 pDevice->pImmediateContext->IASetPrimitiveTopology(enmTopology); 3611 pDXContext->svgaDXContext.inputAssembly.topology = topology; 3612 return VINF_SUCCESS; 3613 } 3614 3615 3616 static DECLCALLBACK(int) vmsvga3dBackDXSetRenderTargets(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGA3dDepthStencilViewId depthStencilViewId, uint32_t cRenderTargetViewId, SVGA3dRenderTargetViewId const *paRenderTargetViewId) 3617 { 3618 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 2423 3619 RT_NOREF(pBackend); 2424 AssertFailed(); /** @todo Implement */ 2425 } 2426 2427 2428 static DECLCALLBACK(void) vmsvga3dDXDrawIndexed(PVMSVGA3DSTATE p3dState) 2429 { 2430 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 2431 3620 3621 DXDEVICE *pDevice = &pDXContext->pBackendDXContext->device; 3622 AssertReturn(pDevice->pDevice, VERR_INVALID_STATE); 3623 3624 ID3D11RenderTargetView *aRenderTargetViews[SVGA3D_MAX_RENDER_TARGETS]; 3625 for (uint32_t i = 0; i < cRenderTargetViewId; ++i) 3626 { 3627 SVGA3dRenderTargetViewId renderTargetViewId = paRenderTargetViewId[i]; 3628 if (renderTargetViewId != SVGA3D_INVALID_ID) 3629 { 3630 ASSERT_GUEST_RETURN(renderTargetViewId < pDXContext->pBackendDXContext->cRenderTargetView, VERR_INVALID_PARAMETER); 3631 aRenderTargetViews[i] = pDXContext->pBackendDXContext->papRenderTargetView[renderTargetViewId]; 3632 } 3633 else 3634 aRenderTargetViews[i] = NULL; 3635 } 3636 3637 ID3D11DepthStencilView *pDepthStencilView; 3638 if (depthStencilViewId != SVGA_ID_INVALID) 3639 pDepthStencilView = pDXContext->pBackendDXContext->papDepthStencilView[depthStencilViewId]; 3640 else 3641 pDepthStencilView = NULL; 3642 3643 pDevice->pImmediateContext->OMSetRenderTargets(cRenderTargetViewId, aRenderTargetViews, pDepthStencilView); 3644 return VINF_SUCCESS; 3645 } 3646 3647 3648 static DECLCALLBACK(int) vmsvga3dBackDXSetBlendState(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGA3dBlendStateId blendId, float const blendFactor[4], uint32_t sampleMask) 3649 { 3650 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 2432 3651 RT_NOREF(pBackend); 2433 AssertFailed(); /** @todo Implement */ 2434 } 2435 2436 2437 static DECLCALLBACK(void) vmsvga3dDXDrawInstanced(PVMSVGA3DSTATE p3dState) 2438 { 2439 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 2440 3652 3653 DXDEVICE *pDevice = &pDXContext->pBackendDXContext->device; 3654 AssertReturn(pDevice->pDevice, VERR_INVALID_STATE); 3655 3656 ID3D11BlendState *pBlendState = pDXContext->pBackendDXContext->papBlendState[blendId]; 3657 pDevice->pImmediateContext->OMSetBlendState(pBlendState, blendFactor, sampleMask); 3658 3659 pDXContext->svgaDXContext.renderState.blendStateId = blendId; 3660 memcpy(pDXContext->svgaDXContext.renderState.blendFactor, blendFactor, sizeof(blendFactor)); 3661 pDXContext->svgaDXContext.renderState.sampleMask = sampleMask; 3662 3663 return VINF_SUCCESS; 3664 } 3665 3666 3667 static DECLCALLBACK(int) vmsvga3dBackDXSetDepthStencilState(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGA3dDepthStencilStateId depthStencilId, uint32_t stencilRef) 3668 { 3669 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 2441 3670 RT_NOREF(pBackend); 2442 AssertFailed(); /** @todo Implement */ 2443 } 2444 2445 2446 static DECLCALLBACK(void) vmsvga3dDXDrawIndexedInstanced(PVMSVGA3DSTATE p3dState) 2447 { 2448 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 3671 3672 DXDEVICE *pDevice = &pDXContext->pBackendDXContext->device; 3673 AssertReturn(pDevice->pDevice, VERR_INVALID_STATE); 3674 3675 ID3D11DepthStencilState *pDepthStencilState = pDXContext->pBackendDXContext->papDepthStencilState[depthStencilId]; 3676 pDevice->pImmediateContext->OMSetDepthStencilState(pDepthStencilState, stencilRef); 3677 3678 pDXContext->svgaDXContext.renderState.depthStencilStateId = depthStencilId; 3679 pDXContext->svgaDXContext.renderState.stencilRef = stencilRef; 3680 3681 return VINF_SUCCESS; 3682 } 3683 3684 3685 static DECLCALLBACK(int) vmsvga3dBackDXSetRasterizerState(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGA3dRasterizerStateId rasterizerId) 3686 { 3687 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 3688 DXDEVICE *pDevice = &pDXContext->pBackendDXContext->device; 3689 AssertReturn(pDevice->pDevice, VERR_INVALID_STATE); 2449 3690 2450 3691 RT_NOREF(pBackend); 2451 AssertFailed(); /** @todo Implement */ 2452 } 2453 2454 2455 static DECLCALLBACK(void) vmsvga3dDXDrawAuto(PVMSVGA3DSTATE p3dState) 2456 { 2457 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 3692 3693 pDevice->pImmediateContext->RSSetState(pDXContext->pBackendDXContext->papRasterizerState[rasterizerId]); 3694 return VINF_SUCCESS; 3695 } 3696 3697 3698 static DECLCALLBACK(int) vmsvga3dBackDXDefineQuery(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 3699 { 3700 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 3701 3702 RT_NOREF(pBackend, pDXContext); 3703 AssertFailed(); /** @todo Implement */ 3704 return VERR_NOT_IMPLEMENTED; 3705 } 3706 3707 3708 static DECLCALLBACK(int) vmsvga3dBackDXDestroyQuery(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 3709 { 3710 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 3711 3712 RT_NOREF(pBackend, pDXContext); 3713 AssertFailed(); /** @todo Implement */ 3714 return VERR_NOT_IMPLEMENTED; 3715 } 3716 3717 3718 static DECLCALLBACK(int) vmsvga3dBackDXBindQuery(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 3719 { 3720 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 3721 3722 RT_NOREF(pBackend, pDXContext); 3723 AssertFailed(); /** @todo Implement */ 3724 return VERR_NOT_IMPLEMENTED; 3725 } 3726 3727 3728 static DECLCALLBACK(int) vmsvga3dBackDXSetQueryOffset(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 3729 { 3730 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 3731 3732 RT_NOREF(pBackend, pDXContext); 3733 AssertFailed(); /** @todo Implement */ 3734 return VERR_NOT_IMPLEMENTED; 3735 } 3736 3737 3738 static DECLCALLBACK(int) vmsvga3dBackDXBeginQuery(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 3739 { 3740 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 3741 3742 RT_NOREF(pBackend, pDXContext); 3743 AssertFailed(); /** @todo Implement */ 3744 return VERR_NOT_IMPLEMENTED; 3745 } 3746 3747 3748 static DECLCALLBACK(int) vmsvga3dBackDXEndQuery(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 3749 { 3750 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 3751 3752 RT_NOREF(pBackend, pDXContext); 3753 AssertFailed(); /** @todo Implement */ 3754 return VERR_NOT_IMPLEMENTED; 3755 } 3756 3757 3758 static DECLCALLBACK(int) vmsvga3dBackDXReadbackQuery(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 3759 { 3760 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 3761 3762 RT_NOREF(pBackend, pDXContext); 3763 AssertFailed(); /** @todo Implement */ 3764 return VERR_NOT_IMPLEMENTED; 3765 } 3766 3767 3768 static DECLCALLBACK(int) vmsvga3dBackDXSetPredication(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 3769 { 3770 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 3771 3772 RT_NOREF(pBackend, pDXContext); 3773 AssertFailed(); /** @todo Implement */ 3774 return VERR_NOT_IMPLEMENTED; 3775 } 3776 3777 3778 static DECLCALLBACK(int) vmsvga3dBackDXSetSOTargets(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 3779 { 3780 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 3781 3782 RT_NOREF(pBackend, pDXContext); 3783 AssertFailed(); /** @todo Implement */ 3784 return VERR_NOT_IMPLEMENTED; 3785 } 3786 3787 3788 static DECLCALLBACK(int) vmsvga3dBackDXSetViewports(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, uint32_t cViewport, SVGA3dViewport const *paViewport) 3789 { 3790 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 3791 DXDEVICE *pDevice = &pDXContext->pBackendDXContext->device; 3792 AssertReturn(pDevice->pDevice, VERR_INVALID_STATE); 2458 3793 2459 3794 RT_NOREF(pBackend); 2460 AssertFailed(); /** @todo Implement */ 2461 } 2462 2463 2464 static DECLCALLBACK(void) vmsvga3dDXSetInputLayout(PVMSVGA3DSTATE p3dState) 2465 { 2466 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 3795 3796 /* D3D11_VIEWPORT is identical to SVGA3dViewport. */ 3797 D3D11_VIEWPORT *pViewports = (D3D11_VIEWPORT *)paViewport; 3798 3799 pDevice->pImmediateContext->RSSetViewports(cViewport, pViewports); 3800 return VINF_SUCCESS; 3801 } 3802 3803 3804 static DECLCALLBACK(int) vmsvga3dBackDXSetScissorRects(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, uint32_t cRect, SVGASignedRect const *paRect) 3805 { 3806 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 3807 DXDEVICE *pDevice = &pDXContext->pBackendDXContext->device; 3808 AssertReturn(pDevice->pDevice, VERR_INVALID_STATE); 2467 3809 2468 3810 RT_NOREF(pBackend); 2469 AssertFailed(); /** @todo Implement */ 2470 } 2471 2472 2473 static DECLCALLBACK(void) vmsvga3dDXSetVertexBuffers(PVMSVGA3DSTATE p3dState) 2474 { 2475 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 2476 3811 3812 /* D3D11_RECT is identical to SVGASignedRect. */ 3813 D3D11_RECT *pRects = (D3D11_RECT *)paRect; 3814 3815 pDevice->pImmediateContext->RSSetScissorRects(cRect, pRects); 3816 return VINF_SUCCESS; 3817 } 3818 3819 3820 static DECLCALLBACK(int) vmsvga3dBackDXClearRenderTargetView(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 3821 { 3822 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 3823 3824 RT_NOREF(pBackend, pDXContext); 3825 AssertFailed(); /** @todo Implement */ 3826 return VERR_NOT_IMPLEMENTED; 3827 } 3828 3829 3830 static DECLCALLBACK(int) vmsvga3dBackDXClearDepthStencilView(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 3831 { 3832 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 3833 3834 RT_NOREF(pBackend, pDXContext); 3835 AssertFailed(); /** @todo Implement */ 3836 return VERR_NOT_IMPLEMENTED; 3837 } 3838 3839 3840 static DECLCALLBACK(int) vmsvga3dBackDXPredCopyRegion(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 3841 { 3842 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 3843 3844 RT_NOREF(pBackend, pDXContext); 3845 AssertFailed(); /** @todo Implement */ 3846 return VERR_NOT_IMPLEMENTED; 3847 } 3848 3849 3850 static DECLCALLBACK(int) vmsvga3dBackDXPredCopy(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 3851 { 3852 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 3853 3854 RT_NOREF(pBackend, pDXContext); 3855 AssertFailed(); /** @todo Implement */ 3856 return VERR_NOT_IMPLEMENTED; 3857 } 3858 3859 3860 static DECLCALLBACK(int) vmsvga3dBackDXPresentBlt(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 3861 { 3862 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 3863 3864 RT_NOREF(pBackend, pDXContext); 3865 AssertFailed(); /** @todo Implement */ 3866 return VERR_NOT_IMPLEMENTED; 3867 } 3868 3869 3870 static DECLCALLBACK(int) vmsvga3dBackDXGenMips(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 3871 { 3872 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 3873 3874 RT_NOREF(pBackend, pDXContext); 3875 AssertFailed(); /** @todo Implement */ 3876 return VERR_NOT_IMPLEMENTED; 3877 } 3878 3879 3880 static DECLCALLBACK(int) vmsvga3dBackDXUpdateSubResource(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 3881 { 3882 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 3883 3884 RT_NOREF(pBackend, pDXContext); 3885 AssertFailed(); /** @todo Implement */ 3886 return VERR_NOT_IMPLEMENTED; 3887 } 3888 3889 3890 static DECLCALLBACK(int) vmsvga3dBackDXReadbackSubResource(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 3891 { 3892 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 3893 3894 RT_NOREF(pBackend, pDXContext); 3895 AssertFailed(); /** @todo Implement */ 3896 return VERR_NOT_IMPLEMENTED; 3897 } 3898 3899 3900 static DECLCALLBACK(int) vmsvga3dBackDXInvalidateSubResource(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 3901 { 3902 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 3903 3904 RT_NOREF(pBackend, pDXContext); 3905 AssertFailed(); /** @todo Implement */ 3906 return VERR_NOT_IMPLEMENTED; 3907 } 3908 3909 3910 static DECLCALLBACK(int) vmsvga3dBackDXDefineShaderResourceView(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGA3dShaderResourceViewId shaderResourceViewId, SVGACOTableDXSRViewEntry const *pEntry) 3911 { 3912 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 2477 3913 RT_NOREF(pBackend); 2478 AssertFailed(); /** @todo Implement */ 2479 } 2480 2481 2482 static DECLCALLBACK(void) vmsvga3dDXSetIndexBuffer(PVMSVGA3DSTATE p3dState) 2483 { 2484 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 2485 3914 3915 DXDEVICE *pDevice = &pDXContext->pBackendDXContext->device; 3916 AssertReturn(pDevice->pDevice, VERR_INVALID_STATE); 3917 3918 /* Get corresponding resource for pEntry->sid. Create the surface if does not yet exist. */ 3919 PVMSVGA3DSURFACE pSurface; 3920 int rc = vmsvga3dSurfaceFromSid(pThisCC->svga.p3dState, pEntry->sid, &pSurface); 3921 AssertRCReturn(rc, rc); 3922 3923 if (pSurface->pBackendSurface == NULL) 3924 { 3925 /* Create the actual texture. */ 3926 rc = vmsvga3dBackSurfaceCreateTexture(pThisCC->svga.p3dState, pDXContext, pSurface); 3927 AssertRCReturn(rc, rc); 3928 } 3929 3930 HRESULT hr = dxShaderResourceViewCreate(pDevice, pEntry, pSurface->pBackendSurface, &pDXContext->pBackendDXContext->papShaderResourceView[shaderResourceViewId]); 3931 if (SUCCEEDED(hr)) 3932 return VINF_SUCCESS; 3933 return VERR_INVALID_STATE; 3934 } 3935 3936 3937 static DECLCALLBACK(int) vmsvga3dBackDXDestroyShaderResourceView(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 3938 { 3939 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 3940 3941 RT_NOREF(pBackend, pDXContext); 3942 AssertFailed(); /** @todo Implement */ 3943 return VERR_NOT_IMPLEMENTED; 3944 } 3945 3946 3947 static DECLCALLBACK(int) vmsvga3dBackDXDefineRenderTargetView(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGA3dRenderTargetViewId renderTargetViewId, SVGACOTableDXRTViewEntry const *pEntry) 3948 { 3949 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 2486 3950 RT_NOREF(pBackend); 2487 AssertFailed(); /** @todo Implement */ 2488 } 2489 2490 2491 static DECLCALLBACK(void) vmsvga3dDXSetTopology(PVMSVGA3DSTATE p3dState) 2492 { 2493 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 3951 3952 DXDEVICE *pDevice = &pDXContext->pBackendDXContext->device; 3953 AssertReturn(pDevice->pDevice, VERR_INVALID_STATE); 3954 3955 /* Get corresponding resource for pEntry->sid. Create the surface if does not yet exist. */ 3956 PVMSVGA3DSURFACE pSurface; 3957 int rc = vmsvga3dSurfaceFromSid(pThisCC->svga.p3dState, pEntry->sid, &pSurface); 3958 AssertRCReturn(rc, rc); 3959 3960 if (pSurface->pBackendSurface == NULL) 3961 { 3962 /* Create the actual texture. */ 3963 rc = vmsvga3dBackSurfaceCreateRenderTarget(pThisCC->svga.p3dState, pDXContext, pSurface); 3964 AssertRCReturn(rc, rc); 3965 } 3966 3967 HRESULT hr = dxRenderTargetViewCreate(pDevice, pEntry, pSurface->pBackendSurface, &pDXContext->pBackendDXContext->papRenderTargetView[renderTargetViewId]); 3968 if (SUCCEEDED(hr)) 3969 return VINF_SUCCESS; 3970 return VERR_INVALID_STATE; 3971 } 3972 3973 3974 static DECLCALLBACK(int) vmsvga3dBackDXDestroyRenderTargetView(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 3975 { 3976 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 3977 3978 RT_NOREF(pBackend, pDXContext); 3979 AssertFailed(); /** @todo Implement */ 3980 return VERR_NOT_IMPLEMENTED; 3981 } 3982 3983 3984 static DECLCALLBACK(int) vmsvga3dBackDXDefineDepthStencilView(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 3985 { 3986 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 3987 3988 RT_NOREF(pBackend, pDXContext); 3989 AssertFailed(); /** @todo Implement */ 3990 return VERR_NOT_IMPLEMENTED; 3991 } 3992 3993 3994 static DECLCALLBACK(int) vmsvga3dBackDXDestroyDepthStencilView(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 3995 { 3996 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 3997 3998 RT_NOREF(pBackend, pDXContext); 3999 AssertFailed(); /** @todo Implement */ 4000 return VERR_NOT_IMPLEMENTED; 4001 } 4002 4003 4004 static DECLCALLBACK(int) vmsvga3dBackDXDefineElementLayout(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGA3dElementLayoutId elementLayoutId, SVGACOTableDXElementLayoutEntry const *pEntry) 4005 { 4006 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 4007 DXDEVICE *pDevice = &pDXContext->pBackendDXContext->device; 4008 AssertReturn(pDevice->pDevice, VERR_INVALID_STATE); 4009 4010 RT_NOREF(pBackend, elementLayoutId, pEntry); 4011 4012 /* Not much can be done here because ID3D11Device::CreateInputLayout requires 4013 * a pShaderBytecodeWithInputSignature which is not known at this moment. 4014 * InputLayout object will be created in SVGA_3D_CMD_DX_SET_INPUT_LAYOUT. 4015 */ 4016 4017 DXELEMENTLAYOUT *pDXElementLayout = &pDXContext->pBackendDXContext->paElementLayout[pEntry->elid]; 4018 D3D_RELEASE(pDXElementLayout->pElementLayout); 4019 4020 /* Semantic name is not interpreted by D3D, therefore arbitrary names can be used 4021 * if they are consistent between the element layout and shader input signature. 4022 * "In general, data passed between pipeline stages is completely generic and is not uniquely 4023 * interpreted by the system; arbitrary semantics are allowed ..." 4024 * 4025 * However D3D runtime insists that "SemanticName string ("POSITIO1") cannot end with a number." 4026 * 4027 * System-Value semantics ("SV_*") between shaders require proper names of course. 4028 * But they are irrelevant for input attributes. 4029 */ 4030 pDXElementLayout->cElementDesc = pEntry->numDescs; 4031 for (uint32_t i = 0; i < pEntry->numDescs; ++i) 4032 { 4033 D3D11_INPUT_ELEMENT_DESC *pDst = &pDXElementLayout->aElementDesc[i]; 4034 SVGA3dInputElementDesc const *pSrc = &pEntry->descs[i]; 4035 pDst->SemanticName = "ATTRIB"; 4036 pDst->SemanticIndex = i; /// @todo 'pSrc->inputRegister' is unused, maybe it should somehow. 4037 pDst->Format = vmsvgaDXSurfaceFormat2Dxgi(pSrc->format); 4038 AssertReturn(pDst->Format != DXGI_FORMAT_UNKNOWN, VERR_NOT_IMPLEMENTED); 4039 pDst->InputSlot = pSrc->inputSlot; 4040 pDst->AlignedByteOffset = pSrc->alignedByteOffset; 4041 pDst->InputSlotClass = (D3D11_INPUT_CLASSIFICATION)pSrc->inputSlotClass; 4042 pDst->InstanceDataStepRate = pSrc->instanceDataStepRate; 4043 } 4044 4045 return VINF_SUCCESS; 4046 } 4047 4048 4049 static DECLCALLBACK(int) vmsvga3dBackDXDestroyElementLayout(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 4050 { 4051 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 4052 4053 RT_NOREF(pBackend, pDXContext); 4054 AssertFailed(); /** @todo Implement */ 4055 return VERR_NOT_IMPLEMENTED; 4056 } 4057 4058 4059 static DECLCALLBACK(int) vmsvga3dBackDXDefineBlendState(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, 4060 SVGA3dBlendStateId blendId, SVGACOTableDXBlendStateEntry const *pEntry) 4061 { 4062 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 4063 DXDEVICE *pDevice = &pDXContext->pBackendDXContext->device; 4064 AssertReturn(pDevice->pDevice, VERR_INVALID_STATE); 2494 4065 2495 4066 RT_NOREF(pBackend); 2496 AssertFailed(); /** @todo Implement */ 2497 } 2498 2499 2500 static DECLCALLBACK(void) vmsvga3dDXSetRenderTargets(PVMSVGA3DSTATE p3dState) 2501 { 2502 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 4067 4068 HRESULT hr = dxBlendStateCreate(pDevice, pEntry, &pDXContext->pBackendDXContext->papBlendState[blendId]); 4069 if (SUCCEEDED(hr)) 4070 return VINF_SUCCESS; 4071 return VERR_INVALID_STATE; 4072 } 4073 4074 4075 static DECLCALLBACK(int) vmsvga3dBackDXDestroyBlendState(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 4076 { 4077 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 4078 4079 RT_NOREF(pBackend, pDXContext); 4080 AssertFailed(); /** @todo Implement */ 4081 return VERR_NOT_IMPLEMENTED; 4082 } 4083 4084 4085 static DECLCALLBACK(int) vmsvga3dBackDXDefineDepthStencilState(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGA3dDepthStencilStateId depthStencilId, SVGACOTableDXDepthStencilEntry *pEntry) 4086 { 4087 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 4088 DXDEVICE *pDevice = &pDXContext->pBackendDXContext->device; 4089 AssertReturn(pDevice->pDevice, VERR_INVALID_STATE); 2503 4090 2504 4091 RT_NOREF(pBackend); 2505 AssertFailed(); /** @todo Implement */ 2506 } 2507 2508 2509 static DECLCALLBACK(void) vmsvga3dDXSetBlendState(PVMSVGA3DSTATE p3dState) 2510 { 2511 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 4092 4093 HRESULT hr = dxDepthStencilStateCreate(pDevice, pEntry, &pDXContext->pBackendDXContext->papDepthStencilState[depthStencilId]); 4094 if (SUCCEEDED(hr)) 4095 return VINF_SUCCESS; 4096 return VERR_INVALID_STATE; 4097 } 4098 4099 4100 static DECLCALLBACK(int) vmsvga3dBackDXDestroyDepthStencilState(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 4101 { 4102 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 4103 4104 RT_NOREF(pBackend, pDXContext); 4105 AssertFailed(); /** @todo Implement */ 4106 return VERR_NOT_IMPLEMENTED; 4107 } 4108 4109 4110 static DECLCALLBACK(int) vmsvga3dBackDXDefineRasterizerState(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGA3dRasterizerStateId rasterizerId, SVGACOTableDXRasterizerStateEntry const *pEntry) 4111 { 4112 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 4113 DXDEVICE *pDevice = &pDXContext->pBackendDXContext->device; 4114 AssertReturn(pDevice->pDevice, VERR_INVALID_STATE); 2512 4115 2513 4116 RT_NOREF(pBackend); 2514 AssertFailed(); /** @todo Implement */ 2515 } 2516 2517 2518 static DECLCALLBACK(void) vmsvga3dDXSetDepthStencilState(PVMSVGA3DSTATE p3dState) 2519 { 2520 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 4117 4118 HRESULT hr = dxRasterizerStateCreate(pDevice, pEntry, &pDXContext->pBackendDXContext->papRasterizerState[rasterizerId]); 4119 if (SUCCEEDED(hr)) 4120 return VINF_SUCCESS; 4121 return VERR_INVALID_STATE; 4122 } 4123 4124 4125 static DECLCALLBACK(int) vmsvga3dBackDXDestroyRasterizerState(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 4126 { 4127 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 4128 4129 RT_NOREF(pBackend, pDXContext); 4130 AssertFailed(); /** @todo Implement */ 4131 return VERR_NOT_IMPLEMENTED; 4132 } 4133 4134 4135 static DECLCALLBACK(int) vmsvga3dBackDXDefineSamplerState(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGA3dSamplerId samplerId, SVGACOTableDXSamplerEntry const *pEntry) 4136 { 4137 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 4138 DXDEVICE *pDevice = &pDXContext->pBackendDXContext->device; 4139 AssertReturn(pDevice->pDevice, VERR_INVALID_STATE); 2521 4140 2522 4141 RT_NOREF(pBackend); 2523 AssertFailed(); /** @todo Implement */ 2524 } 2525 2526 2527 static DECLCALLBACK(void) vmsvga3dDXSetRasterizerState(PVMSVGA3DSTATE p3dState) 2528 { 2529 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 4142 4143 HRESULT hr = dxSamplerStateCreate(pDevice, pEntry, &pDXContext->pBackendDXContext->papSamplerState[samplerId]); 4144 if (SUCCEEDED(hr)) 4145 return VINF_SUCCESS; 4146 return VERR_INVALID_STATE; 4147 } 4148 4149 4150 static DECLCALLBACK(int) vmsvga3dBackDXDestroySamplerState(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 4151 { 4152 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 4153 4154 RT_NOREF(pBackend, pDXContext); 4155 AssertFailed(); /** @todo Implement */ 4156 return VERR_NOT_IMPLEMENTED; 4157 } 4158 4159 4160 static DECLCALLBACK(int) vmsvga3dBackDXDefineShader(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, PVMSVGA3DSHADER pShader) 4161 { 4162 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 2530 4163 2531 4164 RT_NOREF(pBackend); 2532 AssertFailed(); /** @todo Implement */ 2533 } 2534 2535 2536 static DECLCALLBACK(void) vmsvga3dDXDefineQuery(PVMSVGA3DSTATE p3dState) 2537 { 2538 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 4165 4166 DXSHADER *pDXShader = &pDXContext->pBackendDXContext->paShader[pShader->id]; 4167 D3D_RELEASE(pDXShader->pShader); 4168 pDXShader->enmShaderType = pShader->type; 4169 pShader->u.pvBackendShader = pDXShader; 4170 return VINF_SUCCESS; 4171 } 4172 4173 4174 static DECLCALLBACK(int) vmsvga3dBackDXDestroyShader(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 4175 { 4176 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 4177 4178 RT_NOREF(pBackend, pDXContext); 4179 AssertFailed(); /** @todo Implement */ 4180 return VERR_NOT_IMPLEMENTED; 4181 } 4182 4183 4184 static DECLCALLBACK(int) vmsvga3dBackDXBindShader(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, PVMSVGA3DSHADER pShader, void const *pvShaderBytecode) 4185 { 4186 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 4187 DXDEVICE *pDevice = &pDXContext->pBackendDXContext->device; 4188 AssertReturn(pDevice->pDevice, VERR_INVALID_STATE); 2539 4189 2540 4190 RT_NOREF(pBackend); 2541 AssertFailed(); /** @todo Implement */ 2542 } 2543 2544 2545 static DECLCALLBACK(void) vmsvga3dDXDestroyQuery(PVMSVGA3DSTATE p3dState) 2546 { 2547 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 2548 2549 RT_NOREF(pBackend); 2550 AssertFailed(); /** @todo Implement */ 2551 } 2552 2553 2554 static DECLCALLBACK(void) vmsvga3dDXBindQuery(PVMSVGA3DSTATE p3dState) 2555 { 2556 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 2557 2558 RT_NOREF(pBackend); 2559 AssertFailed(); /** @todo Implement */ 2560 } 2561 2562 2563 static DECLCALLBACK(void) vmsvga3dDXSetQueryOffset(PVMSVGA3DSTATE p3dState) 2564 { 2565 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 2566 2567 RT_NOREF(pBackend); 2568 AssertFailed(); /** @todo Implement */ 2569 } 2570 2571 2572 static DECLCALLBACK(void) vmsvga3dDXBeginQuery(PVMSVGA3DSTATE p3dState) 2573 { 2574 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 2575 2576 RT_NOREF(pBackend); 2577 AssertFailed(); /** @todo Implement */ 2578 } 2579 2580 2581 static DECLCALLBACK(void) vmsvga3dDXEndQuery(PVMSVGA3DSTATE p3dState) 2582 { 2583 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 2584 2585 RT_NOREF(pBackend); 2586 AssertFailed(); /** @todo Implement */ 2587 } 2588 2589 2590 static DECLCALLBACK(void) vmsvga3dDXReadbackQuery(PVMSVGA3DSTATE p3dState) 2591 { 2592 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 2593 2594 RT_NOREF(pBackend); 2595 AssertFailed(); /** @todo Implement */ 2596 } 2597 2598 2599 static DECLCALLBACK(void) vmsvga3dDXSetPredication(PVMSVGA3DSTATE p3dState) 2600 { 2601 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 2602 2603 RT_NOREF(pBackend); 2604 AssertFailed(); /** @todo Implement */ 2605 } 2606 2607 2608 static DECLCALLBACK(void) vmsvga3dDXSetSOTargets(PVMSVGA3DSTATE p3dState) 2609 { 2610 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 2611 2612 RT_NOREF(pBackend); 2613 AssertFailed(); /** @todo Implement */ 2614 } 2615 2616 2617 static DECLCALLBACK(void) vmsvga3dDXSetViewports(PVMSVGA3DSTATE p3dState) 2618 { 2619 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 2620 2621 RT_NOREF(pBackend); 2622 AssertFailed(); /** @todo Implement */ 2623 } 2624 2625 2626 static DECLCALLBACK(void) vmsvga3dDXSetScissorRects(PVMSVGA3DSTATE p3dState) 2627 { 2628 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 2629 2630 RT_NOREF(pBackend); 2631 AssertFailed(); /** @todo Implement */ 2632 } 2633 2634 2635 static DECLCALLBACK(void) vmsvga3dDXClearRenderTargetView(PVMSVGA3DSTATE p3dState) 2636 { 2637 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 2638 2639 RT_NOREF(pBackend); 2640 AssertFailed(); /** @todo Implement */ 2641 } 2642 2643 2644 static DECLCALLBACK(void) vmsvga3dDXClearDepthStencilView(PVMSVGA3DSTATE p3dState) 2645 { 2646 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 2647 2648 RT_NOREF(pBackend); 2649 AssertFailed(); /** @todo Implement */ 2650 } 2651 2652 2653 static DECLCALLBACK(void) vmsvga3dDXPredCopyRegion(PVMSVGA3DSTATE p3dState) 2654 { 2655 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 2656 2657 RT_NOREF(pBackend); 2658 AssertFailed(); /** @todo Implement */ 2659 } 2660 2661 2662 static DECLCALLBACK(void) vmsvga3dDXPredCopy(PVMSVGA3DSTATE p3dState) 2663 { 2664 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 2665 2666 RT_NOREF(pBackend); 2667 AssertFailed(); /** @todo Implement */ 2668 } 2669 2670 2671 static DECLCALLBACK(void) vmsvga3dDXPresentBlt(PVMSVGA3DSTATE p3dState) 2672 { 2673 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 2674 2675 RT_NOREF(pBackend); 2676 AssertFailed(); /** @todo Implement */ 2677 } 2678 2679 2680 static DECLCALLBACK(void) vmsvga3dDXGenMips(PVMSVGA3DSTATE p3dState) 2681 { 2682 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 2683 2684 RT_NOREF(pBackend); 2685 AssertFailed(); /** @todo Implement */ 2686 } 2687 2688 2689 static DECLCALLBACK(void) vmsvga3dDXUpdateSubResource(PVMSVGA3DSTATE p3dState) 2690 { 2691 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 2692 2693 RT_NOREF(pBackend); 2694 AssertFailed(); /** @todo Implement */ 2695 } 2696 2697 2698 static DECLCALLBACK(void) vmsvga3dDXReadbackSubResource(PVMSVGA3DSTATE p3dState) 2699 { 2700 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 2701 2702 RT_NOREF(pBackend); 2703 AssertFailed(); /** @todo Implement */ 2704 } 2705 2706 2707 static DECLCALLBACK(void) vmsvga3dDXInvalidateSubResource(PVMSVGA3DSTATE p3dState) 2708 { 2709 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 2710 2711 RT_NOREF(pBackend); 2712 AssertFailed(); /** @todo Implement */ 2713 } 2714 2715 2716 static DECLCALLBACK(void) vmsvga3dDXDefineShaderResourceView(PVMSVGA3DSTATE p3dState) 2717 { 2718 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 2719 2720 RT_NOREF(pBackend); 2721 AssertFailed(); /** @todo Implement */ 2722 } 2723 2724 2725 static DECLCALLBACK(void) vmsvga3dDXDestroyShaderResourceView(PVMSVGA3DSTATE p3dState) 2726 { 2727 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 2728 2729 RT_NOREF(pBackend); 2730 AssertFailed(); /** @todo Implement */ 2731 } 2732 2733 2734 static DECLCALLBACK(void) vmsvga3dDXDefineRenderTargetView(PVMSVGA3DSTATE p3dState) 2735 { 2736 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 2737 2738 RT_NOREF(pBackend); 2739 AssertFailed(); /** @todo Implement */ 2740 } 2741 2742 2743 static DECLCALLBACK(void) vmsvga3dDXDestroyRenderTargetView(PVMSVGA3DSTATE p3dState) 2744 { 2745 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 2746 2747 RT_NOREF(pBackend); 2748 AssertFailed(); /** @todo Implement */ 2749 } 2750 2751 2752 static DECLCALLBACK(void) vmsvga3dDXDefineDepthStencilView(PVMSVGA3DSTATE p3dState) 2753 { 2754 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 2755 2756 RT_NOREF(pBackend); 2757 AssertFailed(); /** @todo Implement */ 2758 } 2759 2760 2761 static DECLCALLBACK(void) vmsvga3dDXDestroyDepthStencilView(PVMSVGA3DSTATE p3dState) 2762 { 2763 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 2764 2765 RT_NOREF(pBackend); 2766 AssertFailed(); /** @todo Implement */ 2767 } 2768 2769 2770 static DECLCALLBACK(void) vmsvga3dDXDefineElementLayout(PVMSVGA3DSTATE p3dState) 2771 { 2772 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 2773 2774 RT_NOREF(pBackend); 2775 AssertFailed(); /** @todo Implement */ 2776 } 2777 2778 2779 static DECLCALLBACK(void) vmsvga3dDXDestroyElementLayout(PVMSVGA3DSTATE p3dState) 2780 { 2781 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 2782 2783 RT_NOREF(pBackend); 2784 AssertFailed(); /** @todo Implement */ 2785 } 2786 2787 2788 static DECLCALLBACK(void) vmsvga3dDXDefineBlendState(PVMSVGA3DSTATE p3dState) 2789 { 2790 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 2791 2792 RT_NOREF(pBackend); 2793 AssertFailed(); /** @todo Implement */ 2794 } 2795 2796 2797 static DECLCALLBACK(void) vmsvga3dDXDestroyBlendState(PVMSVGA3DSTATE p3dState) 2798 { 2799 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 2800 2801 RT_NOREF(pBackend); 2802 AssertFailed(); /** @todo Implement */ 2803 } 2804 2805 2806 static DECLCALLBACK(void) vmsvga3dDXDefineDepthStencilState(PVMSVGA3DSTATE p3dState) 2807 { 2808 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 2809 2810 RT_NOREF(pBackend); 2811 AssertFailed(); /** @todo Implement */ 2812 } 2813 2814 2815 static DECLCALLBACK(void) vmsvga3dDXDestroyDepthStencilState(PVMSVGA3DSTATE p3dState) 2816 { 2817 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 2818 2819 RT_NOREF(pBackend); 2820 AssertFailed(); /** @todo Implement */ 2821 } 2822 2823 2824 static DECLCALLBACK(void) vmsvga3dDXDefineRasterizerState(PVMSVGA3DSTATE p3dState) 2825 { 2826 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 2827 2828 RT_NOREF(pBackend); 2829 AssertFailed(); /** @todo Implement */ 2830 } 2831 2832 2833 static DECLCALLBACK(void) vmsvga3dDXDestroyRasterizerState(PVMSVGA3DSTATE p3dState) 2834 { 2835 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 2836 2837 RT_NOREF(pBackend); 2838 AssertFailed(); /** @todo Implement */ 2839 } 2840 2841 2842 static DECLCALLBACK(void) vmsvga3dDXDefineSamplerState(PVMSVGA3DSTATE p3dState) 2843 { 2844 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 2845 2846 RT_NOREF(pBackend); 2847 AssertFailed(); /** @todo Implement */ 2848 } 2849 2850 2851 static DECLCALLBACK(void) vmsvga3dDXDestroySamplerState(PVMSVGA3DSTATE p3dState) 2852 { 2853 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 2854 2855 RT_NOREF(pBackend); 2856 AssertFailed(); /** @todo Implement */ 2857 } 2858 2859 2860 static DECLCALLBACK(void) vmsvga3dDXDefineShader(PVMSVGA3DSTATE p3dState) 2861 { 2862 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 2863 2864 RT_NOREF(pBackend); 2865 AssertFailed(); /** @todo Implement */ 2866 } 2867 2868 2869 static DECLCALLBACK(void) vmsvga3dDXDestroyShader(PVMSVGA3DSTATE p3dState) 2870 { 2871 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 2872 2873 RT_NOREF(pBackend); 2874 AssertFailed(); /** @todo Implement */ 2875 } 2876 2877 2878 static DECLCALLBACK(void) vmsvga3dDXBindShader(PVMSVGA3DSTATE p3dState) 2879 { 2880 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 2881 2882 RT_NOREF(pBackend); 2883 AssertFailed(); /** @todo Implement */ 2884 } 2885 2886 2887 static DECLCALLBACK(void) vmsvga3dDXDefineStreamOutput(PVMSVGA3DSTATE p3dState) 2888 { 2889 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 2890 2891 RT_NOREF(pBackend); 2892 AssertFailed(); /** @todo Implement */ 2893 } 2894 2895 2896 static DECLCALLBACK(void) vmsvga3dDXDestroyStreamOutput(PVMSVGA3DSTATE p3dState) 2897 { 2898 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 2899 2900 RT_NOREF(pBackend); 2901 AssertFailed(); /** @todo Implement */ 2902 } 2903 2904 2905 static DECLCALLBACK(void) vmsvga3dDXSetStreamOutput(PVMSVGA3DSTATE p3dState) 2906 { 2907 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 2908 2909 RT_NOREF(pBackend); 2910 AssertFailed(); /** @todo Implement */ 2911 } 2912 2913 2914 static DECLCALLBACK(void) vmsvga3dDXSetCOTable(PVMSVGA3DSTATE p3dState) 2915 { 2916 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 2917 2918 RT_NOREF(pBackend); 2919 AssertFailed(); /** @todo Implement */ 2920 } 2921 2922 2923 static DECLCALLBACK(void) vmsvga3dDXReadbackCOTable(PVMSVGA3DSTATE p3dState) 2924 { 2925 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 2926 2927 RT_NOREF(pBackend); 2928 AssertFailed(); /** @todo Implement */ 2929 } 2930 2931 2932 static DECLCALLBACK(void) vmsvga3dDXBufferCopy(PVMSVGA3DSTATE p3dState) 2933 { 2934 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 2935 2936 RT_NOREF(pBackend); 2937 AssertFailed(); /** @todo Implement */ 2938 } 2939 2940 2941 static DECLCALLBACK(void) vmsvga3dDXTransferFromBuffer(PVMSVGA3DSTATE p3dState) 2942 { 2943 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 2944 2945 RT_NOREF(pBackend); 2946 AssertFailed(); /** @todo Implement */ 2947 } 2948 2949 2950 static DECLCALLBACK(void) vmsvga3dDXSurfaceCopyAndReadback(PVMSVGA3DSTATE p3dState) 2951 { 2952 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 2953 2954 RT_NOREF(pBackend); 2955 AssertFailed(); /** @todo Implement */ 2956 } 2957 2958 2959 static DECLCALLBACK(void) vmsvga3dDXMoveQuery(PVMSVGA3DSTATE p3dState) 2960 { 2961 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 2962 2963 RT_NOREF(pBackend); 2964 AssertFailed(); /** @todo Implement */ 2965 } 2966 2967 2968 static DECLCALLBACK(void) vmsvga3dDXBindAllQuery(PVMSVGA3DSTATE p3dState) 2969 { 2970 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 2971 2972 RT_NOREF(pBackend); 2973 AssertFailed(); /** @todo Implement */ 2974 } 2975 2976 2977 static DECLCALLBACK(void) vmsvga3dDXReadbackAllQuery(PVMSVGA3DSTATE p3dState) 2978 { 2979 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 2980 2981 RT_NOREF(pBackend); 2982 AssertFailed(); /** @todo Implement */ 2983 } 2984 2985 2986 static DECLCALLBACK(void) vmsvga3dDXPredTransferFromBuffer(PVMSVGA3DSTATE p3dState) 2987 { 2988 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 2989 2990 RT_NOREF(pBackend); 2991 AssertFailed(); /** @todo Implement */ 2992 } 2993 2994 2995 static DECLCALLBACK(void) vmsvga3dDXMobFence64(PVMSVGA3DSTATE p3dState) 2996 { 2997 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 2998 2999 RT_NOREF(pBackend); 3000 AssertFailed(); /** @todo Implement */ 3001 } 3002 3003 3004 static DECLCALLBACK(void) vmsvga3dDXBindAllShader(PVMSVGA3DSTATE p3dState) 3005 { 3006 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 3007 3008 RT_NOREF(pBackend); 3009 AssertFailed(); /** @todo Implement */ 3010 } 3011 3012 3013 static DECLCALLBACK(void) vmsvga3dDXHint(PVMSVGA3DSTATE p3dState) 3014 { 3015 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 3016 3017 RT_NOREF(pBackend); 3018 AssertFailed(); /** @todo Implement */ 3019 } 3020 3021 3022 static DECLCALLBACK(void) vmsvga3dDXBufferUpdate(PVMSVGA3DSTATE p3dState) 3023 { 3024 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 3025 3026 RT_NOREF(pBackend); 3027 AssertFailed(); /** @todo Implement */ 3028 } 3029 3030 3031 static DECLCALLBACK(void) vmsvga3dDXSetVSConstantBufferOffset(PVMSVGA3DSTATE p3dState) 3032 { 3033 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 3034 3035 RT_NOREF(pBackend); 3036 AssertFailed(); /** @todo Implement */ 3037 } 3038 3039 3040 static DECLCALLBACK(void) vmsvga3dDXSetPSConstantBufferOffset(PVMSVGA3DSTATE p3dState) 3041 { 3042 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 3043 3044 RT_NOREF(pBackend); 3045 AssertFailed(); /** @todo Implement */ 3046 } 3047 3048 3049 static DECLCALLBACK(void) vmsvga3dDXSetGSConstantBufferOffset(PVMSVGA3DSTATE p3dState) 3050 { 3051 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 3052 3053 RT_NOREF(pBackend); 3054 AssertFailed(); /** @todo Implement */ 3055 } 3056 3057 3058 static DECLCALLBACK(void) vmsvga3dDXSetHSConstantBufferOffset(PVMSVGA3DSTATE p3dState) 3059 { 3060 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 3061 3062 RT_NOREF(pBackend); 3063 AssertFailed(); /** @todo Implement */ 3064 } 3065 3066 3067 static DECLCALLBACK(void) vmsvga3dDXSetDSConstantBufferOffset(PVMSVGA3DSTATE p3dState) 3068 { 3069 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 3070 3071 RT_NOREF(pBackend); 3072 AssertFailed(); /** @todo Implement */ 3073 } 3074 3075 3076 static DECLCALLBACK(void) vmsvga3dDXSetCSConstantBufferOffset(PVMSVGA3DSTATE p3dState) 3077 { 3078 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 3079 3080 RT_NOREF(pBackend); 3081 AssertFailed(); /** @todo Implement */ 3082 } 3083 3084 3085 static DECLCALLBACK(void) vmsvga3dDXCondBindAllShader(PVMSVGA3DSTATE p3dState) 3086 { 3087 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 3088 3089 RT_NOREF(pBackend); 3090 AssertFailed(); /** @todo Implement */ 3091 } 3092 3093 3094 static DECLCALLBACK(void) vmsvga3dScreenCopy(PVMSVGA3DSTATE p3dState) 3095 { 3096 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 3097 3098 RT_NOREF(pBackend); 3099 AssertFailed(); /** @todo Implement */ 3100 } 3101 3102 3103 static DECLCALLBACK(void) vmsvga3dGrowOTable(PVMSVGA3DSTATE p3dState) 3104 { 3105 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 3106 3107 RT_NOREF(pBackend); 3108 AssertFailed(); /** @todo Implement */ 3109 } 3110 3111 3112 static DECLCALLBACK(void) vmsvga3dDXGrowCOTable(PVMSVGA3DSTATE p3dState) 3113 { 3114 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 3115 3116 RT_NOREF(pBackend); 3117 AssertFailed(); /** @todo Implement */ 3118 } 3119 3120 3121 static DECLCALLBACK(void) vmsvga3dIntraSurfaceCopy(PVMSVGA3DSTATE p3dState) 3122 { 3123 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 3124 3125 RT_NOREF(pBackend); 3126 AssertFailed(); /** @todo Implement */ 3127 } 3128 3129 3130 static DECLCALLBACK(void) vmsvga3dDefineGBSurface_v3(PVMSVGA3DSTATE p3dState) 3131 { 3132 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 3133 3134 RT_NOREF(pBackend); 3135 AssertFailed(); /** @todo Implement */ 3136 } 3137 3138 3139 static DECLCALLBACK(void) vmsvga3dDXResolveCopy(PVMSVGA3DSTATE p3dState) 3140 { 3141 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 3142 3143 RT_NOREF(pBackend); 3144 AssertFailed(); /** @todo Implement */ 3145 } 3146 3147 3148 static DECLCALLBACK(void) vmsvga3dDXPredResolveCopy(PVMSVGA3DSTATE p3dState) 3149 { 3150 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 3151 3152 RT_NOREF(pBackend); 3153 AssertFailed(); /** @todo Implement */ 3154 } 3155 3156 3157 static DECLCALLBACK(void) vmsvga3dDXPredConvertRegion(PVMSVGA3DSTATE p3dState) 3158 { 3159 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 3160 3161 RT_NOREF(pBackend); 3162 AssertFailed(); /** @todo Implement */ 3163 } 3164 3165 3166 static DECLCALLBACK(void) vmsvga3dDXPredConvert(PVMSVGA3DSTATE p3dState) 3167 { 3168 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 3169 3170 RT_NOREF(pBackend); 3171 AssertFailed(); /** @todo Implement */ 3172 } 3173 3174 3175 static DECLCALLBACK(void) vmsvga3dWholeSurfaceCopy(PVMSVGA3DSTATE p3dState) 3176 { 3177 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 3178 3179 RT_NOREF(pBackend); 3180 AssertFailed(); /** @todo Implement */ 3181 } 3182 3183 3184 static DECLCALLBACK(void) vmsvga3dDXDefineUAView(PVMSVGA3DSTATE p3dState) 3185 { 3186 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 3187 3188 RT_NOREF(pBackend); 3189 AssertFailed(); /** @todo Implement */ 3190 } 3191 3192 3193 static DECLCALLBACK(void) vmsvga3dDXDestroyUAView(PVMSVGA3DSTATE p3dState) 3194 { 3195 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 3196 3197 RT_NOREF(pBackend); 3198 AssertFailed(); /** @todo Implement */ 3199 } 3200 3201 3202 static DECLCALLBACK(void) vmsvga3dDXClearUAViewUint(PVMSVGA3DSTATE p3dState) 3203 { 3204 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 3205 3206 RT_NOREF(pBackend); 3207 AssertFailed(); /** @todo Implement */ 3208 } 3209 3210 3211 static DECLCALLBACK(void) vmsvga3dDXClearUAViewFloat(PVMSVGA3DSTATE p3dState) 3212 { 3213 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 3214 3215 RT_NOREF(pBackend); 3216 AssertFailed(); /** @todo Implement */ 3217 } 3218 3219 3220 static DECLCALLBACK(void) vmsvga3dDXCopyStructureCount(PVMSVGA3DSTATE p3dState) 3221 { 3222 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 3223 3224 RT_NOREF(pBackend); 3225 AssertFailed(); /** @todo Implement */ 3226 } 3227 3228 3229 static DECLCALLBACK(void) vmsvga3dDXSetUAViews(PVMSVGA3DSTATE p3dState) 3230 { 3231 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 3232 3233 RT_NOREF(pBackend); 3234 AssertFailed(); /** @todo Implement */ 3235 } 3236 3237 3238 static DECLCALLBACK(void) vmsvga3dDXDrawIndexedInstancedIndirect(PVMSVGA3DSTATE p3dState) 3239 { 3240 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 3241 3242 RT_NOREF(pBackend); 3243 AssertFailed(); /** @todo Implement */ 3244 } 3245 3246 3247 static DECLCALLBACK(void) vmsvga3dDXDrawInstancedIndirect(PVMSVGA3DSTATE p3dState) 3248 { 3249 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 3250 3251 RT_NOREF(pBackend); 3252 AssertFailed(); /** @todo Implement */ 3253 } 3254 3255 3256 static DECLCALLBACK(void) vmsvga3dDXDispatch(PVMSVGA3DSTATE p3dState) 3257 { 3258 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 3259 3260 RT_NOREF(pBackend); 3261 AssertFailed(); /** @todo Implement */ 3262 } 3263 3264 3265 static DECLCALLBACK(void) vmsvga3dDXDispatchIndirect(PVMSVGA3DSTATE p3dState) 3266 { 3267 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 3268 3269 RT_NOREF(pBackend); 3270 AssertFailed(); /** @todo Implement */ 3271 } 3272 3273 3274 static DECLCALLBACK(void) vmsvga3dWriteZeroSurface(PVMSVGA3DSTATE p3dState) 3275 { 3276 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 3277 3278 RT_NOREF(pBackend); 3279 AssertFailed(); /** @todo Implement */ 3280 } 3281 3282 3283 static DECLCALLBACK(void) vmsvga3dHintZeroSurface(PVMSVGA3DSTATE p3dState) 3284 { 3285 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 3286 3287 RT_NOREF(pBackend); 3288 AssertFailed(); /** @todo Implement */ 3289 } 3290 3291 3292 static DECLCALLBACK(void) vmsvga3dDXTransferToBuffer(PVMSVGA3DSTATE p3dState) 3293 { 3294 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 3295 3296 RT_NOREF(pBackend); 3297 AssertFailed(); /** @todo Implement */ 3298 } 3299 3300 3301 static DECLCALLBACK(void) vmsvga3dDXSetStructureCount(PVMSVGA3DSTATE p3dState) 3302 { 3303 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 3304 3305 RT_NOREF(pBackend); 3306 AssertFailed(); /** @todo Implement */ 3307 } 3308 3309 3310 static DECLCALLBACK(void) vmsvga3dLogicOpsBitBlt(PVMSVGA3DSTATE p3dState) 3311 { 3312 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 3313 3314 RT_NOREF(pBackend); 3315 AssertFailed(); /** @todo Implement */ 3316 } 3317 3318 3319 static DECLCALLBACK(void) vmsvga3dLogicOpsTransBlt(PVMSVGA3DSTATE p3dState) 3320 { 3321 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 3322 3323 RT_NOREF(pBackend); 3324 AssertFailed(); /** @todo Implement */ 3325 } 3326 3327 3328 static DECLCALLBACK(void) vmsvga3dLogicOpsStretchBlt(PVMSVGA3DSTATE p3dState) 3329 { 3330 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 3331 3332 RT_NOREF(pBackend); 3333 AssertFailed(); /** @todo Implement */ 3334 } 3335 3336 3337 static DECLCALLBACK(void) vmsvga3dLogicOpsColorFill(PVMSVGA3DSTATE p3dState) 3338 { 3339 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 3340 3341 RT_NOREF(pBackend); 3342 AssertFailed(); /** @todo Implement */ 3343 } 3344 3345 3346 static DECLCALLBACK(void) vmsvga3dLogicOpsAlphaBlend(PVMSVGA3DSTATE p3dState) 3347 { 3348 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 3349 3350 RT_NOREF(pBackend); 3351 AssertFailed(); /** @todo Implement */ 3352 } 3353 3354 3355 static DECLCALLBACK(void) vmsvga3dLogicOpsClearTypeBlend(PVMSVGA3DSTATE p3dState) 3356 { 3357 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 3358 3359 RT_NOREF(pBackend); 3360 AssertFailed(); /** @todo Implement */ 3361 } 3362 3363 3364 static DECLCALLBACK(void) vmsvga3dDefineGBSurface_v4(PVMSVGA3DSTATE p3dState) 3365 { 3366 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 3367 3368 RT_NOREF(pBackend); 3369 AssertFailed(); /** @todo Implement */ 3370 } 3371 3372 3373 static DECLCALLBACK(void) vmsvga3dDXSetCSUAViews(PVMSVGA3DSTATE p3dState) 3374 { 3375 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 3376 3377 RT_NOREF(pBackend); 3378 AssertFailed(); /** @todo Implement */ 3379 } 3380 3381 3382 static DECLCALLBACK(void) vmsvga3dDXSetMinLOD(PVMSVGA3DSTATE p3dState) 3383 { 3384 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 3385 3386 RT_NOREF(pBackend); 3387 AssertFailed(); /** @todo Implement */ 3388 } 3389 3390 3391 static DECLCALLBACK(void) vmsvga3dDXDefineDepthStencilView_v2(PVMSVGA3DSTATE p3dState) 3392 { 3393 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 3394 3395 RT_NOREF(pBackend); 3396 AssertFailed(); /** @todo Implement */ 3397 } 3398 3399 3400 static DECLCALLBACK(void) vmsvga3dDXDefineStreamOutputWithMob(PVMSVGA3DSTATE p3dState) 3401 { 3402 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 3403 3404 RT_NOREF(pBackend); 3405 AssertFailed(); /** @todo Implement */ 3406 } 3407 3408 3409 static DECLCALLBACK(void) vmsvga3dDXSetShaderIface(PVMSVGA3DSTATE p3dState) 3410 { 3411 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 3412 3413 RT_NOREF(pBackend); 3414 AssertFailed(); /** @todo Implement */ 3415 } 3416 3417 3418 static DECLCALLBACK(void) vmsvga3dDXBindStreamOutput(PVMSVGA3DSTATE p3dState) 3419 { 3420 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 3421 3422 RT_NOREF(pBackend); 3423 AssertFailed(); /** @todo Implement */ 3424 } 3425 3426 3427 static DECLCALLBACK(void) vmsvga3dSurfaceStretchBltNonMSToMS(PVMSVGA3DSTATE p3dState) 3428 { 3429 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 3430 3431 RT_NOREF(pBackend); 3432 AssertFailed(); /** @todo Implement */ 3433 } 3434 3435 3436 static DECLCALLBACK(void) vmsvga3dDXBindShaderIface(PVMSVGA3DSTATE p3dState) 3437 { 3438 PVMSVGA3DBACKEND pBackend = p3dState->pBackend; 3439 3440 RT_NOREF(pBackend); 3441 AssertFailed(); /** @todo Implement */ 4191 4192 int rc = VINF_SUCCESS; 4193 4194 DXSHADER *pDXShader = &pDXContext->pBackendDXContext->paShader[pShader->id]; 4195 if (pDXShader->pvDXBC) 4196 { 4197 RTMemFree(pDXShader->pvDXBC); 4198 pDXShader->pvDXBC = NULL; 4199 pDXShader->cbDXBC = 0; 4200 } 4201 4202 if (pvShaderBytecode) 4203 { 4204 #ifdef LOG_ENABLED 4205 Log(("Shader: cid=%u shid=%u type=%d:\n", pDXContext->cid, pShader->id, pDXShader->enmShaderType)); 4206 uint8_t *pu8 = (uint8_t *)pvShaderBytecode; 4207 for (uint32_t i = 0; i < pShader->cbData; ++i) 4208 { 4209 if ((i % 16) == 0) 4210 { 4211 if (i > 0) 4212 Log((",\n")); 4213 4214 Log((" %#04x", pu8[i])); 4215 } 4216 else 4217 { 4218 Log((", %#04x", pu8[i])); 4219 } 4220 } 4221 Log(("\n")); 4222 #endif 4223 4224 rc = DXShaderCreateDXBC(&pShader->shaderInfo, pvShaderBytecode, pShader->cbData, &pDXShader->pvDXBC, &pDXShader->cbDXBC); 4225 if (RT_SUCCESS(rc)) 4226 { 4227 HRESULT hr = dxShaderCreate(pDevice, pShader, pDXShader); 4228 if (FAILED(hr)) 4229 rc = VERR_INVALID_STATE; 4230 } 4231 else 4232 rc = VERR_NO_MEMORY; 4233 } 4234 4235 return rc; 4236 } 4237 4238 4239 static DECLCALLBACK(int) vmsvga3dBackDXDefineStreamOutput(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 4240 { 4241 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 4242 4243 RT_NOREF(pBackend, pDXContext); 4244 AssertFailed(); /** @todo Implement */ 4245 return VERR_NOT_IMPLEMENTED; 4246 } 4247 4248 4249 static DECLCALLBACK(int) vmsvga3dBackDXDestroyStreamOutput(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 4250 { 4251 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 4252 4253 RT_NOREF(pBackend, pDXContext); 4254 AssertFailed(); /** @todo Implement */ 4255 return VERR_NOT_IMPLEMENTED; 4256 } 4257 4258 4259 static DECLCALLBACK(int) vmsvga3dBackDXSetStreamOutput(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 4260 { 4261 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 4262 4263 RT_NOREF(pBackend, pDXContext); 4264 AssertFailed(); /** @todo Implement */ 4265 return VERR_NOT_IMPLEMENTED; 4266 } 4267 4268 static DECLCALLBACK(int) vmsvga3dBackDXSetCOTable(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGACOTableType type, uint32_t cEntries) 4269 { 4270 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 4271 VMSVGA3DBACKENDDXCONTEXT *pBackendDXContext = pDXContext->pBackendDXContext; 4272 4273 RT_NOREF(pBackend, pDXContext, type); 4274 4275 int rc = VINF_SUCCESS; 4276 4277 /* Allocate paBlendState for example. */ 4278 switch (type) 4279 { 4280 case SVGA_COTABLE_RTVIEW: 4281 if (pBackendDXContext->papRenderTargetView) 4282 { 4283 DX_RELEASE_ARRAY(pBackendDXContext->cRenderTargetView, pBackendDXContext->papRenderTargetView); 4284 RTMemFree(pBackendDXContext->papRenderTargetView); 4285 pBackendDXContext->papRenderTargetView = NULL; 4286 pBackendDXContext->cRenderTargetView = 0; 4287 } 4288 4289 if (cEntries) 4290 { 4291 pBackendDXContext->papRenderTargetView = (ID3D11RenderTargetView **)RTMemAllocZ(cEntries * sizeof(pBackendDXContext->papRenderTargetView[0])); 4292 AssertBreakStmt(pBackendDXContext->papRenderTargetView, rc = VERR_NO_MEMORY); 4293 pBackendDXContext->cRenderTargetView = cEntries; 4294 } 4295 break; 4296 case SVGA_COTABLE_DSVIEW: 4297 if (pBackendDXContext->papDepthStencilView) 4298 { 4299 DX_RELEASE_ARRAY(pBackendDXContext->cDepthStencilView, pBackendDXContext->papDepthStencilView); 4300 RTMemFree(pBackendDXContext->papDepthStencilView); 4301 pBackendDXContext->papDepthStencilView = NULL; 4302 pBackendDXContext->cDepthStencilView = 0; 4303 } 4304 4305 if (cEntries) 4306 { 4307 pBackendDXContext->papDepthStencilView = (ID3D11DepthStencilView **)RTMemAllocZ(cEntries * sizeof(pBackendDXContext->papDepthStencilView[0])); 4308 AssertBreakStmt(pBackendDXContext->papDepthStencilView, rc = VERR_NO_MEMORY); 4309 pBackendDXContext->cDepthStencilView = cEntries; 4310 } 4311 break; 4312 case SVGA_COTABLE_SRVIEW: 4313 if (pBackendDXContext->papShaderResourceView) 4314 { 4315 DX_RELEASE_ARRAY(pBackendDXContext->cShaderResourceView, pBackendDXContext->papShaderResourceView); 4316 RTMemFree(pBackendDXContext->papShaderResourceView); 4317 pBackendDXContext->papShaderResourceView = NULL; 4318 pBackendDXContext->cShaderResourceView = 0; 4319 } 4320 4321 if (cEntries) 4322 { 4323 pBackendDXContext->papShaderResourceView = (ID3D11ShaderResourceView **)RTMemAllocZ(cEntries * sizeof(pBackendDXContext->papShaderResourceView[0])); 4324 AssertBreakStmt(pBackendDXContext->papShaderResourceView, rc = VERR_NO_MEMORY); 4325 pBackendDXContext->cShaderResourceView = cEntries; 4326 } 4327 break; 4328 case SVGA_COTABLE_ELEMENTLAYOUT: 4329 if (pBackendDXContext->paElementLayout) 4330 { 4331 for (uint32_t i = 0; i < pBackendDXContext->cElementLayout; ++i) 4332 D3D_RELEASE(pBackendDXContext->paElementLayout[i].pElementLayout); 4333 RTMemFree(pBackendDXContext->paElementLayout); 4334 pBackendDXContext->paElementLayout = NULL; 4335 pBackendDXContext->cElementLayout = 0; 4336 } 4337 4338 if (cEntries) 4339 { 4340 pBackendDXContext->paElementLayout = (DXELEMENTLAYOUT *)RTMemAllocZ(cEntries * sizeof(pBackendDXContext->paElementLayout[0])); 4341 AssertBreakStmt(pBackendDXContext->paElementLayout, rc = VERR_NO_MEMORY); 4342 pBackendDXContext->cElementLayout = cEntries; 4343 } 4344 break; 4345 case SVGA_COTABLE_BLENDSTATE: 4346 if (pBackendDXContext->papBlendState) 4347 { 4348 DX_RELEASE_ARRAY(pBackendDXContext->cBlendState, pBackendDXContext->papBlendState); 4349 RTMemFree(pBackendDXContext->papBlendState); 4350 pBackendDXContext->papBlendState = NULL; 4351 pBackendDXContext->cBlendState = 0; 4352 } 4353 4354 if (cEntries) 4355 { 4356 pBackendDXContext->papBlendState = (ID3D11BlendState **)RTMemAllocZ(cEntries * sizeof(pBackendDXContext->papBlendState[0])); 4357 AssertBreakStmt(pBackendDXContext->papBlendState, rc = VERR_NO_MEMORY); 4358 pBackendDXContext->cBlendState = cEntries; 4359 } 4360 break; 4361 case SVGA_COTABLE_DEPTHSTENCIL: 4362 if (pBackendDXContext->papDepthStencilState) 4363 { 4364 DX_RELEASE_ARRAY(pBackendDXContext->cDepthStencilState, pBackendDXContext->papDepthStencilState); 4365 RTMemFree(pBackendDXContext->papDepthStencilState); 4366 pBackendDXContext->papDepthStencilState = NULL; 4367 pBackendDXContext->cDepthStencilState = 0; 4368 } 4369 4370 if (cEntries) 4371 { 4372 pBackendDXContext->papDepthStencilState = (ID3D11DepthStencilState **)RTMemAllocZ(cEntries * sizeof(pBackendDXContext->papDepthStencilState[0])); 4373 AssertBreakStmt(pBackendDXContext->papDepthStencilState, rc = VERR_NO_MEMORY); 4374 pBackendDXContext->cDepthStencilState = cEntries; 4375 } 4376 break; 4377 case SVGA_COTABLE_RASTERIZERSTATE: 4378 if (pBackendDXContext->papRasterizerState) 4379 { 4380 DX_RELEASE_ARRAY(pBackendDXContext->cRasterizerState, pBackendDXContext->papRasterizerState); 4381 RTMemFree(pBackendDXContext->papRasterizerState); 4382 pBackendDXContext->papRasterizerState = NULL; 4383 pBackendDXContext->cRasterizerState = 0; 4384 } 4385 4386 if (cEntries) 4387 { 4388 pBackendDXContext->papRasterizerState = (ID3D11RasterizerState **)RTMemAllocZ(cEntries * sizeof(pBackendDXContext->papRasterizerState[0])); 4389 AssertBreakStmt(pBackendDXContext->papRasterizerState, rc = VERR_NO_MEMORY); 4390 pBackendDXContext->cRasterizerState = cEntries; 4391 } 4392 break; 4393 case SVGA_COTABLE_SAMPLER: 4394 if (pBackendDXContext->papSamplerState) 4395 { 4396 DX_RELEASE_ARRAY(pBackendDXContext->cSamplerState, pBackendDXContext->papSamplerState); 4397 RTMemFree(pBackendDXContext->papSamplerState); 4398 pBackendDXContext->papSamplerState = NULL; 4399 pBackendDXContext->cSamplerState = 0; 4400 } 4401 4402 if (cEntries) 4403 { 4404 pBackendDXContext->papSamplerState = (ID3D11SamplerState **)RTMemAllocZ(cEntries * sizeof(pBackendDXContext->papSamplerState[0])); 4405 AssertBreakStmt(pBackendDXContext->papSamplerState, rc = VERR_NO_MEMORY); 4406 pBackendDXContext->cSamplerState = cEntries; 4407 } 4408 break; 4409 case SVGA_COTABLE_STREAMOUTPUT: 4410 //AssertFailed(); /** @todo Implement */ 4411 break; 4412 case SVGA_COTABLE_DXQUERY: 4413 if (pBackendDXContext->papQuery) 4414 { 4415 DX_RELEASE_ARRAY(pBackendDXContext->cQuery, pBackendDXContext->papQuery); 4416 RTMemFree(pBackendDXContext->papQuery); 4417 pBackendDXContext->papQuery = NULL; 4418 pBackendDXContext->cQuery = 0; 4419 } 4420 4421 if (cEntries) 4422 { 4423 pBackendDXContext->papQuery = (ID3D11Query **)RTMemAllocZ(cEntries * sizeof(pBackendDXContext->papQuery[0])); 4424 AssertBreakStmt(pBackendDXContext->papQuery, rc = VERR_NO_MEMORY); 4425 pBackendDXContext->cQuery = cEntries; 4426 } 4427 break; 4428 case SVGA_COTABLE_DXSHADER: 4429 if (pBackendDXContext->paShader) 4430 { 4431 for (uint32_t i = 0; i < pBackendDXContext->cShader; ++i) 4432 D3D_RELEASE(pBackendDXContext->paShader[i].pShader); 4433 RTMemFree(pBackendDXContext->paShader); 4434 pBackendDXContext->paShader = NULL; 4435 pBackendDXContext->cShader = 0; 4436 } 4437 4438 if (cEntries) 4439 { 4440 pBackendDXContext->paShader = (DXSHADER *)RTMemAllocZ(cEntries * sizeof(pBackendDXContext->paShader[0])); 4441 AssertBreakStmt(pBackendDXContext->paShader, rc = VERR_NO_MEMORY); 4442 pBackendDXContext->cShader = cEntries; 4443 } 4444 break; 4445 case SVGA_COTABLE_UAVIEW: 4446 AssertFailed(); /** @todo Implement */ 4447 break; 4448 case SVGA_COTABLE_MAX: break; /* Compiler warning */ 4449 } 4450 return rc; 4451 } 4452 4453 4454 static DECLCALLBACK(int) vmsvga3dBackDXReadbackCOTable(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 4455 { 4456 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 4457 4458 RT_NOREF(pBackend, pDXContext); 4459 AssertFailed(); /** @todo Implement */ 4460 return VERR_NOT_IMPLEMENTED; 4461 } 4462 4463 4464 static DECLCALLBACK(int) vmsvga3dBackDXBufferCopy(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 4465 { 4466 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 4467 4468 RT_NOREF(pBackend, pDXContext); 4469 AssertFailed(); /** @todo Implement */ 4470 return VERR_NOT_IMPLEMENTED; 4471 } 4472 4473 4474 static DECLCALLBACK(int) vmsvga3dBackDXTransferFromBuffer(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 4475 { 4476 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 4477 4478 RT_NOREF(pBackend, pDXContext); 4479 AssertFailed(); /** @todo Implement */ 4480 return VERR_NOT_IMPLEMENTED; 4481 } 4482 4483 4484 static DECLCALLBACK(int) vmsvga3dBackDXSurfaceCopyAndReadback(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 4485 { 4486 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 4487 4488 RT_NOREF(pBackend, pDXContext); 4489 AssertFailed(); /** @todo Implement */ 4490 return VERR_NOT_IMPLEMENTED; 4491 } 4492 4493 4494 static DECLCALLBACK(int) vmsvga3dBackDXMoveQuery(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 4495 { 4496 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 4497 4498 RT_NOREF(pBackend, pDXContext); 4499 AssertFailed(); /** @todo Implement */ 4500 return VERR_NOT_IMPLEMENTED; 4501 } 4502 4503 4504 static DECLCALLBACK(int) vmsvga3dBackDXBindAllQuery(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 4505 { 4506 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 4507 4508 RT_NOREF(pBackend, pDXContext); 4509 AssertFailed(); /** @todo Implement */ 4510 return VERR_NOT_IMPLEMENTED; 4511 } 4512 4513 4514 static DECLCALLBACK(int) vmsvga3dBackDXReadbackAllQuery(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 4515 { 4516 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 4517 4518 RT_NOREF(pBackend, pDXContext); 4519 AssertFailed(); /** @todo Implement */ 4520 return VERR_NOT_IMPLEMENTED; 4521 } 4522 4523 4524 static DECLCALLBACK(int) vmsvga3dBackDXPredTransferFromBuffer(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 4525 { 4526 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 4527 4528 RT_NOREF(pBackend, pDXContext); 4529 AssertFailed(); /** @todo Implement */ 4530 return VERR_NOT_IMPLEMENTED; 4531 } 4532 4533 4534 static DECLCALLBACK(int) vmsvga3dBackDXMobFence64(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 4535 { 4536 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 4537 4538 RT_NOREF(pBackend, pDXContext); 4539 AssertFailed(); /** @todo Implement */ 4540 return VERR_NOT_IMPLEMENTED; 4541 } 4542 4543 4544 static DECLCALLBACK(int) vmsvga3dBackDXBindAllShader(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 4545 { 4546 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 4547 4548 RT_NOREF(pBackend, pDXContext); 4549 AssertFailed(); /** @todo Implement */ 4550 return VERR_NOT_IMPLEMENTED; 4551 } 4552 4553 4554 static DECLCALLBACK(int) vmsvga3dBackDXHint(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 4555 { 4556 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 4557 4558 RT_NOREF(pBackend, pDXContext); 4559 AssertFailed(); /** @todo Implement */ 4560 return VERR_NOT_IMPLEMENTED; 4561 } 4562 4563 4564 static DECLCALLBACK(int) vmsvga3dBackDXBufferUpdate(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 4565 { 4566 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 4567 4568 RT_NOREF(pBackend, pDXContext); 4569 AssertFailed(); /** @todo Implement */ 4570 return VERR_NOT_IMPLEMENTED; 4571 } 4572 4573 4574 static DECLCALLBACK(int) vmsvga3dBackDXSetVSConstantBufferOffset(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 4575 { 4576 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 4577 4578 RT_NOREF(pBackend, pDXContext); 4579 AssertFailed(); /** @todo Implement */ 4580 return VERR_NOT_IMPLEMENTED; 4581 } 4582 4583 4584 static DECLCALLBACK(int) vmsvga3dBackDXSetPSConstantBufferOffset(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 4585 { 4586 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 4587 4588 RT_NOREF(pBackend, pDXContext); 4589 AssertFailed(); /** @todo Implement */ 4590 return VERR_NOT_IMPLEMENTED; 4591 } 4592 4593 4594 static DECLCALLBACK(int) vmsvga3dBackDXSetGSConstantBufferOffset(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 4595 { 4596 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 4597 4598 RT_NOREF(pBackend, pDXContext); 4599 AssertFailed(); /** @todo Implement */ 4600 return VERR_NOT_IMPLEMENTED; 4601 } 4602 4603 4604 static DECLCALLBACK(int) vmsvga3dBackDXSetHSConstantBufferOffset(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 4605 { 4606 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 4607 4608 RT_NOREF(pBackend, pDXContext); 4609 AssertFailed(); /** @todo Implement */ 4610 return VERR_NOT_IMPLEMENTED; 4611 } 4612 4613 4614 static DECLCALLBACK(int) vmsvga3dBackDXSetDSConstantBufferOffset(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 4615 { 4616 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 4617 4618 RT_NOREF(pBackend, pDXContext); 4619 AssertFailed(); /** @todo Implement */ 4620 return VERR_NOT_IMPLEMENTED; 4621 } 4622 4623 4624 static DECLCALLBACK(int) vmsvga3dBackDXSetCSConstantBufferOffset(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 4625 { 4626 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 4627 4628 RT_NOREF(pBackend, pDXContext); 4629 AssertFailed(); /** @todo Implement */ 4630 return VERR_NOT_IMPLEMENTED; 4631 } 4632 4633 4634 static DECLCALLBACK(int) vmsvga3dBackDXCondBindAllShader(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 4635 { 4636 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 4637 4638 RT_NOREF(pBackend, pDXContext); 4639 AssertFailed(); /** @todo Implement */ 4640 return VERR_NOT_IMPLEMENTED; 4641 } 4642 4643 4644 static DECLCALLBACK(int) vmsvga3dBackScreenCopy(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 4645 { 4646 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 4647 4648 RT_NOREF(pBackend, pDXContext); 4649 AssertFailed(); /** @todo Implement */ 4650 return VERR_NOT_IMPLEMENTED; 4651 } 4652 4653 4654 static DECLCALLBACK(int) vmsvga3dBackGrowOTable(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 4655 { 4656 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 4657 4658 RT_NOREF(pBackend, pDXContext); 4659 AssertFailed(); /** @todo Implement */ 4660 return VERR_NOT_IMPLEMENTED; 4661 } 4662 4663 4664 static DECLCALLBACK(int) vmsvga3dBackDXGrowCOTable(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 4665 { 4666 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 4667 4668 RT_NOREF(pBackend, pDXContext); 4669 AssertFailed(); /** @todo Implement */ 4670 return VERR_NOT_IMPLEMENTED; 4671 } 4672 4673 4674 static DECLCALLBACK(int) vmsvga3dBackIntraSurfaceCopy(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 4675 { 4676 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 4677 4678 RT_NOREF(pBackend, pDXContext); 4679 AssertFailed(); /** @todo Implement */ 4680 return VERR_NOT_IMPLEMENTED; 4681 } 4682 4683 4684 static DECLCALLBACK(int) vmsvga3dBackDefineGBSurface_v3(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 4685 { 4686 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 4687 4688 RT_NOREF(pBackend, pDXContext); 4689 AssertFailed(); /** @todo Implement */ 4690 return VERR_NOT_IMPLEMENTED; 4691 } 4692 4693 4694 static DECLCALLBACK(int) vmsvga3dBackDXResolveCopy(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 4695 { 4696 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 4697 4698 RT_NOREF(pBackend, pDXContext); 4699 AssertFailed(); /** @todo Implement */ 4700 return VERR_NOT_IMPLEMENTED; 4701 } 4702 4703 4704 static DECLCALLBACK(int) vmsvga3dBackDXPredResolveCopy(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 4705 { 4706 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 4707 4708 RT_NOREF(pBackend, pDXContext); 4709 AssertFailed(); /** @todo Implement */ 4710 return VERR_NOT_IMPLEMENTED; 4711 } 4712 4713 4714 static DECLCALLBACK(int) vmsvga3dBackDXPredConvertRegion(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 4715 { 4716 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 4717 4718 RT_NOREF(pBackend, pDXContext); 4719 AssertFailed(); /** @todo Implement */ 4720 return VERR_NOT_IMPLEMENTED; 4721 } 4722 4723 4724 static DECLCALLBACK(int) vmsvga3dBackDXPredConvert(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 4725 { 4726 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 4727 4728 RT_NOREF(pBackend, pDXContext); 4729 AssertFailed(); /** @todo Implement */ 4730 return VERR_NOT_IMPLEMENTED; 4731 } 4732 4733 4734 static DECLCALLBACK(int) vmsvga3dBackWholeSurfaceCopy(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 4735 { 4736 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 4737 4738 RT_NOREF(pBackend, pDXContext); 4739 AssertFailed(); /** @todo Implement */ 4740 return VERR_NOT_IMPLEMENTED; 4741 } 4742 4743 4744 static DECLCALLBACK(int) vmsvga3dBackDXDefineUAView(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 4745 { 4746 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 4747 4748 RT_NOREF(pBackend, pDXContext); 4749 AssertFailed(); /** @todo Implement */ 4750 return VERR_NOT_IMPLEMENTED; 4751 } 4752 4753 4754 static DECLCALLBACK(int) vmsvga3dBackDXDestroyUAView(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 4755 { 4756 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 4757 4758 RT_NOREF(pBackend, pDXContext); 4759 AssertFailed(); /** @todo Implement */ 4760 return VERR_NOT_IMPLEMENTED; 4761 } 4762 4763 4764 static DECLCALLBACK(int) vmsvga3dBackDXClearUAViewUint(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 4765 { 4766 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 4767 4768 RT_NOREF(pBackend, pDXContext); 4769 AssertFailed(); /** @todo Implement */ 4770 return VERR_NOT_IMPLEMENTED; 4771 } 4772 4773 4774 static DECLCALLBACK(int) vmsvga3dBackDXClearUAViewFloat(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 4775 { 4776 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 4777 4778 RT_NOREF(pBackend, pDXContext); 4779 AssertFailed(); /** @todo Implement */ 4780 return VERR_NOT_IMPLEMENTED; 4781 } 4782 4783 4784 static DECLCALLBACK(int) vmsvga3dBackDXCopyStructureCount(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 4785 { 4786 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 4787 4788 RT_NOREF(pBackend, pDXContext); 4789 AssertFailed(); /** @todo Implement */ 4790 return VERR_NOT_IMPLEMENTED; 4791 } 4792 4793 4794 static DECLCALLBACK(int) vmsvga3dBackDXSetUAViews(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 4795 { 4796 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 4797 4798 RT_NOREF(pBackend, pDXContext); 4799 AssertFailed(); /** @todo Implement */ 4800 return VERR_NOT_IMPLEMENTED; 4801 } 4802 4803 4804 static DECLCALLBACK(int) vmsvga3dBackDXDrawIndexedInstancedIndirect(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 4805 { 4806 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 4807 4808 RT_NOREF(pBackend, pDXContext); 4809 AssertFailed(); /** @todo Implement */ 4810 return VERR_NOT_IMPLEMENTED; 4811 } 4812 4813 4814 static DECLCALLBACK(int) vmsvga3dBackDXDrawInstancedIndirect(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 4815 { 4816 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 4817 4818 RT_NOREF(pBackend, pDXContext); 4819 AssertFailed(); /** @todo Implement */ 4820 return VERR_NOT_IMPLEMENTED; 4821 } 4822 4823 4824 static DECLCALLBACK(int) vmsvga3dBackDXDispatch(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 4825 { 4826 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 4827 4828 RT_NOREF(pBackend, pDXContext); 4829 AssertFailed(); /** @todo Implement */ 4830 return VERR_NOT_IMPLEMENTED; 4831 } 4832 4833 4834 static DECLCALLBACK(int) vmsvga3dBackDXDispatchIndirect(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 4835 { 4836 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 4837 4838 RT_NOREF(pBackend, pDXContext); 4839 AssertFailed(); /** @todo Implement */ 4840 return VERR_NOT_IMPLEMENTED; 4841 } 4842 4843 4844 static DECLCALLBACK(int) vmsvga3dBackWriteZeroSurface(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 4845 { 4846 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 4847 4848 RT_NOREF(pBackend, pDXContext); 4849 AssertFailed(); /** @todo Implement */ 4850 return VERR_NOT_IMPLEMENTED; 4851 } 4852 4853 4854 static DECLCALLBACK(int) vmsvga3dBackHintZeroSurface(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 4855 { 4856 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 4857 4858 RT_NOREF(pBackend, pDXContext); 4859 AssertFailed(); /** @todo Implement */ 4860 return VERR_NOT_IMPLEMENTED; 4861 } 4862 4863 4864 static DECLCALLBACK(int) vmsvga3dBackDXTransferToBuffer(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 4865 { 4866 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 4867 4868 RT_NOREF(pBackend, pDXContext); 4869 AssertFailed(); /** @todo Implement */ 4870 return VERR_NOT_IMPLEMENTED; 4871 } 4872 4873 4874 static DECLCALLBACK(int) vmsvga3dBackDXSetStructureCount(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 4875 { 4876 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 4877 4878 RT_NOREF(pBackend, pDXContext); 4879 AssertFailed(); /** @todo Implement */ 4880 return VERR_NOT_IMPLEMENTED; 4881 } 4882 4883 4884 static DECLCALLBACK(int) vmsvga3dBackLogicOpsBitBlt(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 4885 { 4886 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 4887 4888 RT_NOREF(pBackend, pDXContext); 4889 AssertFailed(); /** @todo Implement */ 4890 return VERR_NOT_IMPLEMENTED; 4891 } 4892 4893 4894 static DECLCALLBACK(int) vmsvga3dBackLogicOpsTransBlt(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 4895 { 4896 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 4897 4898 RT_NOREF(pBackend, pDXContext); 4899 AssertFailed(); /** @todo Implement */ 4900 return VERR_NOT_IMPLEMENTED; 4901 } 4902 4903 4904 static DECLCALLBACK(int) vmsvga3dBackLogicOpsStretchBlt(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 4905 { 4906 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 4907 4908 RT_NOREF(pBackend, pDXContext); 4909 AssertFailed(); /** @todo Implement */ 4910 return VERR_NOT_IMPLEMENTED; 4911 } 4912 4913 4914 static DECLCALLBACK(int) vmsvga3dBackLogicOpsColorFill(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 4915 { 4916 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 4917 4918 RT_NOREF(pBackend, pDXContext); 4919 AssertFailed(); /** @todo Implement */ 4920 return VERR_NOT_IMPLEMENTED; 4921 } 4922 4923 4924 static DECLCALLBACK(int) vmsvga3dBackLogicOpsAlphaBlend(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 4925 { 4926 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 4927 4928 RT_NOREF(pBackend, pDXContext); 4929 AssertFailed(); /** @todo Implement */ 4930 return VERR_NOT_IMPLEMENTED; 4931 } 4932 4933 4934 static DECLCALLBACK(int) vmsvga3dBackLogicOpsClearTypeBlend(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 4935 { 4936 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 4937 4938 RT_NOREF(pBackend, pDXContext); 4939 AssertFailed(); /** @todo Implement */ 4940 return VERR_NOT_IMPLEMENTED; 4941 } 4942 4943 4944 static DECLCALLBACK(int) vmsvga3dBackDefineGBSurface_v4(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 4945 { 4946 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 4947 4948 RT_NOREF(pBackend, pDXContext); 4949 AssertFailed(); /** @todo Implement */ 4950 return VERR_NOT_IMPLEMENTED; 4951 } 4952 4953 4954 static DECLCALLBACK(int) vmsvga3dBackDXSetCSUAViews(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 4955 { 4956 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 4957 4958 RT_NOREF(pBackend, pDXContext); 4959 AssertFailed(); /** @todo Implement */ 4960 return VERR_NOT_IMPLEMENTED; 4961 } 4962 4963 4964 static DECLCALLBACK(int) vmsvga3dBackDXSetMinLOD(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 4965 { 4966 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 4967 4968 RT_NOREF(pBackend, pDXContext); 4969 AssertFailed(); /** @todo Implement */ 4970 return VERR_NOT_IMPLEMENTED; 4971 } 4972 4973 4974 static DECLCALLBACK(int) vmsvga3dBackDXDefineDepthStencilView_v2(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 4975 { 4976 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 4977 4978 RT_NOREF(pBackend, pDXContext); 4979 AssertFailed(); /** @todo Implement */ 4980 return VERR_NOT_IMPLEMENTED; 4981 } 4982 4983 4984 static DECLCALLBACK(int) vmsvga3dBackDXDefineStreamOutputWithMob(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 4985 { 4986 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 4987 4988 RT_NOREF(pBackend, pDXContext); 4989 AssertFailed(); /** @todo Implement */ 4990 return VERR_NOT_IMPLEMENTED; 4991 } 4992 4993 4994 static DECLCALLBACK(int) vmsvga3dBackDXSetShaderIface(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 4995 { 4996 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 4997 4998 RT_NOREF(pBackend, pDXContext); 4999 AssertFailed(); /** @todo Implement */ 5000 return VERR_NOT_IMPLEMENTED; 5001 } 5002 5003 5004 static DECLCALLBACK(int) vmsvga3dBackDXBindStreamOutput(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 5005 { 5006 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 5007 5008 RT_NOREF(pBackend, pDXContext); 5009 AssertFailed(); /** @todo Implement */ 5010 return VERR_NOT_IMPLEMENTED; 5011 } 5012 5013 5014 static DECLCALLBACK(int) vmsvga3dBackSurfaceStretchBltNonMSToMS(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 5015 { 5016 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 5017 5018 RT_NOREF(pBackend, pDXContext); 5019 AssertFailed(); /** @todo Implement */ 5020 return VERR_NOT_IMPLEMENTED; 5021 } 5022 5023 5024 static DECLCALLBACK(int) vmsvga3dBackDXBindShaderIface(PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext) 5025 { 5026 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 5027 5028 RT_NOREF(pBackend, pDXContext); 5029 AssertFailed(); /** @todo Implement */ 5030 return VERR_NOT_IMPLEMENTED; 3442 5031 } 3443 5032 … … 3448 5037 AssertReturn(p3dState, VERR_NOT_SUPPORTED); 3449 5038 3450 PVMSVGA3DBACKEND pBackend = p 3dState->pBackend;5039 PVMSVGA3DBACKEND pBackend = pThisCC->svga.p3dState->pBackend; 3451 5040 AssertReturn(pBackend, VERR_NOT_SUPPORTED); 3452 5041 … … 3462 5051 { 3463 5052 VMSVGA3DBACKENDFUNCSDX *p = (VMSVGA3DBACKENDFUNCSDX *)pvInterfaceFuncs; 3464 p->pfnDXDefineContext = vmsvga3d DXDefineContext;3465 p->pfnDXDestroyContext = vmsvga3d DXDestroyContext;3466 p->pfnDXBindContext = vmsvga3d DXBindContext;3467 p->pfnDXReadbackContext = vmsvga3d DXReadbackContext;3468 p->pfnDXInvalidateContext = vmsvga3d DXInvalidateContext;3469 p->pfnDXSetSingleConstantBuffer = vmsvga3d DXSetSingleConstantBuffer;3470 p->pfnDXSetShaderResources = vmsvga3d DXSetShaderResources;3471 p->pfnDXSetShader = vmsvga3d DXSetShader;3472 p->pfnDXSetSamplers = vmsvga3d DXSetSamplers;3473 p->pfnDXDraw = vmsvga3d DXDraw;3474 p->pfnDXDrawIndexed = vmsvga3d DXDrawIndexed;3475 p->pfnDXDrawInstanced = vmsvga3d DXDrawInstanced;3476 p->pfnDXDrawIndexedInstanced = vmsvga3d DXDrawIndexedInstanced;3477 p->pfnDXDrawAuto = vmsvga3d DXDrawAuto;3478 p->pfnDXSetInputLayout = vmsvga3d DXSetInputLayout;3479 p->pfnDXSetVertexBuffers = vmsvga3d DXSetVertexBuffers;3480 p->pfnDXSetIndexBuffer = vmsvga3d DXSetIndexBuffer;3481 p->pfnDXSetTopology = vmsvga3d DXSetTopology;3482 p->pfnDXSetRenderTargets = vmsvga3d DXSetRenderTargets;3483 p->pfnDXSetBlendState = vmsvga3d DXSetBlendState;3484 p->pfnDXSetDepthStencilState = vmsvga3d DXSetDepthStencilState;3485 p->pfnDXSetRasterizerState = vmsvga3d DXSetRasterizerState;3486 p->pfnDXDefineQuery = vmsvga3d DXDefineQuery;3487 p->pfnDXDestroyQuery = vmsvga3d DXDestroyQuery;3488 p->pfnDXBindQuery = vmsvga3d DXBindQuery;3489 p->pfnDXSetQueryOffset = vmsvga3d DXSetQueryOffset;3490 p->pfnDXBeginQuery = vmsvga3d DXBeginQuery;3491 p->pfnDXEndQuery = vmsvga3d DXEndQuery;3492 p->pfnDXReadbackQuery = vmsvga3d DXReadbackQuery;3493 p->pfnDXSetPredication = vmsvga3d DXSetPredication;3494 p->pfnDXSetSOTargets = vmsvga3d DXSetSOTargets;3495 p->pfnDXSetViewports = vmsvga3d DXSetViewports;3496 p->pfnDXSetScissorRects = vmsvga3d DXSetScissorRects;3497 p->pfnDXClearRenderTargetView = vmsvga3d DXClearRenderTargetView;3498 p->pfnDXClearDepthStencilView = vmsvga3d DXClearDepthStencilView;3499 p->pfnDXPredCopyRegion = vmsvga3d DXPredCopyRegion;3500 p->pfnDXPredCopy = vmsvga3d DXPredCopy;3501 p->pfnDXPresentBlt = vmsvga3d DXPresentBlt;3502 p->pfnDXGenMips = vmsvga3d DXGenMips;3503 p->pfnDXUpdateSubResource = vmsvga3d DXUpdateSubResource;3504 p->pfnDXReadbackSubResource = vmsvga3d DXReadbackSubResource;3505 p->pfnDXInvalidateSubResource = vmsvga3d DXInvalidateSubResource;3506 p->pfnDXDefineShaderResourceView = vmsvga3d DXDefineShaderResourceView;3507 p->pfnDXDestroyShaderResourceView = vmsvga3d DXDestroyShaderResourceView;3508 p->pfnDXDefineRenderTargetView = vmsvga3d DXDefineRenderTargetView;3509 p->pfnDXDestroyRenderTargetView = vmsvga3d DXDestroyRenderTargetView;3510 p->pfnDXDefineDepthStencilView = vmsvga3d DXDefineDepthStencilView;3511 p->pfnDXDestroyDepthStencilView = vmsvga3d DXDestroyDepthStencilView;3512 p->pfnDXDefineElementLayout = vmsvga3d DXDefineElementLayout;3513 p->pfnDXDestroyElementLayout = vmsvga3d DXDestroyElementLayout;3514 p->pfnDXDefineBlendState = vmsvga3d DXDefineBlendState;3515 p->pfnDXDestroyBlendState = vmsvga3d DXDestroyBlendState;3516 p->pfnDXDefineDepthStencilState = vmsvga3d DXDefineDepthStencilState;3517 p->pfnDXDestroyDepthStencilState = vmsvga3d DXDestroyDepthStencilState;3518 p->pfnDXDefineRasterizerState = vmsvga3d DXDefineRasterizerState;3519 p->pfnDXDestroyRasterizerState = vmsvga3d DXDestroyRasterizerState;3520 p->pfnDXDefineSamplerState = vmsvga3d DXDefineSamplerState;3521 p->pfnDXDestroySamplerState = vmsvga3d DXDestroySamplerState;3522 p->pfnDXDefineShader = vmsvga3d DXDefineShader;3523 p->pfnDXDestroyShader = vmsvga3d DXDestroyShader;3524 p->pfnDXBindShader = vmsvga3d DXBindShader;3525 p->pfnDXDefineStreamOutput = vmsvga3d DXDefineStreamOutput;3526 p->pfnDXDestroyStreamOutput = vmsvga3d DXDestroyStreamOutput;3527 p->pfnDXSetStreamOutput = vmsvga3d DXSetStreamOutput;3528 p->pfnDXSetCOTable = vmsvga3d DXSetCOTable;3529 p->pfnDXReadbackCOTable = vmsvga3d DXReadbackCOTable;3530 p->pfnDXBufferCopy = vmsvga3d DXBufferCopy;3531 p->pfnDXTransferFromBuffer = vmsvga3d DXTransferFromBuffer;3532 p->pfnDXSurfaceCopyAndReadback = vmsvga3d DXSurfaceCopyAndReadback;3533 p->pfnDXMoveQuery = vmsvga3d DXMoveQuery;3534 p->pfnDXBindAllQuery = vmsvga3d DXBindAllQuery;3535 p->pfnDXReadbackAllQuery = vmsvga3d DXReadbackAllQuery;3536 p->pfnDXPredTransferFromBuffer = vmsvga3d DXPredTransferFromBuffer;3537 p->pfnDXMobFence64 = vmsvga3d DXMobFence64;3538 p->pfnDXBindAllShader = vmsvga3d DXBindAllShader;3539 p->pfnDXHint = vmsvga3d DXHint;3540 p->pfnDXBufferUpdate = vmsvga3d DXBufferUpdate;3541 p->pfnDXSetVSConstantBufferOffset = vmsvga3d DXSetVSConstantBufferOffset;3542 p->pfnDXSetPSConstantBufferOffset = vmsvga3d DXSetPSConstantBufferOffset;3543 p->pfnDXSetGSConstantBufferOffset = vmsvga3d DXSetGSConstantBufferOffset;3544 p->pfnDXSetHSConstantBufferOffset = vmsvga3d DXSetHSConstantBufferOffset;3545 p->pfnDXSetDSConstantBufferOffset = vmsvga3d DXSetDSConstantBufferOffset;3546 p->pfnDXSetCSConstantBufferOffset = vmsvga3d DXSetCSConstantBufferOffset;3547 p->pfnDXCondBindAllShader = vmsvga3d DXCondBindAllShader;3548 p->pfnScreenCopy = vmsvga3d ScreenCopy;3549 p->pfnGrowOTable = vmsvga3d GrowOTable;3550 p->pfnDXGrowCOTable = vmsvga3d DXGrowCOTable;3551 p->pfnIntraSurfaceCopy = vmsvga3d IntraSurfaceCopy;3552 p->pfnDefineGBSurface_v3 = vmsvga3d DefineGBSurface_v3;3553 p->pfnDXResolveCopy = vmsvga3d DXResolveCopy;3554 p->pfnDXPredResolveCopy = vmsvga3d DXPredResolveCopy;3555 p->pfnDXPredConvertRegion = vmsvga3d DXPredConvertRegion;3556 p->pfnDXPredConvert = vmsvga3d DXPredConvert;3557 p->pfnWholeSurfaceCopy = vmsvga3d WholeSurfaceCopy;3558 p->pfnDXDefineUAView = vmsvga3d DXDefineUAView;3559 p->pfnDXDestroyUAView = vmsvga3d DXDestroyUAView;3560 p->pfnDXClearUAViewUint = vmsvga3d DXClearUAViewUint;3561 p->pfnDXClearUAViewFloat = vmsvga3d DXClearUAViewFloat;3562 p->pfnDXCopyStructureCount = vmsvga3d DXCopyStructureCount;3563 p->pfnDXSetUAViews = vmsvga3d DXSetUAViews;3564 p->pfnDXDrawIndexedInstancedIndirect = vmsvga3d DXDrawIndexedInstancedIndirect;3565 p->pfnDXDrawInstancedIndirect = vmsvga3d DXDrawInstancedIndirect;3566 p->pfnDXDispatch = vmsvga3d DXDispatch;3567 p->pfnDXDispatchIndirect = vmsvga3d DXDispatchIndirect;3568 p->pfnWriteZeroSurface = vmsvga3d WriteZeroSurface;3569 p->pfnHintZeroSurface = vmsvga3d HintZeroSurface;3570 p->pfnDXTransferToBuffer = vmsvga3d DXTransferToBuffer;3571 p->pfnDXSetStructureCount = vmsvga3d DXSetStructureCount;3572 p->pfnLogicOpsBitBlt = vmsvga3d LogicOpsBitBlt;3573 p->pfnLogicOpsTransBlt = vmsvga3d LogicOpsTransBlt;3574 p->pfnLogicOpsStretchBlt = vmsvga3d LogicOpsStretchBlt;3575 p->pfnLogicOpsColorFill = vmsvga3d LogicOpsColorFill;3576 p->pfnLogicOpsAlphaBlend = vmsvga3d LogicOpsAlphaBlend;3577 p->pfnLogicOpsClearTypeBlend = vmsvga3d LogicOpsClearTypeBlend;3578 p->pfnDefineGBSurface_v4 = vmsvga3d DefineGBSurface_v4;3579 p->pfnDXSetCSUAViews = vmsvga3d DXSetCSUAViews;3580 p->pfnDXSetMinLOD = vmsvga3d DXSetMinLOD;3581 p->pfnDXDefineDepthStencilView_v2 = vmsvga3d DXDefineDepthStencilView_v2;3582 p->pfnDXDefineStreamOutputWithMob = vmsvga3d DXDefineStreamOutputWithMob;3583 p->pfnDXSetShaderIface = vmsvga3d DXSetShaderIface;3584 p->pfnDXBindStreamOutput = vmsvga3d DXBindStreamOutput;3585 p->pfnSurfaceStretchBltNonMSToMS = vmsvga3d SurfaceStretchBltNonMSToMS;3586 p->pfnDXBindShaderIface = vmsvga3d DXBindShaderIface;5053 p->pfnDXDefineContext = vmsvga3dBackDXDefineContext; 5054 p->pfnDXDestroyContext = vmsvga3dBackDXDestroyContext; 5055 p->pfnDXBindContext = vmsvga3dBackDXBindContext; 5056 p->pfnDXReadbackContext = vmsvga3dBackDXReadbackContext; 5057 p->pfnDXInvalidateContext = vmsvga3dBackDXInvalidateContext; 5058 p->pfnDXSetSingleConstantBuffer = vmsvga3dBackDXSetSingleConstantBuffer; 5059 p->pfnDXSetShaderResources = vmsvga3dBackDXSetShaderResources; 5060 p->pfnDXSetShader = vmsvga3dBackDXSetShader; 5061 p->pfnDXSetSamplers = vmsvga3dBackDXSetSamplers; 5062 p->pfnDXDraw = vmsvga3dBackDXDraw; 5063 p->pfnDXDrawIndexed = vmsvga3dBackDXDrawIndexed; 5064 p->pfnDXDrawInstanced = vmsvga3dBackDXDrawInstanced; 5065 p->pfnDXDrawIndexedInstanced = vmsvga3dBackDXDrawIndexedInstanced; 5066 p->pfnDXDrawAuto = vmsvga3dBackDXDrawAuto; 5067 p->pfnDXSetInputLayout = vmsvga3dBackDXSetInputLayout; 5068 p->pfnDXSetVertexBuffers = vmsvga3dBackDXSetVertexBuffers; 5069 p->pfnDXSetIndexBuffer = vmsvga3dBackDXSetIndexBuffer; 5070 p->pfnDXSetTopology = vmsvga3dBackDXSetTopology; 5071 p->pfnDXSetRenderTargets = vmsvga3dBackDXSetRenderTargets; 5072 p->pfnDXSetBlendState = vmsvga3dBackDXSetBlendState; 5073 p->pfnDXSetDepthStencilState = vmsvga3dBackDXSetDepthStencilState; 5074 p->pfnDXSetRasterizerState = vmsvga3dBackDXSetRasterizerState; 5075 p->pfnDXDefineQuery = vmsvga3dBackDXDefineQuery; 5076 p->pfnDXDestroyQuery = vmsvga3dBackDXDestroyQuery; 5077 p->pfnDXBindQuery = vmsvga3dBackDXBindQuery; 5078 p->pfnDXSetQueryOffset = vmsvga3dBackDXSetQueryOffset; 5079 p->pfnDXBeginQuery = vmsvga3dBackDXBeginQuery; 5080 p->pfnDXEndQuery = vmsvga3dBackDXEndQuery; 5081 p->pfnDXReadbackQuery = vmsvga3dBackDXReadbackQuery; 5082 p->pfnDXSetPredication = vmsvga3dBackDXSetPredication; 5083 p->pfnDXSetSOTargets = vmsvga3dBackDXSetSOTargets; 5084 p->pfnDXSetViewports = vmsvga3dBackDXSetViewports; 5085 p->pfnDXSetScissorRects = vmsvga3dBackDXSetScissorRects; 5086 p->pfnDXClearRenderTargetView = vmsvga3dBackDXClearRenderTargetView; 5087 p->pfnDXClearDepthStencilView = vmsvga3dBackDXClearDepthStencilView; 5088 p->pfnDXPredCopyRegion = vmsvga3dBackDXPredCopyRegion; 5089 p->pfnDXPredCopy = vmsvga3dBackDXPredCopy; 5090 p->pfnDXPresentBlt = vmsvga3dBackDXPresentBlt; 5091 p->pfnDXGenMips = vmsvga3dBackDXGenMips; 5092 p->pfnDXUpdateSubResource = vmsvga3dBackDXUpdateSubResource; 5093 p->pfnDXReadbackSubResource = vmsvga3dBackDXReadbackSubResource; 5094 p->pfnDXInvalidateSubResource = vmsvga3dBackDXInvalidateSubResource; 5095 p->pfnDXDefineShaderResourceView = vmsvga3dBackDXDefineShaderResourceView; 5096 p->pfnDXDestroyShaderResourceView = vmsvga3dBackDXDestroyShaderResourceView; 5097 p->pfnDXDefineRenderTargetView = vmsvga3dBackDXDefineRenderTargetView; 5098 p->pfnDXDestroyRenderTargetView = vmsvga3dBackDXDestroyRenderTargetView; 5099 p->pfnDXDefineDepthStencilView = vmsvga3dBackDXDefineDepthStencilView; 5100 p->pfnDXDestroyDepthStencilView = vmsvga3dBackDXDestroyDepthStencilView; 5101 p->pfnDXDefineElementLayout = vmsvga3dBackDXDefineElementLayout; 5102 p->pfnDXDestroyElementLayout = vmsvga3dBackDXDestroyElementLayout; 5103 p->pfnDXDefineBlendState = vmsvga3dBackDXDefineBlendState; 5104 p->pfnDXDestroyBlendState = vmsvga3dBackDXDestroyBlendState; 5105 p->pfnDXDefineDepthStencilState = vmsvga3dBackDXDefineDepthStencilState; 5106 p->pfnDXDestroyDepthStencilState = vmsvga3dBackDXDestroyDepthStencilState; 5107 p->pfnDXDefineRasterizerState = vmsvga3dBackDXDefineRasterizerState; 5108 p->pfnDXDestroyRasterizerState = vmsvga3dBackDXDestroyRasterizerState; 5109 p->pfnDXDefineSamplerState = vmsvga3dBackDXDefineSamplerState; 5110 p->pfnDXDestroySamplerState = vmsvga3dBackDXDestroySamplerState; 5111 p->pfnDXDefineShader = vmsvga3dBackDXDefineShader; 5112 p->pfnDXDestroyShader = vmsvga3dBackDXDestroyShader; 5113 p->pfnDXBindShader = vmsvga3dBackDXBindShader; 5114 p->pfnDXDefineStreamOutput = vmsvga3dBackDXDefineStreamOutput; 5115 p->pfnDXDestroyStreamOutput = vmsvga3dBackDXDestroyStreamOutput; 5116 p->pfnDXSetStreamOutput = vmsvga3dBackDXSetStreamOutput; 5117 p->pfnDXSetCOTable = vmsvga3dBackDXSetCOTable; 5118 p->pfnDXReadbackCOTable = vmsvga3dBackDXReadbackCOTable; 5119 p->pfnDXBufferCopy = vmsvga3dBackDXBufferCopy; 5120 p->pfnDXTransferFromBuffer = vmsvga3dBackDXTransferFromBuffer; 5121 p->pfnDXSurfaceCopyAndReadback = vmsvga3dBackDXSurfaceCopyAndReadback; 5122 p->pfnDXMoveQuery = vmsvga3dBackDXMoveQuery; 5123 p->pfnDXBindAllQuery = vmsvga3dBackDXBindAllQuery; 5124 p->pfnDXReadbackAllQuery = vmsvga3dBackDXReadbackAllQuery; 5125 p->pfnDXPredTransferFromBuffer = vmsvga3dBackDXPredTransferFromBuffer; 5126 p->pfnDXMobFence64 = vmsvga3dBackDXMobFence64; 5127 p->pfnDXBindAllShader = vmsvga3dBackDXBindAllShader; 5128 p->pfnDXHint = vmsvga3dBackDXHint; 5129 p->pfnDXBufferUpdate = vmsvga3dBackDXBufferUpdate; 5130 p->pfnDXSetVSConstantBufferOffset = vmsvga3dBackDXSetVSConstantBufferOffset; 5131 p->pfnDXSetPSConstantBufferOffset = vmsvga3dBackDXSetPSConstantBufferOffset; 5132 p->pfnDXSetGSConstantBufferOffset = vmsvga3dBackDXSetGSConstantBufferOffset; 5133 p->pfnDXSetHSConstantBufferOffset = vmsvga3dBackDXSetHSConstantBufferOffset; 5134 p->pfnDXSetDSConstantBufferOffset = vmsvga3dBackDXSetDSConstantBufferOffset; 5135 p->pfnDXSetCSConstantBufferOffset = vmsvga3dBackDXSetCSConstantBufferOffset; 5136 p->pfnDXCondBindAllShader = vmsvga3dBackDXCondBindAllShader; 5137 p->pfnScreenCopy = vmsvga3dBackScreenCopy; 5138 p->pfnGrowOTable = vmsvga3dBackGrowOTable; 5139 p->pfnDXGrowCOTable = vmsvga3dBackDXGrowCOTable; 5140 p->pfnIntraSurfaceCopy = vmsvga3dBackIntraSurfaceCopy; 5141 p->pfnDefineGBSurface_v3 = vmsvga3dBackDefineGBSurface_v3; 5142 p->pfnDXResolveCopy = vmsvga3dBackDXResolveCopy; 5143 p->pfnDXPredResolveCopy = vmsvga3dBackDXPredResolveCopy; 5144 p->pfnDXPredConvertRegion = vmsvga3dBackDXPredConvertRegion; 5145 p->pfnDXPredConvert = vmsvga3dBackDXPredConvert; 5146 p->pfnWholeSurfaceCopy = vmsvga3dBackWholeSurfaceCopy; 5147 p->pfnDXDefineUAView = vmsvga3dBackDXDefineUAView; 5148 p->pfnDXDestroyUAView = vmsvga3dBackDXDestroyUAView; 5149 p->pfnDXClearUAViewUint = vmsvga3dBackDXClearUAViewUint; 5150 p->pfnDXClearUAViewFloat = vmsvga3dBackDXClearUAViewFloat; 5151 p->pfnDXCopyStructureCount = vmsvga3dBackDXCopyStructureCount; 5152 p->pfnDXSetUAViews = vmsvga3dBackDXSetUAViews; 5153 p->pfnDXDrawIndexedInstancedIndirect = vmsvga3dBackDXDrawIndexedInstancedIndirect; 5154 p->pfnDXDrawInstancedIndirect = vmsvga3dBackDXDrawInstancedIndirect; 5155 p->pfnDXDispatch = vmsvga3dBackDXDispatch; 5156 p->pfnDXDispatchIndirect = vmsvga3dBackDXDispatchIndirect; 5157 p->pfnWriteZeroSurface = vmsvga3dBackWriteZeroSurface; 5158 p->pfnHintZeroSurface = vmsvga3dBackHintZeroSurface; 5159 p->pfnDXTransferToBuffer = vmsvga3dBackDXTransferToBuffer; 5160 p->pfnDXSetStructureCount = vmsvga3dBackDXSetStructureCount; 5161 p->pfnLogicOpsBitBlt = vmsvga3dBackLogicOpsBitBlt; 5162 p->pfnLogicOpsTransBlt = vmsvga3dBackLogicOpsTransBlt; 5163 p->pfnLogicOpsStretchBlt = vmsvga3dBackLogicOpsStretchBlt; 5164 p->pfnLogicOpsColorFill = vmsvga3dBackLogicOpsColorFill; 5165 p->pfnLogicOpsAlphaBlend = vmsvga3dBackLogicOpsAlphaBlend; 5166 p->pfnLogicOpsClearTypeBlend = vmsvga3dBackLogicOpsClearTypeBlend; 5167 p->pfnDefineGBSurface_v4 = vmsvga3dBackDefineGBSurface_v4; 5168 p->pfnDXSetCSUAViews = vmsvga3dBackDXSetCSUAViews; 5169 p->pfnDXSetMinLOD = vmsvga3dBackDXSetMinLOD; 5170 p->pfnDXDefineDepthStencilView_v2 = vmsvga3dBackDXDefineDepthStencilView_v2; 5171 p->pfnDXDefineStreamOutputWithMob = vmsvga3dBackDXDefineStreamOutputWithMob; 5172 p->pfnDXSetShaderIface = vmsvga3dBackDXSetShaderIface; 5173 p->pfnDXBindStreamOutput = vmsvga3dBackDXBindStreamOutput; 5174 p->pfnSurfaceStretchBltNonMSToMS = vmsvga3dBackSurfaceStretchBltNonMSToMS; 5175 p->pfnDXBindShaderIface = vmsvga3dBackDXBindShaderIface; 3587 5176 } 3588 5177 }
Note:
See TracChangeset
for help on using the changeset viewer.