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

2018-03-13 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. v3: - Use src/dst bitsize to get the proper conversion opcode. (Jason) S

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

2018-03-13 Thread Jason Ekstrand
On Tue, Mar 13, 2018 at 5:40 AM, 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

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

2018-03-14 Thread Samuel Iglesias Gonsálvez
On 13/03/18 19:23, Jason Ekstrand wrote: > On Tue, Mar 13, 2018 at 5:40 AM, 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