mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-02 22:29:21 +00:00
D3D: Set the geometry shader for triangle primitives.
This commit is contained in:
parent
4f6ce0f236
commit
7c05b9a6d0
2 changed files with 6 additions and 0 deletions
|
@ -21,6 +21,7 @@
|
||||||
#include "VideoBackends/D3D/D3DState.h"
|
#include "VideoBackends/D3D/D3DState.h"
|
||||||
#include "VideoBackends/D3D/D3DUtil.h"
|
#include "VideoBackends/D3D/D3DUtil.h"
|
||||||
#include "VideoBackends/D3D/FramebufferManager.h"
|
#include "VideoBackends/D3D/FramebufferManager.h"
|
||||||
|
#include "VideoBackends/D3D/GeometryShaderCache.h"
|
||||||
#include "VideoBackends/D3D/PixelShaderCache.h"
|
#include "VideoBackends/D3D/PixelShaderCache.h"
|
||||||
#include "VideoBackends/D3D/Render.h"
|
#include "VideoBackends/D3D/Render.h"
|
||||||
#include "VideoBackends/D3D/Television.h"
|
#include "VideoBackends/D3D/Television.h"
|
||||||
|
|
|
@ -140,11 +140,15 @@ void VertexManager::Draw(u32 stride)
|
||||||
if (current_primitive_type == PRIMITIVE_TRIANGLES)
|
if (current_primitive_type == PRIMITIVE_TRIANGLES)
|
||||||
{
|
{
|
||||||
D3D::stateman->SetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP);
|
D3D::stateman->SetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP);
|
||||||
|
D3D::stateman->SetGeometryConstants(VertexShaderCache::GetConstantBuffer());
|
||||||
|
D3D::stateman->SetGeometryShader(g_ActiveConfig.iStereoMode > 0 ? GeometryShaderCache::GetActiveShader() : nullptr);
|
||||||
|
|
||||||
D3D::stateman->Apply();
|
D3D::stateman->Apply();
|
||||||
D3D::context->DrawIndexed(indices, startIndex, baseVertex);
|
D3D::context->DrawIndexed(indices, startIndex, baseVertex);
|
||||||
|
|
||||||
INCSTAT(stats.thisFrame.numDrawCalls);
|
INCSTAT(stats.thisFrame.numDrawCalls);
|
||||||
|
|
||||||
|
D3D::stateman->SetGeometryShader(nullptr);
|
||||||
}
|
}
|
||||||
else if (current_primitive_type == PRIMITIVE_LINES)
|
else if (current_primitive_type == PRIMITIVE_LINES)
|
||||||
{
|
{
|
||||||
|
@ -220,6 +224,7 @@ void VertexManager::vFlush(bool useDstAlpha)
|
||||||
if (!GeometryShaderCache::SetShader(components))
|
if (!GeometryShaderCache::SetShader(components))
|
||||||
{
|
{
|
||||||
GFX_DEBUGGER_PAUSE_LOG_AT(NEXT_ERROR, true, { printf("Fail to set pixel shader\n"); });
|
GFX_DEBUGGER_PAUSE_LOG_AT(NEXT_ERROR, true, { printf("Fail to set pixel shader\n"); });
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue