[Mesa-dev] [PATCH mesa] freedreno/a2xx: add missing `break` after error message

Rob Clark robdclark at gmail.com
Sat Jul 30 00:59:37 UTC 2016


hmm, these were actually intended to fall-thru to the 'x' case, just
to give the hw something sensible.  (Not that it is a case that should
ever happen.)  Maybe better to use unreachable()?

BR,
-R

On Fri, Jul 29, 2016 at 8:27 PM, Eric Engestrom <eric at engestrom.ch> wrote:
> CovID: 1362455, 1362456, 1362457
> Signed-off-by: Eric Engestrom <eric at engestrom.ch>
> ---
>  src/gallium/drivers/freedreno/a2xx/ir-a2xx.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/src/gallium/drivers/freedreno/a2xx/ir-a2xx.c b/src/gallium/drivers/freedreno/a2xx/ir-a2xx.c
> index 2b62b3a..e2fea5d 100644
> --- a/src/gallium/drivers/freedreno/a2xx/ir-a2xx.c
> +++ b/src/gallium/drivers/freedreno/a2xx/ir-a2xx.c
> @@ -536,6 +536,7 @@ static uint32_t reg_fetch_src_swiz(struct ir2_register *reg, uint32_t n)
>                 switch (reg->swizzle[i]) {
>                 default:
>                         ERROR_MSG("invalid fetch src swizzle: %s", reg->swizzle);
> +                       break;
>                 case 'x': swiz |= 0x0; break;
>                 case 'y': swiz |= 0x1; break;
>                 case 'z': swiz |= 0x2; break;
> @@ -562,6 +563,7 @@ static uint32_t reg_fetch_dst_swiz(struct ir2_register *reg)
>                         switch (reg->swizzle[i]) {
>                         default:
>                                 ERROR_MSG("invalid dst swizzle: %s", reg->swizzle);
> +                               break;
>                         case 'x': swiz |= 0x0; break;
>                         case 'y': swiz |= 0x1; break;
>                         case 'z': swiz |= 0x2; break;
> @@ -622,6 +624,7 @@ static uint32_t reg_alu_src_swiz(struct ir2_register *reg)
>                         switch (reg->swizzle[i]) {
>                         default:
>                                 ERROR_MSG("invalid vector src swizzle: %s", reg->swizzle);
> +                               break;
>                         case 'x': swiz |= (0x0 - i) & 0x3; break;
>                         case 'y': swiz |= (0x1 - i) & 0x3; break;
>                         case 'z': swiz |= (0x2 - i) & 0x3; break;
> --
> 2.9.0
>


More information about the mesa-dev mailing list