Re: [Mesa-dev] [PATCH libdrm] etnaviv: drop etna_bo_from_handle symbol

2019-05-29 Thread Philipp Zabel
On Wed, 2019-05-29 at 12:08 +0200, Lucas Stach wrote: > There is no implementation and also no users, so there is no point > in keeping it in the API. > > Signed-off-by: Lucas Stach Reviewed-by: Philipp Zabel This makes https://patchwork.kernel.org/patch/9912089/ obsolete. reg

[Mesa-dev] [PATCH] etnaviv: fill missing offset in etna_resource_get_handle

2019-05-03 Thread Philipp Zabel
Without this gbm_bo_get_offset() can return 0 where it shouldn't. --- src/gallium/drivers/etnaviv/etnaviv_resource.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gallium/drivers/etnaviv/etnaviv_resource.c b/src/gallium/drivers/etnaviv/etnaviv_resource.c index

Re: [Mesa-dev] [PATCH 8/8] etnaviv: handle YUV textures with the 2D GPU

2019-04-15 Thread Philipp Zabel
On Fri, 2019-04-12 at 19:38 +0200, Lucas Stach wrote: > This allows color space conversion and tiling in a single step, as > well as handling multi-planar formats like NV12, which are really > useful when dealing with hardware video decoders. > > Signed-off-by: Lucas Stach > --- >

Re: [Mesa-dev] [PATCH 4/6] st/dri: handle emulated YUV texture sampling in query_dma_buf_modifiers

2019-04-15 Thread Philipp Zabel
> + * formats natively, so we need a special case here to give a mostly > + * accurate answer to the modifiers query. > + */ "Mostly accurate" meaning that for IYUV this is correct, but for NV12 we are assuming that the drivers will return the same modifiers fo

Re: [Mesa-dev] [PATCH 6/6] st/mesa: skip any extra handling of YUV textures if driver supports them

2019-04-15 Thread Philipp Zabel
On Fri, 2019-04-12 at 19:33 +0200, Lucas Stach wrote: > If the driver provides native support for YUV textures we can skip > adding additional samplers and re-writing the shaders. > > Signed-off-by: Lucas Stach Reviewed-by: Philipp Zabel reg

Re: [Mesa-dev] [PATCH 5/6] st/dri: don't re-write plane format if supported by driver

2019-04-15 Thread Philipp Zabel
On Fri, 2019-04-12 at 19:33 +0200, Lucas Stach wrote: > If the driver supports multi-planar formats natively we don't want to > re-write the format of the planes on import. Split this out in a > separate function for clarity. > > Signed-off-by: Lucas Stach Reviewed-by: Philipp

Re: [Mesa-dev] [PATCH 7/8] etnaviv: improve PIPE_BIND_LINEAR handling

2019-04-15 Thread Philipp Zabel
to use LINEAR here > */ > return etna_resource_alloc(pscreen, layout, mode, DRM_FORMAT_MOD_LINEAR, > templat); > } Reviewed-by: Philipp Zabel regards Philipp ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 6/8] etnaviv: use filter blit for 2D YUV import on old GC320

2019-04-15 Thread Philipp Zabel
.dest = dst->bo, > +.dest_offset = 0, > +.dest_stride = dst->levels[0].stride, > +.dest_padded_height = dst->levels[0].padded_height, > +.downsample_x = 0, > +.downsample_y = 0, > + .swap_rb = 0, >

Re: [Mesa-dev] [PATCH 4/8] etnaviv: add 2D GPU YUV->RGB blitter

2019-04-15 Thread Philipp Zabel
On Fri, 2019-04-12 at 19:38 +0200, Lucas Stach wrote: > This adds a blit path using the 2D GPU for a linear YUV to tiled RGB > blit. This allows to implement importing of planar YUV textures with > a single copy. > > Signed-off-by: Lucas Stach > --- >

Re: [Mesa-dev] [PATCH 5/8] etnaviv: export etna_submit_rs_state

2019-04-15 Thread Philipp Zabel
er way, Reviewed-by: Philipp Zabel regards Philipp ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 2/8] etnaviv: clear out next pointer when allocating resource

2019-04-15 Thread Philipp Zabel
On Mon, 2019-04-15 at 12:31 +0200, Lucas Stach wrote: > Am Montag, den 15.04.2019, 12:20 +0200 schrieb Philipp Zabel: > > On Fri, 2019-04-12 at 19:38 +0200, Lucas Stach wrote: > > > We copy the template resource content into the newly allocated resource. > > > If the tem

Re: [Mesa-dev] [PATCH 4/8] etnaviv: add 2D GPU YUV->RGB blitter

2019-04-15 Thread Philipp Zabel
On Fri, 2019-04-12 at 19:38 +0200, Lucas Stach wrote: > This adds a blit path using the 2D GPU for a linear YUV to tiled RGB > blit. This allows to implement importing of planar YUV textures with > a single copy. > > Signed-off-by: Lucas Stach Reviewed-by: Philipp Zabel

Re: [Mesa-dev] [PATCH 2/8] etnaviv: clear out next pointer when allocating resource

2019-04-15 Thread Philipp Zabel
On Fri, 2019-04-12 at 19:38 +0200, Lucas Stach wrote: > We copy the template resource content into the newly allocated resource. > If the template derived from a planar resource this leads to a non reference > counted copy of the next resource pointer. Make sure to clear this out when > allocating

Re: [Mesa-dev] [PATCH 3/8] etnaviv: remember data offset into BO

2019-04-15 Thread Philipp Zabel
ne padding of the imported resource. */ > unsigned paddingX = 0, paddingY = 0; Reviewed-by: Philipp Zabel regards Philipp ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 1/8] etnaviv: create optional 2d pipe in screen

2019-04-15 Thread Philipp Zabel
On Fri, 2019-04-12 at 19:38 +0200, Lucas Stach wrote: > The 2D pipe is useful to implement fast planar and interleaved YUV buffer > imports. Not all systems have a 2D capable core, so this is strictly > optional. > > Signed-off-by: Lucas Stach > --- >

Re: [Mesa-dev] [PATCH 1/6] st/dri: allow to create image for formats that only support SV or RT binding

2019-04-15 Thread Philipp Zabel
0, 0, PIPE_BIND_SAMPLER_VIEW)) > + tex_usage |= PIPE_BIND_SAMPLER_VIEW; > + > + if (!tex_usage) > + return NULL; > > if (use & __DRI_IMAGE_USE_SCANOUT) >tex_usage |= PIPE_BIND_SCANOUT; Reviewed-by: Philipp Zabel regards Philipp ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH] nir: Optimize double-precision lower_round_even()

2019-01-29 Thread Philipp Zabel
On Tue, 2019-01-29 at 10:10 +0100, Erik Faye-Lund wrote: > On Mon, 2019-01-28 at 09:31 -0800, Matt Turner wrote: > > Use the trick of adding and then subtracting 2**52 (52 is the number > > of > > explicit mantissa bits a double-precision floating-point value has) > > to > > implement

Re: [Mesa-dev] [PATCH 4/4] etnaviv: annotate variables only used in debug build

2018-11-15 Thread Philipp Zabel
On Thu, 2018-11-15 at 15:37 +0100, Lucas Stach wrote: > Some of the status variables in the compiler are only used in asserts > and thus may be unused in release builds. Annotate them accordingly > to avoid 'unused but set' warnings from the compiler. > > Signed-off-by: Lucas Stach > --- >

Re: [Mesa-dev] [PATCH 3/4] etnaviv: enable full overwrite in a few more cases

2018-11-15 Thread Philipp Zabel
On Thu, 2018-11-15 at 15:37 +0100, Lucas Stach wrote: > Take into account the render target format when checking if the color > mask affects all channels of the RT. This allows to enable full > override in a few cases where a non-alpha format is used. > > Signed-off-by: Lucas Stach > --- >

Re: [Mesa-dev] [PATCH 2/4] etnaviv: use surface format directly

2018-11-15 Thread Philipp Zabel
>texture->format)) { > + translate_rs_format_rb_swap(pfb->cbufs[0]->format)) { There is another instance of this in etna_update_blend_color() below. With that added, Reviewed-by: Philipp Zabel >colormask = rt0->colormask & (PIPE_MASK_A | PIPE_MASK_G); >

Re: [Mesa-dev] [PATCH 1/4] etnaviv: use dummy RT buffer when rendering without color buffer

2018-11-15 Thread Philipp Zabel
000. Flushes and stalls don't seem to make any > difference. > > In order to stop the core from pushing the dirt into a precious real > render target, plug in dummy buffer when rendering without a color > buffer. > > Signed-off-by: Lucas Stach Reviewed-by

Re: [Mesa-dev] [PATCH mesa 2/2] wsi/wayland: only finish() a successfully init()ed display

2018-11-05 Thread Philipp Zabel
On Mon, 2018-11-05 at 10:00 +, Eric Engestrom wrote: > Cc: Dave Airlie > Cc: Philipp Zabel > Signed-off-by: Eric Engestrom Reviewed-by: Philipp Zabel > --- > src/vulkan/wsi/wsi_common_wayland.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > dif

Re: [Mesa-dev] [PATCH] vulkan/wsi/wayland: don't double free on error in get_presentation_support

2018-10-05 Thread Philipp Zabel
On Fri, 2018-10-05 at 10:13 +1000, Dave Airlie wrote: > From: Dave Airlie > > If we fail the init path then don't call the free path. > > Found by coverity > --- > src/vulkan/wsi/wsi_common_wayland.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git

Re: [Mesa-dev] [PATCH 1/4] gallium/u_inlines: normalize naming, use dst & src, style fixes

2018-09-07 Thread Philipp Zabel
Hi Marek, there are two comments that will be confusing if they are not updated as well: On Sat, 2018-09-01 at 02:54 -0400, Marek Olšák wrote: > From: Marek Olšák > > --- > src/gallium/auxiliary/util/u_inlines.h | 86 +- > 1 file changed, 43 insertions(+), 43

Re: [Mesa-dev] [PATCH 6/9] etnaviv: add 2D GPU YUV->RGB blitter

2018-07-17 Thread Philipp Zabel
On Mon, 2018-07-09 at 18:02 +0200, Lucas Stach wrote: > This adds a blit path using the 2D GPU for a linear YUV to tiled RGB > blit. This allows to implement importing of planar YUV textures with > a single copy. > > Signed-off-by: Lucas Stach > --- >

Re: [Mesa-dev] [PATCH 00/21] Towards NIR support for etnaviv

2018-06-06 Thread Philipp Zabel
Hi Christian, On Tue, 2018-06-05 at 17:43 +0200, Christian Gmeiner wrote: > Am Di., 5. Juni 2018 um 16:40 Uhr schrieb Philipp Zabel > : > Thanks for this nice patch series. I have been working for too long on > the nir topic > for etnaviv and never pushed any patches (which is qui

Re: [Mesa-dev] [PATCH 06/21] etnaviv: nir: hardwire position location

2018-06-06 Thread Philipp Zabel
On Tue, 2018-06-05 at 11:50 -0400, Rob Clark wrote: > On Tue, Jun 5, 2018 at 10:38 AM, Philipp Zabel wrote: > > The temporary input/output register 0 is reserved for position in the > > fragment shader. Hardwire it to 0 and start other input/output variables > > at 1. The

Re: [Mesa-dev] [PATCH 08/21] etnaviv: nir: add virtual register classes

2018-06-06 Thread Philipp Zabel
On Tue, 2018-06-05 at 11:39 -0400, Rob Clark wrote: > On Tue, Jun 5, 2018 at 10:38 AM, Philipp Zabel wrote: > > Since all threads share a global temporary vec4 register file, it is > > important to reduce temporary register use of shaders. > > Using source swizzles and d

[Mesa-dev] [PATCH 15/21] etnaviv: compiler: ignore nir_instr_type_ssa_undef

2018-06-05 Thread Philipp Zabel
-by: Michael Tretter Signed-off-by: Philipp Zabel --- src/gallium/drivers/etnaviv/etnaviv_compiler.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gallium/drivers/etnaviv/etnaviv_compiler.c b/src/gallium/drivers/etnaviv/etnaviv_compiler.c index 66553199fe19..f17b9979b705 100644 --- a/src

[Mesa-dev] [PATCH 21/21] etnaviv: nir: globalize local registers

2018-06-05 Thread Philipp Zabel
We represent allocated temporaries as NIR global registers. Turn local registers left over by the nir_convert_from_ssa pass into global registers with the correct temporary number. Signed-off-by: Philipp Zabel --- src/gallium/drivers/etnaviv/etnaviv_nir.c | 21 + 1 file

[Mesa-dev] [PATCH 06/21] etnaviv: nir: hardwire position location

2018-06-05 Thread Philipp Zabel
The temporary input/output register 0 is reserved for position in the fragment shader. Hardwire it to 0 and start other input/output variables at 1. The intrinsic input load and output store base corresponds to the temporary register number. Signed-off-by: Philipp Zabel Signed-off-by: Michael

[Mesa-dev] [PATCH 19/21] etnaviv: nir: add extra mov for uniforms used as output

2018-06-05 Thread Philipp Zabel
From: Michael Tretter If a uniform is source to an output store operation, we have to emit an actual mov instruction that copies from the uniform register into the temporary register that is used as a shader output. Signed-off-by: Michael Tretter Signed-off-by: Philipp Zabel --- src/gallium

[Mesa-dev] [PATCH 20/21] etnaviv: nir: avoid multiple uniform src for alu ops

2018-06-05 Thread Philipp Zabel
From: Michael Tretter The hardware does not allow two different uniform registers to be used as sources in the same ALU instruction. Emit mov instructions to temporary registers for all but one uniform register in this case. Signed-off-by: Michael Tretter Signed-off-by: Philipp Zabel --- src

[Mesa-dev] [PATCH 12/21] etnaviv: compiler: generate instructions for log2

2018-06-05 Thread Philipp Zabel
. in the glmark2 ideas benchmark). TODO: move this up into NIR as a lowering step. Signed-off-by: Michael Tretter Signed-off-by: Philipp Zabel --- src/gallium/drivers/etnaviv/etnaviv_compiler.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/src/gallium/drivers/etnaviv

[Mesa-dev] [PATCH 04/21] etnaviv: add debug option to report NIR as supported and preferred shader IR

2018-06-05 Thread Philipp Zabel
Add a debug option ETNA_MESA_DEBUG="nir" that will cause the etnaviv gallium pipe driver to advertise support and preference for NIR shaders. Signed-off-by: Philipp Zabel Signed-off-by: Michael Tretter --- src/gallium/drivers/etnaviv/etnaviv_debug.h | 3 +++ src/gallium/drive

[Mesa-dev] [PATCH 11/21] etnaviv: compiler: add code emitter for alu operations

2018-06-05 Thread Philipp Zabel
From: Michael Tretter Start emitting ALU instructions for nir_alu_instr structures from the NIR shader's main function implementation. Signed-off-by: Michael Tretter Signed-off-by: Philipp Zabel --- .../drivers/etnaviv/etnaviv_compiler.c| 290 ++ 1 file changed, 290

[Mesa-dev] [PATCH 16/21] etnaviv: compiler: generate texture loads

2018-06-05 Thread Philipp Zabel
Emit TEXLD, TEXLDB, and TEXLDL instructions from nir_texop_tex, nir_texop_txb, and nir_texop_txl texture loads, respectively. Signed-off-by: Philipp Zabel Signed-off-by: Michael Tretter --- .../drivers/etnaviv/etnaviv_compiler.c| 65 +++ 1 file changed, 65 insertions

[Mesa-dev] [PATCH 18/21] etnaviv: nir: implement conditionals

2018-06-05 Thread Philipp Zabel
instruction using the sources and condition flags from the preceding conditional operation. Signed-off-by: Philipp Zabel Signed-off-by: Michael Tretter --- .../drivers/etnaviv/etnaviv_compiler.c| 75 +++ src/gallium/drivers/etnaviv/etnaviv_nir.c | 18 + 2 files changed

[Mesa-dev] [PATCH 17/21] etnaviv: nir: add texture fixup path before register assignment

2018-06-05 Thread Philipp Zabel
registers with the correct num_components we have to add additional virtual scalar, vec2, and vec3 register classes that only allow to use the X, XY, and XYZ components. Signed-off-by: Philipp Zabel Signed-off-by: Michael Tretter --- src/gallium/drivers/etnaviv/etnaviv_nir.c | 27

[Mesa-dev] [PATCH 14/21] etnaviv: nir: remove undefined variables

2018-06-05 Thread Philipp Zabel
From: Michael Tretter If the source to a mov instruction is undefined, the result is undefined as well. In that case it is valid to drop the mov instruction. Signed-off-by: Michael Tretter Signed-off-by: Philipp Zabel --- src/gallium/drivers/etnaviv/etnaviv_nir.c | 35

[Mesa-dev] [PATCH 13/21] etnaviv: nir: add a nop intrinsic to empty shaders

2018-06-05 Thread Philipp Zabel
The Vivante instruction set does not allow empty shaders. If the shader is empty, add a nop to allow execution. Signed-off-by: Philipp Zabel Signed-off-by: Michael Tretter --- src/gallium/drivers/etnaviv/etnaviv_nir.c | 16 1 file changed, 16 insertions(+) diff --git a/src

[Mesa-dev] [PATCH 08/21] etnaviv: nir: add virtual register classes

2018-06-05 Thread Philipp Zabel
-by: Philipp Zabel Signed-off-by: Michael Tretter --- src/gallium/drivers/etnaviv/etnaviv_nir.c | 282 -- 1 file changed, 259 insertions(+), 23 deletions(-) diff --git a/src/gallium/drivers/etnaviv/etnaviv_nir.c b/src/gallium/drivers/etnaviv/etnaviv_nir.c index b73d4be31bc6

[Mesa-dev] [PATCH 10/21] etnaviv: compiler: avoid using tgsi_shader_info

2018-06-05 Thread Philipp Zabel
From: Michael Tretter For NIR shaders, get the shader stage from the nir_shader structure instead from tgsi_shader_info. Signed-off-by: Michael Tretter Signed-off-by: Philipp Zabel --- .../drivers/etnaviv/etnaviv_compiler.c| 37 ++- 1 file changed, 35 insertions(+), 2

[Mesa-dev] [PATCH 09/21] etnaviv: compiler: setup registers from nir

2018-06-05 Thread Philipp Zabel
From: Michael Tretter Add etna_compile_shader_nir, set up shader inputs and outputs, and start emitting instructions for optimized NIR shaders. Signed-off-by: Michael Tretter Signed-off-by: Philipp Zabel --- .../drivers/etnaviv/etnaviv_compiler.c| 224 +- 1 file

[Mesa-dev] [PATCH 07/21] etnaviv: nir: merge mov of result into alu op

2018-06-05 Thread Philipp Zabel
Remove unnecessary mov instructions. If the destination of an ALU instruction is only used in a following mov, merge that mov into the ALU instruction. Signed-off-by: Philipp Zabel Signed-off-by: Michael Tretter --- src/gallium/drivers/etnaviv/etnaviv_nir.c | 43 +++ 1 file

[Mesa-dev] [PATCH 05/21] etnaviv: generate and optimize NIR

2018-06-05 Thread Philipp Zabel
cation, since they are not needed anymore. Signed-off-by: Philipp Zabel Signed-off-by: Michael Tretter --- src/gallium/drivers/etnaviv/Makefile.am | 5 +- src/gallium/drivers/etnaviv/Makefile.sources | 2 + src/gallium/drivers/etnaviv/etnaviv_nir.c| 577 +++ src/ga

[Mesa-dev] [PATCH 02/21] etnaviv: extract get_mystery_meat_load_balancing

2018-06-05 Thread Philipp Zabel
From: Michael Tretter Extract the mystery meat load balancing calculation into a function that can also be called from the NIR compiler implementation. Signed-off-by: Michael Tretter Signed-off-by: Philipp Zabel --- .../drivers/etnaviv/etnaviv_compiler.c| 60 +++ 1

[Mesa-dev] [PATCH 00/21] Towards NIR support for etnaviv

2018-06-05 Thread Philipp Zabel
nstructions for log2 etnaviv: nir: remove undefined variables etnaviv: compiler: ignore nir_instr_type_ssa_undef etnaviv: nir: add extra mov for uniforms used as output etnaviv: nir: avoid multiple uniform src for alu ops Philipp Zabel (11): etnaviv: prefix COMPARE_FUNC enum values in

[Mesa-dev] [PATCH 03/21] etnaviv: compiler: extract compile shader from tgsi

2018-06-05 Thread Philipp Zabel
From: Michael Tretter Prepare for compilation from NIR. etna_compile_shader will call either etna_compile_shader_tgsi or etna_compile_shader_nir, depending on whether the input is TGSI or NIR. Signed-off-by: Michael Tretter Signed-off-by: Philipp Zabel --- .../drivers/etnaviv

[Mesa-dev] [PATCH 01/21] etnaviv: prefix COMPARE_FUNC enum values in rnndb

2018-06-05 Thread Philipp Zabel
the prefixed macro. Signed-off-by: Philipp Zabel Signed-off-by: Michael Tretter --- src/gallium/drivers/etnaviv/hw/state_3d.xml.h | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/gallium/drivers/etnaviv/hw/state_3d.xml.h b/src/gallium/drivers/etnaviv/hw

[Mesa-dev] [PATCH] egl: autotools: add missing dependency on generated header

2018-05-25 Thread Philipp Zabel
18.1.0/src/egl/drivers/dri2/platform_wayland.c: In function 'create_wl_buffer': ../../../Mesa-18.1.0/src/egl/drivers/dri2/platform_wayland.c:810:16: error: implicit declaration of function 'zwp_linux_dmabuf_v1_create_params' [-Werror=implicit-function-declaration] Signed-off-by: Philipp Z

Re: [Mesa-dev] [PATCH v2 04/14] etnaviv: put logic for rs clear format selection into caller

2018-05-15 Thread Philipp Zabel
On Tue, 2018-05-01 at 16:48 +0200, Christian Gmeiner wrote: > We do no need to call translate_rs_format(..) as we can simplify > things by using formats blocksize to choose the correct RS format > for clearing. > > No piglit regressions. > > Signed-off-by: Christian Gmeiner

Re: [Mesa-dev] [PATCH 2/2] etnaviv: remove not needed includes

2018-04-24 Thread Philipp Zabel
h" > #include "util/u_math.h" > > -#include > - > /* Returned when there is no match of pipe value to etna value */ > #define ETNA_NO_MATCH (~0) Both Reviewed-by: Philipp Zabel <p.za...@pengutronix.de> regards Philipp ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 1/2] gallium/util: implement util_format_is_yuv

2018-04-04 Thread Philipp Zabel
uct util_format_description *desc = > util_format_description(format); > + > + assert(desc); > + if (!desc) { > + return FALSE; > + } > + > + return desc->colorspace == UTIL_FORMAT_COLORSPACE_YUV; > +} > > /** > * Calculates the depth format type based up

Re: [Mesa-dev] [PATCH 2/2] etnaviv: advertise YUV formats as external only

2018-04-04 Thread Philipp Zabel
rs[i]; >if (external_only) > - external_only[num_modifiers] = 0; > + external_only[num_modifiers] = util_format_is_yuv(format) ? 1 : 0; >num_modifiers++; > } Reviewed-by: Philipp Zabel <p.za...@pengutronix.de> regards Philipp _

Re: [Mesa-dev] [PATCH] renderonly: fix dumb BO allocation for non 32bpp formats

2018-01-30 Thread Philipp Zabel
cas Stach <l.st...@pengutronix.de> Reviewed-by: Philipp Zabel <p.za...@pengutronix.de> regards Philipp ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 05/19] etnaviv: Use only DRAW_INSTANCED on GC3000+

2017-11-01 Thread Philipp Zabel
ream_emit(stream, > + VIV_FE_DRAW_INSTANCED_COUNT_INSTANCE_COUNT_HI(instance_count >> 16) | > + VIV_FE_DRAW_INSTANCED_COUNT_VERTEX_COUNT(vertex_count)); > + etna_cmd_stream_emit(stream, > + VIV_FE_DRAW_INSTANCED_START_INDEX(offset)); > + etna_cmd_stream_emit(stream, 0); > +} > + > void > etna_emit_state(struct etna_context *ctx); Reviewed-by: Philipp Zabel <p.za...@pengutronix.de> regards Philipp ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 02/19] etnaviv: Const-correctness etnaviv_emit.h

2017-11-01 Thread Philipp Zabel
etna_reloc *reloc) > { > etna_cmd_stream_reserve(stream, 2); > etna_emit_load_state(stream, address >> 2, 1, 0); Reviewed-by: Philipp Zabel <p.za...@pengutronix.de> regards Philipp ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH v2 1/2] etnaviv: fix varying interpolation

2017-09-19 Thread Philipp Zabel
r(struct etna_shader_link_info *info, >    varying = >varyings[fsio->reg - 1]; >    varying->num_components = fsio->num_components; >   > -  if (fsio->semantic.Name == TGSI_SEMANTIC_COLOR) /* colors affected by > flat shading */ > +  if (interpolate) /* co

Re: [Mesa-dev] [PATCH v2] egl/dri2: Allow modifiers to add FDs to imports

2017-08-11 Thread Philipp Zabel
iersLo[i].IsPresent && > +  attrs->DMABufPlaneModifiersHi[i].IsPresent) { > + plane_n = i + 1; > +  } > +   } > + Nice, this makes sure that all planes up to the last modifier have fds present. And since all fds are guaranteed to be present, the modifier equality check in dri2_c

Re: [Mesa-dev] [PATCH] egl/dri2: Allow modifiers to add FDs to imports

2017-08-08 Thread Philipp Zabel
On Tue, 2017-08-08 at 07:29 +0300, Tapani Pälli wrote: > > On 08/07/2017 03:05 PM, Philipp Zabel wrote: > > On Mon, 2017-07-31 at 18:35 +0100, Daniel Stone wrote: > >> When using dmabuf import, make sure that the modifier is actually > >> allowed to add planes

Re: [Mesa-dev] [PATCH] egl/dri2: Allow modifiers to add FDs to imports

2017-08-07 Thread Philipp Zabel
gt; > _eglError(EGL_BAD_ATTRIBUTE, "too many plane attributes"); > return 0; Reviewed-by: Philipp Zabel <p.za...@pengutronix.de> regards Philipp ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 1/2] etnaviv: fix etna_bo_from_name

2017-08-04 Thread Philipp Zabel
On Fri, 2017-08-04 at 18:15 +0200, Wladimir J. van der Laan wrote: > On Fri, Aug 04, 2017 at 05:07:54PM +0200, Philipp Zabel wrote: > > Look up BOs from the name table using the name parameter instead of > > req.handle (which at this point is always zero). > > Good

[Mesa-dev] [PATCH 1/2] etnaviv: fix etna_bo_from_name

2017-08-04 Thread Philipp Zabel
Look up BOs from the name table using the name parameter instead of req.handle (which at this point is always zero). Signed-off-by: Philipp Zabel <p.za...@pengutronix.de> --- etnaviv/etnaviv_bo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etnaviv/etnaviv_bo.c b/e

[Mesa-dev] [PATCH 2/2] etnaviv: add etna_bo_from_handle

2017-08-04 Thread Philipp Zabel
Although etnaviv_drmif.h declared etna_bo_from_handle from the start, there was no implementation. Signed-off-by: Philipp Zabel <p.za...@pengutronix.de> --- etnaviv/etnaviv_bo.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/etnaviv/etnaviv_bo.c b/etnaviv/etnavi

Re: [Mesa-dev] [PATCH] etnaviv: Add support for R8_UNORM textures

2017-07-28 Thread Philipp Zabel
E), > V_(R8_UINT,UNSIGNED_BYTE, NONE), > V_(R8_SINT,BYTE, NONE), Reviewed-by: Philipp Zabel <p.za...@pengutronix.de> regards Philipp ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH] st/dri: allow direct YUYV import

2017-07-19 Thread Philipp Zabel
_format dri2_format_to_pipe_format (int > format) > case __DRI_IMAGE_FORMAT_GR88: >pf = PIPE_FORMAT_RG88_UNORM; >break; > + case __DRI_IMAGE_FORMAT_YUYV: > + pf = PIPE_FORMAT_YUYV; > + break; > default: >pf = PIPE_FORMAT_NONE; &

[Mesa-dev] [PATCH] st/mesa: release EGLImage on EGLImageTarget* error

2017-06-30 Thread Philipp Zabel
ted(). Fixes: 83e9de25f325 ("st/mesa: EGLImageTarget* error handling") Signed-off-by: Philipp Zabel <p.za...@pengutronix.de> --- src/mesa/state_tracker/st_cb_eglimage.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/state_tracker/st_cb_eglimage.c b/src/mesa/state_track

Re: [Mesa-dev] [PATCH] etnaviv: flush source TS before resolve

2017-06-28 Thread Philipp Zabel
etna_set_state(ctx->stream, VIVS_TS_FLUSH_CACHE, > VIVS_TS_FLUSH_CACHE_FLUSH); > } > > /* Set up color TS to source surface before blit, if needed */ Reviewed-by: Philipp Zabel <p.za...@pengutronix.de> regards Philipp ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 07/11] etnaviv: implement resource import with modifier

2017-06-27 Thread Philipp Zabel
DER_TARGET) { > - /* Render targets are linear in Xorg but must be tiled > - * here. It would be nice if dri_drawable_get_format() > - * set scanout for these buffers too. */ > + if (rsc->layout == ETNA_LAYOUT_LINEAR) { > + /* > + * Both samp

Re: [Mesa-dev] [PATCH 06/11] etnaviv: also update textures from external resources

2017-06-26 Thread Philipp Zabel
, >base, 0, > view->texture->last_level); > - etna_resource(res->texture)->seqno = res->seqno; > - } else if (etna_resource_needs_flush(res)) { > - etna_copy_resource(view->context, view->texture, view->texture, 0, 0); > -

Re: [Mesa-dev] [PATCH] etnaviv: only flush resource to self if no scanout buffer exists

2017-06-26 Thread Philipp Zabel
, rsc)) { > + etna_copy_resource(pctx, rsc->scanout->prime, prsc, 0, 0); > + etna_resource(rsc->scanout->prime)->seqno = rsc->seqno; > + } > } else if (etna_resource_needs_flush(rsc)) { >etna_copy_resource(pctx, prsc, prsc, 0, 0);

Re: [Mesa-dev] [PATCH 05/11] etnaviv: increment correct seqno for external resources

2017-06-26 Thread Philipp Zabel
ct pipe_screen *pscreen, > struct pipe_resource *prsc) > { > struct etna_resource *res = etna_resource(prsc); > > - res->seqno++; > + if (res->external) > + etna_resource(res->external)->seqno++; > + else > + res->seqno+

Re: [Mesa-dev] [PATCH 04/11] etnaviv: pad scanout buffer size to RS alignment

2017-06-26 Thread Philipp Zabel
plat.width0, padX); > + scanout_templat.height0 = align(scanout_templat.height0, padY); > + > + rsc->scanout = renderonly_scanout_for_resource(_templat, > + screen->ro,

Re: [Mesa-dev] [PATCH 02/11] etnaviv: fix memory leak when BO allocation fails

2017-06-26 Thread Philipp Zabel
memory for resource"); > - return NULL; > + goto free_rsc; > } > > rsc->bo = bo; > @@ -223,6 +223,10 @@ etna_resource_alloc(struct pipe_screen *pscreen, > unsigned layout, > } > > return >base; > + > +free_rsc: > + FREE(rsc); >

Re: [Mesa-dev] [PATCH 01/11] etnaviv: fill in layer_stride for imported resources

2017-06-26 Thread Philipp Zabel
a BO which conforms to our padding size. > * The stride of the BO must be greater or equal to our padded Reviewed-by: Philipp Zabel <p.za...@pengutronix.de> regards Philipp ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 03/11] renderonly/etnaviv: stop importing resource from renderonly

2017-06-26 Thread Philipp Zabel
On Fri, 2017-06-23 at 17:50 +0200, Lucas Stach wrote: > The current way of importing the resource from renderonly after allocation > is opaque and is taking away control from the driver, which it needs in > order to implement more advanced scenarios, than the simple linear > scanout with matching

[Mesa-dev] [RFC v2] etnaviv: flush color cache and depth cache together before resolves

2017-06-23 Thread Philipp Zabel
hows through. Other attempts such as adding a pipeline stall before the color flush or a TS cache flush afterwards or flushing multiple times, with stalls before and after each flush, have shown no effect. Signed-off-by: Philipp Zabel <p.za...@pengutronix.de> --- Changes since v1: - Add a

Re: [Mesa-dev] [PATCH 2/2] etnaviv: remove flat shading workaround

2017-06-09 Thread Philipp Zabel
G_SHADE_MODEL_SMOOTH) | > + cs->PA_CONFIG = (so->flatshade ? VIVS_PA_CONFIG_SHADE_MODEL_FLAT : > VIVS_PA_CONFIG_SHADE_MODEL_SMOOTH) | > translate_cull_face(so->cull_face, so->front_ccw) | > translate_polygon_mode(so->fill_front) |

Re: [Mesa-dev] [PATCH 1/2] etnaviv: fix varying interpolation

2017-06-09 Thread Philipp Zabel
On Thu, 2017-06-08 at 18:25 +0200, Lucas Stach wrote: > It seems that newer cores don't use the PA_ATTRIBUTES to decide if the > varying should bypass the flat shading, but derive this from the component > use. This fixes flat shading on GC880+. > > VARYING_COMPONENT_USE_POINTCOORD is a bit of a

Re: [Mesa-dev] [libdrm 1/4] etnaviv: submit full struct drm_etnaviv_gem_submit

2017-06-09 Thread Philipp Zabel
("drm/etnaviv: submit support for out-fences") and 9ad59fea162c ("drm/etnaviv: submit support for in-fences") to test, without ill effects. > Signed-off-by: Christian Gmeiner <christian.gmei...@gmail.com> Reviewed-by: Philipp Zabel <p.za...@pengutronix.de> Te

Re: [Mesa-dev] [PATCH 3/6] etnaviv: honor PIPE_TRANSFER_UNSYNCHRONIZED flag

2017-05-30 Thread Philipp Zabel
On Fri, 2017-05-19 at 11:41 +0200, Lucas Stach wrote: > This gets rid of quite a bit of CPU/GPU sync on frequent vertex buffer > uploads and I haven't seen any of the issues mentioned in the comment, > so this one seems stale. > > Ignore the flag if there exists a temporary resource, as those

Re: [Mesa-dev] [PATCH 1/6] etnaviv: always do cpu_fini in transfer_unmap

2017-05-30 Thread Philipp Zabel
c9e8b49b885 ("etnaviv: gallium driver for Vivante GPUs") > Cc: mesa-sta...@lists.freedesktop.org > Signed-off-by: Lucas Stach <l.st...@pengutronix.de> Reviewed-by: Philipp Zabel <p.za...@pengutronix.de> > --- > src/gallium/drivers/etnaviv/etnaviv_transfer

[Mesa-dev] [RFC] etnaviv: flush color cache and depth cache together before resolves

2017-05-30 Thread Philipp Zabel
hows through. Other attempts such as adding a pipeline stall before the color flush or a TS cache flush afterwards or flushing multiple times, with stalls before and after each flush, have shown no effect. Signed-off-by: Philipp Zabel <p.za...@pengutronix.de> --- src/gallium/drivers/etnaviv

Re: [Mesa-dev] [PATCH v3 01/15] st/dri: refactor multi-planar YUV import path

2017-05-23 Thread Philipp Zabel
On Tue, 2017-05-23 at 14:40 +0530, Varad Gautam wrote: > Hi Lucas, > > On Mon, May 22, 2017 at 11:16 PM, Lucas Stach wrote: > > Am Mittwoch, den 10.05.2017, 23:15 +0530 schrieb Varad Gautam: > >> From: Varad Gautam > >> > >> we currently

[Mesa-dev] [PATCH] vulkan/wsi/wayland: Fix proxy wrappers for swapchain recreation

2017-05-19 Thread Philipp Zabel
between two frames without using the VkSwapchainCreateInfoKHR::oldSwapchain mechanism to keep the old swapchain until after the next redraw. Fixes: 5034c615582a ("vulkan/wsi/wayland: Use proxy wrappers for swapchain") Signed-off-by: Philipp Zabel <philipp.za...@gmail.com&

Re: [Mesa-dev] [PATCH] mesa/st: fix yuv EGLImage's

2017-05-17 Thread Philipp Zabel
On Tue, 2017-05-16 at 10:33 -0400, Rob Clark wrote: > Don't reject YUV formats that the driver doesn't handle natively, since > mesa/st already knows how to lower this in shader. > > Fixes: 83e9de2 ("st/mesa: EGLImageTarget* error handling") > Cc: 17.1

Re: [Mesa-dev] [PATCH 3/3] etnaviv: Check extended format availability on GPU

2017-05-16 Thread Philipp Zabel
Hi Wladimir, On Tue, 2017-05-16 at 10:42 +0200, Wladimir J. van der Laan wrote: > Current information shows that both extended texture/render formats > and texture swizzling were introduced with the HALTI0 feature bit, > available on GC2000/GC3000. With this patch applied, trying to import

Re: [Mesa-dev] [PATCH 5/5] etnaviv: increment the resource seqno in resource_changed

2017-05-11 Thread Philipp Zabel
it. regards Philipp > > On Wed, May 10, 2017 at 06:01:08PM +0200, Lucas Stach wrote: > > From: Philipp Zabel <p.za...@pengutronix.de> > > > > Just increment the resource seqno instead of setting the texture > > seqno to be lower by one than the resource seqno.

[Mesa-dev] [PATCH] configure.ac: Fix help string for --disable-pwr8 configure option

2017-05-10 Thread Philipp Zabel
Signed-off-by: Philipp Zabel <p.za...@pengutronix.de> --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index df3eb6b29a..5c460f43d5 100644 --- a/configure.ac +++ b/configure.ac @@ -455,7 +455,7 @@ int main () { CFLAGS=$save_

Re: [Mesa-dev] Sampling DRM_FORMAT_YUYV in GLSL

2017-05-09 Thread Philipp Zabel
On Tue, 2017-05-09 at 12:48 +0200, Volker Vogelhuber wrote: [...] > Ok thanks for the clarification. There is only one missing part for the > GL_TEXTURE_2D case. The second EGLImage is created internally when > calling eglCreateImage with EGL_LINUX_DMA_BUF_EXT, so I only > have one return value I

Re: [Mesa-dev] Sampling DRM_FORMAT_YUYV in GLSL

2017-05-09 Thread Philipp Zabel
On Tue, 2017-05-09 at 12:31 +0300, Tapani Pälli wrote: > > On 05/09/2017 12:29 PM, Tapani Pälli wrote: > > > > > > On 05/09/2017 12:14 PM, Volker Vogelhuber wrote: > >> Hi, > >> > >> first sorry, for missing the subject in my mail to the mailing list, > >> then thanks > >> for the hint with

Re: [Mesa-dev] [PATCH] etnaviv: add L8A8_UNORM texture format

2017-05-03 Thread Philipp Zabel
On Tue, 2017-05-02 at 22:06 +0200, Christian Gmeiner wrote: > No piglit regressions. > > Signed-off-by: Christian Gmeiner <christian.gmei...@gmail.com> Reviewed-by: Philipp Zabel <p.za...@pengutronix.de> > --- > src/gallium/drivers/etnaviv/etnaviv_format.c

[Mesa-dev] [PATCH] renderonly: use drmIoctl

2017-04-28 Thread Philipp Zabel
To restart interrupted system calls, use drmIoctl. Suggested-by: Emil Velikov <emil.l.veli...@gmail.com> Signed-off-by: Philipp Zabel <p.za...@pengutronix.de> --- Applies on top of the "renderonly: drop resources on destroy" patch: https://patchwork.freedesktop.org/patch/15

[Mesa-dev] [PATCH] renderonly: use drmIoctl

2017-04-28 Thread Philipp Zabel
To restart interrupted system calls, use drmIoctl. Suggested-by: Emil Velikov <emil.l.veli...@gmail.com> Signed-off-by: Philipp Zabel <p.za...@pengutronix.de> --- Applies on top of the "renderonly: drop resources on destroy" patch: https://patchwork.freedesktop.org/patch/15

Re: [Mesa-dev] [PATCH 2/2] renderonly: drop resources on destroy

2017-04-28 Thread Philipp Zabel
On Fri, 2017-04-28 at 11:19 +0100, Emil Velikov wrote: > On 27 April 2017 at 17:44, Philipp Zabel <p.za...@pengutronix.de> wrote: > > The renderonly_scanout holds a reference on its prime pipe resource, > > which should be released when it is destroy

[Mesa-dev] [PATCH 1/2] renderonly: close transfer prime_fd

2017-04-27 Thread Philipp Zabel
prime_fd is only used to transfer the scanout buffer to the GPU inside renderonly_create_kms_dumb_buffer_for_resource. It should be closed immediately to avoid leaking the DMA-BUF file handle. Signed-off-by: Philipp Zabel <p.za...@pengutronix.de> --- src/gallium/auxiliary/renderonly/render

[Mesa-dev] [PATCH 2/2] renderonly: drop resources on destroy

2017-04-27 Thread Philipp Zabel
The renderonly_scanout holds a reference on its prime pipe resource, which should be released when it is destroyed. If it was created by renderonly_create_kms_dumb_buffer_for_resource, the dumb BO also has to be destroyed. Signed-off-by: Philipp Zabel <p.za...@pengutronix.de> --- src/g

Re: [Mesa-dev] [PATCH 3/3] etnaviv: SINGLE_BUFFER support on GC3000

2017-04-13 Thread Philipp Zabel
Hi Wladimir, On Thu, 2017-04-13 at 16:05 +0200, Wladimir J. van der Laan wrote: > This patch adds support for the SINGLE_BUFFER feature on GC3000 > GPUs, which allows rendering to a single buffer using multiple pixel > pipes. > > This feature is always used when it is available, which means that

[Mesa-dev] [PATCH] etnaviv: increment the resource seqno in resource_changed

2017-04-12 Thread Philipp Zabel
Just increment the resource seqno instead of setting the texture seqno to be lower by one than the resource seqno. Signed-off-by: Philipp Zabel <p.za...@pengutronix.de> --- src/gallium/drivers/etnaviv/etnaviv_resource.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git

  1   2   >