[Mesa-dev] [PATCH 1/2] intel: Prevent huge lastlevel values from being computed.

2012-09-04 Thread Stéphane Marchesin
The current computation for the lastlevel is based on the level size and can lead to writing past the end of the texture array. Instead we clamp it by MAX_TEXTURE_LEVELS. --- src/mesa/drivers/dri/intel/intel_tex_image.c |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git

Re: [Mesa-dev] [PATCH 1/2] intel: Prevent huge lastlevel values from being computed.

2012-09-04 Thread Eric Anholt
Stéphane Marchesin marc...@chromium.org writes: The current computation for the lastlevel is based on the level size and can lead to writing past the end of the texture array. Instead we clamp it by MAX_TEXTURE_LEVELS. --- src/mesa/drivers/dri/intel/intel_tex_image.c |5 + 1 files

Re: [Mesa-dev] [PATCH 1/2] intel: Prevent huge lastlevel values from being computed.

2012-09-04 Thread Stéphane Marchesin
On Tue, Sep 4, 2012 at 2:59 PM, Eric Anholt e...@anholt.net wrote: Stéphane Marchesin marc...@chromium.org writes: The current computation for the lastlevel is based on the level size and can lead to writing past the end of the texture array. Instead we clamp it by MAX_TEXTURE_LEVELS. ---

Re: [Mesa-dev] [PATCH 1/2] intel: Prevent huge lastlevel values from being computed.

2012-09-04 Thread Ian Romanick
On 09/04/2012 03:19 PM, Stéphane Marchesin wrote: On Tue, Sep 4, 2012 at 2:59 PM, Eric Anholt e...@anholt.net wrote: Stéphane Marchesin marc...@chromium.org writes: The current computation for the lastlevel is based on the level size and can lead to writing past the end of the texture array.

Re: [Mesa-dev] [PATCH 1/2] intel: Prevent huge lastlevel values from being computed.

2012-09-04 Thread Stéphane Marchesin
On Tue, Sep 4, 2012 at 3:27 PM, Ian Romanick i...@freedesktop.org wrote: On 09/04/2012 03:19 PM, Stéphane Marchesin wrote: On Tue, Sep 4, 2012 at 2:59 PM, Eric Anholt e...@anholt.net wrote: Stéphane Marchesin marc...@chromium.org writes: The current computation for the lastlevel is based on

Re: [Mesa-dev] [PATCH 1/2] intel: Prevent huge lastlevel values from being computed.

2012-09-04 Thread Ian Romanick
On 09/04/2012 03:32 PM, Stéphane Marchesin wrote: On Tue, Sep 4, 2012 at 3:27 PM, Ian Romanick i...@freedesktop.org wrote: On 09/04/2012 03:19 PM, Stéphane Marchesin wrote: On Tue, Sep 4, 2012 at 2:59 PM, Eric Anholt e...@anholt.net wrote: Stéphane Marchesin marc...@chromium.org writes:

Re: [Mesa-dev] [PATCH 1/2] intel: Prevent huge lastlevel values from being computed.

2012-09-04 Thread Brian Paul
On 09/04/2012 04:39 PM, Ian Romanick wrote: On 09/04/2012 03:32 PM, Stéphane Marchesin wrote: On Tue, Sep 4, 2012 at 3:27 PM, Ian Romanick i...@freedesktop.org wrote: On 09/04/2012 03:19 PM, Stéphane Marchesin wrote: On Tue, Sep 4, 2012 at 2:59 PM, Eric Anholt e...@anholt.net wrote:

Re: [Mesa-dev] [PATCH 1/2] intel: Prevent huge lastlevel values from being computed.

2012-09-04 Thread Stéphane Marchesin
On Tue, Sep 4, 2012 at 4:01 PM, Brian Paul bri...@vmware.com wrote: On 09/04/2012 04:39 PM, Ian Romanick wrote: On 09/04/2012 03:32 PM, Stéphane Marchesin wrote: On Tue, Sep 4, 2012 at 3:27 PM, Ian Romanick i...@freedesktop.org wrote: On 09/04/2012 03:19 PM, Stéphane Marchesin wrote: On