diff options
| author | Jules Blok <jules.blok@gmail.com> | 2014-12-15 22:29:56 +0100 |
|---|---|---|
| committer | Jules Blok <jules.blok@gmail.com> | 2014-12-15 22:47:43 +0100 |
| commit | 8ae738ff3076aa2b4cec254f3d5dcfe2fea95d88 (patch) | |
| tree | 8d5d12c80d408d6cbf6e1c328d8e7f6f33d6b22f /Source/Core/VideoBackends/D3D/VertexManager.cpp | |
| parent | 55e60a9c2242713a93621ca1b618930e5c61aef0 (diff) | |
VideoCommon: Merge PointGeometryShader into GeometryShaderGen.
This adds point-width emulation support to OpenGL.
Diffstat (limited to 'Source/Core/VideoBackends/D3D/VertexManager.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/D3D/VertexManager.cpp | 30 |
1 files changed, 7 insertions, 23 deletions
diff --git a/Source/Core/VideoBackends/D3D/VertexManager.cpp b/Source/Core/VideoBackends/D3D/VertexManager.cpp index dcd1ad1569..9f2b2ba318 100644 --- a/Source/Core/VideoBackends/D3D/VertexManager.cpp +++ b/Source/Core/VideoBackends/D3D/VertexManager.cpp @@ -48,14 +48,10 @@ void VertexManager::CreateDeviceObjects() m_currentBuffer = 0; m_bufferCursor = MAX_BUFFER_SIZE; - - m_pointShader.Init(); } void VertexManager::DestroyDeviceObjects() { - m_pointShader.Shutdown(); - for (int i = 0; i < MAX_BUFFER_COUNT; i++) { SAFE_RELEASE(m_buffers[i]); @@ -158,28 +154,16 @@ void VertexManager::Draw(u32 stride) } else //if (current_primitive_type == PRIMITIVE_POINTS) { - float pointSize = float(bpmem.lineptwidth.pointsize) / 6.f; - float texOffset = LINE_PT_TEX_OFFSETS[bpmem.lineptwidth.pointoff]; - float vpWidth = 2.0f * xfmem.viewport.wd; - float vpHeight = -2.0f * xfmem.viewport.ht; - - bool texOffsetEnable[8]; - - for (int i = 0; i < 8; ++i) - texOffsetEnable[i] = bpmem.texcoords[i].s.point_offset; - - if (m_pointShader.SetShader(components, pointSize, - texOffset, vpWidth, vpHeight, texOffsetEnable)) - { - D3D::stateman->SetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_POINTLIST); + D3D::stateman->SetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_POINTLIST); + D3D::stateman->SetGeometryConstants(GeometryShaderCache::GetConstantBuffer()); + D3D::stateman->SetGeometryShader(GeometryShaderCache::GetActiveShader()); - D3D::stateman->Apply(); - D3D::context->DrawIndexed(indices, startIndex, baseVertex); + D3D::stateman->Apply(); + D3D::context->DrawIndexed(indices, startIndex, baseVertex); - INCSTAT(stats.thisFrame.numDrawCalls); + INCSTAT(stats.thisFrame.numDrawCalls); - D3D::stateman->SetGeometryShader(nullptr); - } + D3D::stateman->SetGeometryShader(nullptr); } } |
