Optimize blending in DXVA2 and D3D11VA renderers
This commit is contained in:
parent
c5b7a9c679
commit
c3ce0918b3
3 changed files with 32 additions and 6 deletions
|
|
@ -375,7 +375,6 @@ bool DXVA2Renderer::initializeRenderer()
|
|||
m_Device->SetSamplerState(0, D3DSAMP_MAGFILTER, D3DTEXF_LINEAR);
|
||||
m_Device->SetSamplerState(0, D3DSAMP_MINFILTER, D3DTEXF_LINEAR);
|
||||
|
||||
m_Device->SetRenderState(D3DRS_ALPHABLENDENABLE, TRUE);
|
||||
m_Device->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_SRCALPHA);
|
||||
m_Device->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA);
|
||||
|
||||
|
|
@ -951,7 +950,10 @@ void DXVA2Renderer::renderOverlay(Overlay::OverlayType type)
|
|||
return;
|
||||
}
|
||||
|
||||
// Only enable blending when drawing the overlay
|
||||
m_Device->SetRenderState(D3DRS_ALPHABLENDENABLE, TRUE);
|
||||
hr = m_Device->DrawPrimitive(D3DPT_TRIANGLEFAN, 0, 2);
|
||||
m_Device->SetRenderState(D3DRS_ALPHABLENDENABLE, FALSE);
|
||||
if (FAILED(hr)) {
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION,
|
||||
"DrawPrimitive() failed: %x",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue