MCPcopy Create free account
hub / github.com/WinDurango/WinDurango / CopyResource

Method CopyResource

projects/WinDurango.D3D11X/src/ID3D11DeviceContext.cpp:1059–1213  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1057 D3D11_RESOURCE_DIMENSION SrcType{};
1058 pDstResource->GetType(&DstType);
1059 if (DstType == D3D11_RESOURCE_DIMENSION_BUFFER)
1060 {
1061 pSrcResource->GetType(&SrcType);
1062 if (SrcType == D3D11_RESOURCE_DIMENSION_BUFFER)
1063 {
1064 m_pFunction->CopyResource(static_cast<D3D11Buffer<ABI> *>(pDstResource)->m_pFunction,
1065 static_cast<D3D11Buffer<ABI> *>(pSrcResource)->m_pFunction);
1066 }
1067 else if (SrcType == D3D11_RESOURCE_DIMENSION_TEXTURE1D)
1068 {
1069 m_pFunction->CopyResource(static_cast<D3D11Buffer<ABI> *>(pDstResource)->m_pFunction,
1070 static_cast<D3D11Texture1D<ABI> *>(pSrcResource)->m_pFunction);
1071 }
1072 else if (SrcType == D3D11_RESOURCE_DIMENSION_TEXTURE2D)
1073 {
1074 m_pFunction->CopyResource(static_cast<D3D11Buffer<ABI> *>(pDstResource)->m_pFunction,
1075 static_cast<D3D11Texture2D<ABI> *>(pSrcResource)->m_pFunction);
1076 }
1077 else if (SrcType == D3D11_RESOURCE_DIMENSION_TEXTURE3D)
1078 {
1079 m_pFunction->CopyResource(static_cast<D3D11Buffer<ABI> *>(pDstResource)->m_pFunction,
1080 static_cast<D3D11Texture3D<ABI> *>(pSrcResource)->m_pFunction);
1081 }
1082 else if (SrcType == D3D11_RESOURCE_DIMENSION_UNKNOWN)
1083 {
1084 m_pFunction->CopyResource(static_cast<D3D11Buffer<ABI> *>(pDstResource)->m_pFunction,
1085 static_cast<D3D11Resource<ABI> *>(pSrcResource)->m_pFunction);
1086 }
1087 }
1088 else if (DstType == D3D11_RESOURCE_DIMENSION_TEXTURE1D)
1089 {
1090 pSrcResource->GetType(&SrcType);
1091 if (SrcType == D3D11_RESOURCE_DIMENSION_BUFFER)
1092 {
1093 m_pFunction->CopyResource(static_cast<D3D11Texture1D<ABI> *>(pDstResource)->m_pFunction,
1094 static_cast<D3D11Buffer<ABI> *>(pSrcResource)->m_pFunction);
1095 }
1096 else if (SrcType == D3D11_RESOURCE_DIMENSION_TEXTURE1D)
1097 {
1098 m_pFunction->CopyResource(static_cast<D3D11Texture1D<ABI> *>(pDstResource)->m_pFunction,
1099 static_cast<D3D11Texture1D<ABI> *>(pSrcResource)->m_pFunction);
1100 }
1101 else if (SrcType == D3D11_RESOURCE_DIMENSION_TEXTURE2D)
1102 {
1103 m_pFunction->CopyResource(static_cast<D3D11Texture1D<ABI> *>(pDstResource)->m_pFunction,
1104 static_cast<D3D11Texture2D<ABI> *>(pSrcResource)->m_pFunction);
1105 }
1106 else if (SrcType == D3D11_RESOURCE_DIMENSION_TEXTURE3D)
1107 {
1108 m_pFunction->CopyResource(static_cast<D3D11Texture1D<ABI> *>(pDstResource)->m_pFunction,
1109 static_cast<D3D11Texture3D<ABI> *>(pSrcResource)->m_pFunction);
1110 }
1111 else if (SrcType == D3D11_RESOURCE_DIMENSION_UNKNOWN)
1112 {
1113 m_pFunction->CopyResource(static_cast<D3D11Texture1D<ABI> *>(pDstResource)->m_pFunction,
1114 static_cast<D3D11Resource<ABI> *>(pSrcResource)->m_pFunction);
1115 }
1116 }

Callers 1

ExecuteMethod · 0.45

Calls 1

GetTypeMethod · 0.45

Tested by

no test coverage detected