[Piglit] [PATCH] 0001-fixed-oes_compressed_etc2_texture-miptree-failure.patch

Guo, Johney Weijun.Guo at amd.com
Tue Apr 15 19:19:29 PDT 2014


>From 4b2a3cce5ab3ca89900c4215c81da83c0f4928fd Mon Sep 17 00:00:00 2001
From: gwj <w at 1.com>
Date: Wed, 16 Apr 2014 10:13:01 +0800
Subject: ktx texture file is binary format, so fopen() should be 'b' mode to keep compatible on window platform.

---
tests/util/piglit_ktx.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/util/piglit_ktx.c b/tests/util/piglit_ktx.c
index b60f737..d844540 100644
--- a/tests/util/piglit_ktx.c
+++ b/tests/util/piglit_ktx.c
@@ -436,7 +436,7 @@ piglit_ktx_read_file(const char *filename)
              if (self == NULL)
                             goto out_of_memory;
-              file = fopen(filename, "r");
+             file = fopen(filename, "rb");
              if (file == NULL)
                             goto bad_open;
@@ -521,7 +521,7 @@ piglit_ktx_write_file(struct piglit_ktx *self, const char *filename)
              size_t size_written = 0;
              bool ok = true;
-              file = fopen(filename, "w");
+             file = fopen(filename, "wb");
              if (file == NULL)
                             goto bad_open;
--
1.8.4.msysgit.0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20140416/5258ac26/attachment-0001.html>


More information about the Piglit mailing list