| 298 | } |
| 299 | |
| 300 | HRESULT CDX11VideoProcessor::TextureCopyRect( |
| 301 | const Tex2D_t& Tex, ID3D11Texture2D* pRenderTarget, |
| 302 | const CRect& srcRect, const CRect& destRect, |
| 303 | ID3D11PixelShader* pPixelShader, ID3D11Buffer* pConstantBuffer, |
| 304 | const int iRotation, const bool bFlip) |
| 305 | { |
| 306 | CComPtr<ID3D11RenderTargetView> pRenderTargetView; |
| 307 | |
| 308 | HRESULT hr = m_pDevice->CreateRenderTargetView(pRenderTarget, nullptr, &pRenderTargetView); |
| 309 | if (FAILED(hr)) { |
| 310 | DLog(L"TextureCopyRect() : CreateRenderTargetView() failed with error {}", HR2Str(hr)); |
| 311 | return hr; |
| 312 | } |
| 313 | |
| 314 | hr = FillVertexBuffer(m_pDeviceContext, m_pVertexBuffer, Tex.desc.Width, Tex.desc.Height, srcRect, iRotation, bFlip); |
| 315 | if (FAILED(hr)) { |
| 316 | return hr; |
| 317 | } |
| 318 | |
| 319 | D3D11_VIEWPORT VP; |
| 320 | VP.TopLeftX = (FLOAT)destRect.left; |
| 321 | VP.TopLeftY = (FLOAT)destRect.top; |
| 322 | VP.Width = (FLOAT)destRect.Width(); |
| 323 | VP.Height = (FLOAT)destRect.Height(); |
| 324 | VP.MinDepth = 0.0f; |
| 325 | VP.MaxDepth = 1.0f; |
| 326 | |
| 327 | TextureBlt11(m_pDeviceContext, pRenderTargetView, VP, m_pVSimpleInputLayout, m_pVS_Simple, pPixelShader, Tex.pShaderResource, m_pSamplerPoint, pConstantBuffer, m_pVertexBuffer); |
| 328 | |
| 329 | return hr; |
| 330 | } |
| 331 | |
| 332 | HRESULT CDX11VideoProcessor::TextureResizeShader( |
| 333 | const Tex2D_t& Tex, ID3D11Texture2D* pRenderTarget, |
nothing calls this directly
no test coverage detected