Re: [Mesa-dev] RFC: tgsi opcodes for 32x32 muls with 64bit results

2013-05-03 Thread Marek Olšák
FWIW, this maps nicely to r600, which also has separate instructions for the low and high 32 bits. As to what option is better, it really depends on whether shading languages and OpenCL expose the instructions directly through functions, or whether they just have 64-bit integers. Marek On Fri,

Re: [Mesa-dev] RFC: tgsi opcodes for 32x32 muls with 64bit results

2013-05-03 Thread Aaron Watry
Not sure if this helps much, but... With gentype being one of: char, uchar, short, ushort, int, uint, long, ulong, and the widths being scalar, 2, 3, 4, 8, or 16 components wide. From the OpenCL 1.1 spec: gentype mad_hi(gentype a, gentype b): Computes x * y and returns the high half of the

Re: [Mesa-dev] RFC: tgsi opcodes for 32x32 muls with 64bit results

2013-05-03 Thread Roland Scheidegger
Am 03.05.2013 06:58, schrieb Jose Fonseca: - Original Message - Currently, there's no way to get the high bits of a 32x32 signed/unsigned integer multiplication with tgsi. However, all of d3d10, OpenGL, and OpenCL support that, so we need it as well. There's essentially two ways

Re: [Mesa-dev] RFC: tgsi opcodes for 32x32 muls with 64bit results

2013-05-03 Thread Roland Scheidegger
Yes, that's why I said it looks like separate low and high bits in opencl. So in opencl you will get the low and high parts separately anyway. If we have only one instruction, we also probably really wanted to be able to say that we may only need one or the other destination to avoid extra work,

Re: [Mesa-dev] RFC: tgsi opcodes for 32x32 muls with 64bit results

2013-05-03 Thread Jose Fonseca
- Original Message - Am 03.05.2013 06:58, schrieb Jose Fonseca: - Original Message - Currently, there's no way to get the high bits of a 32x32 signed/unsigned integer multiplication with tgsi. However, all of d3d10, OpenGL, and OpenCL support that, so we need it as

Re: [Mesa-dev] RFC: tgsi opcodes for 32x32 muls with 64bit results

2013-05-03 Thread Christoph Bumiller
On 03.05.2013 16:32, Jose Fonseca wrote: - Original Message - Am 03.05.2013 06:58, schrieb Jose Fonseca: - Original Message - Currently, there's no way to get the high bits of a 32x32 signed/unsigned integer multiplication with tgsi. However, all of d3d10, OpenGL, and

Re: [Mesa-dev] RFC: tgsi opcodes for 32x32 muls with 64bit results

2013-05-03 Thread Roland Scheidegger
Am 03.05.2013 16:32, schrieb Jose Fonseca: - Original Message - Am 03.05.2013 06:58, schrieb Jose Fonseca: - Original Message - Currently, there's no way to get the high bits of a 32x32 signed/unsigned integer multiplication with tgsi. However, all of d3d10, OpenGL, and

Re: [Mesa-dev] RFC: tgsi opcodes for 32x32 muls with 64bit results

2013-05-03 Thread Roland Scheidegger
Am 03.05.2013 16:45, schrieb Christoph Bumiller: On 03.05.2013 16:32, Jose Fonseca wrote: - Original Message - Am 03.05.2013 06:58, schrieb Jose Fonseca: - Original Message - Currently, there's no way to get the high bits of a 32x32 signed/unsigned integer multiplication

[Mesa-dev] RFC: tgsi opcodes for 32x32 muls with 64bit results

2013-05-02 Thread Roland Scheidegger
Currently, there's no way to get the high bits of a 32x32 signed/unsigned integer multiplication with tgsi. However, all of d3d10, OpenGL, and OpenCL support that, so we need it as well. There's essentially two ways how it could be done: - a 2-destination instruction returning both high and low

Re: [Mesa-dev] RFC: tgsi opcodes for 32x32 muls with 64bit results

2013-05-02 Thread Jose Fonseca
- Original Message - Currently, there's no way to get the high bits of a 32x32 signed/unsigned integer multiplication with tgsi. However, all of d3d10, OpenGL, and OpenCL support that, so we need it as well. There's essentially two ways how it could be done: - a 2-destination