| 4140 | } |
| 4141 | |
| 4142 | HRESULT CDX11VideoProcessor::AddPostScaleShader(const std::wstring& name, const std::string& srcCode) |
| 4143 | { |
| 4144 | if (!m_pDevice) { |
| 4145 | return E_ABORT; |
| 4146 | } |
| 4147 | |
| 4148 | ID3DBlob* pShaderCode = nullptr; |
| 4149 | HRESULT hr = CompileShader(srcCode, nullptr, "ps_4_0", &pShaderCode); |
| 4150 | if (S_OK == hr) { |
| 4151 | m_pPostScaleShaders.emplace_back(); |
| 4152 | hr = m_pDevice->CreatePixelShader(pShaderCode->GetBufferPointer(), pShaderCode->GetBufferSize(), nullptr, &m_pPostScaleShaders.back().shader); |
| 4153 | if (S_OK == hr) { |
| 4154 | m_pPostScaleShaders.back().name = name; |
| 4155 | UpdatePostScaleTexures(); |
| 4156 | DLog(L"CDX11VideoProcessor::AddPostScaleShader() : \"{}\" pixel shader added successfully.", name); |
| 4157 | } |
| 4158 | else { |
| 4159 | DLog(L"CDX11VideoProcessor::AddPostScaleShader() : create pixel shader \"{}\" FAILED!", name); |
| 4160 | m_pPostScaleShaders.pop_back(); |
| 4161 | } |
| 4162 | pShaderCode->Release(); |
| 4163 | } |
| 4164 | |
| 4165 | return hr; |
| 4166 | } |
| 4167 | |
| 4168 | ISubPicAllocator* CDX11VideoProcessor::GetSubPicAllocator() |
| 4169 | { |
nothing calls this directly
no test coverage detected