[virglrenderer-devel] [PATCH] vrend: fix texture upload for 3-byte formats

Gurchetan Singh gurchetansingh at chromium.org
Sat Mar 10 02:55:20 UTC 2018


We need a case for 24-bit formats, like GL_RGB8I.

Fixes:
dEQP-GLES3.functional.texture.specification.*.{rgb8i, rgb8ui}
dEQP-GLES3.functional.texture.format.sized.2d.*.{rgb8i, rgb8ui}

Example test cases:
dEQP-GLES3.functional.texture.specification.basic_teximage2d.rgb8i_2d
dEQP-GLES3.functional.texture.specification.basic_teximage2d.rgb8ui_2d
dEQP-GLES3.functional.texture.format.sized.2d.rgb8i_npot
---
 src/vrend_renderer.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/vrend_renderer.c b/src/vrend_renderer.c
index 5943e3f..70fbdca 100644
--- a/src/vrend_renderer.c
+++ b/src/vrend_renderer.c
@@ -4998,6 +4998,7 @@ static int vrend_renderer_transfer_write_iov(struct vrend_context *ctx,
 
       switch (elsize) {
       case 1:
+      case 3:
          glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
          break;
       case 2:
-- 
2.16.2.660.g709887971b-goog



More information about the virglrenderer-devel mailing list