[Mesa-dev] [PATCH v2 2/3] nvc0: check return value of nvc0_program_validate()

2015-12-14 Thread Samuel Pitoiset
Spotted by Coverity. Signed-off-by: Samuel Pitoiset --- src/gallium/drivers/nouveau/nvc0/nvc0_shader_state.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_shader_state.c

Re: [Mesa-dev] [PATCH v2 2/3] nvc0: check return value of nvc0_program_validate()

2015-12-14 Thread Pierre Moreau
On 11:56 AM - Dec 14 2015, Ilia Mirkin wrote: > No, gp->code_size is set by the validation. You need to put that last. IIRC, you can't assume in which order the compiler will decide to evaluate the different expressions being AND'ed. > > On Mon, Dec 14, 2015 at 11:51 AM, Samuel Pitoiset >

Re: [Mesa-dev] [PATCH v2 2/3] nvc0: check return value of nvc0_program_validate()

2015-12-14 Thread Ilia Mirkin
On Mon, Dec 14, 2015 at 11:59 AM, Pierre Moreau wrote: > On 11:56 AM - Dec 14 2015, Ilia Mirkin wrote: >> No, gp->code_size is set by the validation. You need to put that last. > > IIRC, you can't assume in which order the compiler will decide to evaluate the > different

Re: [Mesa-dev] [PATCH v2 2/3] nvc0: check return value of nvc0_program_validate()

2015-12-14 Thread Samuel Pitoiset
On 12/14/2015 05:56 PM, Ilia Mirkin wrote: No, gp->code_size is set by the validation. You need to put that last. Right, it's set by nvc0_program_translate(). On Mon, Dec 14, 2015 at 11:51 AM, Samuel Pitoiset wrote: Spotted by Coverity. Signed-off-by: Samuel

Re: [Mesa-dev] [PATCH v2 2/3] nvc0: check return value of nvc0_program_validate()

2015-12-14 Thread Ilia Mirkin
No, gp->code_size is set by the validation. You need to put that last. On Mon, Dec 14, 2015 at 11:51 AM, Samuel Pitoiset wrote: > Spotted by Coverity. > > Signed-off-by: Samuel Pitoiset > --- >