Re: [Mesa-dev] [PATCH] draw: avoid buffer overflows with bad geometry programs.

2014-06-10 Thread Dave Airlie
On 11 June 2014 10:48, Zack Rusin wrote: > To be honest I still don't like it. While the tgsi_exec specific paths in > draw_gs don't matter to me and can be as ugly as they need to be, they can't > be polluting the draw_pt_emit code, in other words the primitive_lengths > can't be bogus at that

Re: [Mesa-dev] [PATCH] draw: avoid buffer overflows with bad geometry programs.

2014-06-10 Thread Zack Rusin
To be honest I still don't like it. While the tgsi_exec specific paths in draw_gs don't matter to me and can be as ugly as they need to be, they can't be polluting the draw_pt_emit code, in other words the primitive_lengths can't be bogus at that point - prim_info can't lie about the amount of d

[Mesa-dev] [PATCH] draw: avoid buffer overflows with bad geometry programs.

2014-06-10 Thread Dave Airlie
From: Dave Airlie One of the mismatched tests have a max output vertices of 3, but emits 6 vertices, this means the output buffer is undersized and causes problems down the line, so limit things later if we have a number of vertices lower than the number required to execute a primitive. Signed-o