mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
D3D: Implemented context state caching
This avoids most of the redundant API calls.
This commit is contained in:
@ -6,6 +6,7 @@
|
||||
|
||||
#include "VideoBackends/D3D/D3DBase.h"
|
||||
#include "VideoBackends/D3D/D3DShader.h"
|
||||
#include "VideoBackends/D3D/D3DState.h"
|
||||
#include "VideoBackends/D3D/PointGeometryShader.h"
|
||||
#include "VideoCommon/VertexShaderGen.h"
|
||||
|
||||
@ -217,8 +218,8 @@ bool PointGeometryShader::SetShader(u32 components, float pointSize,
|
||||
DEBUG_LOG(VIDEO, "Point params: size %f, texOffset %f, vpWidth %f, vpHeight %f",
|
||||
pointSize, texOffset, vpWidth, vpHeight);
|
||||
|
||||
D3D::context->GSSetShader(shaderIt->second, nullptr, 0);
|
||||
D3D::context->GSSetConstantBuffers(0, 1, &m_paramsBuffer);
|
||||
D3D::stateman->setGeometryShader(shaderIt->second);
|
||||
D3D::stateman->setGeometryConstants(m_paramsBuffer);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user