While more verbose and a little slower, I think using the util_is_intensity/luminance* functions would make it clearer to someone reading the code what’s being excluded.
> On Nov 9, 2016, at 2:15 PM, Ilia Mirkin <imir...@alum.mit.edu> wrote: > > The rasterizer does not have StoreTile support for these, so just mark > them as unsupported. They may still be used for texturing if necessary. > > Fixes fbo-blending-formats piglit test. > > Signed-off-by: Ilia Mirkin <imir...@alum.mit.edu> > --- > src/gallium/drivers/swr/swr_screen.cpp | 14 ++++++++++++++ > 1 file changed, 14 insertions(+) > > diff --git a/src/gallium/drivers/swr/swr_screen.cpp > b/src/gallium/drivers/swr/swr_screen.cpp > index fa16edd..c4b46b9 100644 > --- a/src/gallium/drivers/swr/swr_screen.cpp > +++ b/src/gallium/drivers/swr/swr_screen.cpp > @@ -114,6 +114,20 @@ swr_is_format_supported(struct pipe_screen *screen, > return FALSE; > > /* > + * Don't allow any luminance/intensity formats > + */ > + if (format_desc->swizzle[0] == format_desc->swizzle[1] && > + format_desc->swizzle[0] != PIPE_SWIZZLE_0) > + return FALSE; > + > + /* > + * There's also currently no support for rendering to BGR5X1 or BGR10X2 > + */ > + if (format == PIPE_FORMAT_B5G5R5X1_UNORM || > + format == PIPE_FORMAT_B10G10R10X2_UNORM) > + return FALSE; > + > + /* > * Although possible, it is unnatural to render into compressed or YUV > * surfaces. So disable these here to avoid going into weird paths > * inside the state trackers. > -- > 2.7.3 > _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev