summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri
diff options
context:
space:
mode:
authorMatt Turner <[email protected]>2016-05-24 15:10:25 -0700
committerMatt Turner <[email protected]>2016-06-02 11:34:09 -0700
commit0d81a684c125626ad0ed5db97fa75ed3336d5396 (patch)
treed5cf53cc8794670d0a5abbd8b6f5a0c218ea49d3 /src/mesa/drivers/dri
parentc06cef7f9b27dcc109c9c6ae69f729acce041072 (diff)
i965: Add missing types to type_sz().
Coverity warns in multiple places about the potential for division by zero, caused by this function's default case. Reviewed-by: Francisco Jerez <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r--src/mesa/drivers/dri/i965/brw_reg.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_reg.h b/src/mesa/drivers/dri/i965/brw_reg.h
index bd7ea1ba7bc..38cf8e31371 100644
--- a/src/mesa/drivers/dri/i965/brw_reg.h
+++ b/src/mesa/drivers/dri/i965/brw_reg.h
@@ -292,15 +292,19 @@ type_sz(unsigned type)
case BRW_REGISTER_TYPE_UD:
case BRW_REGISTER_TYPE_D:
case BRW_REGISTER_TYPE_F:
+ case BRW_REGISTER_TYPE_VF:
return 4;
case BRW_REGISTER_TYPE_UW:
case BRW_REGISTER_TYPE_W:
+ case BRW_REGISTER_TYPE_UV:
+ case BRW_REGISTER_TYPE_V:
+ case BRW_REGISTER_TYPE_HF:
return 2;
case BRW_REGISTER_TYPE_UB:
case BRW_REGISTER_TYPE_B:
return 1;
default:
- return 0;
+ unreachable("not reached");
}
}