summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorIlia Mirkin <[email protected]>2016-11-12 13:17:27 -0500
committerIlia Mirkin <[email protected]>2016-11-15 20:24:50 -0500
commitb53a33feef2595fc71fadafa5857d5482514a724 (patch)
treeff047bc5ba725f3de3e8dfe3aac4c337b4b06a26 /src/gallium
parent5dd0b8d3c635b67d8274c64653d825b8855b8167 (diff)
swr: [rasterizer jitter] don't bother quantizing unused channels
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 <[email protected]> Reviewed-by: Bruce Cherniak <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/swr/rasterizer/jitter/blend_jit.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/swr/rasterizer/jitter/blend_jit.cpp b/src/gallium/drivers/swr/rasterizer/jitter/blend_jit.cpp
index b5b21c0d332..ad809c4e149 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);