Re: [Freedreno] [PATCH] ir3_compiler/nir: fix imageSize() for buffer-backed images

2018-10-23 Thread Ilia Mirkin
On Tue, Oct 23, 2018 at 3:03 PM Eduardo Lima Mitev wrote: > > GL_EXT_texture_buffer introduced texture buffers, which can be used > in shaders through a new type imageBuffer. > > Because how image access is implemented in freedreno, calling > imageSize on an imageBuffer returns the size in bytes i

Re: [Freedreno] [Mesa-dev] [PATCH] freedreno/ir3: Make imageStore use num components from image format

2018-12-17 Thread Ilia Mirkin
Note that the format may not be known. I suspect that falls into your "default" case. On Mon, Dec 17, 2018 at 3:41 PM Eduardo Lima Mitev wrote: > > emit_intrinsic_store_image() is always using 4 components when > collecting registers for the value. When image has less than > 4 components (e.g, r32

Re: [Freedreno] [Mesa-dev] [RFC 2/4] nir: Add a new ALU nir_op_imad

2019-01-25 Thread Ilia Mirkin
IMAD_S24 isn't src0 * src1 + src2 though. I think this could be called imad24, which I suspect exits on many GPUs (nv50-era NVIDIA definitely had this, and I think maxwell+ has a variant of this implemented by XMAD): (src0 * src1) & 0xff + src2 Cheers, -ilia On Fri, Jan 25, 2019 at 10:49

Re: [Freedreno] [Mesa-dev] [RFC 2/4] nir: Add a new ALU nir_op_imad

2019-01-25 Thread Ilia Mirkin
On Fri, Jan 25, 2019 at 10:58 AM Ilia Mirkin wrote: > > IMAD_S24 isn't src0 * src1 + src2 though. I think this could be called > imad24, which I suspect exits on many GPUs (nv50-era NVIDIA definitely > had this, and I think maxwell+ has a variant of this implemented by > XMA

Re: [Freedreno] [Mesa-dev] [RFC 2/4] nir: Add a new ALU nir_op_imad

2019-01-25 Thread Ilia Mirkin
The specification in NIR has to be exact. Otherwise it will constant-fold in a way that doesn't reflect what the hardware would do, leading to subtle bugs. On Fri, Jan 25, 2019 at 11:06 AM Eduardo Lima Mitev wrote: > > On 1/25/19 5:01 PM, Ilia Mirkin wrote: > > On Fri, Jan 25,

[Freedreno] [PATCH] drm/msm: avoid double-attaching hdmi/edp bridges

2020-03-11 Thread Ilia Mirkin
) Cc: Boris Brezillon Signed-off-by: Ilia Mirkin --- drivers/gpu/drm/msm/edp/edp.c | 4 drivers/gpu/drm/msm/hdmi/hdmi.c | 4 2 files changed, 8 deletions(-) diff --git a/drivers/gpu/drm/msm/edp/edp.c b/drivers/gpu/drm/msm/edp/edp.c index ad4e963ccd9b..106a67473af5 100644 --- a/drivers

[Freedreno] [PATCH] a3xx, a4xx: fix Z_CLAMP_ENABLE name in RB_DEPTH_CONTROL

2016-08-14 Thread Ilia Mirkin
This bit appears in the original revision of the db410c docs, and is tested on a4xx to work. --- rnndb/adreno/a3xx.xml | 2 +- rnndb/adreno/a4xx.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rnndb/adreno/a3xx.xml b/rnndb/adreno/a3xx.xml index 6228804..980f711 100644 --

[Freedreno] [PATCH] freedreno: fix depth clamping on a3xx/a4xx

2016-08-14 Thread Ilia Mirkin
new depth implementation, which seems to work better with this patch. Tested on a4xx but not a3xx. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97231 Signed-off-by: Ilia Mirkin --- src/gallium/drivers/freedreno/a3xx/a3xx.xml.h | 2 +- src/gallium/drivers/freedreno/a3xx/fd3_e

[Freedreno] [PATCH] a4xx: add some comments around CL_NDRANGE values

2016-08-15 Thread Ilia Mirkin
--- rnndb/adreno/a4xx.xml | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rnndb/adreno/a4xx.xml b/rnndb/adreno/a4xx.xml index 9f4c3d2..12f28b5 100644 --- a/rnndb/adreno/a4xx.xml +++ b/rnndb/adreno/a4xx.xml @@ -2107,12 +2107,12 @@ perhaps they should be taken with a grai

[Freedreno] [PATCH] a4xx: add separate near/far clipping disable bits

2016-08-18 Thread Ilia Mirkin
--- rnndb/adreno/a4xx.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rnndb/adreno/a4xx.xml b/rnndb/adreno/a4xx.xml index 12f28b5..c1b5c53 100644 --- a/rnndb/adreno/a4xx.xml +++ b/rnndb/adreno/a4xx.xml @@ -1948,6 +1948,8 @@ perhaps they should be taken with a grain of salt

[Freedreno] [PATCH 2/2] a4xx: make sure to actually clamp depth as requested

2016-08-18 Thread Ilia Mirkin
p.org/show_bug.cgi?id=97231 Signed-off-by: Ilia Mirkin Cc: mesa-sta...@lists.freedesktop.org --- src/gallium/drivers/freedreno/a4xx/a4xx.xml.h | 2 +- src/gallium/drivers/freedreno/a4xx/fd4_emit.c | 29 ++- 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/src/ga

[Freedreno] [PATCH 1/2] a4xx: only disable depth clipping, not all clipping, when requested

2016-08-18 Thread Ilia Mirkin
The previous bit disables the whole clipper, including the regular viewport-related clipping that would go on. The two new bits disable near and far clipping (separately, as verified with the depth-clamp-range piglit). Signed-off-by: Ilia Mirkin Cc: mesa-sta...@lists.freedesktop.org --- src

[Freedreno] [PATCH] a3xx: make use of software clipping when hw can't handle it

2016-08-19 Thread Ilia Mirkin
The hw clipper only handles up to 6 UCPs. If there are more than 6 UCPs, or a clip vertex, or clip distances are in use, then we must use the fallback discard-based clipping from the frag shader. Signed-off-by: Ilia Mirkin --- src/gallium/drivers/freedreno/a3xx/fd3_draw.c| 4 src

[Freedreno] [PATCH 1/3] a3xx: make sure to actually clamp depth as requested

2016-08-30 Thread Ilia Mirkin
p.org/show_bug.cgi?id=97231 Signed-off-by: Ilia Mirkin Cc: mesa-sta...@lists.freedesktop.org --- src/gallium/drivers/freedreno/a3xx/a3xx.xml.h | 2 +- src/gallium/drivers/freedreno/a3xx/fd3_emit.c | 30 ++- 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/src/ga

[Freedreno] [PATCH 2/3] a3xx: make use of software clipping when hw can't handle it

2016-08-30 Thread Ilia Mirkin
The hw clipper only handles up to 6 UCPs. If there are more than 6 UCPs, or a clip vertex, or clip distances are in use, then we must use the fallback discard-based clipping from the frag shader. Signed-off-by: Ilia Mirkin Cc: mesa-sta...@lists.freedesktop.org --- src/gallium/drivers/freedreno

[Freedreno] [PATCH 3/3] a3xx: use window scissor to simulate viewport xy clip

2016-08-30 Thread Ilia Mirkin
scissor. This may have slightly different behavior around wide points, but it's unlikely that anything depends on this. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97231 Signed-off-by: Ilia Mirkin Cc: mesa-sta...@lists.freedesktop.org --- src/gallium/drivers/freedreno/a3xx/fd3_e

[Freedreno] [PATCH] freedreno: pack texture buffer objects in 2d logical space

2016-09-04 Thread Ilia Mirkin
shader since otherwise we wouldn't be able to prevent a situation where the last line of the texture covers unallocated pages. Signed-off-by: Ilia Mirkin --- The limits we were previous allowing are too small. The spec requires at least 64K. src/gallium/drivers/freedreno/a3xx/fd3_text

[Freedreno] [PATCH 1/3] a5xx: update headers

2017-07-04 Thread Ilia Mirkin
Signed-off-by: Ilia Mirkin --- src/gallium/drivers/freedreno/a5xx/a5xx.xml.h | 57 ++- 1 file changed, 47 insertions(+), 10 deletions(-) diff --git a/src/gallium/drivers/freedreno/a5xx/a5xx.xml.h b/src/gallium/drivers/freedreno/a5xx/a5xx.xml.h index abcc53965ad

[Freedreno] [PATCH 3/3] a5xx: enable formats newly added to the headers

2017-07-04 Thread Ilia Mirkin
This enables S3TC, BPTC, ETC2, and ASTC texture decoding. Additionally this enables RGB32 texture buffer objects, as well as 11_11_10_FLOAT and 10_10_10_2 vertex formats (and related extensions). Signed-off-by: Ilia Mirkin --- src/gallium/drivers/freedreno/a5xx/fd5_format.c | 138

[Freedreno] [PATCH 2/3] a5xx: include color swap when decoding vertices

2017-07-04 Thread Ilia Mirkin
This fixes support for BGRA vertex formats Signed-off-by: Ilia Mirkin --- src/gallium/drivers/freedreno/a5xx/fd5_emit.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gallium/drivers/freedreno/a5xx/fd5_emit.c b/src/gallium/drivers/freedreno/a5xx/fd5_emit.c index f5c0bd27c35

[Freedreno] [PATCH] a5xx: fix primitive restart

2017-07-07 Thread Ilia Mirkin
Signed-off-by: Ilia Mirkin --- src/gallium/drivers/freedreno/a5xx/a5xx.xml.h | 3 ++- src/gallium/drivers/freedreno/a5xx/fd5_emit.c | 32 ++- 2 files changed, 23 insertions(+), 12 deletions(-) diff --git a/src/gallium/drivers/freedreno/a5xx/a5xx.xml.h b/src/gallium

[Freedreno] [PATCH] a5xx: fix condition for updating *_FS_OUTPUT_CNTL

2017-07-09 Thread Ilia Mirkin
The register values depend on the currently set program, so make sure to revalidate when the program changes. Fixes glsl-1.10-fragdepth as well as dEQP-GLES3.functional.shaders.fragdepth.compare.* Signed-off-by: Ilia Mirkin --- src/gallium/drivers/freedreno/a5xx/fd5_emit.c | 2 +- 1 file

Re: [Freedreno] Whether A200 driver is supported by Linux Mainline Kernel

2017-07-10 Thread Ilia Mirkin
On Mon, Jul 10, 2017 at 10:53 AM, abhijit wrote: > Hi Rob, > > Thank you very much for your reply. > > I ensured that --enable-freedreno-kgsl is enabled in libdrm build and the > same is copied to target > > The issue seems to be in mesa build > > I observed that there are two mechanism in which a

[Freedreno] [PATCH] freedreno/ir3: fix load_front_face conversion

2017-07-11 Thread Ilia Mirkin
-frontfacing-not.shader_test and dEQP-GLES3.functional.shaders.builtin_variable.frontfacing on A530. Signed-off-by: Ilia Mirkin --- src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/gallium/drivers/freedreno/ir3

[Freedreno] [PATCH] a2xx: only update rasterizer settings when they're there

2017-08-15 Thread Ilia Mirkin
The rasterizer being empty can happen e.g. during clears Signed-off-by: Ilia Mirkin --- src/gallium/drivers/freedreno/a2xx/fd2_emit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/freedreno/a2xx/fd2_emit.c b/src/gallium/drivers/freedreno/a2xx

[Freedreno] [PATCH] a2xx: add support for a few 16-bit color rendering formats

2017-08-24 Thread Ilia Mirkin
The rest should be possible too, just needs some additional investigation. Passes fbo-*-formats piglit tests. Signed-off-by: Ilia Mirkin --- src/gallium/drivers/freedreno/a2xx/fd2_gmem.c | 5 + src/gallium/drivers/freedreno/a2xx/fd2_screen.c | 7 ++- 2 files changed, 11 insertions

[Freedreno] [PATCH 1/2] nir: allow texture offsets with cube maps

2017-11-19 Thread Ilia Mirkin
GL doesn't have this, but some hardware supports it. This is convenient for lowering tg4 to plain texture calls, which is necessary on Adreno A4xx hardware. Signed-off-by: Ilia Mirkin --- src/compiler/nir/nir.h | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --

[Freedreno] [PATCH 2/2] freedreno/ir3: add a pass to lower tg4 to txl, enable gather on a4xx

2017-11-19 Thread Ilia Mirkin
; diff --git a/src/gallium/drivers/freedreno/ir3/ir3_nir_lower_tg4_to_tex.c b/src/gallium/drivers/freedreno/ir3/ir3_nir_lower_tg4_to_tex.c new file mode 100644 index 000..087688cd234 --- /dev/null +++ b/src/gallium/drivers/freedreno/ir3/ir3_nir_lower_tg4_to_tex.c @@ -0,0 +1,139 @@ +/* + * Copyright

[Freedreno] [PATCH] freedreno/a4xx: add stencil texturing support

2017-11-19 Thread Ilia Mirkin
Copied from a5xx, should be identical. Signed-off-by: Ilia Mirkin --- docs/features.txt| 6 ++--- src/gallium/drivers/freedreno/a4xx/fd4_emit.c| 2 ++ src/gallium/drivers/freedreno/a4xx/fd4_format.c | 11 +--- src/gallium/drivers/freedreno/a4xx

Re: [Freedreno] [Mesa-dev] [PATCH 1/2] nir: allow texture offsets with cube maps

2017-11-20 Thread Ilia Mirkin
On Mon, Nov 20, 2017 at 5:16 PM, Jason Ekstrand wrote: > On Sun, Nov 19, 2017 at 11:54 AM, Ilia Mirkin wrote: >> >> GL doesn't have this, but some hardware supports it. This is convenient >> for lowering tg4 to plain texture calls, which is necessary on Adreno >>

Re: [Freedreno] [Mesa-dev] [PATCH 1/2] nir: allow texture offsets with cube maps

2017-11-20 Thread Ilia Mirkin
On Mon, Nov 20, 2017 at 7:08 PM, Jason Ekstrand wrote: > On Mon, Nov 20, 2017 at 3:11 PM, Ilia Mirkin wrote: >> >> On Mon, Nov 20, 2017 at 5:16 PM, Jason Ekstrand >> wrote: >> > On Sun, Nov 19, 2017 at 11:54 AM, Ilia Mirkin >> > wrote: >> >

[Freedreno] [PATCH v2 2/2] freedreno/ir3: add a pass to lower tg4 to txl, enable gather on a4xx

2017-11-25 Thread Ilia Mirkin
w file mode 100644 index 000..de304bffbc3 --- /dev/null +++ b/src/gallium/drivers/freedreno/ir3/ir3_nir_lower_tg4_to_tex.c @@ -0,0 +1,140 @@ +/* + * Copyright © 2017 Ilia Mirkin + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associate

[Freedreno] [PATCH v2 1/2] nir: allow texture offsets with cube maps

2017-11-25 Thread Ilia Mirkin
GL doesn't have this, but some hardware supports it. This is convenient for lowering tg4 to plain texture calls, which is necessary on Adreno A4xx hardware. Signed-off-by: Ilia Mirkin Reviewed-by: Jason Ekstrand --- v1 -> v2: shuffled code around to use an if ladder src/compiler/n

[Freedreno] [PATCH 2/2] freedreno/a4xx: add indirect draw support

2017-11-25 Thread Ilia Mirkin
This is a copy of the a5xx logic. Fails a few tests, but basic functionality is there. Signed-off-by: Ilia Mirkin --- docs/features.txt| 6 ++--- src/gallium/drivers/freedreno/a4xx/fd4_draw.h| 29 src/gallium/drivers/freedreno

[Freedreno] [PATCH 1/2] freedreno: regenerate pm4 header, adjust code for new names

2017-11-25 Thread Ilia Mirkin
Signed-off-by: Ilia Mirkin --- src/gallium/drivers/freedreno/a5xx/fd5_compute.c | 6 +- src/gallium/drivers/freedreno/a5xx/fd5_draw.h| 2 +- src/gallium/drivers/freedreno/adreno_pm4.xml.h | 277 ++- 3 files changed, 171 insertions(+), 114 deletions(-) diff --git a

[Freedreno] [PATCH] freedreno/a4xx: add ARB_framebuffer_no_attachments support

2017-11-25 Thread Ilia Mirkin
Signed-off-by: Ilia Mirkin --- docs/features.txt| 4 ++-- src/gallium/drivers/freedreno/a4xx/fd4_screen.c | 5 + src/gallium/drivers/freedreno/freedreno_screen.c | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/docs/features.txt b/docs

[Freedreno] [PATCH] freedreno/ir3: avoid using shr.b for immediate offset inputs

2017-11-26 Thread Ilia Mirkin
Since this is all happening as a post-optimization fixup, and offsets are generally immediates, we can just do the calculation directly. Signed-off-by: Ilia Mirkin --- Only very mildly tested. Noticed it when looking closely at our shaders, thinking why it tries to shift 0 by a constant. This

Re: [Freedreno] [PATCH] freedreno/ir3: avoid using shr.b for immediate offset inputs

2017-11-26 Thread Ilia Mirkin
On Sun, Nov 26, 2017 at 1:29 PM, Rob Clark wrote: > On Sun, Nov 26, 2017 at 12:08 PM, Ilia Mirkin wrote: >> Since this is all happening as a post-optimization fixup, and offsets >> are generally immediates, we can just do the calculation directly. >> >>

Re: [Freedreno] freedreno 3D test applications

2017-12-20 Thread Ilia Mirkin
On Thu, Dec 21, 2017 at 12:43 AM, priyanka more wrote: > Hi, > > I've cloned freedreno test applications from the bellow link. > https://github.com/freedreno-zz/freedreno/tree/master/tests-3d > > I'm working on 3d test cases, I've executed test-cube.c test-caps.c on > i.mx53 QSB environment, I got

[Freedreno] [PATCH] freedreno: set missing internal_format when importing texture

2017-12-21 Thread Ilia Mirkin
Fixes running piglits without -fbo. Probably lots of other stuff too. Signed-off-by: Ilia Mirkin --- src/gallium/drivers/freedreno/freedreno_resource.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gallium/drivers/freedreno/freedreno_resource.c b/src/gallium/drivers/freedreno

Re: [Freedreno] [PATCH 1/7] freedreno: a2xx: Update rnndb header

2018-01-25 Thread Ilia Mirkin
On Thu, Jan 25, 2018 at 8:29 AM, Wladimir J. van der Laan wrote: > Also update BLEND_ to BLEND2_ opcodes to accomodate. Are you saying this doesn't compile right now? I would have expected the accompanying change to a2xx.xml.h for that. Perhaps this landed into the wrong commit? Also it's odd th

Re: [Freedreno] [PATCH 4/7] freedreno: a2xx: Support TEXTURE_RECT

2018-01-25 Thread Ilia Mirkin
Should you also expose PIPE_CAP_TEXTURE_RECTANGLE? (Or whatever it's called... I forget.) On Thu, Jan 25, 2018 at 8:29 AM, Wladimir J. van der Laan wrote: > Denormalized texture coordinates are required for text rendering in > GALLIUM_HUD. > > Signed-off-by: Wladimir J. van der Laan > --- > src

Re: [Freedreno] Whether A200 driver is supported by Linux Mainline Kernel

2018-03-16 Thread Ilia Mirkin
Hi Abhijit, Looks like there may have been some duplication of effort... https://github.com/laanwj/linux-freedreno-a2xx/commits/4.15-rc5-rdu1-kgsl Seems to be based on 4.15 if the branch name is to be believed. -ilia On Fri, Mar 16, 2018 at 8:54 AM, abhijit wrote: > Hi Waldimir, > > Hi Wlad

Re: [Freedreno] [PATCH 4/7] freedreno: a2xx: Support TEXTURE_RECT

2018-03-22 Thread Ilia Mirkin
On Thu, Mar 22, 2018 at 10:43 AM, Wladimir J. van der Laan wrote: > Hello Ilia, > > On Thu, Jan 25, 2018 at 08:41:11AM -0500, Ilia Mirkin wrote: >> Should you also expose PIPE_CAP_TEXTURE_RECTANGLE? (Or whatever it's >> called... I forget.) > > I checked and I don

Re: [Freedreno] [PATCH v2 7/8] freedreno: a2xx: implement SEQ/SNE instructions

2018-03-22 Thread Ilia Mirkin
On Thu, Mar 22, 2018 at 11:26 AM, Wladimir J. van der Laan wrote: > Extend translate_sge_slt to emit these, in analogous fashion > but using CNDEv. > > Signed-off-by: Wladimir J. van der Laan > --- > src/gallium/drivers/freedreno/a2xx/fd2_compiler.c | 23 > --- > 1 file chan

Re: [Freedreno] [PATCH v2 0/8] freedreno: a2xx improvements

2018-03-22 Thread Ilia Mirkin
With the minor whitespace issue I pointed out (which might also apply to 8/8, couldn't tell), this is Reviewed-by: Ilia Mirkin On Thu, Mar 22, 2018 at 11:26 AM, Wladimir J. van der Laan wrote: > While working on a205 support for i.MX51/53, I've also written some patches > that