[virglrenderer-devel] [PATCH] vrend: fix glTexParameteri call
Gurchetan Singh
gurchetansingh at chromium.org
Tue Feb 27 02:22:38 UTC 2018
When emulating GL_ALPHA8 with GL_R8, we should make the alpha
component equal to the red color channel.
Fixes:
['dEQP-GLES2.functional.texture.mipmap.2d.generate.a8_fastest']
['dEQP-GLES2.functional.texture.mipmap.2d.generate.a8_nicest']
on OpenGL 4.5 (core).
---
src/vrend_blitter.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/vrend_blitter.c b/src/vrend_blitter.c
index 908a82d..ebd76ac 100644
--- a/src/vrend_blitter.c
+++ b/src/vrend_blitter.c
@@ -616,7 +616,7 @@ void vrend_renderer_blit_gl(struct vrend_context *ctx,
glBindTexture(src_res->target, src_res->id);
if (vrend_format_is_emulated_alpha(info->src.format))
- glTexParameteri(src_res->target, GL_TEXTURE_SWIZZLE_R, GL_ALPHA);
+ glTexParameteri(src_res->target, GL_TEXTURE_SWIZZLE_A, GL_RED);
glTexParameteri(src_res->target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameteri(src_res->target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
--
2.16.1.291.g4437f3f132-goog
More information about the virglrenderer-devel
mailing list