Re: [Mesa-dev] NIR constant problem for GPU which doesn't have native integer support

2019-01-07 Thread Erik Faye-Lund
On Fri, 2019-01-04 at 09:40 -0600, Jason Ekstrand wrote: > On Fri, Jan 4, 2019 at 4:07 AM Erik Faye-Lund < > erik.faye-l...@collabora.com> wrote: > > On Thu, 2019-01-03 at 11:58 -0600, Jason Ekstrand wrote: > > > On Thu, Jan 3, 2019 at 3:39 AM Erik Faye-Lund < > > > erik.faye-l...@collabora.com>

Re: [Mesa-dev] NIR constant problem for GPU which doesn't have native integer support

2019-01-05 Thread Jason Ekstrand
Qiang, Sorry things got so side-tracked Going back to the original conversation, I mentioned that there are two general methods to solve this: Making glsl_to_nir generate int-free NIR and doing some sort of lowering. I believe Jonathan is attempting the first in which case the patch you

Re: [Mesa-dev] NIR constant problem for GPU which doesn't have native integer support

2019-01-04 Thread Qiang Yu
Thanks for your guys' information, although it's much deeper than my question and also my understanding of the NIR and compiler knowledge. This patch fix my problem: https://patchwork.freedesktop.org/patch/268946/ But seems it's not the final solution, right? And I'm not sure if we will have

Re: [Mesa-dev] NIR constant problem for GPU which doesn't have native integer support

2019-01-04 Thread Ilia Mirkin
On Fri, Jan 4, 2019 at 10:46 AM Jason Ekstrand wrote: > > On Fri, Jan 4, 2019 at 4:07 AM Erik Faye-Lund > wrote: >> >> On Thu, 2019-01-03 at 11:58 -0600, Jason Ekstrand wrote: >> > On Thu, Jan 3, 2019 at 3:39 AM Erik Faye-Lund < >> > erik.faye-l...@collabora.com> wrote: >> > > On Wed,

Re: [Mesa-dev] NIR constant problem for GPU which doesn't have native integer support

2019-01-04 Thread Jason Ekstrand
On Fri, Jan 4, 2019 at 4:07 AM Erik Faye-Lund wrote: > On Thu, 2019-01-03 at 11:58 -0600, Jason Ekstrand wrote: > > On Thu, Jan 3, 2019 at 3:39 AM Erik Faye-Lund < > > erik.faye-l...@collabora.com> wrote: > > > On Wed, 2019-01-02 at 10:16 -0600, Jason Ekstrand wrote: > > > > On Wed, Jan 2, 2019

Re: [Mesa-dev] NIR constant problem for GPU which doesn't have native integer support

2019-01-04 Thread Erik Faye-Lund
On Thu, 2019-01-03 at 11:58 -0600, Jason Ekstrand wrote: > On Thu, Jan 3, 2019 at 3:39 AM Erik Faye-Lund < > erik.faye-l...@collabora.com> wrote: > > On Wed, 2019-01-02 at 10:16 -0600, Jason Ekstrand wrote: > > > On Wed, Jan 2, 2019 at 9:43 AM Ilia Mirkin > > > wrote: > > > > Have a look at the

Re: [Mesa-dev] NIR constant problem for GPU which doesn't have native integer support

2019-01-03 Thread Roland Scheidegger
Am 03.01.19 um 20:50 schrieb Jason Ekstrand: > > The problem you're describing is in converting from NIR to another IR, > > not to hardware.  In LLVM they made a choice to put types on SSA > values > > but then to have the actual semantics be based on the instruction > >

Re: [Mesa-dev] NIR constant problem for GPU which doesn't have native integer support

2019-01-03 Thread Jason Ekstrand
On Thu, Jan 3, 2019 at 2:03 PM Bas Nieuwenhuizen wrote: > On Thu, Jan 3, 2019 at 6:59 PM Jason Ekstrand > wrote: > > > > On Thu, Jan 3, 2019 at 3:39 AM Erik Faye-Lund < > erik.faye-l...@collabora.com> wrote: > >> > >> On Wed, 2019-01-02 at 10:16 -0600, Jason Ekstrand wrote: > >> > On Wed, Jan

Re: [Mesa-dev] NIR constant problem for GPU which doesn't have native integer support

2019-01-03 Thread Bas Nieuwenhuizen
On Thu, Jan 3, 2019 at 6:59 PM Jason Ekstrand wrote: > > On Thu, Jan 3, 2019 at 3:39 AM Erik Faye-Lund > wrote: >> >> On Wed, 2019-01-02 at 10:16 -0600, Jason Ekstrand wrote: >> > On Wed, Jan 2, 2019 at 9:43 AM Ilia Mirkin >> > wrote: >> > > Have a look at the first 4 patches in the series

Re: [Mesa-dev] NIR constant problem for GPU which doesn't have native integer support

2019-01-03 Thread Jason Ekstrand
On Thu, Jan 3, 2019 at 1:37 PM Roland Scheidegger wrote: > Am 03.01.19 um 18:58 schrieb Jason Ekstrand: > > On Thu, Jan 3, 2019 at 3:39 AM Erik Faye-Lund > > mailto:erik.faye-l...@collabora.com>> > wrote: > > > > On Wed, 2019-01-02 at 10:16 -0600, Jason Ekstrand wrote: > > > On Wed, Jan

Re: [Mesa-dev] NIR constant problem for GPU which doesn't have native integer support

2019-01-03 Thread Roland Scheidegger
Am 03.01.19 um 18:58 schrieb Jason Ekstrand: > On Thu, Jan 3, 2019 at 3:39 AM Erik Faye-Lund > mailto:erik.faye-l...@collabora.com>> wrote: > > On Wed, 2019-01-02 at 10:16 -0600, Jason Ekstrand wrote: > > On Wed, Jan 2, 2019 at 9:43 AM Ilia Mirkin > >

Re: [Mesa-dev] NIR constant problem for GPU which doesn't have native integer support

2019-01-03 Thread Jason Ekstrand
On Thu, Jan 3, 2019 at 3:39 AM Erik Faye-Lund wrote: > On Wed, 2019-01-02 at 10:16 -0600, Jason Ekstrand wrote: > > On Wed, Jan 2, 2019 at 9:43 AM Ilia Mirkin > > wrote: > > > Have a look at the first 4 patches in the series from Jonathan > > > Marek > > > to address some of these issues: > > >

Re: [Mesa-dev] NIR constant problem for GPU which doesn't have native integer support

2019-01-03 Thread Erik Faye-Lund
On Wed, 2019-01-02 at 10:16 -0600, Jason Ekstrand wrote: > On Wed, Jan 2, 2019 at 9:43 AM Ilia Mirkin > wrote: > > Have a look at the first 4 patches in the series from Jonathan > > Marek > > to address some of these issues: > > > > https://patchwork.freedesktop.org/series/54295/ > > > > Not

Re: [Mesa-dev] NIR constant problem for GPU which doesn't have native integer support

2019-01-02 Thread Ilia Mirkin
On Wed, Jan 2, 2019 at 11:17 AM Jason Ekstrand wrote: > > On Wed, Jan 2, 2019 at 9:43 AM Ilia Mirkin wrote: >> >> Have a look at the first 4 patches in the series from Jonathan Marek >> to address some of these issues: >> >> https://patchwork.freedesktop.org/series/54295/ >> >> Not sure exactly

Re: [Mesa-dev] NIR constant problem for GPU which doesn't have native integer support

2019-01-02 Thread Jason Ekstrand
On Wed, Jan 2, 2019 at 9:43 AM Ilia Mirkin wrote: > Have a look at the first 4 patches in the series from Jonathan Marek > to address some of these issues: > > https://patchwork.freedesktop.org/series/54295/ > > Not sure exactly what state that work is in, but I've added Jonathan > to CC,

Re: [Mesa-dev] NIR constant problem for GPU which doesn't have native integer support

2019-01-02 Thread Ilia Mirkin
Have a look at the first 4 patches in the series from Jonathan Marek to address some of these issues: https://patchwork.freedesktop.org/series/54295/ Not sure exactly what state that work is in, but I've added Jonathan to CC, perhaps he can provide an update. Cheers, -ilia On Wed, Jan 2,

[Mesa-dev] NIR constant problem for GPU which doesn't have native integer support

2019-01-02 Thread Qiang Yu
Hi guys, I found the problem with this test fragment shader when lima development: uniform int color; void main() { if (color > 1) gl_FragColor = vec4(1.0, 0.0, 0.0, 1); else gl_FragColor = vec4(0.0, 1.0, 0.0, 1); } nir_print_shader output: impl main { block