mirror of
https://github.com/mpv-player/mpv
synced 2024-11-18 21:16:10 +01:00
vo_opengl: don't call glGetProgramBinary if GL_PROGRAM_BINARY_LENGTH==0
Noticed in #4717, although the issue might be about something else.
This commit is contained in:
parent
3f75b3c343
commit
0b10a07b63
@ -687,8 +687,10 @@ static GLuint load_program(struct ra *ra, const struct ra_renderpass_params *p,
|
||||
uint8_t *buffer = talloc_size(NULL, size + 4);
|
||||
GLsizei actual_size = 0;
|
||||
GLenum binary_format = 0;
|
||||
gl->GetProgramBinary(prog, size, &actual_size, &binary_format,
|
||||
buffer + 4);
|
||||
if (size > 0) {
|
||||
gl->GetProgramBinary(prog, size, &actual_size, &binary_format,
|
||||
buffer + 4);
|
||||
}
|
||||
AV_WL32(buffer, binary_format);
|
||||
if (actual_size) {
|
||||
*out_cached_data = (bstr){buffer, actual_size + 4};
|
||||
|
Loading…
Reference in New Issue
Block a user