Skip to content

Commit

Permalink
Merge pull request #82359 from bitsawer/add_gles3_device_cache_key
Browse files Browse the repository at this point in the history
Add device info to GLES3 shader cache key hash
  • Loading branch information
akien-mga committed Sep 26, 2023
2 parents 92ac0e5 + f1062f2 commit 36945da
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions drivers/gles3/shader_gles3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,14 @@ void ShaderGLES3::_setup(const char *p_vertex_code, const char *p_fragment_code,
tohash.append("[Fragment]");
tohash.append(p_fragment_code ? p_fragment_code : "");

tohash.append("[gl_implementation]");
const char *vendor = (const char *)glGetString(GL_VENDOR);
tohash.append(vendor ? vendor : "unknown");
const char *renderer = (const char *)glGetString(GL_RENDERER);
tohash.append(renderer ? renderer : "unknown");
const char *version = (const char *)glGetString(GL_VERSION);
tohash.append(version ? version : "unknown");

base_sha256 = tohash.as_string().sha256_text();
}

Expand Down

0 comments on commit 36945da

Please sign in to comment.