return MALI_WRAP_MIRRORED_REPEAT;
default:
- assert(0);
- return 0;
+ unreachable("Invalid wrap");
}
}
return MALI_LINEAR;
default:
- assert(0);
- return 0;
+ unreachable("Invalid filter");
}
}
case PIPE_FUNC_ALWAYS:
return MALI_FUNC_ALWAYS;
- }
- assert (0);
- return 0; /* Unreachable */
+ default:
+ unreachable("Invalid func");
+ }
}
static unsigned
case PIPE_FUNC_ALWAYS:
return MALI_ALT_FUNC_ALWAYS;
- }
- assert (0);
- return 0; /* Unreachable */
+ default:
+ unreachable("Invalid alt func");
+ }
}
static unsigned
case PIPE_STENCIL_OP_INVERT:
return MALI_STENCIL_INVERT;
- }
- assert (0);
- return 0; /* Unreachable */
+ default:
+ unreachable("Invalid stencil op");
+ }
}
static void
break;
default:
- DBG("Unknown shader stage %d in uniform upload\n", i);
- assert(0);
+ unreachable("Invalid shader stage\n");
}
/* Also attach the same buffer as a UBO for extended access */
DEFINE_CASE(POLYGON);
default:
- DBG("Illegal draw mode %d\n", mode);
- assert(0);
- return MALI_LINE_LOOP;
+ unreachable("Invalid draw mode");
}
}
return MALI_DRAW_INDEXED_UINT32;
default:
- DBG("Unknown index size %d\n", size);
- assert(0);
- return 0;
+ unreachable("Invalid index size");
}
}
return MALI_CHANNEL_ONE;
default:
- assert(0);
- return 0;
+ unreachable("INvalid swizzle");
}
}
case 32:
return MALI_CHANNEL_32;
default:
- fprintf(stderr, "Unknown width %d\n", size);
- assert(0);
- return 0;
+ unreachable("Invalid width");
}
}
}
default:
- assert(0);
- return 0;
+ unreachable("Invalid type");
}
}
break;
default:
- fprintf(stderr, "Unknown format type in %s\n", desc->name);
- assert(0);
- break;
+ unreachable("Invalid format type");
}
return (enum mali_format) format;