[Mesa-dev] [PATCH] panfrost: Report sRGB colorspace as not supported

2019-06-06 Thread Boris Brezillon
The driver does not support sRGB yet, so let's report it as unsupported. Signed-off-by: Boris Brezillon --- src/gallium/drivers/panfrost/pan_screen.c | 4 1 file changed, 4 insertions(+) diff --git a/src/gallium/drivers/panfrost/pan_screen.c b/src/gallium/drivers/panfrost/pan_scr

Re: [Mesa-dev] [PATCH] panfrost: Report sRGB colorspace as not supported

2019-06-06 Thread Boris Brezillon
On Thu, 6 Jun 2019 12:24:48 -0700 Alyssa Rosenzweig wrote: > R-b: , but please use my c.c address from now on; I don't > normally get email here on work hours. Thank you! Updated my alias file to fix that. Thanks. Boris ___ mesa-dev mailing list me

[Mesa-dev] [PATCH] panfrost: Fix general purpose varying handling

2019-06-13 Thread Boris Brezillon
When both the fragment and vertex shaders point to the same varying location they expect to share the same varying slot. Make sure vertex and fragment varyings pointing to the same loc have ->src_offset set to the same value. Signed-off-by: Boris Brezillon --- Found the bug while debugg

[Mesa-dev] [PATCH RFC 1/2] nir/lower_tex: Actually report when projector lowering happened

2019-06-17 Thread Boris Brezillon
doing: do progress = nir_lower_tex(); while (progress); Signed-off-by: Boris Brezillon --- src/compiler/nir/nir_lower_tex.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/compiler/nir/nir_lower_tex.c b/src/compiler/nir/nir_lower_tex.c index c29581d

[Mesa-dev] [PATCH RFC 0/2] nir/lower_tex: Fix progress report when called in a loop

2019-06-17 Thread Boris Brezillon
these). So, my question is, are nir_lower_tex() users supposed to clear options flags manually after this pass and limit the number of passes (through some experimenting) or should we try to fix nir_lower_tex()? Regards, Boris Boris Brezillon (2): nir/lower_tex: Actually report when projector lo

[Mesa-dev] [PATCH RFC 2/2] nir/lower_tex: Update ->sampler_dim value before calling get_texture_size()

2019-06-17 Thread Boris Brezillon
nt passes. Signed-off-by: Boris Brezillon --- Another option would be to not call lower_rect() when the instruction is a txs op. --- src/compiler/nir/nir_lower_tex.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/compiler/nir/nir_lower_tex.c b/src/compiler/nir/nir_lower

[Mesa-dev] [PATCH 5/6] panfrost: Move sysval upload logic out of panfrost_emit_for_draw()

2019-06-17 Thread Boris Brezillon
We're about to add more sysval types, and panfrost_emit_for_draw() is big enough, so let's move the sysval upload logic in a separate function. We also add one sub-function per sysval type to keep the panfrost_upload_sysvals() small/readable. Signed-off-by: Boris Brezillon --- s

[Mesa-dev] [PATCH 1/6] nir/builder: Add the nir_imm_ivec3() helper

2019-06-17 Thread Boris Brezillon
We already have nir_imm_ivec2() and nir_imm_ivec4(), let's add nir_imm_ivec3() instead of open-coding the logic. Signed-off-by: Boris Brezillon --- src/compiler/nir/nir_builder.h | 13 + 1 file changed, 13 insertions(+) diff --git a/src/compiler/nir/nir_builder.h b/src/compile

[Mesa-dev] [PATCH 0/6] panfrost: Add support for TXS instructions

2019-06-17 Thread Boris Brezillon
logic moved to the panfrost driver. Regards, Boris Boris Brezillon (6): nir/builder: Add the nir_imm_ivec3() helper nir/lower_tex: Add a way to lower TXS(non-0-LOD) instructions panfrost: Control texop value earlier panfrost: Make the sysval logic more generic panfrost: Move sysval u

[Mesa-dev] [PATCH 4/6] panfrost: Make the sysval logic more generic

2019-06-17 Thread Boris Brezillon
a txs instruction. Signed-off-by: Boris Brezillon --- .../panfrost/midgard/midgard_compile.c| 65 --- 1 file changed, 41 insertions(+), 24 deletions(-) diff --git a/src/gallium/drivers/panfrost/midgard/midgard_compile.c b/src/gallium/drivers/panfrost/midgard/midgard_compile.c

[Mesa-dev] [PATCH 3/6] panfrost: Control texop value earlier

2019-06-17 Thread Boris Brezillon
we can easily branch to a different path when needed. Signed-off-by: Boris Brezillon --- src/gallium/drivers/panfrost/midgard/midgard_compile.c | 8 1 file changed, 8 insertions(+) diff --git a/src/gallium/drivers/panfrost/midgard/midgard_compile.c b/src/gallium/drivers/panfrost/midgard/midg

[Mesa-dev] [PATCH 6/6] panfrost: Add support for TXS instructions

2019-06-17 Thread Boris Brezillon
This patch adds support for nir_texop_txs instructions which are needed to support the OpenGL textureSize() function. This is also needed to support RECT texture sampling which is currently lowered to 2D sampling + a TXS() instruction by the nir_lower_tex() helper. Signed-off-by: Boris Brezillon

[Mesa-dev] [PATCH 2/6] nir/lower_tex: Add a way to lower TXS(non-0-LOD) instructions

2019-06-17 Thread Boris Brezillon
The V3D driver has an open-coded solution for this, and we need the same thing for Panfrost, so let's add a generic way to lower TXS(LOD) into max(TXS(0) >> LOD, 1). Signed-off-by: Boris Brezillon --- src/compiler/nir/nir.h | 6 src/compiler/nir/nir_lower

Re: [Mesa-dev] [PATCH 3/6] panfrost: Control texop value earlier

2019-06-17 Thread Boris Brezillon
On Mon, 17 Jun 2019 06:56:11 -0700 Alyssa Rosenzweig wrote: > This conflicts with texture bias/LOD work (in a functional sense, not > a git sense). No problem, I'll rebase once this work has landed. > We can probably reuse the switch from the previous > function rather than duplicating the op l

Re: [Mesa-dev] [PATCH 3/6] panfrost: Control texop value earlier

2019-06-17 Thread Boris Brezillon
On Mon, 17 Jun 2019 07:09:16 -0700 Alyssa Rosenzweig wrote: > > No problem, I'll rebase once this work has landed. > > I thought it has? Then it's all good (I'm based on mesa master from today, and just fetched/rebased 2 minutes ago to make sure I had everything). > > > Hm, the list of allo

Re: [Mesa-dev] [PATCH RFC 0/2] nir/lower_tex: Fix progress report when called in a loop

2019-06-17 Thread Boris Brezillon
n Mon, Jun 17, 2019 at 5:21 AM Boris Brezillon < > boris.brezil...@collabora.com> wrote: > > > Hello, > > > > I've recently been working on adding a new lowering option to the > > lower_tex() logic and found out that doing > > > >

Re: [Mesa-dev] [PATCH RFC 2/2] nir/lower_tex: Update ->sampler_dim value before calling get_texture_size()

2019-06-17 Thread Boris Brezillon
On Mon, 17 Jun 2019 11:00:22 -0500 Jason Ekstrand wrote: > On Mon, Jun 17, 2019 at 5:21 AM Boris Brezillon < > boris.brezil...@collabora.com> wrote: > > > get_texture_size() will create a txs instruction with ->sampler_dim set > > to the original tex->s

Re: [Mesa-dev] [PATCH 6/6] panfrost: Add support for TXS instructions

2019-06-17 Thread Boris Brezillon
On Mon, 17 Jun 2019 07:05:24 -0700 Alyssa Rosenzweig wrote: > > +/* > > + * Note: the first call is here to lower RECT and TXP, the second > > one > > + * to lower the TXS(lod) instructions generated by the RECT > > lowering > > + * done in the first pass. > > +

Re: [Mesa-dev] [PATCH 2/6] nir/lower_tex: Add a way to lower TXS(non-0-LOD) instructions

2019-06-17 Thread Boris Brezillon
On Mon, 17 Jun 2019 10:53:47 -0500 Jason Ekstrand wrote: > On Mon, Jun 17, 2019 at 5:49 AM Boris Brezillon < > boris.brezil...@collabora.com> wrote: > > > The V3D driver has an open-coded solution for this, and we need the > > same thing for Panfrost, so let'

Re: [Mesa-dev] [PATCH 1/6] nir/builder: Add the nir_imm_ivec3() helper

2019-06-18 Thread Boris Brezillon
On Mon, 17 Jun 2019 06:51:15 -0700 Alyssa Rosenzweig wrote: > Reviewed-by, seems like a good idea to have the full set :) I don't intend to post a v2 of that patch since the rework proposed by Jason means we no longer call nir_imm_vec4(). If you think it's still worth applying it, feel free to p

[Mesa-dev] [PATCH v2 1/2] nir/lower_tex: Actually report when projector lowering happened

2019-06-18 Thread Boris Brezillon
The code considers that projector lowering was done even if it's not really the case. Change the project_src() prototype to return a bool encoding whether projector lowering happened or not and update the progress var accordingly in nir_lower_tex_block(). Signed-off-by: Boris Brezillon Rev

[Mesa-dev] [PATCH v2 2/2] nir/lower_tex: Update ->sampler_dim value before calling get_texture_size()

2019-06-18 Thread Boris Brezillon
nt passes. Signed-off-by: Boris Brezillon Reviewed-by: Jason Ekstrand --- Changes in v2: * Add Jason R-b * Add a comment explaining why we patch ->sampler_dim at the beginning of the lower_rect() func --- src/compiler/nir/nir_lower_tex.c | 7 +-- 1 file changed, 5 insertions(+), 2 de

[Mesa-dev] [PATCH v2 4/5] panfrost: Prepare things to support non-native texture ops

2019-06-18 Thread Boris Brezillon
We are about to add support for the TXS (texture size) op which is not implemented using a midgard texture instruction. Let's rename emit_tex() into emit_texop_native() and repurpose emit_tex() as a dispatcher. Signed-off-by: Boris Brezillon --- Changes in v2: * New patch --- .../pan

[Mesa-dev] [PATCH v2 1/5] nir/lower_tex: Add a way to lower TXS(non-0-LOD) instructions

2019-06-18 Thread Boris Brezillon
The V3D driver has an open-coded solution for this, and we need the same thing for Panfrost, so let's add a generic way to lower TXS(LOD) into max(TXS(0) >> LOD, 1). Signed-off-by: Boris Brezillon --- Changes in v2: * Use == 0 instead of ! * Rework the minification logic as suggest

[Mesa-dev] [PATCH v2 0/5] panfrost: Add support for TXS instructions

2019-06-18 Thread Boris Brezillon
logic moved to the panfrost driver. Regards, Boris Changes in v2: * Drop the patch adding nir_imm_ivec3() * Rework the emit_tex() logic to avoid duplicate the switch(texop) statement * Split options for the first and second tex lowering passes Boris Brezillon (5): nir/lower_tex: Add a way t

[Mesa-dev] [PATCH v2 5/5] panfrost: Add support for TXS instructions

2019-06-18 Thread Boris Brezillon
This patch adds support for nir_texop_txs instructions which are needed to support the OpenGL textureSize() function. This is also needed to support RECT texture sampling which is currently lowered to 2D sampling + a TXS() instruction by the nir_lower_tex() helper. Signed-off-by: Boris Brezillon

[Mesa-dev] [PATCH v2 2/5] panfrost: Make the sysval logic more generic

2019-06-18 Thread Boris Brezillon
a txs instruction. Signed-off-by: Boris Brezillon Reviewed-by: Alyssa Rosenzweig --- Changes in v2: * Add Alyssa's R-b --- .../panfrost/midgard/midgard_compile.c| 65 --- 1 file changed, 41 insertions(+), 24 deletions(-) diff --git a/src/gallium/drivers/panfro

[Mesa-dev] [PATCH v2 3/5] panfrost: Move sysval upload logic out of panfrost_emit_for_draw()

2019-06-18 Thread Boris Brezillon
We're about to add more sysval types, and panfrost_emit_for_draw() is big enough, so let's move the sysval upload logic in a separate function. We also add one sub-function per sysval type to keep the panfrost_upload_sysvals() small/readable. Signed-off-by: Boris Brezillon Reviewed-

Re: [Mesa-dev] [PATCH v2 1/5] nir/lower_tex: Add a way to lower TXS(non-0-LOD) instructions

2019-06-19 Thread Boris Brezillon
Hi Jason, On Tue, 18 Jun 2019 09:45:56 -0500 Jason Ekstrand wrote: > On Tue, Jun 18, 2019 at 2:38 AM Boris Brezillon < > boris.brezil...@collabora.com> wrote: > > > The V3D driver has an open-coded solution for this, and we need the > > same thing for Panfrost, so

[Mesa-dev] [PATCH] nir/lower_tex: Add an assert() in nir_lower_txs_lod()

2019-06-19 Thread Boris Brezillon
We don't expect the output of a TXS instruction to be wider than a vec3. Add an assert() to make sure this never happens. Suggested-by: Jason Ekstrand Signed-off-by: Boris Brezillon --- src/compiler/nir/nir_lower_tex.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/compile

[Mesa-dev] [PATCH 1/2] panfrost: Kill the perf counters interface

2019-06-21 Thread Boris Brezillon
The DRM driver has a dummy implementation and the non-drm backend is gone, so let's kill this perf counter interface. Signed-off-by: Boris Brezillon --- src/gallium/drivers/panfrost/pan_context.c | 14 -- src/gallium/drivers/panfrost/pan_drm.c | 14 -- src/ga

[Mesa-dev] [PATCH 2/2] panfrost: Kill the panfrost_driver abstraction

2019-06-21 Thread Boris Brezillon
The non-drm backend is gone and there's no plan to bring it back to life. Let's get rid of the panfrost_driver abstraction and call the panfrost_drm_xxx() functions directly. Signed-off-by: Boris Brezillon --- src/gallium/drivers/panfrost/pan_afbc.c | 2 +- src/gallium/driver

<    1   2   3   4