From 876d789ad5c83029c72f1caeb5a586088ef07225 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Thu, 30 Nov 2023 16:38:25 +0100 Subject: render/gles2: reword wlr_gles2_texture comments These comments were a bit misleading: - "GL_TEXTURE_2D == mutable": not really, imported non-external-only DMA-BUFs would also use this target, but are not mutable. - "Only affects target == GL_TEXTURE_2D": same here. - "If imported from a wlr_buffer": not really, would be NULL if imported from a shm wlr_buffer. Adjust these comments to better reflect reality and adjust the check in gles2_texture_update_from_buffer(). --- render/gles2/texture.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'render') diff --git a/render/gles2/texture.c b/render/gles2/texture.c index 51c6290d..3c9720c1 100644 --- a/render/gles2/texture.c +++ b/render/gles2/texture.c @@ -32,7 +32,7 @@ static bool gles2_texture_update_from_buffer(struct wlr_texture *wlr_texture, struct wlr_buffer *buffer, const pixman_region32_t *damage) { struct wlr_gles2_texture *texture = gles2_get_texture(wlr_texture); - if (texture->target != GL_TEXTURE_2D || texture->buffer) { + if (texture->drm_format == DRM_FORMAT_INVALID) { return false; } -- cgit v1.2.3