mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-07-04 23:31:19 +01:00
gl_shader_cache: Remove unused program_code vector in GetShaderAddress()
Given std::vector is a type with a non-trivial destructor, this variable cannot be optimized away by the compiler, even if unused. Because of that, something that was intended to be fairly lightweight, was actually allocating 32KB and deallocating it at the end of the function.
This commit is contained in:
parent
ffe2336136
commit
2e7dc4cac9
1 changed files with 1 additions and 2 deletions
|
@ -14,9 +14,8 @@ namespace OpenGL {
|
||||||
/// Gets the address for the specified shader stage program
|
/// Gets the address for the specified shader stage program
|
||||||
static Tegra::GPUVAddr GetShaderAddress(Maxwell::ShaderProgram program) {
|
static Tegra::GPUVAddr GetShaderAddress(Maxwell::ShaderProgram program) {
|
||||||
auto& gpu = Core::System::GetInstance().GPU().Maxwell3D();
|
auto& gpu = Core::System::GetInstance().GPU().Maxwell3D();
|
||||||
|
|
||||||
GLShader::ProgramCode program_code(GLShader::MAX_PROGRAM_CODE_LENGTH);
|
|
||||||
auto& shader_config = gpu.regs.shader_config[static_cast<size_t>(program)];
|
auto& shader_config = gpu.regs.shader_config[static_cast<size_t>(program)];
|
||||||
|
|
||||||
return gpu.regs.code_address.CodeAddress() + shader_config.offset;
|
return gpu.regs.code_address.CodeAddress() + shader_config.offset;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue