Message ID | 60711ADC69ED054383C0ADA87BAE4B510143299C@SCYBEXDAG01.amd.com |
---|---|
State | New |
Headers | show |
diff --git a/tests/spec/gles-3.0/oes_compressed_etc2_texture-miptree.c b/tests/spec/gles-3.0/oes_compressed_etc2_texture-miptree.c index 59d8748..eeda3cb 100644 --- a/tests/spec/gles-3.0/oes_compressed_etc2_texture-miptree.c +++ b/tests/spec/gles-3.0/oes_compressed_etc2_texture-miptree.c @@ -289,6 +289,7 @@ piglit_display(void) bool pass = true; glClear(GL_COLOR_BUFFER_BIT); + glViewport(0, 0, window_width, window_height); for (level = 0; level < num_levels; ++level) { glUniform2f(level_pixel_size_loc, (float) level_width, @@ -339,7 +340,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN config.supports_gl_es_version = 30; - config.window_width = 150; + config.window_width = 160; config.window_height = 150; config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGBA; PIGLIT_GL_TEST_CONFIG_END 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;
I'm also the wrong person to review this patch, sorry Dylan On Tuesday, April 22, 2014 05:11:52 AM Guo, Johney wrote: > Hi, > Can you review this patch ? I want to know if it is a piglit bug. > I do not know who is the owner of tests/spec/gles-3.0, so I send it to you. > Thank you. > > -----Original Message----- > From: Piglit [mailto:piglit-bounces@lists.freedesktop.org] On Behalf Of Guo, > Johney Sent: 2014年4月21日 16:31 > To: Ilia Mirkin; Dylan Baker > Cc: piglit@lists.freedesktop.org > Subject: [Piglit] [PATCH] fixed-oes_compressed_etc2_texture-miptree-failure > > - glut config.window_width should be > 160 so as to avoid warning > message. > - fopen ktx texture file should be binary mode > - viewport need be reset in each display, since it has changed in > glut reshape() function > > Signed-off-by: infi <infidragon@163.com> > --- > tests/spec/gles-3.0/oes_compressed_etc2_texture-miptree.c | 3 ++- > tests/util/piglit_ktx.c | 4 ++-- > 2 files changed, 4 insertions(+), 3 deletions(-) > > diff --git a/tests/spec/gles-3.0/oes_compressed_etc2_texture-miptree.c > b/tests/spec/gles-3.0/oes_compressed_etc2_texture-miptree.c index > 59d8748..eeda3cb 100644 > --- a/tests/spec/gles-3.0/oes_compressed_etc2_texture-miptree.c > +++ b/tests/spec/gles-3.0/oes_compressed_etc2_texture-miptree.c > @@ -289,6 +289,7 @@ piglit_display(void) > bool pass = true; > > glClear(GL_COLOR_BUFFER_BIT); > + glViewport(0, 0, window_width, window_height); > for (level = 0; level < num_levels; ++level) { > glUniform2f(level_pixel_size_loc, > (float) level_width, > @@ -339,7 +340,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN > > config.supports_gl_es_version = 30; > > - config.window_width = 150; > + config.window_width = 160; > config.window_height = 150; > config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGBA; > PIGLIT_GL_TEST_CONFIG_END 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 > _______________________________________________ > Piglit mailing list > Piglit@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/piglit
- glut config.window_width should be > 160 so as to avoid warning message. - fopen ktx texture file should be binary mode - viewport need be reset in each display, since it has changed in glut reshape() function Signed-off-by: infi <infidragon@163.com> --- tests/spec/gles-3.0/oes_compressed_etc2_texture-miptree.c | 3 ++- tests/util/piglit_ktx.c | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) -- 1.8.4.msysgit.0