llvmpipe: fix linear rast samples check.

The checks didn't work for the samples == 0 case, just fix it
to use the helper.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15040>
This commit is contained in:
Dave Airlie 2022-02-16 16:00:00 +10:00 committed by Marge Bot
parent 3f4bfecee6
commit eebe298a87

View file

@ -182,7 +182,7 @@ check_linear_rasterizer( struct llvmpipe_context *lp )
boolean clipping_changed = FALSE;
bgr8 = (lp->framebuffer.nr_cbufs == 1 && lp->framebuffer.cbufs[0] &&
lp->framebuffer.cbufs[0]->texture->nr_samples == 1 &&
util_res_sample_count(lp->framebuffer.cbufs[0]->texture) == 1 &&
lp->framebuffer.cbufs[0]->texture->target == PIPE_TEXTURE_2D &&
(lp->framebuffer.cbufs[0]->format == PIPE_FORMAT_B8G8R8A8_UNORM ||
lp->framebuffer.cbufs[0]->format == PIPE_FORMAT_B8G8R8X8_UNORM));