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(). --- include/render/gles2.h | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'include/render') diff --git a/include/render/gles2.h b/include/render/gles2.h index 58972675..60bf4d17 100644 --- a/include/render/gles2.h +++ b/include/render/gles2.h @@ -118,19 +118,14 @@ struct wlr_gles2_texture { struct wlr_gles2_renderer *renderer; struct wl_list link; // wlr_gles2_renderer.textures - // Basically: - // GL_TEXTURE_2D == mutable - // GL_TEXTURE_EXTERNAL_OES == immutable GLenum target; bool owns_tex; GLuint tex; bool has_alpha; - // Only affects target == GL_TEXTURE_2D - uint32_t drm_format; // used to interpret upload data - // If imported from a wlr_buffer - struct wlr_gles2_buffer *buffer; + uint32_t drm_format; // for mutable textures only, used to interpret upload data + struct wlr_gles2_buffer *buffer; // for DMA-BUF imports only }; struct wlr_gles2_render_pass { -- cgit v1.2.3