mirror of
https://github.com/yuzu-mirror/yuzu.git
synced 2024-11-08 15:19:58 +00:00
gl_shader_cache: Add commentaries explaining the intention in shaders creation
This commit is contained in:
parent
838b6d2ff8
commit
ad321564ed
1 changed files with 2 additions and 0 deletions
|
@ -573,9 +573,11 @@ Shader ShaderCacheOpenGL::GetStageProgram(Maxwell::ShaderProgram program) {
|
||||||
const VAddr cpu_addr{*memory_manager.GpuToCpuAddress(program_addr)};
|
const VAddr cpu_addr{*memory_manager.GpuToCpuAddress(program_addr)};
|
||||||
const auto found = precompiled_shaders.find(unique_identifier);
|
const auto found = precompiled_shaders.find(unique_identifier);
|
||||||
if (found != precompiled_shaders.end()) {
|
if (found != precompiled_shaders.end()) {
|
||||||
|
// Create a shader from the cache
|
||||||
shader = std::make_shared<CachedShader>(cpu_addr, unique_identifier, program, disk_cache,
|
shader = std::make_shared<CachedShader>(cpu_addr, unique_identifier, program, disk_cache,
|
||||||
precompiled_programs, found->second, host_ptr);
|
precompiled_programs, found->second, host_ptr);
|
||||||
} else {
|
} else {
|
||||||
|
// Create a shader from guest memory
|
||||||
shader = std::make_shared<CachedShader>(
|
shader = std::make_shared<CachedShader>(
|
||||||
device, cpu_addr, unique_identifier, program, disk_cache, precompiled_programs,
|
device, cpu_addr, unique_identifier, program, disk_cache, precompiled_programs,
|
||||||
std::move(program_code), std::move(program_code_b), host_ptr);
|
std::move(program_code), std::move(program_code_b), host_ptr);
|
||||||
|
|
Loading…
Reference in a new issue