mirror of
https://repo.dec05eba.com/gpu-screen-recorder
synced 2026-03-31 09:07:13 +09:00
Regression fix: hevc_10bit broken
This commit is contained in:
@@ -257,6 +257,7 @@ struct gsr_egl {
|
|||||||
void (*glTexParameterfv)(unsigned int target, unsigned int pname, const float *params);
|
void (*glTexParameterfv)(unsigned int target, unsigned int pname, const float *params);
|
||||||
void (*glTexImage2D)(unsigned int target, int level, int internalFormat, int width, int height, int border, unsigned int format, unsigned int type, const void *pixels);
|
void (*glTexImage2D)(unsigned int target, int level, int internalFormat, int width, int height, int border, unsigned int format, unsigned int type, const void *pixels);
|
||||||
void (*glTexSubImage2D)(unsigned int target, int level, int xoffset, int yoffset, int width, int height, unsigned format, unsigned type, const void *pixels);
|
void (*glTexSubImage2D)(unsigned int target, int level, int xoffset, int yoffset, int width, int height, unsigned format, unsigned type, const void *pixels);
|
||||||
|
void (*glTexStorage2D)(unsigned int target, int levels, unsigned int internalformat, int width, int height);
|
||||||
void (*glGetTexImage)(unsigned int target, int level, unsigned int format, unsigned int type, void *pixels);
|
void (*glGetTexImage)(unsigned int target, int level, unsigned int format, unsigned int type, void *pixels);
|
||||||
void (*glGenFramebuffers)(int n, unsigned int *framebuffers);
|
void (*glGenFramebuffers)(int n, unsigned int *framebuffers);
|
||||||
void (*glBindFramebuffer)(unsigned int target, unsigned int framebuffer);
|
void (*glBindFramebuffer)(unsigned int target, unsigned int framebuffer);
|
||||||
|
|||||||
@@ -282,6 +282,7 @@ static bool gsr_egl_load_gl(gsr_egl *self, void *library) {
|
|||||||
{ (void**)&self->glTexParameterfv, "glTexParameterfv" },
|
{ (void**)&self->glTexParameterfv, "glTexParameterfv" },
|
||||||
{ (void**)&self->glTexImage2D, "glTexImage2D" },
|
{ (void**)&self->glTexImage2D, "glTexImage2D" },
|
||||||
{ (void**)&self->glTexSubImage2D, "glTexSubImage2D" },
|
{ (void**)&self->glTexSubImage2D, "glTexSubImage2D" },
|
||||||
|
{ (void**)&self->glTexStorage2D, "glTexStorage2D" },
|
||||||
{ (void**)&self->glGetTexImage, "glGetTexImage" },
|
{ (void**)&self->glGetTexImage, "glGetTexImage" },
|
||||||
{ (void**)&self->glGenFramebuffers, "glGenFramebuffers" },
|
{ (void**)&self->glGenFramebuffers, "glGenFramebuffers" },
|
||||||
{ (void**)&self->glBindFramebuffer, "glBindFramebuffer" },
|
{ (void**)&self->glBindFramebuffer, "glBindFramebuffer" },
|
||||||
|
|||||||
@@ -631,7 +631,9 @@ unsigned int gl_create_texture(gsr_egl *egl, int width, int height, int internal
|
|||||||
unsigned int texture_id = 0;
|
unsigned int texture_id = 0;
|
||||||
egl->glGenTextures(1, &texture_id);
|
egl->glGenTextures(1, &texture_id);
|
||||||
egl->glBindTexture(GL_TEXTURE_2D, texture_id);
|
egl->glBindTexture(GL_TEXTURE_2D, texture_id);
|
||||||
egl->glTexImage2D(GL_TEXTURE_2D, 0, internal_format, width, height, 0, format, GL_UNSIGNED_BYTE, NULL);
|
//egl->glTexImage2D(GL_TEXTURE_2D, 0, internal_format, width, height, 0, format, GL_UNSIGNED_BYTE, NULL);
|
||||||
|
// Needed for hevc_10bit for nvenc (cuGraphicsGLRegisterImage)
|
||||||
|
egl->glTexStorage2D(GL_TEXTURE_2D, 1, internal_format, width, height);
|
||||||
|
|
||||||
egl->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, filter);
|
egl->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, filter);
|
||||||
egl->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, filter);
|
egl->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, filter);
|
||||||
|
|||||||
Reference in New Issue
Block a user