aboutsummaryrefslogtreecommitdiff
path: root/src/window_texture.c
diff options
context:
space:
mode:
authorSteam Deck User <deck@arch.steamdeck>2023-03-16 13:36:19 +0100
committerdec05eba <dec05eba@protonmail.com>2023-03-17 11:44:51 +0100
commit8cbdb596ebf79587a432ed40583630b6cd39ed88 (patch)
tree82c60558aaaa7a1fc1eb9ffc388f1dd84a9529d2 /src/window_texture.c
parent689419a78238626aba887e974cbfcf5dff99de81 (diff)
vaapi wip
Diffstat (limited to 'src/window_texture.c')
-rw-r--r--src/window_texture.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/window_texture.c b/src/window_texture.c
index 72a2474..df34a37 100644
--- a/src/window_texture.c
+++ b/src/window_texture.c
@@ -85,8 +85,10 @@ int window_texture_on_resize(WindowTexture *self) {
self->egl->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
self->egl->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
- self->egl->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
- self->egl->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+ self->egl->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
+ self->egl->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
+
+ while(self->egl->eglGetError() != EGL_SUCCESS) {}
image = self->egl->eglCreateImage(self->egl->egl_display, NULL, EGL_NATIVE_PIXMAP_KHR, (EGLClientBuffer)pixmap, pixmap_attrs);
if(!image) {
@@ -95,7 +97,7 @@ int window_texture_on_resize(WindowTexture *self) {
}
self->egl->glEGLImageTargetTexture2DOES(GL_TEXTURE_2D, image);
- if(self->egl->glGetError() != 0) {
+ if(self->egl->glGetError() != 0 || self->egl->eglGetError() != EGL_SUCCESS) {
result = 5;
goto cleanup;
}