[Mesa-dev] [PATCH 1/7] intel/ir: Don't allow allocating zero registers
Ian Romanick
idr at freedesktop.org
Fri Oct 12 18:36:08 UTC 2018
Patches 1 through 5 and 7 are
Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
Patch 6 is
Acked-by: Ian Romanick <ian.d.romanick at intel.com>
Someone more familiar with those bits should look at patch 6.
On 10/11/2018 02:32 PM, Jason Ekstrand wrote:
> This simple check helps catch bugs early that can end up propagating
> into later stages of the compile and triggering strange asserts.
> ---
> src/intel/compiler/brw_ir_allocator.h | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/src/intel/compiler/brw_ir_allocator.h b/src/intel/compiler/brw_ir_allocator.h
> index b1237ed38e7..9f124645ba2 100644
> --- a/src/intel/compiler/brw_ir_allocator.h
> +++ b/src/intel/compiler/brw_ir_allocator.h
> @@ -47,6 +47,7 @@ namespace brw {
> unsigned
> allocate(unsigned size)
> {
> + assert(size > 0);
> if (capacity <= count) {
> capacity = MAX2(16, capacity * 2);
> sizes = (unsigned *)realloc(sizes, capacity * sizeof(unsigned));
>
More information about the mesa-dev
mailing list