aboutsummaryrefslogtreecommitdiff
path: root/render/gles2/texture.c
AgeCommit message (Collapse)Author
2019-11-20Add -Wmissing-prototypesSimon Ser
This requires functions without a prototype definition to be static. This allows to detect dead code, export less symbols and put shared functions in headers.
2019-11-07render/gles2: provide public API to access GL textureSimon Ser
Prior to this commit, compositors needed to render the texture to an intermediate off-screen buffer using wlr_renderer APIs if they wanted to use a custom rendering path (e.g. render to a 3D scene). A new wlr_gles2_texture_get_attribs exposes the GL texture target and ID so that compositors can render wlr_textures with their own shaders. An example of a compositor doing so is available at [1]. [1]: https://git.sr.ht/~sircmpwn/wxrc/tree/3db905b7842ac42cf1878876e647005b41f00a52/src/render.c#L227
2019-11-06render/gles: Simplify textures a bitScott Anderson
We don't need our own enum for types. Instead we just use GL_TEXTURE_{2D,EXTERNAL_OES}, which already describes usage. Also fixes a situation where we were using GL_TEXTURE_2D in a situation we should not have. wl_drm buffers are always GL_TEXTURE_EXTERNAL_OES, no matter if they're RGB or any other format.
2019-10-16render/gles2: don't unset the current EGL surface when destroying textureSimon Ser
When a texture is destroyed between wlr_egl_make_current and wlr_egl_swap_buffers, it resets the current EGL surface to NULL. This makes wlr_egl_swap_buffers fail. If the EGL context is already current, there's no need to reset it.
2019-01-29Require libdrm >= 2.4.95emersion
2018-10-16Use enum wl_shm_format for gles2 texture formatsnyorain
Also rephrase the write_pixels comment.
2018-10-15Remove fmt parameter from wlr_texture_write_pixelsnyorain
It's not allowed to change the format of a texture so remove the confusing parameter.
2018-08-03gles2: change context when it is not currentMariusz Bialonczyk
Texture functions, that create and manipulate textures should switch the current context if necessary. thanks to: @emersion Fixes #934
2018-07-12render: add wlr_texture_is_opaqueemersion
2018-07-09util: add wlr_ prefix to log symbolsemersion
2018-06-17Merge branch 'master' into screencontentemersion
2018-06-09Rename egl.exts to match the extension namesVincent Vanlaer
2018-06-08render/egl: only request high priority context on DRMemersion
2018-05-31Merge branch 'master' into screencontentemersion
2018-05-30render: remove wlr_renderer_check_import_dmabufemersion
It's possible to implement it outside the renderer, by creating a texture and destroying it right away. This reduces the API surface of the renderer.
2018-05-30Only allow one modifier per DMA-BUF, split attributes struct in render/emersion
2018-05-29render: add wlr_texture_to_dmabufemersion
2018-04-25Make sure we don't use others' prefixesemersion
2018-04-25render/egl: allow passing NULL to surface and image destructorsemersion
2018-04-01Untie wlr_gles2_renderer and wlr_gles2_textureemersion
2018-03-31render/egl: add wlr_egl_create_image_from_wl_drmemersion
This allows external renderers and potential future GL-based renderers to re-use this function.
2018-03-24Redesign wlr_textureemersion
- Textures are now immutable (apart from those created from raw pixels), no more invalid textures - Move all wl_drm stuff in wlr_renderer - Most of wlr_texture fields are now private - Remove some duplicated DMA-BUF code in the DRM backend - Add more assertions - Stride is now always given as bytes rather than pixels - Drop wl_shm functions Fun fact: this patch has been written 10,000 meters up in the air.
2018-03-23linux-dmabuf: Support multi plane formats like NV12Guido Günther
2018-03-23Merge branch 'master' into gles2-renderer-redesignemersion
2018-03-21render/egl: use EGL_KHR_debugemersion
2018-03-20render/gles2: remove global state, use OpenGL debug extensionemersion
2018-03-20gles2_texture_bind: use texture's target typeGuido Günther
Hardcoding GL_TEXTURE_2D leads to rendering errors when using GL_TEXTURE_EXTERNAL_OES textures.
2018-03-20gles2: allow to specify texture target typeGuido Günther
Allow to set the texture target type when generating/binding the texture. This allows us to attach the texture type to the texture so we don't have to keep the logic elsewhere.
2018-03-19render: split render.h into wlr_renderer.h and wlr_texture.hemersion
2018-03-17Merge pull request #722 from emersion/matrix-redesignDrew DeVault
Matrix redesign
2018-03-15renderer: replace wlr_texture_get_matrix by wlr_render_textureemersion
2018-03-15render/gles2: don't set inverted_y when EGL_WAYLAND_Y_INVERTED_WL is unsupportedemersion
2018-03-15Merge branch 'master' into matrix-redesignemersion
2018-03-15matrix: use 2D matricesemersion
2018-03-15Add initial linux_dmabuf protocol supportGuido Günther
Tested with ./weston-simple-dmabuf-drm ./weston-simple-dmabuf-drm --import-immediate=1 ./weston-simple-dmabuf-drm --y-inverted=1 (and combinations) Supports only single plane XRGB dmabufs for now.
2018-03-15matrix: unify API, don't use array pointersemersion
2018-03-15matrix: move to types/emersion
2018-03-11render: Flip textures in case of inverted_yGuido Günther
2018-02-28textures: tell us which texture format is unsupportedGuido Günther
2018-02-12Reformat all #include directivesemersion
2018-02-12Make wlr_signal_emit_safe privateemersion
2018-02-12Add wlr_signal_emit_safeemersion
2017-10-22Move egl.h to render/egl.hScott Anderson
2017-10-01Multi-GPU DRMScott Anderson
2017-09-28Add xwayland activate and fix EGL bugDrew DeVault
2017-08-19wlr renderer/texture: rename init to create when it does allocDominique Martinet
2017-08-15Merge pull request #88 from 4e554c4c/alloc_crashingDrew DeVault
Prevent alloc errors from crashing
2017-08-15implement get_buffer_size for egl buffersTony Crisci
2017-08-15implement texture get buffer sizeTony Crisci
2017-08-15Prevent alloc errors from crashingCalvin Lee
Resolves #76