summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2019-07-26 19:27:55 -0400
committerLioncash <mathew1800@gmail.com>2019-07-26 19:45:33 -0400
commit0ce6264f90e5591a7f28b2545f727809beaa8415 (patch)
tree9099a365242b997b4c592fabdc927914d01dbab6 /Source/Core
parent287b446ef73d9da392ea917fd5efbd15b11da4de (diff)
D3DCommon/Shader: Create vector via iterators in CreateByteCode()
Same behavior, but without unnecessary zeroing of data contents. Instead, we supply the dataset to use directly.
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/VideoBackends/D3DCommon/Shader.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/Core/VideoBackends/D3DCommon/Shader.cpp b/Source/Core/VideoBackends/D3DCommon/Shader.cpp
index 268f75370c..81d88c0968 100644
--- a/Source/Core/VideoBackends/D3DCommon/Shader.cpp
+++ b/Source/Core/VideoBackends/D3DCommon/Shader.cpp
@@ -132,9 +132,10 @@ bool Shader::CompileShader(D3D_FEATURE_LEVEL feature_level, BinaryData* out_byte
AbstractShader::BinaryData Shader::CreateByteCode(const void* data, size_t length)
{
- BinaryData bytecode(length);
- std::memcpy(bytecode.data(), data, length);
- return bytecode;
+ const auto* const begin = static_cast<const u8*>(data);
+ const auto* const end = begin + length;
+
+ return {begin, end};
}
} // namespace D3DCommon