From 4392d3cd55f4b39ae6006702ff6466867609e2a3 Mon Sep 17 00:00:00 2001 From: Yuriy O'Donnell Date: Sat, 6 Dec 2014 14:54:06 +0100 Subject: [PATCH] D3D: Fixed StateManager member function name case --- Source/Core/VideoBackends/D3D/D3DState.h | 26 ++++---- Source/Core/VideoBackends/D3D/D3DUtil.cpp | 66 +++++++++---------- .../VideoBackends/D3D/LineGeometryShader.cpp | 4 +- .../VideoBackends/D3D/NativeVertexFormat.cpp | 2 +- .../VideoBackends/D3D/PSTextureEncoder.cpp | 32 ++++----- .../VideoBackends/D3D/PointGeometryShader.cpp | 4 +- Source/Core/VideoBackends/D3D/Render.cpp | 12 ++-- Source/Core/VideoBackends/D3D/Television.cpp | 2 +- .../Core/VideoBackends/D3D/TextureCache.cpp | 4 +- .../Core/VideoBackends/D3D/VertexManager.cpp | 14 ++-- Source/Core/VideoBackends/D3D/XFBEncoder.cpp | 30 ++++----- 11 files changed, 98 insertions(+), 98 deletions(-) diff --git a/Source/Core/VideoBackends/D3D/D3DState.h b/Source/Core/VideoBackends/D3D/D3DState.h index 1670cfaad3..af2d7f2adb 100644 --- a/Source/Core/VideoBackends/D3D/D3DState.h +++ b/Source/Core/VideoBackends/D3D/D3DState.h @@ -110,7 +110,7 @@ public: void PopDepthState(); void PopRasterizerState(); - void setTexture(u32 index, ID3D11ShaderResourceView* texture) + void SetTexture(u32 index, ID3D11ShaderResourceView* texture) { if (m_current.textures[index] != texture) { @@ -119,7 +119,7 @@ public: } } - void setSampler(u32 index, ID3D11SamplerState* sampler) + void SetSampler(u32 index, ID3D11SamplerState* sampler) { if (m_current.samplers[index] != sampler) { @@ -128,7 +128,7 @@ public: } } - void setPixelConstants(ID3D11Buffer* buffer0, ID3D11Buffer* buffer1 = nullptr) + void SetPixelConstants(ID3D11Buffer* buffer0, ID3D11Buffer* buffer1 = nullptr) { if (m_current.pixelConstants[0] != buffer0) { @@ -143,7 +143,7 @@ public: } } - void setVertexConstants(ID3D11Buffer* buffer) + void SetVertexConstants(ID3D11Buffer* buffer) { if (m_current.vertexConstants != buffer) { @@ -152,7 +152,7 @@ public: } } - void setGeometryConstants(ID3D11Buffer* buffer) + void SetGeometryConstants(ID3D11Buffer* buffer) { if (m_current.geometryConstants != buffer) { @@ -161,7 +161,7 @@ public: } } - void setVertexBuffer(ID3D11Buffer* buffer, u32 stride, u32 offset) + void SetVertexBuffer(ID3D11Buffer* buffer, u32 stride, u32 offset) { if (m_current.vertexBuffer != buffer || m_current.vertexBufferStride != stride || @@ -174,7 +174,7 @@ public: } } - void setIndexBuffer(ID3D11Buffer* buffer) + void SetIndexBuffer(ID3D11Buffer* buffer) { if (m_current.indexBuffer != buffer) { @@ -183,7 +183,7 @@ public: } } - void setPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY topology) + void SetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY topology) { if (m_current.topology != topology) { @@ -192,7 +192,7 @@ public: } } - void setInputLayout(ID3D11InputLayout* layout) + void SetInputLayout(ID3D11InputLayout* layout) { if (m_current.inputLayout != layout) { @@ -201,7 +201,7 @@ public: } } - void setPixelShader(ID3D11PixelShader* shader) + void SetPixelShader(ID3D11PixelShader* shader) { if (m_current.pixelShader != shader) { @@ -210,13 +210,13 @@ public: } } - void setPixelShaderDynamic(ID3D11PixelShader* shader, ID3D11ClassInstance * const * classInstances, u32 classInstancesCount) + void SetPixelShaderDynamic(ID3D11PixelShader* shader, ID3D11ClassInstance * const * classInstances, u32 classInstancesCount) { D3D::context->PSSetShader(shader, classInstances, classInstancesCount); m_pending.pixelShader = shader; } - void setVertexShader(ID3D11VertexShader* shader) + void SetVertexShader(ID3D11VertexShader* shader) { if (m_current.vertexShader != shader) { @@ -225,7 +225,7 @@ public: } } - void setGeometryShader(ID3D11GeometryShader* shader) + void SetGeometryShader(ID3D11GeometryShader* shader) { if (m_current.geometryShader != shader) { diff --git a/Source/Core/VideoBackends/D3D/D3DUtil.cpp b/Source/Core/VideoBackends/D3D/D3DUtil.cpp index d798814a89..57524a49d3 100644 --- a/Source/Core/VideoBackends/D3D/D3DUtil.cpp +++ b/Source/Core/VideoBackends/D3D/D3DUtil.cpp @@ -347,12 +347,12 @@ int CD3DFont::DrawTextScaled(float x, float y, float size, float spacing, u32 dw D3D::stateman->PushBlendState(m_blendstate); D3D::stateman->PushRasterizerState(m_raststate); - D3D::stateman->setPixelShader(m_pshader); - D3D::stateman->setVertexShader(m_vshader); + D3D::stateman->SetPixelShader(m_pshader); + D3D::stateman->SetVertexShader(m_vshader); - D3D::stateman->setInputLayout(m_InputLayout); - D3D::stateman->setPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST); - D3D::stateman->setTexture(0, m_pTexture); + D3D::stateman->SetInputLayout(m_InputLayout); + D3D::stateman->SetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST); + D3D::stateman->SetTexture(0, m_pTexture); float fStartX = sx; for (char c : text) @@ -391,7 +391,7 @@ int CD3DFont::DrawTextScaled(float x, float y, float size, float spacing, u32 dw { context->Unmap(m_pVB, 0); - D3D::stateman->setVertexBuffer(m_pVB, stride, bufoffset); + D3D::stateman->SetVertexBuffer(m_pVB, stride, bufoffset); D3D::stateman->Apply(); D3D::context->Draw(3 * dwNumTriangles, 0); @@ -409,7 +409,7 @@ int CD3DFont::DrawTextScaled(float x, float y, float size, float spacing, u32 dw context->Unmap(m_pVB, 0); if (dwNumTriangles > 0) { - D3D::stateman->setVertexBuffer(m_pVB, stride, bufoffset); + D3D::stateman->SetVertexBuffer(m_pVB, stride, bufoffset); D3D::stateman->Apply(); D3D::context->Draw(3 * dwNumTriangles, 0); @@ -497,12 +497,12 @@ void ShutdownUtils() void SetPointCopySampler() { - D3D::stateman->setSampler(0, point_copy_sampler); + D3D::stateman->SetSampler(0, point_copy_sampler); } void SetLinearCopySampler() { - D3D::stateman->setSampler(0, linear_copy_sampler); + D3D::stateman->SetSampler(0, linear_copy_sampler); } void drawShadedTexQuad(ID3D11ShaderResourceView* texture, @@ -546,17 +546,17 @@ void drawShadedTexQuad(ID3D11ShaderResourceView* texture, UINT stride = sizeof(STQVertex); UINT offset = 0; - D3D::stateman->setPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP); - D3D::stateman->setInputLayout(layout); - D3D::stateman->setVertexBuffer(util_vbuf->GetBuffer(), stride, offset); - D3D::stateman->setPixelShader(PShader); - D3D::stateman->setTexture(0, texture); - D3D::stateman->setVertexShader(Vshader); + D3D::stateman->SetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP); + D3D::stateman->SetInputLayout(layout); + D3D::stateman->SetVertexBuffer(util_vbuf->GetBuffer(), stride, offset); + D3D::stateman->SetPixelShader(PShader); + D3D::stateman->SetTexture(0, texture); + D3D::stateman->SetVertexShader(Vshader); D3D::stateman->Apply(); D3D::context->Draw(4, stq_offset); - D3D::stateman->setTexture(0, nullptr); // immediately unbind the texture + D3D::stateman->SetTexture(0, nullptr); // immediately unbind the texture D3D::stateman->Apply(); } @@ -604,17 +604,17 @@ void drawShadedTexSubQuad(ID3D11ShaderResourceView* texture, UINT stride = sizeof(STSQVertex); UINT offset = 0; - stateman->setPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP); - stateman->setVertexBuffer(util_vbuf->GetBuffer(), stride, offset); - stateman->setInputLayout(layout); - stateman->setTexture(0, texture); - stateman->setPixelShader(PShader); - stateman->setVertexShader(Vshader); + stateman->SetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP); + stateman->SetVertexBuffer(util_vbuf->GetBuffer(), stride, offset); + stateman->SetInputLayout(layout); + stateman->SetTexture(0, texture); + stateman->SetPixelShader(PShader); + stateman->SetVertexShader(Vshader); stateman->Apply(); context->Draw(4, stsq_offset); - stateman->setTexture(0, nullptr); // immediately unbind the texture + stateman->SetTexture(0, nullptr); // immediately unbind the texture stateman->Apply(); } @@ -644,14 +644,14 @@ void drawColorQuad(u32 Color, float x1, float y1, float x2, float y2) draw_quad_data.col = Color; } - stateman->setVertexShader(VertexShaderCache::GetClearVertexShader()); - stateman->setPixelShader(PixelShaderCache::GetClearProgram()); - stateman->setInputLayout(VertexShaderCache::GetClearInputLayout()); + stateman->SetVertexShader(VertexShaderCache::GetClearVertexShader()); + stateman->SetPixelShader(PixelShaderCache::GetClearProgram()); + stateman->SetInputLayout(VertexShaderCache::GetClearInputLayout()); UINT stride = sizeof(ColVertex); UINT offset = 0; - stateman->setPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP); - stateman->setVertexBuffer(util_vbuf->GetBuffer(), stride, offset); + stateman->SetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP); + stateman->SetVertexBuffer(util_vbuf->GetBuffer(), stride, offset); stateman->Apply(); context->Draw(4, cq_offset); @@ -675,14 +675,14 @@ void drawClearQuad(u32 Color, float z, ID3D11PixelShader* PShader, ID3D11VertexS clear_quad_data.z = z; } - stateman->setVertexShader(Vshader); - stateman->setPixelShader(PShader); - stateman->setInputLayout(layout); + stateman->SetVertexShader(Vshader); + stateman->SetPixelShader(PShader); + stateman->SetInputLayout(layout); UINT stride = sizeof(ClearVertex); UINT offset = 0; - stateman->setPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP); - stateman->setVertexBuffer(util_vbuf->GetBuffer(), stride, offset); + stateman->SetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP); + stateman->SetVertexBuffer(util_vbuf->GetBuffer(), stride, offset); stateman->Apply(); context->Draw(4, clearq_offset); diff --git a/Source/Core/VideoBackends/D3D/LineGeometryShader.cpp b/Source/Core/VideoBackends/D3D/LineGeometryShader.cpp index 692f099ab7..cd2b11e2b3 100644 --- a/Source/Core/VideoBackends/D3D/LineGeometryShader.cpp +++ b/Source/Core/VideoBackends/D3D/LineGeometryShader.cpp @@ -224,8 +224,8 @@ bool LineGeometryShader::SetShader(u32 components, float lineWidth, DEBUG_LOG(VIDEO, "Line params: width %f, texOffset %f, vpWidth %f, vpHeight %f", lineWidth, texOffset, vpWidth, vpHeight); - D3D::stateman->setGeometryShader(shaderIt->second); - D3D::stateman->setGeometryConstants(m_paramsBuffer); + D3D::stateman->SetGeometryShader(shaderIt->second); + D3D::stateman->SetGeometryConstants(m_paramsBuffer); return true; } diff --git a/Source/Core/VideoBackends/D3D/NativeVertexFormat.cpp b/Source/Core/VideoBackends/D3D/NativeVertexFormat.cpp index bb83cba003..a0762578e1 100644 --- a/Source/Core/VideoBackends/D3D/NativeVertexFormat.cpp +++ b/Source/Core/VideoBackends/D3D/NativeVertexFormat.cpp @@ -138,7 +138,7 @@ void D3DVertexFormat::SetupVertexPointers() if (FAILED(hr)) PanicAlert("Failed to create input layout, %s %d\n", __FILE__, __LINE__); DX11::D3D::SetDebugObjectName((ID3D11DeviceChild*)m_layout, "input layout used to emulate the GX pipeline"); } - DX11::D3D::stateman->setInputLayout(m_layout); + DX11::D3D::stateman->SetInputLayout(m_layout); } } // namespace DX11 diff --git a/Source/Core/VideoBackends/D3D/PSTextureEncoder.cpp b/Source/Core/VideoBackends/D3D/PSTextureEncoder.cpp index aa90986bcc..408bb55ef3 100644 --- a/Source/Core/VideoBackends/D3D/PSTextureEncoder.cpp +++ b/Source/Core/VideoBackends/D3D/PSTextureEncoder.cpp @@ -1083,7 +1083,7 @@ size_t PSTextureEncoder::Encode(u8* dst, unsigned int dstFormat, if (SetStaticShader(dstFormat, srcFormat, isIntensity, scaleByHalf)) #endif { - D3D::stateman->setVertexShader(m_vShader); + D3D::stateman->SetVertexShader(m_vShader); D3D::stateman->PushBlendState(m_efbEncodeBlendState); D3D::stateman->PushDepthState(m_efbEncodeDepthState); @@ -1092,11 +1092,11 @@ size_t PSTextureEncoder::Encode(u8* dst, unsigned int dstFormat, D3D11_VIEWPORT vp = CD3D11_VIEWPORT(0.f, 0.f, FLOAT(cacheLinesPerRow*2), FLOAT(numBlocksY)); D3D::context->RSSetViewports(1, &vp); - D3D::stateman->setInputLayout(m_quadLayout); - D3D::stateman->setPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP); + D3D::stateman->SetInputLayout(m_quadLayout); + D3D::stateman->SetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP); UINT stride = sizeof(QuadVertex); UINT offset = 0; - D3D::stateman->setVertexBuffer(m_quad, stride, offset); + D3D::stateman->SetVertexBuffer(m_quad, stride, offset); EFBRectangle fullSrcRect; fullSrcRect.left = 0; @@ -1125,10 +1125,10 @@ size_t PSTextureEncoder::Encode(u8* dst, unsigned int dstFormat, // expecting the blurred edges around multisampled shapes. FramebufferManager::GetResolvedEFBColorTexture()->GetSRV(); - D3D::stateman->setVertexConstants(m_encodeParams); - D3D::stateman->setPixelConstants(m_encodeParams); - D3D::stateman->setTexture(0, pEFB); - D3D::stateman->setSampler(0, m_efbSampler); + D3D::stateman->SetVertexConstants(m_encodeParams); + D3D::stateman->SetPixelConstants(m_encodeParams); + D3D::stateman->SetTexture(0, pEFB); + D3D::stateman->SetSampler(0, m_efbSampler); // Encode! @@ -1144,13 +1144,13 @@ size_t PSTextureEncoder::Encode(u8* dst, unsigned int dstFormat, D3D::context->OMSetRenderTargets(0, nullptr, nullptr); - D3D::stateman->setSampler(0, nullptr); - D3D::stateman->setTexture(0, nullptr); - D3D::stateman->setPixelConstants(nullptr); - D3D::stateman->setVertexConstants(nullptr); + D3D::stateman->SetSampler(0, nullptr); + D3D::stateman->SetTexture(0, nullptr); + D3D::stateman->SetPixelConstants(nullptr); + D3D::stateman->SetVertexConstants(nullptr); - D3D::stateman->setPixelShader(nullptr); - D3D::stateman->setVertexBuffer(nullptr, 0, 0); + D3D::stateman->SetPixelShader(nullptr); + D3D::stateman->SetVertexBuffer(nullptr, 0, 0); D3D::stateman->PopRasterizerState(); D3D::stateman->PopDepthState(); @@ -1272,7 +1272,7 @@ bool PSTextureEncoder::SetStaticShader(unsigned int dstFormat, PEControl::PixelF { if (it->second) { - D3D::stateman->setPixelShader(it->second); + D3D::stateman->SetPixelShader(it->second); return true; } else @@ -1432,7 +1432,7 @@ bool PSTextureEncoder::SetDynamicShader(unsigned int dstFormat, if (m_generatorSlot != UINT(-1)) m_linkageArray[m_generatorSlot] = m_generatorClass[generatorNum]; - D3D::stateman->setPixelShaderDynamic(m_dynamicShader, + D3D::stateman->SetPixelShaderDynamic(m_dynamicShader, m_linkageArray.empty() ? nullptr : &m_linkageArray[0], (UINT)m_linkageArray.size()); diff --git a/Source/Core/VideoBackends/D3D/PointGeometryShader.cpp b/Source/Core/VideoBackends/D3D/PointGeometryShader.cpp index de2d0cd016..cfaca95cf3 100644 --- a/Source/Core/VideoBackends/D3D/PointGeometryShader.cpp +++ b/Source/Core/VideoBackends/D3D/PointGeometryShader.cpp @@ -218,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::stateman->setGeometryShader(shaderIt->second); - D3D::stateman->setGeometryConstants(m_paramsBuffer); + D3D::stateman->SetGeometryShader(shaderIt->second); + D3D::stateman->SetGeometryConstants(m_paramsBuffer); return true; } diff --git a/Source/Core/VideoBackends/D3D/Render.cpp b/Source/Core/VideoBackends/D3D/Render.cpp index 455d34ea57..da3ca92050 100644 --- a/Source/Core/VideoBackends/D3D/Render.cpp +++ b/Source/Core/VideoBackends/D3D/Render.cpp @@ -356,7 +356,7 @@ u32 Renderer::AccessEFB(EFBAccessType type, u32 x, u32 y, u32 poke_data) // depth buffers can only be completely CopySubresourceRegion'ed, so we're using drawShadedTexQuad instead D3D11_VIEWPORT vp = CD3D11_VIEWPORT(0.f, 0.f, 1.f, 1.f); D3D::context->RSSetViewports(1, &vp); - D3D::stateman->setPixelConstants(0, access_efb_cbuf); + D3D::stateman->SetPixelConstants(0, access_efb_cbuf); D3D::context->OMSetRenderTargets(1, &FramebufferManager::GetEFBDepthReadTexture()->GetRTV(), nullptr); D3D::SetPointCopySampler(); D3D::drawShadedTexQuad(FramebufferManager::GetEFBDepthTexture()->GetSRV(), @@ -1010,7 +1010,7 @@ void Renderer::ApplyState(bool bUseDstAlpha) { // TODO: cache SamplerState directly, not d3d object gx_state.sampler[stage].max_anisotropy = g_ActiveConfig.iMaxAnisotropy; - D3D::stateman->setSampler(stage, gx_state_cache.Get(gx_state.sampler[stage])); + D3D::stateman->SetSampler(stage, gx_state_cache.Get(gx_state.sampler[stage])); } if (bUseDstAlpha) @@ -1023,11 +1023,11 @@ void Renderer::ApplyState(bool bUseDstAlpha) ID3D11Buffer* vertexConstants = VertexShaderCache::GetConstantBuffer(); ID3D11Buffer* pixelConstants = PixelShaderCache::GetConstantBuffer(); - D3D::stateman->setPixelConstants(pixelConstants, g_ActiveConfig.bEnablePixelLighting ? vertexConstants : nullptr); - D3D::stateman->setVertexConstants(vertexConstants); + D3D::stateman->SetPixelConstants(pixelConstants, g_ActiveConfig.bEnablePixelLighting ? vertexConstants : nullptr); + D3D::stateman->SetVertexConstants(vertexConstants); - D3D::stateman->setPixelShader(PixelShaderCache::GetActiveShader()); - D3D::stateman->setVertexShader(VertexShaderCache::GetActiveShader()); + D3D::stateman->SetPixelShader(PixelShaderCache::GetActiveShader()); + D3D::stateman->SetVertexShader(VertexShaderCache::GetActiveShader()); } void Renderer::RestoreState() diff --git a/Source/Core/VideoBackends/D3D/Television.cpp b/Source/Core/VideoBackends/D3D/Television.cpp index 5a3b982645..ed54016ffd 100644 --- a/Source/Core/VideoBackends/D3D/Television.cpp +++ b/Source/Core/VideoBackends/D3D/Television.cpp @@ -151,7 +151,7 @@ void Television::Render() MathUtil::Rectangle sourceRc(0, 0, int(m_curWidth), int(m_curHeight)); MathUtil::Rectangle destRc(-1.f, 1.f, 1.f, -1.f); - D3D::stateman->setSampler(0, m_samplerState); + D3D::stateman->SetSampler(0, m_samplerState); D3D::drawShadedTexSubQuad( m_yuyvTextureSRV, &sourceRc, diff --git a/Source/Core/VideoBackends/D3D/TextureCache.cpp b/Source/Core/VideoBackends/D3D/TextureCache.cpp index 3312eb9d48..4ed4d6045f 100644 --- a/Source/Core/VideoBackends/D3D/TextureCache.cpp +++ b/Source/Core/VideoBackends/D3D/TextureCache.cpp @@ -30,7 +30,7 @@ TextureCache::TCacheEntry::~TCacheEntry() void TextureCache::TCacheEntry::Bind(unsigned int stage) { - D3D::stateman->setTexture(stage, texture->GetSRV()); + D3D::stateman->SetTexture(stage, texture->GetSRV()); } bool TextureCache::TCacheEntry::Save(const std::string& filename, unsigned int level) @@ -144,7 +144,7 @@ void TextureCache::TCacheEntry::FromRenderTarget(u32 dstAddr, unsigned int dstFo CHECK(SUCCEEDED(hr), "Create efb copy constant buffer %d", cbufid); D3D::SetDebugObjectName((ID3D11DeviceChild*)efbcopycbuf[cbufid], "a constant buffer used in TextureCache::CopyRenderTargetToTexture"); } - D3D::stateman->setPixelConstants(efbcopycbuf[cbufid]); + D3D::stateman->SetPixelConstants(efbcopycbuf[cbufid]); const TargetRectangle targetSource = g_renderer->ConvertEFBRectangle(srcRect); // TODO: try targetSource.asRECT(); diff --git a/Source/Core/VideoBackends/D3D/VertexManager.cpp b/Source/Core/VideoBackends/D3D/VertexManager.cpp index 55634cf087..3dee129969 100644 --- a/Source/Core/VideoBackends/D3D/VertexManager.cpp +++ b/Source/Core/VideoBackends/D3D/VertexManager.cpp @@ -128,15 +128,15 @@ void VertexManager::Draw(u32 stride) u32 components = VertexLoaderManager::GetCurrentVertexFormat()->m_components; u32 indices = IndexGenerator::GetIndexLen(); - D3D::stateman->setVertexBuffer(m_buffers[m_currentBuffer], stride, 0); - D3D::stateman->setIndexBuffer(m_buffers[m_currentBuffer]); + D3D::stateman->SetVertexBuffer(m_buffers[m_currentBuffer], stride, 0); + D3D::stateman->SetIndexBuffer(m_buffers[m_currentBuffer]); u32 baseVertex = m_vertexDrawOffset / stride; u32 startIndex = m_indexDrawOffset / sizeof(u16); if (current_primitive_type == PRIMITIVE_TRIANGLES) { - D3D::stateman->setPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP); + D3D::stateman->SetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP); D3D::stateman->Apply(); D3D::context->DrawIndexed(indices, startIndex, baseVertex); @@ -158,14 +158,14 @@ void VertexManager::Draw(u32 stride) if (m_lineShader.SetShader(components, lineWidth, texOffset, vpWidth, vpHeight, texOffsetEnable)) { - D3D::stateman->setPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_LINELIST); + D3D::stateman->SetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_LINELIST); D3D::stateman->Apply(); D3D::context->DrawIndexed(indices, startIndex, baseVertex); INCSTAT(stats.thisFrame.numDrawCalls); - D3D::stateman->setGeometryShader(nullptr); + D3D::stateman->SetGeometryShader(nullptr); } } else //if (current_primitive_type == PRIMITIVE_POINTS) @@ -183,14 +183,14 @@ void VertexManager::Draw(u32 stride) 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->Apply(); D3D::context->DrawIndexed(indices, startIndex, baseVertex); INCSTAT(stats.thisFrame.numDrawCalls); - D3D::stateman->setGeometryShader(nullptr); + D3D::stateman->SetGeometryShader(nullptr); } } } diff --git a/Source/Core/VideoBackends/D3D/XFBEncoder.cpp b/Source/Core/VideoBackends/D3D/XFBEncoder.cpp index 9f805d995c..fb56363e31 100644 --- a/Source/Core/VideoBackends/D3D/XFBEncoder.cpp +++ b/Source/Core/VideoBackends/D3D/XFBEncoder.cpp @@ -280,8 +280,8 @@ void XFBEncoder::Encode(u8* dst, u32 width, u32 height, const EFBRectangle& srcR // Set up all the state for XFB encoding - D3D::stateman->setPixelShader(m_pShader); - D3D::stateman->setVertexShader(m_vShader); + D3D::stateman->SetPixelShader(m_pShader); + D3D::stateman->SetVertexShader(m_vShader); D3D::stateman->PushBlendState(m_xfbEncodeBlendState); D3D::stateman->PushDepthState(m_xfbEncodeDepthState); @@ -290,11 +290,11 @@ void XFBEncoder::Encode(u8* dst, u32 width, u32 height, const EFBRectangle& srcR D3D11_VIEWPORT vp = CD3D11_VIEWPORT(0.f, 0.f, FLOAT(width/2), FLOAT(height)); D3D::context->RSSetViewports(1, &vp); - D3D::stateman->setInputLayout(m_quadLayout); - D3D::stateman->setPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP); + D3D::stateman->SetInputLayout(m_quadLayout); + D3D::stateman->SetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP); UINT stride = sizeof(QuadVertex); UINT offset = 0; - D3D::stateman->setVertexBuffer(m_quad, stride, offset); + D3D::stateman->SetVertexBuffer(m_quad, stride, offset); TargetRectangle targetRect = g_renderer->ConvertEFBRectangle(srcRect); @@ -312,10 +312,10 @@ void XFBEncoder::Encode(u8* dst, u32 width, u32 height, const EFBRectangle& srcR ID3D11ShaderResourceView* pEFB = FramebufferManager::GetEFBColorTexture()->GetSRV(); - D3D::stateman->setVertexConstants(m_encodeParams); - D3D::stateman->setPixelConstants(m_encodeParams); - D3D::stateman->setTexture(0, pEFB); - D3D::stateman->setSampler(0, m_efbSampler); + D3D::stateman->SetVertexConstants(m_encodeParams); + D3D::stateman->SetPixelConstants(m_encodeParams); + D3D::stateman->SetTexture(0, pEFB); + D3D::stateman->SetSampler(0, m_efbSampler); // Encode! @@ -331,13 +331,13 @@ void XFBEncoder::Encode(u8* dst, u32 width, u32 height, const EFBRectangle& srcR D3D::context->OMSetRenderTargets(0, nullptr, nullptr); - D3D::stateman->setSampler(0, nullptr); - D3D::stateman->setTexture(0, nullptr); - D3D::stateman->setPixelConstants(nullptr); - D3D::stateman->setVertexConstants(nullptr); + D3D::stateman->SetSampler(0, nullptr); + D3D::stateman->SetTexture(0, nullptr); + D3D::stateman->SetPixelConstants(nullptr); + D3D::stateman->SetVertexConstants(nullptr); - D3D::stateman->setPixelShader(nullptr); - D3D::stateman->setVertexShader(nullptr); + D3D::stateman->SetPixelShader(nullptr); + D3D::stateman->SetVertexShader(nullptr); D3D::stateman->PopRasterizerState(); D3D::stateman->PopDepthState();