Re: [Mesa-dev] [PATCH v2 1/2] spirv: fix OpSConvert when the source is unsigned

2018-03-13 Thread Samuel Iglesias Gonsálvez
On 12/03/18 20:42, Jason Ekstrand wrote: > On Mon, Mar 5, 2018 at 10:21 PM, Samuel Iglesias Gonsálvez > mailto:sigles...@igalia.com>> wrote: > > OpSConvert interprets the MSB of the unsigned value as the sign > bit and > extends it to the new type. If we want to preserve the value, we

Re: [Mesa-dev] [PATCH v2 1/2] spirv: fix OpSConvert when the source is unsigned

2018-03-12 Thread Jason Ekstrand
On Mon, Mar 5, 2018 at 10:21 PM, Samuel Iglesias Gonsálvez < sigles...@igalia.com> wrote: > OpSConvert interprets the MSB of the unsigned value as the sign bit and > extends it to the new type. If we want to preserve the value, we need > to use OpUConvert opcode. > > v2: > - No need to check dst t

[Mesa-dev] [PATCH v2 1/2] spirv: fix OpSConvert when the source is unsigned

2018-03-05 Thread Samuel Iglesias Gonsálvez
OpSConvert interprets the MSB of the unsigned value as the sign bit and extends it to the new type. If we want to preserve the value, we need to use OpUConvert opcode. v2: - No need to check dst type. - Fix typo in comment. Signed-off-by: Samuel Iglesias Gonsálvez --- src/compiler/spirv/vtn_alu