aboutsummaryrefslogtreecommitdiff
path: root/include/render
AgeCommit message (Collapse)Author
2020-12-03render/drm_format_set: introduce wlr_drm_format_intersectSimon Ser
Intersects modifiers from two wlr_drm_format structs. If either format doesn't support modifiers, the resulting format won't support modifiers.
2020-11-30render: introduce wlr_renderer_get_dmabuf_render_formatsSimon Ser
It describes which DMA-BUF formats can be used to render.
2020-11-15render: introduce wlr_renderer_get_drm_fdSimon Ser
2020-11-15render/swapchain: add support for buffer ageSimon Ser
2020-11-15render/gles2: implement wlr_renderer_bind_bufferSimon Ser
2020-11-15render: introduce wlr_renderer_bind_bufferSimon Ser
2020-11-15render: introduce wlr_swapchainSimon Ser
The swapchain maximum capacity is set to 4, so that we have enough room for: - A buffer currently displayed on screen - A buffer queued for display (e.g. to KMS) - A pending buffer that'll be queued next commit - An additional pending buffer in case we want to invalidate the currently pending one
2020-11-15render/drm_format_set: introduce wlr_drm_format_dupSimon Ser
2020-11-15render: introduce wlr_gbm_allocatorSimon Ser
2020-11-15render: introduce wlr_allocatorSimon Ser
2020-07-28render/gles2: remove gles2_procsSimon Ser
Move the global into wlr_gles2_renderer. This removes global state and allows us to have multiple renderers with different GL loaders.
2020-07-28render/gles2: make push/pop debug functions take a wlr_rendererSimon Ser
2020-07-28render/gles2: keep ref to wlr_gles2_renderer in wlr_gles2_textureSimon Ser
2020-07-28render/gles2: make wlr_gles2_texture_from_* privateSimon Ser
These functions are unused by compositors (see e.g. [1]) and prevent wlr_gles2_texture from accessing wlr_gles2_renderer state. This is an issue for proper teardown [2] and for accessing GLES2 extensions. [1]: https://github.com/swaywm/wlroots/pull/1962#issuecomment-569511830 [2]: https://github.com/swaywm/wlroots/pull/1962
2020-06-24render/gles2: use glGetAttribLocation instead of hardcoded indicesSimon Zeni
2020-06-08render: Add wlr_renderer_blit_dmabuf()Andri Yngvason
2020-04-28render/texture: add width and height fieldsSimon Ser
Instead of requiring compositors to call wlr_texture_get_size each time they want to access the texture's size, expose this information as wlr_texture fields.
2020-04-22render/gles2: add wlr_gles2_renderer_check_extSimon Ser
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-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-07-17Use -fmacro-prefix-map to strip build pathManuel Stoeckl
This commit matches sway's 2dc4978d8af326c310057ca8fd22a4c7f5d09335. To help ensure a reproducible build (when debug info is disabled), the meson build script now uses the -fmacro-prefix-map command line argument supported by GCC to strip the build-path dependent bytes of each __FILE__ string used by wlr_log and related functions. A rather ugly algorithm is used to compute the relative path between the build and source folders, because meson has no specific function for this. When the compiler does not support -fmacro-prefix-map, fall back to shifting the start of each __FILE__ string by the length of the relative path to the source directory.
2019-04-22Fix missing headers when building without X11Alyssa Ross
The deleted includes are redundant, because other headers will include the necessary files. Additionally, they cause build failures, because including EGL/egl.h or EGL/eglext.h directly, instead of through wlr/render/egl.h or wlr/render/interface.h, will mean that MESA_EGL_NO_X11_HEADERS will not have been defined, and so the EGL headers will attempt to pull in unnecessary X11 headers that may not exist on the system. For the headers produced by glgen.sh, the includes couldn't simply be deleted, because no other header would include the EGL headers. Neither wlr/render/egl.h or wlr/render/interface.h felt appropriate to include, so I opted instead to copy the MESA_EGL_NO_X11_HEADERS definition before the EGL includes.
2019-02-28Remove glEGLImageTargetTexture2DOESGuido Günther
It's declared via render/glapi.txt.
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-09util: add wlr_ prefix to log symbolsemersion
2018-06-13gles2 renderer: introduce struct wlr_gles2_tex_shaderNeKit
2018-06-07Fix GLES2 renderer to use glGetUniformLocations locationsNeKit
This is needed as uniform locations are driver implementation-specific.
2018-04-25Make sure we don't use others' prefixesemersion
2018-04-12Make wlr_renderer_scissor take normal coords instead of upside-down onesemersion
2018-04-01Untie wlr_gles2_renderer and wlr_gles2_textureemersion
2018-03-28Merge pull request #744 from emersion/texture-redesignTony Crisci
Redesign wlr_texture
2018-03-27render: remove GL calls from wlr_eglemersion
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-21render/gles2: move list of supported WL formats to pixel_format.cemersion
2018-03-20render/gles2: remove global state, use OpenGL debug extensionemersion
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-02-21Rename _strip_path to wlr_strip_pathGuido Günther
since it's a public function
2018-02-12Reformat all #include directivesemersion
2017-10-22Move egl.h to render/egl.hScott Anderson
2017-09-23Use more consistent include guard namesemersion
2017-08-19wlr renderer/texture: rename init to create when it does allocDominique Martinet
2017-08-14Refactor away wlr_renderer_stateDrew DeVault
2017-08-14Refactor out wlr_texture_stateDrew DeVault
2017-08-10Refactor EGL handlingDrew DeVault
2017-08-10Fix example for updated glesnyorain