aboutsummaryrefslogtreecommitdiff
path: root/render/gles2
AgeCommit message (Collapse)Author
2019-12-20Refactor EGL/GL API loadingSimon Ser
Remove glapi.sh code generation, replace it with hand-written loading code that checks extension strings before calling eglGetProcAddress. The GLES2 renderer still uses global state because of: - {PUSH,POP}_GLES2_DEBUG macros - wlr_gles2_texture_from_* taking a wlr_egl instead of the renderer
2019-11-26render/gles2: do not set GL_TEXTURE_MAG_FILTERRonan Pigott
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-11Introduce wlr_renderer_get_eglDrew DeVault
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-08-31render/gles2: fix calculation for partial gles2 pixel read (#1809)Filip Sandborg
2019-05-07render/gles2: print GL_RENDERERSimon Ser
This is often the name of the GPU and can help debugging graphics issues.
2019-04-01render: switch wlr_renderer to wlr_drm_format_setemersion
2019-03-01meson: enable more compiler warningsemersion
2019-01-29Require libdrm >= 2.4.95emersion
2018-12-21Standardize the wlr_box input paramatersTimidger
Fixes #1094
2018-11-04render/gles2: check for GL_OES_EGL_image_externalemersion
2018-11-04render/gles2: remove assumptions about supported formatsemersion
We were assuming GL_BGRA_EXT was always supported. We now check that it's supported for rendering. We fail if it isn't because this format is specified as "always supported" by the Wayland protocol. We also check if it's supported for reading pixels. A new preferred_read_format function returns the preferred format that can be used to read pixels. This is used by the screencopy protocol.
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-13Revert "Move side-effect out of assert statement"Drew DeVault
This reverts commit a0afedcd8fbeb2013252e629d524aa83cdd9326e.
2018-07-13Move side-effect out of assert statementDrew DeVault
2018-07-12render: add wlr_texture_is_opaqueemersion
2018-07-09util: add wlr_ prefix to log symbolsemersion
2018-06-30render/gles2: ditch extra parensemersion
2018-06-30screencopy: add capture_output_region supportemersion
2018-06-30screencopy: add support for frame flagsemersion
2018-06-17Merge branch 'master' into screencontentemersion
2018-06-13Merge pull request #1047 from NotKit/gles2fixemersion
Fix GLES2 renderer to use glGetUniformLocations locations
2018-06-13gles2 renderer: introduce struct wlr_gles2_tex_shaderNeKit
2018-06-09Rename egl.exts to match the extension namesVincent Vanlaer
2018-06-08render/egl: only request high priority context on DRMemersion
2018-06-07Fix GLES2 renderer to use glGetUniformLocations locationsNeKit
This is needed as uniform locations are driver implementation-specific.
2018-05-31Merge pull request #1020 from emersion/remove-check-dmabufemersion
render: remove wlr_renderer_check_import_dmabuf
2018-05-31Merge branch 'master' into screencontentemersion
2018-05-30cleanup: Use void for zero-parameter functionsGenki Sky
Signed-off-by: Genki Sky <sky@genki.is>
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-05-21render: bind wl_drm in rendereremersion
2018-05-18gles2: pre-multiply alpha and fix blending functionIlia Bozhinov
2018-05-15Fix alpha for src_rgba and src_rgbxBrian Ashworth
2018-04-25Make sure we don't use others' prefixesemersion
2018-04-25render/egl: allow passing NULL to surface and image destructorsemersion
2018-04-12Make wlr_renderer_scissor take normal coords instead of upside-down onesemersion
2018-04-08backend: remove wlr_backend_get_eglemersion
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-31Untie wlr_backend from wlr_rendereremersion
2018-03-31Downgrade gles2 messages to L_DEBUGDrew DeVault
L_INFO is for stuff that's useful to the user
2018-03-31Fix build error with -O2Orestis Floros
../render/gles2/renderer.c: In function ‘gles2_render_texture_with_matrix’: ../render/gles2/renderer.c:140:2: error: ‘target’ may be used uninitialized in this function [-Werror=maybe-uninitialized] glBindTexture(target, tex_id); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../render/gles2/renderer.c:145:2: error: ‘prog’ may be used uninitialized in this function [-Werror=maybe-uninitialized] glUseProgram(prog);
2018-03-28Merge pull request #744 from emersion/texture-redesignTony Crisci
Redesign wlr_texture