From a523a6d1bfabddbd2030dda1aebf28ddb28b5f26 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 7 Jul 2014 19:28:12 -0400 Subject: D3D: Use std::strings for Compile[x]Shader and CompileAndCreate[x]Shader With strings, we don't need to care about passing in a length, since it internally stores it. So now, we don't even need a length parameter for these functions anymore as well. This also kills off some sprintf_s calls. --- Source/Core/VideoBackends/D3D/PSTextureEncoder.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Source/Core/VideoBackends/D3D/PSTextureEncoder.cpp') diff --git a/Source/Core/VideoBackends/D3D/PSTextureEncoder.cpp b/Source/Core/VideoBackends/D3D/PSTextureEncoder.cpp index 8393c2148c..fd1bd8a76d 100644 --- a/Source/Core/VideoBackends/D3D/PSTextureEncoder.cpp +++ b/Source/Core/VideoBackends/D3D/PSTextureEncoder.cpp @@ -929,7 +929,7 @@ void PSTextureEncoder::Init() // Create vertex shader D3DBlob* bytecode = nullptr; - if (!D3D::CompileVertexShader(EFB_ENCODE_VS, sizeof(EFB_ENCODE_VS), &bytecode)) + if (!D3D::CompileVertexShader(EFB_ENCODE_VS, &bytecode)) { ERROR_LOG(VIDEO, "EFB encode vertex shader failed to compile"); return; @@ -1254,7 +1254,7 @@ bool PSTextureEncoder::SetStaticShader(unsigned int dstFormat, PEControl::PixelF { "IMP_GENERATOR", generatorFuncName }, { nullptr, nullptr } }; - if (!D3D::CompilePixelShader(EFB_ENCODE_PS, sizeof(EFB_ENCODE_PS), &bytecode, macros)) + if (!D3D::CompilePixelShader(EFB_ENCODE_PS, &bytecode, macros)) { WARN_LOG(VIDEO, "EFB encoder shader for dstFormat 0x%X, srcFormat %d, isIntensity %d, scaleByHalf %d failed to compile", dstFormat, static_cast(srcFormat), isIntensity ? 1 : 0, scaleByHalf ? 1 : 0); @@ -1296,7 +1296,7 @@ bool PSTextureEncoder::InitDynamicMode() }; D3DBlob* bytecode = nullptr; - if (!D3D::CompilePixelShader(EFB_ENCODE_PS, sizeof(EFB_ENCODE_PS), &bytecode, macros)) + if (!D3D::CompilePixelShader(EFB_ENCODE_PS, &bytecode, macros)) { ERROR_LOG(VIDEO, "EFB encode pixel shader failed to compile"); return false; -- cgit v1.2.3