D3D: Removed cull mode changes for lines and points
Fixed include order and whitespace
This commit is contained in:
parent
6e9226650d
commit
0e18e9e80d
|
@ -33,10 +33,10 @@ template<typename T> AutoState<T>::~AutoState()
|
|||
state = nullptr;
|
||||
}
|
||||
|
||||
StateManager::StateManager()
|
||||
StateManager::StateManager()
|
||||
: m_currentBlendState(nullptr)
|
||||
, m_currentDepthState(nullptr)
|
||||
, m_currentRasterizerState(nullptr)
|
||||
, m_currentRasterizerState(nullptr)
|
||||
, m_dirtyFlags(~0u)
|
||||
{
|
||||
memset(&m_pending, 0, sizeof(m_pending));
|
||||
|
@ -97,7 +97,7 @@ void StateManager::Apply()
|
|||
|
||||
if (m_dirtyFlags & dirtyConstants)
|
||||
{
|
||||
if (m_current.pixelConstants[0] != m_pending.pixelConstants[0] ||
|
||||
if (m_current.pixelConstants[0] != m_pending.pixelConstants[0] ||
|
||||
m_current.pixelConstants[1] != m_pending.pixelConstants[1])
|
||||
{
|
||||
D3D::context->PSSetConstantBuffers(0, m_pending.pixelConstants[1] ? 2 : 1, m_pending.pixelConstants);
|
||||
|
|
|
@ -300,7 +300,7 @@ private:
|
|||
ID3D11VertexShader* vertexShader;
|
||||
ID3D11GeometryShader* geometryShader;
|
||||
};
|
||||
|
||||
|
||||
Resources m_pending;
|
||||
Resources m_current;
|
||||
};
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
#include "VideoBackends/D3D/D3DState.h"
|
||||
#include "VideoBackends/D3D/D3DUtil.h"
|
||||
#include "VideoBackends/D3D/FramebufferManager.h"
|
||||
#include "VideoBackends/D3D/PSTextureEncoder.h"
|
||||
#include "VideoBackends/D3D/PixelShaderCache.h"
|
||||
#include "VideoBackends/D3D/PSTextureEncoder.h"
|
||||
#include "VideoBackends/D3D/TextureCache.h"
|
||||
#include "VideoBackends/D3D/TextureEncoder.h"
|
||||
#include "VideoBackends/D3D/VertexShaderCache.h"
|
||||
|
|
|
@ -158,7 +158,6 @@ void VertexManager::Draw(u32 stride)
|
|||
if (m_lineShader.SetShader(components, lineWidth,
|
||||
texOffset, vpWidth, vpHeight, texOffsetEnable))
|
||||
{
|
||||
((DX11::Renderer*)g_renderer)->ApplyCullDisable(); // Disable culling for lines and points
|
||||
D3D::stateman->setPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_LINELIST);
|
||||
|
||||
D3D::stateman->Apply();
|
||||
|
@ -167,7 +166,6 @@ void VertexManager::Draw(u32 stride)
|
|||
INCSTAT(stats.thisFrame.numDrawCalls);
|
||||
|
||||
D3D::stateman->setGeometryShader(nullptr);
|
||||
((DX11::Renderer*)g_renderer)->RestoreCull();
|
||||
}
|
||||
}
|
||||
else //if (current_primitive_type == PRIMITIVE_POINTS)
|
||||
|
@ -185,8 +183,6 @@ void VertexManager::Draw(u32 stride)
|
|||
if (m_pointShader.SetShader(components, pointSize,
|
||||
texOffset, vpWidth, vpHeight, texOffsetEnable))
|
||||
{
|
||||
((DX11::Renderer*)g_renderer)->ApplyCullDisable(); // Disable culling for lines and points
|
||||
|
||||
D3D::stateman->setPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_POINTLIST);
|
||||
|
||||
D3D::stateman->Apply();
|
||||
|
@ -195,7 +191,6 @@ void VertexManager::Draw(u32 stride)
|
|||
INCSTAT(stats.thisFrame.numDrawCalls);
|
||||
|
||||
D3D::stateman->setGeometryShader(nullptr);
|
||||
((DX11::Renderer*)g_renderer)->RestoreCull();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue