[Mesa-dev] [PATCH kmscube] texturator: Only define png variable when libpng is present
When libpng is not present the following build warning is seen: ../texturator.c:98:13: warning: 'png' defined but not used [-Wunused-variable] static bool png; Fix it by only defining the png variable when HAVE_LIBPNG is defined. Signed-off-by: Fabio Estevam --- texturator.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/texturator.c b/texturator.c index 2675244..a450dfe 100644 --- a/texturator.c +++ b/texturator.c @@ -95,7 +95,9 @@ static int error_frames; static int zoom = 1; static bool full; static bool stop; +#ifdef HAVE_LIBPNG static bool png; +#endif static GLenum target; static struct size { unsigned x, y, z; -- 2.17.1 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [AppVeyor] mesa-webhook master #15102 failed
Build mesa-webhook 15102 failed Commit 88c046a6d3 by Lionel Landwerlin on 11/26/2019 2:22 PM: isl: don't warn in physical extent calculation for yuv formats\n\nThose format have correct descriptions already with the exception of\nthe planar format. In that case we introduce an assert.\n\nThis fine because we don't use the planar format in any of our\ndrivers. There are restrictions on how the addresses of the 2 planes\nare relative to one another which make this annoying. The sampler is\nalso more limited than what we can do with a shader snippet.\n\nSigned-off-by: Lionel Landwerlin \nReviewed-by: Jason Ekstrand \nTested-by: Marge Bot \nPart-of: Configure your notification preferences ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [AppVeyor] mesa-webhook master #15103 completed
Build mesa-webhook 15103 completed Commit 7a53e67816 by Jason Ekstrand on 3/30/2020 4:25 PM: spirv: Implement OpCopyObject and OpCopyLogical as blind copies\n\nBecause the types etc. are required to logically match, we can just\ncopy-propagate the guts of the vtn_value. This was causing issues with\nsome new CTS tests that are doing an OpCopyObject of a sampler which is\na special-cased type in spirv_to_nir. Of course, this is only a partial\nsolution. Ideally, we've got a bit of work to do to make all the\ncomposite stuff able to handle all types including images, sampler, and\ncombined image/samplers but this gets some CTS tests passing.\n\nCc: mesa-sta...@lists.freedesktop.org\nReviewed-by: Ian Romanick \nAcked-by: Caio Marcelo de Oliveira Filho \nTested-by: Marge Bot \nPart-of: Configure your notification preferences ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH kmscube] texturator: Use !! for boolean assignment
The 'complemented' variable is a pointer to boolean. Use the !! operator to fix the following build warning: ../texturator.c:603:45: warning: '*' in boolean context, suggest '&&' instead [-Wint-in-bool-context] *complemented = (((float)rgba[2]) / 255.0) / 0.25; Signed-off-by: Fabio Estevam --- texturator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/texturator.c b/texturator.c index a450dfe..d31b601 100644 --- a/texturator.c +++ b/texturator.c @@ -602,7 +602,7 @@ static void extract_pix(uint8_t *rgba, int *slice, int *level, bool *complemente { *slice = (((float)rgba[0]) / 255.0) * 8.0; *level = (((float)rgba[1]) / 255.0) * 16.0; - *complemented = (((float)rgba[2]) / 255.0) / 0.25; + *complemented = !!(((float)rgba[2]) / 255.0) / 0.25; } static bool probe_pix(int x, int y, int w, int h, int s, int m) -- 2.17.1 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH kmscube] texturator: Use !! for boolean assignment
On 3/31/20 12:25 PM, Fabio Estevam wrote: > The 'complemented' variable is a pointer to boolean. Use the !! operator > to fix the following build warning: > > ../texturator.c:603:45: warning: '*' in boolean context, suggest '&&' instead > [-Wint-in-bool-context] > *complemented = (((float)rgba[2]) / 255.0) / 0.25; > > Signed-off-by: Fabio Estevam > --- > texturator.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/texturator.c b/texturator.c > index a450dfe..d31b601 100644 > --- a/texturator.c > +++ b/texturator.c > @@ -602,7 +602,7 @@ static void extract_pix(uint8_t *rgba, int *slice, int > *level, bool *complemente > { > *slice = (((float)rgba[0]) / 255.0) * 8.0; > *level = (((float)rgba[1]) / 255.0) * 16.0; > - *complemented = (((float)rgba[2]) / 255.0) / 0.25; > + *complemented = !!(((float)rgba[2]) / 255.0) / 0.25; I don't know how others feel, but I know Matt hates this idiom. I'm not terribly fond of it either. I think we both prefer either casting to bool or x != 0.0. But... I don't feel that strongly. > } > > static bool probe_pix(int x, int y, int w, int h, int s, int m) > ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH kmscube] texturator: Use !! for boolean assignment
On Tue, Mar 31, 2020 at 3:00 PM Ian Romanick wrote: > > On 3/31/20 12:25 PM, Fabio Estevam wrote: > > The 'complemented' variable is a pointer to boolean. Use the !! operator > > to fix the following build warning: > > > > ../texturator.c:603:45: warning: '*' in boolean context, suggest '&&' > > instead [-Wint-in-bool-context] > > *complemented = (((float)rgba[2]) / 255.0) / 0.25; > > > > Signed-off-by: Fabio Estevam > > --- > > texturator.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/texturator.c b/texturator.c > > index a450dfe..d31b601 100644 > > --- a/texturator.c > > +++ b/texturator.c > > @@ -602,7 +602,7 @@ static void extract_pix(uint8_t *rgba, int *slice, int > > *level, bool *complemente > > { > > *slice = (((float)rgba[0]) / 255.0) * 8.0; > > *level = (((float)rgba[1]) / 255.0) * 16.0; > > - *complemented = (((float)rgba[2]) / 255.0) / 0.25; > > + *complemented = !!(((float)rgba[2]) / 255.0) / 0.25; > > I don't know how others feel, but I know Matt hates this idiom. I'm not > terribly fond of it either. I think we both prefer either casting to > bool or x != 0.0. But... I don't feel that strongly. My feelings aren't usually all that strong on this point though I generally prefer !=. That said, this is a float. I very strongly prefer != 0.0f. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH kmscube] meson.build: Do not set c_std
On Mon, Mar 30, 2020 at 5:28 PM Fabio Estevam wrote: > > Hi Rob, > > On Mon, Mar 30, 2020 at 6:29 PM Fabio Estevam wrote: > > > > When building kmscube in Buildroot for ARM the following > > errors are seen: > > > > ../common.c: In function 'get_time_ns': > > ../common.c:376:18: error: storage size of 'tv' isn't known > > struct timespec tv; > > ^~ > > ../common.c:377:2: warning: implicit declaration of function > > 'clock_gettime'; did you mean 'localtime'? [-Wimplicit-function-declaration] > > clock_gettime(CLOCK_MONOTONIC, &tv); > > ^ > > localtime > > ../common.c:377:16: error: 'CLOCK_MONOTONIC' undeclared (first use in this > > function) > > clock_gettime(CLOCK_MONOTONIC, &tv); > > > > Fix it by using the default for each compiler on every platform instead. > > > > Inspired by this gst-plugins-good commit: > > > > https://cgit.freedesktop.org/gstreamer/gst-plugins-good/commit/?id=19f6559582c73123a3ec1fcf5a6b8651fbc2e83f > > > > Signed-off-by: Fabio Estevam > > --- > > meson.build | 6 +- > > 1 file changed, 1 insertion(+), 5 deletions(-) > > > > diff --git a/meson.build b/meson.build > > index b8131db..0f52dfe 100644 > > --- a/meson.build > > +++ b/meson.build > > @@ -26,13 +26,9 @@ project( > >version : '0.0.1', > >license : 'MIT', > >meson_version : '>= 0.47', > > - default_options : ['c_std=c99', 'warning_level=2'] > > + default_options : ['warning_level=2'] > > c99 was set in commit 6cbd03ab9406 ("Makefile.am: Add -std=c99 to > CFLAGS") to fix build failure on mips64el: > > cube-tex.c:230:2: note: use option -std=c99 or -std=gnu99 to compile your code > > If we change c_std=gnu99 then we could make both mips64el and ARM happy. > > Will send a v2 with c_std=gnu99. > thx.. I don't suppose I could talk you in to sending a gitlab merge request? BR, -R ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH kmscube] meson.build: Do not set c_std
Hi Rob, On Tue, Mar 31, 2020 at 7:40 PM Rob Clark wrote: > thx.. I don't suppose I could talk you in to sending a gitlab merge request? I never did it, but let me try to learn it how to do it. Thanks ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH kmscube] meson.build: Do not set c_std
Hi Rob, On Tue, Mar 31, 2020 at 7:40 PM Rob Clark wrote: > thx.. I don't suppose I could talk you in to sending a gitlab merge request? Please find it at https://gitlab.freedesktop.org/mesa/kmscube/-/merge_requests/22 Let me know if this is the correct process. Thanks ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH kmscube] meson.build: Do not set c_std
On Tue, Mar 31, 2020 at 10:25 PM Fabio Estevam wrote: > > Hi Rob, > > On Tue, Mar 31, 2020 at 7:40 PM Rob Clark wrote: > > > thx.. I don't suppose I could talk you in to sending a gitlab merge request? > > Please find it at > https://gitlab.freedesktop.org/mesa/kmscube/-/merge_requests/22 Sorry, this is the correct one: https://gitlab.freedesktop.org/mesa/kmscube/-/merge_requests/23 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH kmscube] texturator: Use !! for boolean assignment
Hi Jason and Ian, On Tue, Mar 31, 2020 at 5:39 PM Jason Ekstrand wrote: > My feelings aren't usually all that strong on this point though I > generally prefer !=. That said, this is a float. I very strongly > prefer != 0.0f. Thanks for the feedback. I did as suggested: https://gitlab.freedesktop.org/festevam/kmscube/-/commit/4660a7dca6512b6e658759d00cff7d4ad2a2059d and sent Rob a merge request. Thanks ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev