Re: [Piglit] [PATCH v3] arb_shader_image_load_store: Test format incompatible texture buffer
On Tue, Oct 09, 2018 at 11:07:35AM +0300, Danylo Piliaiev wrote: > > > On 10/8/18 7:41 PM, Nanley Chery wrote: > > On Mon, Jul 23, 2018 at 03:13:34PM +0300, Danylo Piliaiev wrote: > > > Test for the regression which happened when GL_TEXTURE_BUFFER was > > > allowed to have incompatible format. > > > > > > v2: Removed unnecessary code duplication - use upload_image instead > > > of init_level. (Francisco Jerez) > > > v3: Removed upload_image call because image is already called > > > by init_image. (Francisco Jerez) > > > > > > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106465 > > > > > > Signed-off-by: Danylo Piliaiev > > > Reviewed-by: Francisco Jerez > > I noticed that this test has a reviewed-by, but isn't upstream. Does > > someone just need to push it? > > > > -Nanley > Indeed, thank you for noticing it. I need someone to push the test. > Done! Thank you for the test. -Nanley > - Danil > > > --- > > > .../arb_shader_image_load_store/invalid.c | 19 ++- > > > 1 file changed, 14 insertions(+), 5 deletions(-) > > > > > > diff --git a/tests/spec/arb_shader_image_load_store/invalid.c > > > b/tests/spec/arb_shader_image_load_store/invalid.c > > > index ed4b6c064..719304237 100644 > > > --- a/tests/spec/arb_shader_image_load_store/invalid.c > > > +++ b/tests/spec/arb_shader_image_load_store/invalid.c > > > @@ -268,13 +268,11 @@ invalidate_incompatible_format(const struct > > > image_info img, GLuint prog) > > > GLenum base_format = image_base_internal_format(img.format); > > > /* Pick an incompatible texture format with a compatible base > > >* type. */ > > > -bool ret = init_level(img, 0, (base_format == GL_RGBA32F ? > > > - GL_RGBA8 : GL_RG32UI), W, H); > > > - > > > glBindImageTexture(0, get_texture(0), 0, GL_TRUE, 0, > > > - GL_READ_WRITE, img.format->format); > > > + GL_READ_WRITE, (base_format == GL_RGBA32F ? > > > + GL_RGBA8 : GL_RG32UI)); > > > -return ret && piglit_check_gl_error(GL_NO_ERROR); > > > +return piglit_check_gl_error(GL_NO_ERROR); > > > } > > > static bool > > > @@ -346,6 +344,8 @@ piglit_init(int argc, char **argv) > > > for (op = image_ops; op->name; ++op) { > > > const struct image_info def_img = image_info( > > > GL_TEXTURE_2D, op->formats[0].format, W, H); > > > +const struct image_info def_img_buffer = image_info( > > > +GL_TEXTURE_BUFFER, op->formats[0].format, W, H); > > > /* > > >* According to the spec, an access is considered > > > @@ -399,6 +399,15 @@ piglit_init(int argc, char **argv) > > >invalidate_incompatible_format, false), > > > "%s/incompatible format test", op->name); > > > +/* Test for the regression which happened when > > > + * GL_TEXTURE_BUFFER was allowed to have incompatible > > > format. > > > + */ > > > +subtest(&status, true, > > > +run_test(op, def_img_buffer, def_img_buffer, > > > + invalidate_incompatible_format, false), > > > +"%s/incompatible format test/image%s", > > > +op->name, def_img_buffer.target->name); > > > + > > > /* > > >* " * the texture bound to the image unit has layers, > > >* and the selected layer or cube map face doesn't > > > -- > > > 2.17.1 > > > > > > ___ > > > Piglit mailing list > > > Piglit@lists.freedesktop.org > > > https://lists.freedesktop.org/mailman/listinfo/piglit > ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH v3] arb_shader_image_load_store: Test format incompatible texture buffer
On 10/8/18 7:41 PM, Nanley Chery wrote: On Mon, Jul 23, 2018 at 03:13:34PM +0300, Danylo Piliaiev wrote: Test for the regression which happened when GL_TEXTURE_BUFFER was allowed to have incompatible format. v2: Removed unnecessary code duplication - use upload_image instead of init_level. (Francisco Jerez) v3: Removed upload_image call because image is already called by init_image. (Francisco Jerez) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106465 Signed-off-by: Danylo Piliaiev Reviewed-by: Francisco Jerez I noticed that this test has a reviewed-by, but isn't upstream. Does someone just need to push it? -Nanley Indeed, thank you for noticing it. I need someone to push the test. - Danil --- .../arb_shader_image_load_store/invalid.c | 19 ++- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/tests/spec/arb_shader_image_load_store/invalid.c b/tests/spec/arb_shader_image_load_store/invalid.c index ed4b6c064..719304237 100644 --- a/tests/spec/arb_shader_image_load_store/invalid.c +++ b/tests/spec/arb_shader_image_load_store/invalid.c @@ -268,13 +268,11 @@ invalidate_incompatible_format(const struct image_info img, GLuint prog) GLenum base_format = image_base_internal_format(img.format); /* Pick an incompatible texture format with a compatible base * type. */ -bool ret = init_level(img, 0, (base_format == GL_RGBA32F ? - GL_RGBA8 : GL_RG32UI), W, H); - glBindImageTexture(0, get_texture(0), 0, GL_TRUE, 0, - GL_READ_WRITE, img.format->format); + GL_READ_WRITE, (base_format == GL_RGBA32F ? + GL_RGBA8 : GL_RG32UI)); -return ret && piglit_check_gl_error(GL_NO_ERROR); +return piglit_check_gl_error(GL_NO_ERROR); } static bool @@ -346,6 +344,8 @@ piglit_init(int argc, char **argv) for (op = image_ops; op->name; ++op) { const struct image_info def_img = image_info( GL_TEXTURE_2D, op->formats[0].format, W, H); +const struct image_info def_img_buffer = image_info( +GL_TEXTURE_BUFFER, op->formats[0].format, W, H); /* * According to the spec, an access is considered @@ -399,6 +399,15 @@ piglit_init(int argc, char **argv) invalidate_incompatible_format, false), "%s/incompatible format test", op->name); +/* Test for the regression which happened when + * GL_TEXTURE_BUFFER was allowed to have incompatible format. + */ +subtest(&status, true, +run_test(op, def_img_buffer, def_img_buffer, + invalidate_incompatible_format, false), +"%s/incompatible format test/image%s", +op->name, def_img_buffer.target->name); + /* * " * the texture bound to the image unit has layers, * and the selected layer or cube map face doesn't -- 2.17.1 ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH v3] arb_shader_image_load_store: Test format incompatible texture buffer
On Mon, Jul 23, 2018 at 03:13:34PM +0300, Danylo Piliaiev wrote: > Test for the regression which happened when GL_TEXTURE_BUFFER was > allowed to have incompatible format. > > v2: Removed unnecessary code duplication - use upload_image instead > of init_level. (Francisco Jerez) > v3: Removed upload_image call because image is already called > by init_image. (Francisco Jerez) > > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106465 > > Signed-off-by: Danylo Piliaiev > Reviewed-by: Francisco Jerez I noticed that this test has a reviewed-by, but isn't upstream. Does someone just need to push it? -Nanley > --- > .../arb_shader_image_load_store/invalid.c | 19 ++- > 1 file changed, 14 insertions(+), 5 deletions(-) > > diff --git a/tests/spec/arb_shader_image_load_store/invalid.c > b/tests/spec/arb_shader_image_load_store/invalid.c > index ed4b6c064..719304237 100644 > --- a/tests/spec/arb_shader_image_load_store/invalid.c > +++ b/tests/spec/arb_shader_image_load_store/invalid.c > @@ -268,13 +268,11 @@ invalidate_incompatible_format(const struct image_info > img, GLuint prog) > GLenum base_format = image_base_internal_format(img.format); > /* Pick an incompatible texture format with a compatible base > * type. */ > -bool ret = init_level(img, 0, (base_format == GL_RGBA32F ? > - GL_RGBA8 : GL_RG32UI), W, H); > - > glBindImageTexture(0, get_texture(0), 0, GL_TRUE, 0, > - GL_READ_WRITE, img.format->format); > + GL_READ_WRITE, (base_format == GL_RGBA32F ? > + GL_RGBA8 : GL_RG32UI)); > > -return ret && piglit_check_gl_error(GL_NO_ERROR); > +return piglit_check_gl_error(GL_NO_ERROR); > } > > static bool > @@ -346,6 +344,8 @@ piglit_init(int argc, char **argv) > for (op = image_ops; op->name; ++op) { > const struct image_info def_img = image_info( > GL_TEXTURE_2D, op->formats[0].format, W, H); > +const struct image_info def_img_buffer = image_info( > +GL_TEXTURE_BUFFER, op->formats[0].format, W, H); > > /* > * According to the spec, an access is considered > @@ -399,6 +399,15 @@ piglit_init(int argc, char **argv) > invalidate_incompatible_format, false), > "%s/incompatible format test", op->name); > > +/* Test for the regression which happened when > + * GL_TEXTURE_BUFFER was allowed to have incompatible format. > + */ > +subtest(&status, true, > +run_test(op, def_img_buffer, def_img_buffer, > + invalidate_incompatible_format, false), > +"%s/incompatible format test/image%s", > +op->name, def_img_buffer.target->name); > + > /* > * " * the texture bound to the image unit has layers, > * and the selected layer or cube map face doesn't > -- > 2.17.1 > > ___ > Piglit mailing list > Piglit@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/piglit ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH v3] arb_shader_image_load_store: Test format incompatible texture buffer
Test for the regression which happened when GL_TEXTURE_BUFFER was allowed to have incompatible format. v2: Removed unnecessary code duplication - use upload_image instead of init_level. (Francisco Jerez) v3: Removed upload_image call because image is already called by init_image. (Francisco Jerez) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106465 Signed-off-by: Danylo Piliaiev Reviewed-by: Francisco Jerez --- .../arb_shader_image_load_store/invalid.c | 19 ++- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/tests/spec/arb_shader_image_load_store/invalid.c b/tests/spec/arb_shader_image_load_store/invalid.c index ed4b6c064..719304237 100644 --- a/tests/spec/arb_shader_image_load_store/invalid.c +++ b/tests/spec/arb_shader_image_load_store/invalid.c @@ -268,13 +268,11 @@ invalidate_incompatible_format(const struct image_info img, GLuint prog) GLenum base_format = image_base_internal_format(img.format); /* Pick an incompatible texture format with a compatible base * type. */ -bool ret = init_level(img, 0, (base_format == GL_RGBA32F ? - GL_RGBA8 : GL_RG32UI), W, H); - glBindImageTexture(0, get_texture(0), 0, GL_TRUE, 0, - GL_READ_WRITE, img.format->format); + GL_READ_WRITE, (base_format == GL_RGBA32F ? + GL_RGBA8 : GL_RG32UI)); -return ret && piglit_check_gl_error(GL_NO_ERROR); +return piglit_check_gl_error(GL_NO_ERROR); } static bool @@ -346,6 +344,8 @@ piglit_init(int argc, char **argv) for (op = image_ops; op->name; ++op) { const struct image_info def_img = image_info( GL_TEXTURE_2D, op->formats[0].format, W, H); +const struct image_info def_img_buffer = image_info( +GL_TEXTURE_BUFFER, op->formats[0].format, W, H); /* * According to the spec, an access is considered @@ -399,6 +399,15 @@ piglit_init(int argc, char **argv) invalidate_incompatible_format, false), "%s/incompatible format test", op->name); +/* Test for the regression which happened when + * GL_TEXTURE_BUFFER was allowed to have incompatible format. + */ +subtest(&status, true, +run_test(op, def_img_buffer, def_img_buffer, + invalidate_incompatible_format, false), +"%s/incompatible format test/image%s", +op->name, def_img_buffer.target->name); + /* * " * the texture bound to the image unit has layers, * and the selected layer or cube map face doesn't -- 2.17.1 ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit