Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.2] Fix shader cache with transform feedback on some Android devices #88549

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions drivers/gles3/shader_gles3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -584,6 +584,19 @@ bool ShaderGLES3::_load_from_cache(Version *p_version) {
Version::Specialization specialization;

specialization.id = glCreateProgram();
if (feedback_count) {
Vector<const char *> feedback;
for (int i = 0; i < feedback_count; i++) {
if (feedbacks[i].specialization == 0 || (feedbacks[i].specialization & specialization_key)) {
// Specialization for this feedback is enabled
feedback.push_back(feedbacks[i].name);
}
}

if (feedback.size()) {
glTransformFeedbackVaryings(specialization.id, feedback.size(), feedback.ptr(), GL_INTERLEAVED_ATTRIBS);
}
}
glProgramBinary(specialization.id, variant_format, variant_bytes.ptr(), variant_bytes.size());

GLint link_status = 0;
Expand Down