[Mesa-dev] [PATCH 04/14] swr: [rasterizer jitter] don't bother quantizing unused channels

Cherniak, Bruce bruce.cherniak at intel.com
Tue Nov 15 01:45:49 UTC 2016


Reviewed-by: Bruce Cherniak <bruce.cherniak at intel.com>

> On Nov 12, 2016, at 5:00 PM, Ilia Mirkin <imirkin at alum.mit.edu> wrote:
> 
> In a BGR10X2 or BGR5X1 situation, there's no need to try to quantize the
> X channel - the default will have the proper quantization required.
> 
> Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
> ---
> src/gallium/drivers/swr/rasterizer/jitter/blend_jit.cpp | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/gallium/drivers/swr/rasterizer/jitter/blend_jit.cpp b/src/gallium/drivers/swr/rasterizer/jitter/blend_jit.cpp
> index 46ea495..d9c72a9 100644
> --- a/src/gallium/drivers/swr/rasterizer/jitter/blend_jit.cpp
> +++ b/src/gallium/drivers/swr/rasterizer/jitter/blend_jit.cpp
> @@ -220,7 +220,7 @@ struct BlendJit : public Builder
>         const SWR_FORMAT_INFO& info = GetFormatInfo(format);
>         for (uint32_t c = 0; c < info.numComps; ++c)
>         {
> -            if (info.bpc[c] <= QUANTIZE_THRESHOLD)
> +            if (info.bpc[c] <= QUANTIZE_THRESHOLD && info.type[c] != SWR_TYPE_UNUSED)
>             {
>                 uint32_t swizComp = info.swizzle[c];
>                 float factor = (float)((1 << info.bpc[c]) - 1);
> -- 
> 2.7.3
> 
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev



More information about the mesa-dev mailing list