diff options
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); } } |
