mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-14 00:28:20 -05:00
Permit a Null Shader in case of a bad host_ptr.
This commit is contained in:
committed by
FernandoS27
parent
47f2405ab1
commit
021cd56bc9
@ -41,6 +41,10 @@ GPUVAddr GetShaderAddress(Maxwell::ShaderProgram program) {
|
||||
/// Gets the shader program code from memory for the specified address
|
||||
ProgramCode GetShaderCode(const u8* host_ptr) {
|
||||
ProgramCode program_code(VideoCommon::Shader::MAX_PROGRAM_LENGTH);
|
||||
ASSERT_OR_EXECUTE(host_ptr != nullptr, {
|
||||
std::fill(program_code.begin(), program_code.end(), 0);
|
||||
return program_code;
|
||||
});
|
||||
std::memcpy(program_code.data(), host_ptr, program_code.size() * sizeof(u64));
|
||||
return program_code;
|
||||
}
|
||||
|
Reference in New Issue
Block a user