mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-14 14:18:09 +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,
|
update_borders_tex(struct gl_renderer *gr,
|
||||||
struct gl_output_state *go)
|
struct gl_output_state *go)
|
||||||
{
|
{
|
||||||
|
GLint swizzles[] = { GL_BLUE, GL_GREEN, GL_RED, GL_ALPHA };
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < 4; i++) {
|
for (i = 0; i < 4; i++) {
|
||||||
|
|
@ -2010,18 +2011,19 @@ update_borders_tex(struct gl_renderer *gr,
|
||||||
|
|
||||||
if (pending->data) {
|
if (pending->data) {
|
||||||
gl_texture_2d_init(
|
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]);
|
pending->height, &go->borders_tex[i]);
|
||||||
gl_texture_parameters_init(
|
gl_texture_parameters_init(
|
||||||
gr, &go->borders_param[i],
|
gr, &go->borders_param[i],
|
||||||
GL_TEXTURE_2D, NULL, NULL, NULL, false);
|
GL_TEXTURE_2D, NULL, NULL, swizzles,
|
||||||
|
false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pending->data) {
|
if (pending->data) {
|
||||||
glBindTexture(GL_TEXTURE_2D, go->borders_tex[i]);
|
glBindTexture(GL_TEXTURE_2D, go->borders_tex[i]);
|
||||||
gl_texture_2d_store(gr, 0, 0, 0, pending->tex_width,
|
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);
|
GL_UNSIGNED_BYTE, pending->data);
|
||||||
}
|
}
|
||||||
*current = *pending;
|
*current = *pending;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue