mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-09 04:48:04 +02:00
gl-renderer: Relax EXT_texture_format_BGRA8888 requirement
This can now be removed thanks to texture swizzles. Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>
This commit is contained in:
parent
be5c662bae
commit
e8160e059d
1 changed files with 5 additions and 3 deletions
|
|
@ -1994,6 +1994,7 @@ static void
|
|||
update_borders_tex(struct gl_renderer *gr,
|
||||
struct gl_output_state *go)
|
||||
{
|
||||
GLint swizzles[] = { GL_BLUE, GL_GREEN, GL_RED, GL_ALPHA };
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 4; i++) {
|
||||
|
|
@ -2010,18 +2011,19 @@ update_borders_tex(struct gl_renderer *gr,
|
|||
|
||||
if (pending->data) {
|
||||
gl_texture_2d_init(
|
||||
gr, 1, GL_BGRA8_EXT, pending->tex_width,
|
||||
gr, 1, GL_RGBA8, pending->tex_width,
|
||||
pending->height, &go->borders_tex[i]);
|
||||
gl_texture_parameters_init(
|
||||
gr, &go->borders_param[i],
|
||||
GL_TEXTURE_2D, NULL, NULL, NULL, false);
|
||||
GL_TEXTURE_2D, NULL, NULL, swizzles,
|
||||
false);
|
||||
}
|
||||
}
|
||||
|
||||
if (pending->data) {
|
||||
glBindTexture(GL_TEXTURE_2D, go->borders_tex[i]);
|
||||
gl_texture_2d_store(gr, 0, 0, 0, pending->tex_width,
|
||||
pending->height, GL_BGRA_EXT,
|
||||
pending->height, GL_RGBA,
|
||||
GL_UNSIGNED_BYTE, pending->data);
|
||||
}
|
||||
*current = *pending;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue