Re: [Mesa-dev] [PATCH v7 4/5] st/dri2: Implement DRI2bufferDamageExtension

2019-08-12 Thread Qiang Yu
Looks good for me, patch is: Reviewed-by: Qiang Yu Regards, Qiang On Mon, Aug 12, 2019 at 6:07 PM Boris Brezillon wrote: > > From: Daniel Stone > > Add a pipe_screen->set_damage_region() hook to propagate > set-damage-region requests to the driver, it's then up to the drive

Re: [Mesa-dev] [PATCH v6 4/5] st/dri2: Implement DRI2bufferDamageExtension

2019-08-06 Thread Qiang Yu
On Thu, Aug 1, 2019 at 8:15 PM Boris Brezillon wrote: > > +Marek (looks like I forgot to Cc you on this v6 :-/). > > On Mon, 22 Jul 2019 09:49:31 +0200 > Boris Brezillon wrote: > > > Hi Qiang, > > > > On Sun, 21 Jul 2019 17:02:54 +0800 > > Qiang Yu wro

Re: [Mesa-dev] [PATCH v6 4/5] st/dri2: Implement DRI2bufferDamageExtension

2019-07-21 Thread Qiang Yu
On Mon, Jul 15, 2019 at 8:50 PM Boris Brezillon wrote: > > From: Daniel Stone > > Add a pipe_screen->set_damage_region() hook to propagate > set-damage-region requests to the driver, it's then up to the driver to > decide what to do with this piece of information. > > If the hook is left

Re: [Mesa-dev] [PATCH v4 0/5] EGL_KHR_partial_update support

2019-06-30 Thread Qiang Yu
Patch 1~4 are: Reviewed-and-tested-by: Qiang Yu I've tested on lima platform with weston master branch including Daniel's change, works fine for me now. I'll send out the lima change after this series gets merged. Thanks, Qiang On Wed, Jun 26, 2019 at 12:37 AM Boris Brezillon wrote

Re: [Mesa-dev] [PATCH v3 1/2] nir: Add nir_lower_viewport_transform

2019-04-12 Thread Qiang Yu
Patch series are: Reviewed-by: Qiang Yu Regards, Qiang On Sat, Apr 13, 2019 at 7:46 AM Alyssa Rosenzweig wrote: > > On Mali hardware (supported by Panfrost and Lima), the fixed-function > transformation from world-space to screen-space coordinates is done in > the vertex

Re: [Mesa-dev] [PATCH v2 1/2] nir: Add nir_lower_viewport_transform

2019-04-08 Thread Qiang Yu
u to Qiang for this suggestion! > > Signed-off-by: Alyssa Rosenzweig > Suggested-by: Qiang Yu > Cc: Jason Ekstrand > Cc: Eric Anholt > --- > src/compiler/nir/meson.build | 1 + > src/compiler/nir/nir.h| 1 + > .../nir/nir_lower_

Re: [Mesa-dev] [PATCH 1/2] nir: Add nir_lower_viewport_transform

2019-04-07 Thread Qiang Yu
an in dedicated hardware. This commit adds a shared NIR pass for > implementing coordinate transformation and lowering gl_Position writes > into screen-space gl_Position writes. > > Signed-off-by: Alyssa Rosenzweig > Suggested-by: Qiang Yu > Cc: Jason Ekstrand > Cc: Er

Re: [Mesa-dev] [PATCH 0/2] Implement (viewport) system values

2019-04-05 Thread Qiang Yu
On Sat, Apr 6, 2019 at 10:18 AM Alyssa Rosenzweig wrote: > > Hi, > > NIR system values are the preferred method of transferring state like > this around; the shared transformation pass should be agnostic to the > underlying uniforms / state tracker / etc. Is there any reason we can't > share the

Re: [Mesa-dev] [PATCH 0/2] Implement (viewport) system values

2019-04-05 Thread Qiang Yu
So you prefer to use the nir sysval method and implement a per driver version of viewport transform? As I sended out a patch series for a shared version of this transform, any feedback on it? https://patchwork.freedesktop.org/series/58618/ Regards, Qiang On Wed, Apr 3, 2019 at 9:50 AM Alyssa

Re: [Mesa-dev] [PATCH v2 6/8] gallium: add lima driver

2019-03-27 Thread Qiang Yu
V3 driver could be reviewed at: https://gitlab.freedesktop.org/mesa/mesa/merge_requests/465 Regards, Qiang On Tue, Mar 26, 2019 at 2:38 PM Qiang Yu wrote: > > On Tue, Mar 26, 2019 at 11:33 AM Alyssa Rosenzweig > wrote: > > > > > + [PPIR_INSTR_SLOT_ALU_VEC_MUL] = ppi

[Mesa-dev] [PATCH 4/4] mesa/st: do nir_lower_viewport_transform

2019-03-26 Thread Qiang Yu
Do nir_lower_viewport_transform when driver set PIPE_CAP_NIR_VS_LOWER_VIEWPORT_TRANSFORM in vertex shader. Signed-off-by: Qiang Yu --- src/gallium/auxiliary/util/u_screen.c | 3 +++ src/gallium/include/pipe/p_defines.h | 1 + src/mesa/state_tracker/st_glsl_to_nir.cpp | 23

[Mesa-dev] [PATCH 3/4] nir: add nir_lower_viewport_transform

2019-03-26 Thread Qiang Yu
Signed-off-by: Qiang Yu --- src/compiler/Makefile.sources | 1 + src/compiler/nir/meson.build | 1 + src/compiler/nir/nir.h| 8 + .../nir/nir_lower_viewport_transform.c| 142 ++ 4 files changed, 152 insertions

[Mesa-dev] [PATCH 2/4] mesa: add STATE_VIEWPORT_SCALE/TRANSLATE

2019-03-26 Thread Qiang Yu
Signed-off-by: Qiang Yu --- src/mesa/program/prog_statevars.c | 35 +++ src/mesa/program/prog_statevars.h | 2 ++ 2 files changed, 37 insertions(+) diff --git a/src/mesa/program/prog_statevars.c b/src/mesa/program/prog_statevars.c index 3bbe451399f..ce74dbe317d

[Mesa-dev] [PATCH 1/4] mesa: seperate scale and translate in viewport calculation

2019-03-26 Thread Qiang Yu
This is needed in _mesa_fetch_state where scale and translate are get one by one. Signed-off-by: Qiang Yu --- src/mesa/main/viewport.c | 26 -- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/src/mesa/main/viewport.c b/src/mesa/main/viewport.c index

[Mesa-dev] [PATCH 0/4] Add nir_lower_viewport_transform

2019-03-26 Thread Qiang Yu
and Panfrost driver need additinal changes in special uniform handling which I'm not familiar with. I expect Panfrost guys will send out patch to use this and Lima will be another user of it when upstreamed. Qiang Yu (4): mesa: seperate scale and translate in viewport calculation mesa: add

Re: [Mesa-dev] [PATCH v2 6/8] gallium: add lima driver

2019-03-26 Thread Qiang Yu
On Tue, Mar 26, 2019 at 11:33 AM Alyssa Rosenzweig wrote: > > > + [PPIR_INSTR_SLOT_ALU_VEC_MUL] = ppir_codegen_encode_vec_mul, > > + [PPIR_INSTR_SLOT_ALU_SCL_MUL] = ppir_codegen_encode_scl_mul, > > + [PPIR_INSTR_SLOT_ALU_VEC_ADD] = ppir_codegen_encode_vec_add, > > +

Re: [Mesa-dev] [Lima] [PATCH v2 6/8] gallium: add lima driver

2019-03-26 Thread Qiang Yu
On Tue, Mar 26, 2019 at 11:00 AM Alyssa Rosenzweig wrote: > > > Seems Panfrost implementation does not take depth uniforms? > > That's a /* to-do */ for me; it should definitely be implemented before > adding to common code. > > > we both use the viewport scale/transform vector as the uniform > >

Re: [Mesa-dev] [PATCH v2 6/8] gallium: add lima driver

2019-03-25 Thread Qiang Yu
On Fri, Mar 22, 2019 at 11:25 PM Alyssa Rosenzweig wrote: > > > + > > +static bool gpir_lower_viewport_transform(gpir_compiler *comp) > > +{ > > + gpir_node *rcpw = NULL; > > + > > + /* rcpw = 1 / w */ > > + list_for_each_entry(gpir_block, block, >block_list, list) { > > +

[Mesa-dev] [PATCH v2 8/8] kmsro: Add platform support for exynos and sun4i

2019-03-22 Thread Qiang Yu
From: Rob Herring Signed-off-by: Rob Herring Signed-off-by: Qiang Yu --- src/gallium/targets/dri/meson.build | 2 ++ src/gallium/targets/dri/target.c| 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/gallium/targets/dri/meson.build b/src/gallium/targets/dri/meson.build index

[Mesa-dev] [PATCH v2 7/8] kmsro: Add lima renderonly support

2019-03-22 Thread Qiang Yu
From: Rob Herring Enable using lima for KMS renderonly. This still needs KMS driver name mapping to kmsro to be used automatically. Signed-off-by: Rob Herring Signed-off-by: Qiang Yu --- meson.build | 4 ++-- src/gallium/winsys/kmsro/drm

[Mesa-dev] [PATCH v2 5/8] drm-uapi: add lima_drm.h

2019-03-22 Thread Qiang Yu
Signed-of-by: Qiang Yu --- include/drm-uapi/lima_drm.h | 169 1 file changed, 169 insertions(+) create mode 100644 include/drm-uapi/lima_drm.h diff --git a/include/drm-uapi/lima_drm.h b/include/drm-uapi/lima_drm.h new file mode 100644 index 000

[Mesa-dev] [PATCH v2 4/8] gallium/u_vbuf: export u_vbuf_get_minmax_index

2019-03-22 Thread Qiang Yu
This helper function can be used by driver which always need min/max index. Signed-off-by: Qiang Yu --- src/gallium/auxiliary/util/u_vbuf.c | 7 +++ src/gallium/auxiliary/util/u_vbuf.h | 3 +++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/gallium/auxiliary/util

[Mesa-dev] [PATCH v2 1/8] u_math: add ushort_to_float/float_to_ushort

2019-03-22 Thread Qiang Yu
v2: - return 0 for NaN too Cc: Roland Scheidegger Signed-off-by: Qiang Yu --- src/util/u_math.h | 31 +++ 1 file changed, 31 insertions(+) diff --git a/src/util/u_math.h b/src/util/u_math.h index e7dbbe5ca22..5e712dadb4a 100644 --- a/src/util/u_math.h +++ b/src

[Mesa-dev] [PATCH v2 3/8] u_dynarray: add util_dynarray_grow_cap

2019-03-22 Thread Qiang Yu
This is for the case that user only know a max size it wants to append to the array and enlarge the array capacity before writing into it. v2: - rename newsize to newcap - rename util_dynarray_enlarge to util_dynarray_grow_cap Cc: Caio Marcelo de Oliveira Filho Signed-off-by: Qiang Yu --- src

[Mesa-dev] [PATCH v2 2/8] nir: add load uniform lower to scalar

2019-03-22 Thread Qiang Yu
This is needed for lima gp compiler. Signed-off-by: Qiang Yu --- src/compiler/nir/nir_intrinsics.py| 4 +-- src/compiler/nir/nir_lower_io.c | 2 +- src/compiler/nir/nir_lower_io_to_scalar.c | 41 +-- 3 files changed, 42 insertions(+), 5 deletions(-) diff

[Mesa-dev] [PATCH v2 0/8] Lima mesa driver

2019-03-22 Thread Qiang Yu
patch's comment Qiang Yu (6): u_math: add ushort_to_float/float_to_ushort nir: add load uniform lower to scalar u_dynarray: add util_dynarray_grow_cap gallium/u_vbuf: export u_vbuf_get_minmax_index drm-uapi: add lima_drm.h gallium: add lima driver Rob Herring (2): kmsro: Add lima

Re: [Mesa-dev] [PATCH 0/9] Lima mesa driver

2019-03-18 Thread Qiang Yu
yet, will add that when we implement the mipmap generation. Thanks, Qiang > > > BR, > -R > > > On Fri, Mar 15, 2019 at 9:30 PM Qiang Yu wrote: > > > > Mesa Gallium3D driver for ARM Mali 400/450 GPUs. > > > > Lima is still in development and not ready

Re: [Mesa-dev] [PATCH 3/9] u_dynarray: add util_dynarray_enlarge

2019-03-16 Thread Qiang Yu
On Sat, Mar 16, 2019 at 11:26 AM Caio Marcelo de Oliveira Filho wrote: > > On Sat, Mar 16, 2019 at 09:28:48AM +0800, Qiang Yu wrote: > > This is for the case that user only know a max size > > it wants to append to the array and enlarge the array > >

[Mesa-dev] [PATCH 2/9] nir: add load uniform lower to scalar

2019-03-15 Thread Qiang Yu
This is needed for lima gp compiler. Signed-off-by: Qiang Yu --- src/compiler/nir/nir_intrinsics.py| 4 +-- src/compiler/nir/nir_lower_io.c | 2 +- src/compiler/nir/nir_lower_io_to_scalar.c | 41 +-- 3 files changed, 42 insertions(+), 5 deletions(-) diff

[Mesa-dev] [PATCH 3/9] u_dynarray: add util_dynarray_enlarge

2019-03-15 Thread Qiang Yu
This is for the case that user only know a max size it wants to append to the array and enlarge the array capacity before writing into it. Signed-off-by: Qiang Yu --- src/util/u_dynarray.h | 19 +++ 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/src/util

[Mesa-dev] [PATCH 8/9] kmsro: Add lima renderonly support

2019-03-15 Thread Qiang Yu
From: Rob Herring Enable using lima for KMS renderonly. This still needs KMS driver name mapping to kmsro to be used automatically. Signed-off-by: Rob Herring Signed-off-by: Qiang Yu --- meson.build | 4 ++-- src/gallium/winsys/kmsro/drm

[Mesa-dev] [PATCH 5/9] drm-uapi: drm_fourcc.h add ARM GPU modifier

2019-03-15 Thread Qiang Yu
Signed-off-by: Qiang Yu --- include/drm-uapi/drm_fourcc.h | 31 ++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/include/drm-uapi/drm_fourcc.h b/include/drm-uapi/drm_fourcc.h index bab20298f42..56f737af8ca 100644 --- a/include/drm-uapi/drm_fourcc.h

[Mesa-dev] [PATCH 4/9] gallium: add a cap to force compute minmax indices

2019-03-15 Thread Qiang Yu
From: Erico Nunes pipe_draw_info has min_index and max_index fields that can be useful in indexed drawing, however gallium may decide to not compute them in some cases to avoid impacting performance if the driver won't need them. However, some drivers may need to always compute these values to

[Mesa-dev] [PATCH 1/9] gallium/u_math: add ushort_to_float/float_to_ushort

2019-03-15 Thread Qiang Yu
Signed-off-by: Qiang Yu --- src/util/u_math.h | 31 +++ 1 file changed, 31 insertions(+) diff --git a/src/util/u_math.h b/src/util/u_math.h index e7dbbe5ca22..ffadfb47282 100644 --- a/src/util/u_math.h +++ b/src/util/u_math.h @@ -389,6 +389,37 @@ float_to_ubyte(float

[Mesa-dev] [PATCH 6/9] drm-uapi: add lima_drm.h

2019-03-15 Thread Qiang Yu
Signed-of-by: Qiang Yu --- include/drm-uapi/lima_drm.h | 169 1 file changed, 169 insertions(+) create mode 100644 include/drm-uapi/lima_drm.h diff --git a/include/drm-uapi/lima_drm.h b/include/drm-uapi/lima_drm.h new file mode 100644 index 000

[Mesa-dev] [PATCH 9/9] kmsro: Add platform support for exynos and sun4i

2019-03-15 Thread Qiang Yu
From: Rob Herring Signed-off-by: Rob Herring Signed-off-by: Qiang Yu --- src/gallium/targets/dri/meson.build | 2 ++ src/gallium/targets/dri/target.c| 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/gallium/targets/dri/meson.build b/src/gallium/targets/dri/meson.build index

[Mesa-dev] [PATCH 0/9] Lima mesa driver

2019-03-15 Thread Qiang Yu
is ready to be merged: https://patchwork.kernel.org/patch/10845911/ This patch series also depends on a kernel patch which is under review now: https://patchwork.kernel.org/patch/10852619/ Erico Nunes (1): gallium: add a cap to force compute minmax indices Qiang Yu (6): gallium/u_math: add

[Mesa-dev] [Question] nir_intrinsic_load_uniform use float const_offset now

2019-03-11 Thread Qiang Yu
Hi guys, When doing rebase from 18.3 to master branch, I found nir_intrinsic_load_uniform use float const_offset now. But most gallium drivers still treat it as int except freedreno. I don't know which commit did this, is this expected? Regards, Qiang

Re: [Mesa-dev] [PATCH 0/4] Common KMS renderonly support

2019-01-26 Thread Qiang Yu
Sorry, I missed this part of change and thought there's only kmsro_dri.so. Then there's no concern on my side. Thanks, Qiang Rob Herring 于 2019年1月27日周日 上午3:43写道: > On Fri, Jan 25, 2019 at 9:00 PM Qiang Yu wrote: > > > > Thanks Rob, I'm OK with this kmsro approach. > > &g

Re: [Mesa-dev] [PATCH 0/4] Common KMS renderonly support

2019-01-25 Thread Qiang Yu
Thanks Rob, I'm OK with this kmsro approach. But I have to point out that this will break XServer AIGLX: 1. modesetting DDX will report the display drm driver name like meson as DRI2 driver name 2. libglx.so used by xserver will look after meson_dri.so for dlopen 3. then dlsym

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

2019-01-04 Thread Qiang Yu
> > > > 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 u

[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

[Mesa-dev] [PATCH] loader: decouple USE_DRICONF from HAVE_LIBDRM

2018-08-20 Thread Qiang Yu
For user can use dri_driver drirc option even on environment without libdrm. Tested on build with and without libdrm. Signed-off-by: Qiang Yu --- src/loader/loader.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/loader/loader.c b/src/loader/loader.c index

[Mesa-dev] [PATCH v4 2/6] xmlconfig: read more config files from drirc.d/

2018-08-05 Thread Qiang Yu
. seperate driParseConfigFiles refine into another patch 2. fix entries[i] mem leak v2: drop /etc/drirc.d Signed-off-by: Qiang Yu --- docs/autoconf.html | 7 +++ src/util/Makefile.am | 1 + src/util/meson.build | 3 +++ src/util/xmlconfig.c | 42

[Mesa-dev] [PATCH v3 6/6] loader: add dri_driver option to override dri driver to load

2018-08-05 Thread Qiang Yu
into another patch v2: add kernel_driver device attribute to specify kernel driver name instead of reuse driver attribute Suggested-by: Michel Dänzer Signed-off-by: Qiang Yu --- src/loader/loader.c | 34 +- src/util/xmlpool/t_options.h | 5 + 2

[Mesa-dev] [PATCH v3 5/6] xmlconfig: add kernel_driver device attribute

2018-08-05 Thread Qiang Yu
This attribute can be used by loader to apply different option to device use specific kernel driver. Signed-off-by: Qiang Yu --- src/gallium/auxiliary/pipe-loader/pipe_loader.c | 2 +- src/gallium/targets/d3dadapter9/drm.c | 2 +- src/loader/loader.c | 2

[Mesa-dev] [PATCH v3 4/6] loader: abstract loader_get_kernel_driver_name for reuse

2018-08-05 Thread Qiang Yu
This function can be shared by the following kernel_driver drirc patch. Signed-off-by: Qiang Yu --- src/loader/loader.c | 39 +++ 1 file changed, 23 insertions(+), 16 deletions(-) diff --git a/src/loader/loader.c b/src/loader/loader.c index 4327548..c8c7a65

[Mesa-dev] [PATCH v3 3/6] driconf: move ${sysconfdir}/drirc to ${datadir}/drirc.d/00-mesa-defaults.conf

2018-08-05 Thread Qiang Yu
${sysconfdir} is for store admin config files, so move this mesa default config file to ${datadir}/drirc.d. Signed-off-by: Qiang Yu Reviewed-by: Emil Velikov --- src/util/{drirc => 00-mesa-defaults.conf} | 0 src/util/Makefile.am | 5 +++-- src/util/meson.bu

[Mesa-dev] [PATCH v3 2/6] xmlconfig: read more config files from drirc.d/

2018-08-05 Thread Qiang Yu
driParseConfigFiles refine into another patch 2. fix entries[i] mem leak v2: drop /etc/drirc.d Signed-off-by: Qiang Yu --- docs/autoconf.html | 7 +++ src/util/Makefile.am | 1 + src/util/meson.build | 4 +++- src/util/xmlconfig.c | 42 ++ 4 files changed

[Mesa-dev] [PATCH v3 1/6] xmlconfig: refine driParseConfigFiles to use parseOneConfigFile

2018-08-05 Thread Qiang Yu
Also prepare for the usage of following parseConfigDir patch. Signed-off-by: Qiang Yu --- src/util/xmlconfig.c | 62 1 file changed, 28 insertions(+), 34 deletions(-) diff --git a/src/util/xmlconfig.c b/src/util/xmlconfig.c index d384791

[Mesa-dev] [PATCH v3 0/6] support config for third-party DRI driver load

2018-08-05 Thread Qiang Yu
file location to some directory for the ease of driver and application to add their own config files. v3: 1. split more patches 2. fix dirent mem leak v2: 1. remove /etc/drirc.d 2. move orginal /etc/drirc to /usr/share/drirc.d 3. add kernel_driver device attribute Qiang Yu (6): xmlconfig

[Mesa-dev] [PATCH v2 3/3] loader: add drirc option to override dri driver to load

2018-08-03 Thread Qiang Yu
: or Suggested-by: Michel Dänzer Signed-off-by: Qiang Yu --- src/gallium/auxiliary/pipe-loader/pipe_loader.c | 2 +- src/gallium/targets/d3dadapter9/drm.c | 2 +- src/loader/loader.c | 75 +++-- src/mesa/drivers/dri/common/dri_util.c

[Mesa-dev] [PATCH v2 2/3] driconf: move ${sysconfdir}/drirc to ${datadir}/drirc.d/00-mesa-defaults.conf

2018-08-03 Thread Qiang Yu
${sysconfdir} is for store admin config files, so move this mesa default config file to ${datadir}/drirc.d. Signed-off-by: Qiang Yu --- src/util/00-mesa-defaults.conf | 314 + src/util/Makefile.am | 5 +- src/util/drirc | 314

[Mesa-dev] [PATCH v2 1/3] xmlconfig: read more config files from drirc.d/

2018-08-03 Thread Qiang Yu
-off-by: Qiang Yu --- docs/autoconf.html | 7 src/util/Makefile.am | 1 + src/util/meson.build | 4 +- src/util/xmlconfig.c | 103 ++- 4 files changed, 80 insertions(+), 35 deletions(-) diff --git a/docs/autoconf.html b/docs/autoconf.html

[Mesa-dev] [PATCH v2 0/3] support config for third-party DRI driver load

2018-08-03 Thread Qiang Yu
radeonsi dri driver so that it can use the mesa libgbm instead of maintain a customized one. We also expand drirc config file location to some directory for the ease of driver and application to add their own config files. Qiang Yu (3): xmlconfig: read more config files from drirc.d/ driconf: move

[Mesa-dev] [PATCH 0/2] support config for third-party DRI driver load

2018-08-01 Thread Qiang Yu
file location to some directories for the ease of driver and application to add their own config files. Qiang Yu (2): xmlconfig: read more config files from drirc.d/ loader: add dri_driver drirc option to override dri driver to load docs/autoconf.html | 11 - src/loader/loader.c

[Mesa-dev] [PATCH 1/2] xmlconfig: read more config files from drirc.d/

2018-08-01 Thread Qiang Yu
/share/drirc.d/ 2. /etc/drirc.d/ 3. /etc/drirc 4. ~/.drirc Signed-off-by: Qiang Yu --- docs/autoconf.html | 11 +- src/util/Makefile.am | 1 + src/util/meson.build | 4 +- src/util/xmlconfig.c | 104 ++- 4 files changed, 83 insertions(+), 37

[Mesa-dev] [PATCH 2/2] loader: add dri_driver drirc option to override dri driver to load

2018-08-01 Thread Qiang Yu
drirc implementation of MESA_LOADER_DRIVER_OVERRIDE which can be used to override dri driver to load. Usage: override dri driver for device with spec kernel driver name: Signed-off-by: Qiang Yu --- src/loader/loader.c | 75 ++-- src/util

Re: [Mesa-dev] [PATCH v2] egl: Fix missing clamping in eglSetDamageRegionKHR

2018-07-14 Thread Qiang Yu
Looks good for me. Reviewed-by: Qiang Yu Regards, Qiang On Thu, Jul 12, 2018 at 12:28 AM Harish Krupo wrote: > > > Harish Krupo writes: > > > Clamp the x and y co-ordinates of the rectangles. > > > > v2: Clamp width/height after converting to co-ordinates > &

Re: [Mesa-dev] [PATCH rfc 0/3] Be able to disable EGL/GLX_EXT_buffer_age

2018-07-05 Thread Qiang Yu
On Fri, Jul 6, 2018 at 6:20 AM Eric Anholt wrote: > > Qiang Yu writes: > > > Hi Emil, > > > > On Thu, Jul 5, 2018 at 9:54 PM Emil Velikov > > wrote: > >> > >> On 5 July 2018 at 14:31, Emil Velikov wrote: > >> > Hi

Re: [Mesa-dev] [PATCH rfc 0/3] Be able to disable EGL/GLX_EXT_buffer_age

2018-07-05 Thread Qiang Yu
Hi Emil, On Thu, Jul 5, 2018 at 9:54 PM Emil Velikov wrote: > > On 5 July 2018 at 14:31, Emil Velikov wrote: > > Hi Qiang Yu > > > > On 5 July 2018 at 03:31, Qiang Yu wrote: > >> For GPU like ARM mali Utgard EGL/GLX_EXT_buffer_age will make > >> perfor

Re: [Mesa-dev] [PATCH 0/3] Rectify KHR_partial_update extension implementation

2018-07-05 Thread Qiang Yu
Series is: Reviewed-by: Qiang Yu Regards, Qiang On Wed, Jul 4, 2018 at 8:58 PM Harish Krupo wrote: > > Based on the discussion in the thread starting at: > https://lists.freedesktop.org/archives/mesa-dev/2018-June/198846.html > it was identified that the implementation of the KHR_pa

[Mesa-dev] [PATCH rfc 2/3] gallium: add PIPE_CAP_BUFFER_AGE

2018-07-04 Thread Qiang Yu
For gallium drivers to expose EGL/GLX_EXT_buffer_age. Signed-off-by: Qiang Yu --- src/gallium/docs/source/screen.rst | 1 + src/gallium/drivers/etnaviv/etnaviv_screen.c| 1 + src/gallium/drivers/freedreno/freedreno_screen.c| 1 + src/gallium/drivers/i915

[Mesa-dev] [PATCH rfc 0/3] Be able to disable EGL/GLX_EXT_buffer_age

2018-07-04 Thread Qiang Yu
if this is the right way to disable it, so I send this RFC before lima be able to upstream. Qiang Yu (3): egl,glx: query dri integer to expose EGL/GLX_EXT_buffer_age gallium: add PIPE_CAP_BUFFER_AGE egl: fix query buffer age fail when EGL_KHR_partial_update include/GL/internal/dri_interface.h

[Mesa-dev] [PATCH rfc 3/3] egl: fix query buffer age fail when EGL_KHR_partial_update

2018-07-04 Thread Qiang Yu
When no EGL_EXT_buffer_age but has EGL_KHR_partial_update, query buffer age should not fail. Signed-off-by: Qiang Yu --- src/egl/main/eglsurface.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/egl/main/eglsurface.c b/src/egl/main/eglsurface.c index 3bd14a8cd0

[Mesa-dev] [PATCH rfc 1/3] egl, glx: query dri integer to expose EGL/GLX_EXT_buffer_age

2018-07-04 Thread Qiang Yu
back. Expose this extension will mis-lead application to use it which will make performance worse for this kind of GPU. EGL_KHR_partial_update is better choice for this kind of GPU. Signed-off-by: Qiang Yu --- include/GL/internal/dri_interface.h | 2 ++ src/egl/drivers/dri2

Re: [Mesa-dev] Question about EGL_KHR_partial_update implementation

2018-07-02 Thread Qiang Yu
Hi Harish, > > > To my understand this extension should only depend on the driver support > > instead > > of platform support while the EGL_KHR_swap_buffers_with_damage is the > > opposite: > > https://www.khronos.org/registry/EGL/extensions/KHR/EGL_KHR_swap_buffers_with_damage.txt > > > > I

[Mesa-dev] Question about EGL_KHR_partial_update implementation

2018-06-28 Thread Qiang Yu
Hi Harish, I want to implement EGL_KHR_partial_update for lima mesa driver and find you worked on Android/Wayland support for it: https://patchwork.freedesktop.org/patch/160944/ https://patchwork.freedesktop.org/patch/188695/ So I have some question about it: your implementation seems to depend

[Mesa-dev] Question about NIR changes since mesa 17.3

2018-03-30 Thread Qiang Yu
Hi guys, I'm rebasing the mesa-lima code from 17.3 to 18.0 and found the NIR changes in 18.0 will always do nir_lower_io_to_scalar_early() for the output of vertex shader and input of fragment shader. My first question is: Is it for the link time optimization that we can drop un-used channel in a

Re: [Mesa-dev] Question about implementing viewport transfer and const load in nir

2017-08-30 Thread Qiang Yu
On Wed, Aug 30, 2017 at 9:03 PM, Rob Clark <robdcl...@gmail.com> wrote: > On Wed, Aug 30, 2017 at 3:26 AM, Qiang Yu <yuq...@gmail.com> wrote: >>> btw, does lima have some way to write to memory from cmdstream (ie. >>> without setting up a full blown draw)? If

Re: [Mesa-dev] Question about implementing viewport transfer and const load in nir

2017-08-30 Thread Qiang Yu
> btw, does lima have some way to write to memory from cmdstream (ie. > without setting up a full blown draw)? If so perhaps you could get > away with leaving some extra space at the end of your uniform buffer > that you copy driver internal uniforms into before kicking the draw? Unfortunately

Re: [Mesa-dev] Question about implementing viewport transfer and const load in nir

2017-08-30 Thread Qiang Yu
> In my case, VC4 has lots of custom state-dependent uniforms, and uniform > upload is where we spend most of our CPU time (basically each draw call > needs to re-upload the uniform stream, and the stream has to be in the > order they will be used by instructions, rather than where they appear >

Re: [Mesa-dev] Question about implementing viewport transfer and const load in nir

2017-08-30 Thread Qiang Yu
be done in non-driver >> layer and some (instruction >> insertion and uniform base assign to const) can be done in driver. >> >> BTW. lima gp can only have one uniform buffer, so I can't just use a >> dedicated uniform buffer >> for viewport transfer and const uniform

[Mesa-dev] Question about implementing viewport transfer and const load in nir

2017-08-26 Thread Qiang Yu
Hi guys, When working on lima gp compiler, I come across two problems about inserting extra uniform and instructions in nir for the driver and don't know where's the right place to do it. So I'd like to hear your opinion and if there's other driver already did so. 1. viewport transfer lima gp

Re: [Mesa-dev] Question for nir lower load uniform to scalar

2017-08-25 Thread Qiang Yu
On Sat, Aug 26, 2017 at 3:07 AM, Eric Anholt <e...@anholt.net> wrote: > Qiang Yu <yuq...@gmail.com> writes: > >> Hi Eric, >> >> I'm working on lima gp compiler which should benefit from nir lowering >> uniform load to scalar. >> I notice you

[Mesa-dev] Question for nir lower load uniform to scalar

2017-08-25 Thread Qiang Yu
Hi Eric, I'm working on lima gp compiler which should benefit from nir lowering uniform load to scalar. I notice you write the nir_lower_io_to_scalar.c which support lowering shader_in/shader_out but left the uniform lowering in vc4 driver, any reason why not implement in the

[Mesa-dev] [PATCH] android: fix gallium_dri.so can't be loaded by drm_gralloc

2017-08-17 Thread Qiang Yu
The problem is in gallium/winsys/amdgpu/drm/Android.mk which will have duplacated symbols when linking gallium_dri.so for libLLVMCore and libLLVM. Signed-off-by: Qiang Yu <qiang...@amd.com> Signed-off-by: Mauro Rossi <issor.or...@gmail.com> Signed-off-by: Rob Herring <robher

[Mesa-dev] [PATCH v2] gbm: add support for loading third-party backend (v2)

2017-04-07 Thread Qiang Yu
try order. Signed-off-by: Qiang Yu <qiang...@amd.com> --- configure.ac | 9 +++ src/gbm/Makefile.am| 11 +++- src/gbm/backends/dri/gbm_dri.c | 1 + src/gbm/main/backend.c | 130 ++--- src/gbm/main/gbmint.h

[Mesa-dev] [PATCH] gbm: add support for loading third-party backend

2017-01-23 Thread Qiang Yu
one-by-one until one can successfully create a gbm device. The default DRI backend is tried at last. People can still use GBM_BACKEND to overwrite the backend try order. Signed-off-by: Qiang Yu <qiang...@amd.com> --- configure.ac | 7 + src/gbm/Makefile.am| 1 + src/gb