Age | Commit message (Collapse) | Author |
|
|
|
Only expose linux-dmabuf extension if EGL_EXT_image_dmabuf_import_ext is
supported.
Closes: https://github.com/swaywm/wlroots/issues/2076
|
|
This allows us to hard-fail if the extension is advertised but we fail
to enable it.
|
|
This makes it easier for the user of this library to properly handle
failure of this function.
The signature of wlr_renderer_impl.init_wl_display was also modified to
allow for proper error propagation.
|
|
Keeping textures bound results in hard-to-debug situations where some GL
operations incorrectly affect the texture.
|
|
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
|
|
|
|
|
|
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.
|
|
|
|
This is often the name of the GPU and can help debugging graphics issues.
|
|
|
|
|
|
Fixes #1094
|
|
|
|
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.
|
|
Texture functions, that create and manipulate textures should switch
the current context if necessary.
thanks to: @emersion
Fixes #934
|
|
This reverts commit a0afedcd8fbeb2013252e629d524aa83cdd9326e.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This is needed as uniform locations are driver implementation-specific.
|
|
render: remove wlr_renderer_check_import_dmabuf
|
|
Signed-off-by: Genki Sky <sky@genki.is>
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
L_INFO is for stuff that's useful to the user
|
|
../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);
|
|
Redesign wlr_texture
|
|
|
|
|
|
|
|
- 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.
|
|
|
|
|
|
This allows raw GL calls outside wlr_renderer to be removed.
|
|
|
|
By using the same vertex shader and adding alpha to the fragment shader
for external textures we can:
- use alpha blending
- have wlr_gles2_render_texture_with_matrix work with
the GL_TEXTURE_EXTERNAL_OES. So far this failed
since we passed in alpha which was unknown by fragment_src_external
|
|
|
|
Setting glUniformMatrix3fv's transpose parameter to GL_TRUE is
not allowed for OpenGL ES 2.
This adds a wlr_matrix_transpose function.
|