mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-28 11:49:06 +00:00
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.
This commit is contained in:
parent
287b446ef7
commit
0ce6264f90
1 changed files with 4 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue