Re: [Mesa-dev] [PATCH 0/7] dma-buf: Add an API for exporting sync files (v11)

2021-06-10 Thread Chia-I Wu
On Tue, May 25, 2021 at 2:18 PM Jason Ekstrand wrote: > Modern userspace APIs like Vulkan are built on an explicit > synchronization model. This doesn't always play nicely with the > implicit synchronization used in the kernel and assumed by X11 and > Wayland. The client -> compositor half of

Re: [Mesa-dev] Merging virtio-gpu vulkan driver

2021-04-05 Thread Chia-I Wu
On Mon, Apr 5, 2021 at 11:12 AM Dave Airlie wrote: > > On Tue, 6 Apr 2021 at 03:22, Chia-I Wu wrote: > > > > Hi list, > > > > We are looking to merge virtio-gpu vulkan driver > > > > https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests

[Mesa-dev] Merging virtio-gpu vulkan driver

2021-04-05 Thread Chia-I Wu
Hi list, We are looking to merge virtio-gpu vulkan driver https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5800 On the good side, the driver is conformant with Vulkan 1.2 (vtest) and Vulkan 1.1 (virtio-gpu). I only tried it on a handful of games (e.g., Dota 2, Hades on Proton with

Re: [Mesa-dev] Perfetto CPU/GPU tracing

2021-02-12 Thread Chia-I Wu
For virgl, where the biggest perf gaps often come from unnecessary CPU waits or high latencies of fence signaling, being able to insert userspace driver trace events and combine them with kernel ftrace events are a big plus. Admittedly, there is no HW counters and my needs are simpler (inserting

Re: [Mesa-dev] Static thread safety checking with clang

2020-11-10 Thread Chia-I Wu
On Tue, Nov 10, 2020 at 8:09 AM Kristian Høgsberg wrote: > > Hi, > > I wanted to call attention to > > https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7529 > > which shows how we can use a new clang __attribute__ to statically > check locking invariants. It's probably not perfect, but

Re: [Mesa-dev] [PATCH v3] egl/android: Update color_buffers querying for buffer age

2019-07-19 Thread Chia-I Wu
rtial_update. > > v2: update comment instead of removing (Eric Engestrom) > v3: change static array to dynamic allocated color_buffers > querying MIN_UNDEQUEUED_BUFFERS (Chia-I Wu o...@chromium.org) > > Fixes: 2acc69da8ce "EGL/Android: Add EGL_EXT_buffer_age extension"

Re: [Mesa-dev] [PATCH] virgl: Set meta data for textures from handle.

2019-07-17 Thread Chia-I Wu
On Wed, Jul 17, 2019 at 3:59 PM Lepton Wu wrote: > > OK, actually struct winsys_handle is an obscure structure for virgl > driver so we can't access whandle->stride here... > So maybe just leave this CL as it is? That is fair. R-b'ed and pushed. > > On Wed, Jul 17, 2019

Re: [Mesa-dev] [PATCH] virgl: Set meta data for textures from handle.

2019-07-17 Thread Chia-I Wu
t to handle the unexpected stride. Not that I believe that is going to happen, but still... > > On Wed, Jul 17, 2019 at 12:25 PM Chia-I Wu wrote: > > > > On Wed, Jul 17, 2019 at 11:44 AM Lepton Wu wrote: > > > > > > On Wed, Jul 17, 2019 at 11:26 AM Chia-I Wu w

Re: [Mesa-dev] [PATCH] virgl: Set meta data for textures from handle.

2019-07-17 Thread Chia-I Wu
On Wed, Jul 17, 2019 at 11:44 AM Lepton Wu wrote: > > On Wed, Jul 17, 2019 at 11:26 AM Chia-I Wu wrote: > > > > On Wed, Jul 17, 2019 at 10:14 AM Erik Faye-Lund > > wrote: > > > > > > On Wed, 2019-07-17 at 10:02 -0700, Lepton Wu wrote: > > > &

Re: [Mesa-dev] [PATCH] virgl: Set meta data for textures from handle.

2019-07-17 Thread Chia-I Wu
On Wed, Jul 17, 2019 at 10:14 AM Erik Faye-Lund wrote: > > On Wed, 2019-07-17 at 10:02 -0700, Lepton Wu wrote: > > The set of meta data was removed by commit 8083464. It broke lots of > > dEQP tests when running with pbuffer surface type. > > > > Fixes: 80834640137 ("virgl: remove dead code") > >

Re: [Mesa-dev] [PATCH] turnip: drop dead close(master_fd)

2019-04-19 Thread Chia-I Wu
On Fri, Apr 19, 2019 at 8:01 AM Emil Velikov wrote: > > From: Emil Velikov > > The fd is -1, thus the block of if (fd != -1) close(fd) is dead code. > > Cc: Chad Versace > Cc: Chia-I Wu > Signed-off-by: Emil Velikov Reviewed-by: Chia-I Wu > --- > src/freedreno/

Re: [Mesa-dev] [PATCH v2] virgl: Use right key to insert resource to hash.

2019-04-08 Thread Chia-I Wu
On Mon, Apr 8, 2019 at 11:24 AM Lepton Wu wrote: > On Mon, Apr 8, 2019 at 11:10 AM Chia-I Wu wrote: > > > > > > > > On Mon, Apr 8, 2019 at 9:34 AM Lepton Wu wrote: > >> > >> The old code could use gem name as key when inserting it to bo_handles &

Re: [Mesa-dev] [PATCH] virgl: Use right key to insert resource to hash.

2019-04-08 Thread Chia-I Wu
On Wed, Apr 3, 2019 at 8:17 PM Dave Airlie wrote: > On Thu, 4 Apr 2019 at 06:54, Chia-I Wu wrote: > > > > You could end up having two virgl_hw_res with two different GEM handles > pointing to the same kernel GEM object. That might break some assumptions > abou

Re: [Mesa-dev] [PATCH v2] virgl: Use right key to insert resource to hash.

2019-04-08 Thread Chia-I Wu
On Mon, Apr 8, 2019 at 9:34 AM Lepton Wu wrote: > The old code could use gem name as key when inserting it to bo_handles > hash table while trying to remove it from hash table with bo_handle as > key in virgl_hw_res_destroy and then it fail to remove it from bo_handles > hash table. This

Re: [Mesa-dev] [PATCH] virgl: Use right key to insert resource to hash.

2019-04-03 Thread Chia-I Wu
normally need to submit the cmdbuf first before starting the transfer. The current code detects that with virgl_drm_res_is_ref, which assumes each kernel GEM object has a unique virgl_hw_res. On Mon, Apr 1, 2019 at 12:37 PM Lepton Wu wrote: > > > > On Wed, Mar 20, 2019 at 3:03 PM Chia

Re: [Mesa-dev] [PATCH] virgl: Use right key to insert resource to hash.

2019-03-20 Thread Chia-I Wu
On Mon, Mar 18, 2019 at 2:22 PM Lepton Wu wrote: > The old code could use gem name as key when inserting it to bo_handles > hash table while trying to remove it from hash table with bo_handle as > key in virgl_hw_res_destroy. This triggers use after free. Also, we > should only reuse resource

Re: [Mesa-dev] [PATCH] virgl: close drm fd when destroying virgl screen.

2019-03-20 Thread Chia-I Wu
Reviewed-by: Chia-I Wu On Mon, Mar 18, 2019 at 4:40 PM Lepton Wu wrote: > This fd was create in virgl_drm_screen_create and should be closed > in virgl_drm_screen_destroy. > > Signed-off-by: Lepton Wu > --- > src/gallium/winsys/virgl/drm/virgl_drm_winsys.c | 1 + &g

[Mesa-dev] [PATCH] freedreno/drm: sync uapi again

2019-01-07 Thread Chia-I Wu
"pad" was missing in Mesa's msm_drm.h. sizeof(drm_msm_gem_info) remains the same, but now the compiler initializes the field to zero. Buffer allocation results in EINVAL without this for me. Cc: Rob Clark Cc: Kristian Høgsberg Signed-off-by: Chia-I Wu --- src/freedreno/drm/msm

[Mesa-dev] [PATCH] meson: fix EGL/X11 build without GLX

2019-01-07 Thread Chia-I Wu
dep_xcb and others were not set under this configuration. Signed-off-by: Chia-I Wu --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 709f77a9c7..601085e055 100644 --- a/meson.build +++ b/meson.build @@ -1361,7 +1361,7

Re: [Mesa-dev] [PATCH 1/3] ilo: EOL unplumb unmaintained gallium drv from winsys

2017-02-02 Thread Chia-I Wu
All three are Acked-by:Chia-I Wu On Thu, Feb 2, 2017 at 12:15 AM, Edward O'Callaghan wrote: > This is no longer actively maintained and is just > accumulating bitrot. > > Signed-off-by: Edward O'Callaghan > --- >

Re: [Mesa-dev] Potentially EOL ilo gallium driver

2016-12-07 Thread Chia-I Wu
dward O'Callaghan >>>>>>>> <funfunc...@folklore1984.net> wrote: >>>>>>>>> This patch is to potentially remove ourself from the maintaince >>>>>>>>> burden of the ilo driver that appears to now be essentially >

Re: [Mesa-dev] [PATCH 1/3] ilo: add PIPE_QUERY_OCCLUSION_PREDICATE support

2016-02-04 Thread Chia-I Wu
On Fri, Feb 5, 2016 at 2:36 AM, Ilia Mirkin <imir...@alum.mit.edu> wrote: > [+Chia-I Wu] > > I'd appreciate it if you could have a look and see if this looks > reasonable. Not sure if you're still maintaining the driver or not. > The story is that I want to use this query ty

Re: [Mesa-dev] [PATCH 3/4] ilo: unref old fence

2015-07-09 Thread Chia-I Wu
On Thu, Jul 9, 2015 at 8:46 AM, Rob Clark robdcl...@gmail.com wrote: From: Rob Clark robcl...@freedesktop.org Some, but not all, state trackers will explicitly unref (and set to NULL) the previous *fence before calling pipe-flush(). So driver should use fence_ref() which will unref the old

Re: [Mesa-dev] [PATCH 01/18] winsys/radeon: move radeon_winsys.h up one directory

2015-04-28 Thread Chia-I Wu
On Tue, Apr 28, 2015 at 2:19 PM, Emil Velikov emil.l.veli...@gmail.com wrote: On 28 April 2015 at 03:30, Michel Dänzer mic...@daenzer.net wrote: On 28.04.2015 03:57, Marek Olšák wrote: Can you elaborate on what amdgpu/sw would be good for? Frankly I don't see a point, therefore we don't need

Re: [Mesa-dev] [PATCH 0/2] Disable the EGL state tracker for Linux/DRI builds

2014-11-05 Thread Chia-I Wu
On Thu, Nov 6, 2014 at 5:11 AM, Jose Fonseca jfons...@vmware.com wrote: How many people/companies use EGL for Windows/fbdev, how about OpenVG on any platform ? I already said this privately to Marek when he was RFC'ing on this change: I'm fine if Linux-specific drivers abandon st/egl to

Re: [Mesa-dev] [PATCH 0/2] Disable the EGL state tracker for Linux/DRI builds

2014-11-05 Thread Chia-I Wu
On Wed, Nov 5, 2014 at 6:42 AM, Marek Olšák mar...@gmail.com wrote: Hi everybody, I'm about to address this long-standing issue: The EGL state tracker is redundant. It duplicates what st/dri does and it also duplicates what the common loader egl_dri2 does, which is used by all classic drivers

Re: [Mesa-dev] [PATCH 01/27] winsys/intel: drop intel_winsys.h from makefile.sources

2014-08-29 Thread Chia-I Wu
to me. Thanks. Cc: Chia-I Wu olva...@gmail.com Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- src/gallium/winsys/intel/drm/Makefile.sources | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/gallium/winsys/intel/drm/Makefile.sources b/src/gallium/winsys

[Mesa-dev] [PATCHv3 07/16] glsl: protect anonymous struct id with a mutex

2014-08-20 Thread Chia-I Wu
There may be two contexts compiling shaders at the same time, and we want the anonymous struct id to be globally unique. Signed-off-by: Chia-I Wu o...@lunarg.com Reviewed-by: Brian Paul bri...@vmware.com Reviewed-by: Ian Romanick ian.d.roman...@intel.com --- src/glsl/glsl_parser_extras.cpp | 10

[Mesa-dev] [PATCHv3 03/16] util: initialize locale_t with a static object

2014-08-20 Thread Chia-I Wu
_mesa_strtod and _mesa_strtof may be called from multiple threads. They need to be thread-safe. Signed-off-by: Chia-I Wu o...@lunarg.com Reviewed-by: Brian Paul bri...@vmware.com Reviewed-by: Ian Romanick ian.d.roman...@intel.com v2: platform checks are now done in configure.ac --- src/util

[Mesa-dev] [PATCHv3 11/16] mesa: add infrastructure for threaded shader compilation

2014-08-20 Thread Chia-I Wu
parts: the first part links and error checks while the second part optimizes and generates the machine code. With the split, we can always defer the second part to the thread pool. Signed-off-by: Chia-I Wu o...@lunarg.com Reviewed-by: Brian Paul bri...@vmware.com Reviewed-by: Ian Romanick

[Mesa-dev] [PATCHv3 05/16] util: add a generic thread pool data structure

2014-08-20 Thread Chia-I Wu
It can be used to implement, for example, threaded glCompileShader and glLinkProgram. Two basic tests are included to verify the basic functions, and to give us some confidence about its thread-safety. v2: allow tasks to complete other tasks Signed-off-by: Chia-I Wu o...@lunarg.com Reviewed

[Mesa-dev] [PATCHv3 02/16] configure: check for xlocale.h and strtof

2014-08-20 Thread Chia-I Wu
With the assumptions that xlocale.h implies newlocale and strtof_l. SCons is updated to define HAVE_XLOCALE_H on linux and darwin. Signed-off-by: Chia-I Wu o...@lunarg.com --- configure.ac| 3 +++ scons/gallium.py| 4 src/util/strtod.cpp | 12 3 files changed, 11

[Mesa-dev] [PATCHv3 10/16] mesa: protect the debug state with a mutex

2014-08-20 Thread Chia-I Wu
We are about to change mesa to spawn threads for deferred glCompileShader and glLinkProgram, and we need to make sure those threads can send compiler warnings/errors to the debug output safely. Signed-off-by: Chia-I Wu o...@lunarg.com Reviewed-by: Brian Paul bri...@vmware.com Reviewed-by: Ian

[Mesa-dev] [PATCHv3 16/16] i965: enable threaded precompile

2014-08-20 Thread Chia-I Wu
. brw_shader_program_precompile_key is introduced and initialized in NofityLinkShader for we cannot inspect the context during precompiling. Signed-off-by: Chia-I Wu o...@lunarg.com Acked-by: Ian Romanick ian.d.roman...@intel.com --- src/mesa/drivers/dri/i965/brw_context.c | 4 +- src/mesa

[Mesa-dev] [PATCHv3 04/16] util: move simple_list.h from core to util

2014-08-20 Thread Chia-I Wu
It belongs to util, and we will need it from within util. Signed-off-by: Chia-I Wu o...@lunarg.com --- src/mesa/drivers/dri/i915/i830_texblend.c | 2 +- src/mesa/drivers/dri/i915/intel_syncobj.c | 2 +- src/mesa/drivers/dri/r200/r200_cmdbuf.c| 2 +- src/mesa

[Mesa-dev] [PATCHv3 08/16] glsl: protect glsl_type with a mutex

2014-08-20 Thread Chia-I Wu
glsl_type has several static hash tables and a static ralloc context. They need to be protected by a mutex as they are not thread-safe. Signed-off-by: Chia-I Wu o...@lunarg.com Reviewed-by: Brian Paul bri...@vmware.com Reviewed-by: Ian Romanick ian.d.roman...@intel.com --- src/glsl

[Mesa-dev] [PATCHv3 12/16] i965: add drirc option multithread_glsl_compiler

2014-08-20 Thread Chia-I Wu
Setting it to a non-zero value N will cause shader compilation to be deferred to a thread pool. When N is greater than 1, it indicates the maximum number of threads in the pool. When N is 1, the number of threads is up to the driver (two for i965). Signed-off-by: Chia-I Wu o...@lunarg.com

[Mesa-dev] [PATCHv3 14/16] i965: refactor do_gs_prog

2014-08-20 Thread Chia-I Wu
Split do_gs_prog into brw_gs_init_compile brw_gs_do_compile brw_gs_upload_compile brw_gs_clear_complile Signed-off-by: Chia-I Wu o...@lunarg.com Acked-by: Ian Romanick ian.d.roman...@intel.com --- src/mesa/drivers/dri/i965/brw_vec4_gs.c | 161 1 file

[Mesa-dev] [PATCHv3 15/16] i965: refactor do_wm_prog

2014-08-20 Thread Chia-I Wu
Split do_wm_prog into brw_wm_init_compile brw_wm_do_compile brw_wm_upload_compile brw_wm_clear_complile Add struct brw_wm_compile to be passed around them. Signed-off-by: Chia-I Wu o...@lunarg.com Acked-by: Ian Romanick ian.d.roman...@intel.com --- src/mesa/drivers/dri/i965/brw_wm.c

[Mesa-dev] [PATCHv3 09/16] glsl: integrate with the singleton thread pool

2014-08-20 Thread Chia-I Wu
The singleton thread pool will be used by contexts to queue compilation tasks. We need to control its lieftime from the compiler. Signed-off-by: Chia-I Wu o...@lunarg.com --- src/glsl/glsl_parser_extras.cpp | 4 1 file changed, 4 insertions(+) diff --git a/src/glsl/glsl_parser_extras.cpp b

[Mesa-dev] [PATCHv3 01/16] util: add _mesa_strtod and _mesa_strtof

2014-08-20 Thread Chia-I Wu
Both core mesa and glsl have their own wrappers for strtof_l. Merge and move them to util/. They are compiled with a C++ compiler so that we can make them thread-safe in a following commit. Signed-off-by: Chia-I Wu o...@lunarg.com --- src/glsl/Makefile.sources| 3 +- src/glsl

[Mesa-dev] [PATCHv3 00/16] multithread shader compiler

2014-08-20 Thread Chia-I Wu
Hi, This is v3 of the series. It should have all the changes I promised to fix. There are some new or splitted patches because _mesa_strtof, simple_list, and thread pool are now moved to src/util/. To summarize, Patch 1-3 merge mesa and glsl strtof wrappers and moves them to src/util/. They go

[Mesa-dev] [PATCHv3 06/16] util: allow the thread pool to be used as a singleton

2014-08-20 Thread Chia-I Wu
To have a real control over the number of driver threads, we almost never want more than a single thread pool. Signed-off-by: Chia-I Wu o...@lunarg.com Reviewed-by: Brian Paul bri...@vmware.com Reviewed-by: Ian Romanick ian.d.roman...@intel.com v2: split glsl changes to another commit --- src

[Mesa-dev] [PATCHv3 13/16] i965: refactor do_vs_prog

2014-08-20 Thread Chia-I Wu
Split do_vs_prog into brw_vs_init_compile brw_vs_do_compile brw_vs_upload_compile brw_vs_clear_complile Signed-off-by: Chia-I Wu o...@lunarg.com Acked-by: Ian Romanick ian.d.roman...@intel.com --- src/mesa/drivers/dri/i965/brw_vec4.h | 6 ++ src/mesa/drivers/dri/i965/brw_vs.c | 121

Re: [Mesa-dev] [PATCHv3 11/16] mesa: add infrastructure for threaded shader compilation

2014-08-20 Thread Chia-I Wu
On Thu, Aug 21, 2014 at 12:40 AM, Fredrik Höglund fred...@kde.org wrote: On Wednesday 20 August 2014, Chia-I Wu wrote: Add _mesa_enable_glsl_threadpool to enable the thread pool for a context, and add ctx-Const.DeferCompileShader and ctx-Const.DeferLinkProgram to fine-control what gets

Re: [Mesa-dev] [PATCHv3 05/16] util: add a generic thread pool data structure

2014-08-20 Thread Chia-I Wu
On Thu, Aug 21, 2014 at 9:31 AM, Matt Turner matts...@gmail.com wrote: On Tue, Aug 19, 2014 at 11:40 PM, Chia-I Wu olva...@gmail.com wrote: It can be used to implement, for example, threaded glCompileShader and glLinkProgram. Two basic tests are included to verify the basic functions

Re: [Mesa-dev] [PATCHv2 03/13] glsl: initialize locale_t with a static object

2014-08-19 Thread Chia-I Wu
On Thu, Aug 14, 2014 at 3:00 AM, Ian Romanick i...@freedesktop.org wrote: On 07/09/2014 12:47 AM, Chia-I Wu wrote: The compiler may be used by multiple contexts simultaneously and needs to be thread-safe. Signed-off-by: Chia-I Wu o...@lunarg.com --- src/glsl/strtod.cpp | 29

Re: [Mesa-dev] [PATCHv2 04/13] glsl: protect anonymous struct id with a mutex

2014-08-19 Thread Chia-I Wu
On Thu, Aug 14, 2014 at 3:03 AM, Ian Romanick i...@freedesktop.org wrote: On 07/09/2014 12:47 AM, Chia-I Wu wrote: There may be two contexts compiling shaders at the same time, and we want the anonymous struct id to be globally unique. Signed-off-by: Chia-I Wu o...@lunarg.com --- src/glsl

Re: [Mesa-dev] [PATCHv2 08/13] mesa: add infrastructure for threaded shader compilation

2014-08-19 Thread Chia-I Wu
On Thu, Aug 14, 2014 at 4:35 AM, Ian Romanick i...@freedesktop.org wrote: On 07/09/2014 12:47 AM, Chia-I Wu wrote: Add _mesa_enable_glsl_threadpool to enable the thread pool for a context, and add ctx-Const.DeferCompileShader and ctx-Const.DeferLinkProgram to fine-control what gets threaded

Re: [Mesa-dev] [PATCHv2 08/13] mesa: add infrastructure for threaded shader compilation

2014-08-19 Thread Chia-I Wu
On Thu, Aug 14, 2014 at 4:41 AM, Ian Romanick i...@freedesktop.org wrote: On 07/09/2014 12:47 AM, Chia-I Wu wrote: @@ -3489,6 +3508,18 @@ struct gl_constants GLfloat MaxFragmentInterpolationOffset; GLboolean FakeSWMSAA; + + /* +* Defer certain operations to a thread pool

Re: [Mesa-dev] [PATCHv2 13/13] i965: enable threaded precompile

2014-08-19 Thread Chia-I Wu
On Thu, Aug 14, 2014 at 4:44 AM, Ian Romanick i...@freedesktop.org wrote: On 07/09/2014 12:47 AM, Chia-I Wu wrote: Inherit gl_shader_program and add save/restore functions to save precompile results in the shader programs. When DeferLinkProgram is set, we will save the precompile results

Re: [Mesa-dev] [PATCHv2 06/13] glsl: add a generic thread pool data structure

2014-08-19 Thread Chia-I Wu
On Thu, Aug 14, 2014 at 8:38 AM, Ian Romanick i...@freedesktop.org wrote: On 07/09/2014 12:47 AM, Chia-I Wu wrote: It can be used to implement, for example, threaded glCompileShader and glLinkProgram. v2: allow tasks to complete other tasks Signed-off-by: Chia-I Wu o...@lunarg.com

Re: [Mesa-dev] [PATCHv2 01/13] mesa: protect the debug state with a mutex

2014-08-19 Thread Chia-I Wu
... When do you plan to branch off 10.3? I should be able to send out v3 late evening Tuesday, and be responsive. On 07/09/2014 12:47 AM, Chia-I Wu wrote: We are about to change mesa to spawn threads for deferred glCompileShader and glLinkProgram, and we need to make sure those threads can

Re: [Mesa-dev] [PATCH 01/22] gallium/ilo: cleanup intel_winsys.h

2014-08-19 Thread Chia-I Wu
. - Cleanup the compiler includes. The latter two sound fine to me, but do you have a real need to move intel_winsys.h into drm/? It is supposed to be OS-neutral so that the pipe driver stays OS-neutral, not being tied to DRM. Cc: Chia-I Wu olva...@gmail.com Signed-off-by: Emil Velikov emil.l.veli

Re: [Mesa-dev] [PATCH 13/19] gallium/ilo: handle query_renderer caps

2014-08-19 Thread Chia-I Wu
to the winsys. Please call drm_intel_get_aperture_sizes() in probe_winsys() and report the values in bytes in struct intel_winsys_info. There is no need to export the function. Cc: Chia-I Wu olva...@gmail.com Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- src/gallium/drivers/i915

Re: [Mesa-dev] [PATCH 01/22] gallium/ilo: cleanup intel_winsys.h

2014-08-19 Thread Chia-I Wu
On Tue, Aug 19, 2014 at 4:26 PM, Emil Velikov emil.l.veli...@gmail.com wrote: On 19/08/14 09:07, Chia-I Wu wrote: On Tue, Aug 19, 2014 at 7:20 AM, Emil Velikov emil.l.veli...@gmail.com wrote: Make the header location, inclusion and contents more common with its i915,r* and nouveau

Re: [Mesa-dev] [PATCH] ilo: fold drm_intel_get_aperture_sizes() within probe_winsys()

2014-08-19 Thread Chia-I Wu
). Suggested-by: Chia-I Wu olva...@gmail.com Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- Hello Chia-I Hope I've understood you correctly this time :) -Emil src/gallium/drivers/ilo/ilo_common.h| 1 + src/gallium/drivers/ilo/ilo_screen.c| 4

Re: [Mesa-dev] [PATCHv2 01/22] gallium/ilo: cleanup intel_winsys.h

2014-08-19 Thread Chia-I Wu
. - Cleanup the compiler includes. v2: Move the header to drivers/ilo. Suggested by Chia-I. Cc: Chia-I Wu olva...@gmail.com Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- The patch is generated with -M, and likely won't apply as is. It makes it alot easier to read though ;) -Emil

[Mesa-dev] [PATCHv2 00/13] multithread GLSL compiler

2014-07-09 Thread Chia-I Wu
Hi list, This is my second try to add multithread support for the GLSL compiler. Changes since v1 are - glLinkProgram can now be threaded - added ctx-Const.DeferCompileShader and ctx-Const.DeferLinkProgram to allow drivers to control what get threaded - minimal changes to i965 to enable

[Mesa-dev] [PATCHv2 07/13] glsl: add a singleton GLSL thread pool

2014-07-09 Thread Chia-I Wu
This thread pool will be used by contexts to queue compilation tasks. Signed-off-by: Chia-I Wu o...@lunarg.com --- src/glsl/glsl_parser_extras.cpp | 4 +++ src/glsl/threadpool.c | 72 + src/glsl/threadpool.h | 9 ++ 3 files

[Mesa-dev] [PATCHv2 10/13] i965: refactor do_vs_prog

2014-07-09 Thread Chia-I Wu
Split do_vs_prog into brw_vs_init_compile brw_vs_do_compile brw_vs_upload_compile brw_vs_clear_complile Signed-off-by: Chia-I Wu o...@lunarg.com --- src/mesa/drivers/dri/i965/brw_vec4.h | 6 ++ src/mesa/drivers/dri/i965/brw_vs.c | 117 ++- src/mesa

[Mesa-dev] [PATCHv2 06/13] glsl: add a generic thread pool data structure

2014-07-09 Thread Chia-I Wu
It can be used to implement, for example, threaded glCompileShader and glLinkProgram. v2: allow tasks to complete other tasks Signed-off-by: Chia-I Wu o...@lunarg.com --- src/glsl/Makefile.am | 12 +- src/glsl/Makefile.sources | 3 +- src/glsl/tests/threadpool_test.cpp

[Mesa-dev] [PATCHv2 02/13] glsl: rename strtod.c to strtod.cpp

2014-07-09 Thread Chia-I Wu
We want to add a static object to initialize locale_t in the following commit. Signed-off-by: Chia-I Wu o...@lunarg.com --- src/glsl/Makefile.sources | 2 +- src/glsl/strtod.c | 79 --- src/glsl/strtod.cpp | 79

[Mesa-dev] [PATCHv2 03/13] glsl: initialize locale_t with a static object

2014-07-09 Thread Chia-I Wu
The compiler may be used by multiple contexts simultaneously and needs to be thread-safe. Signed-off-by: Chia-I Wu o...@lunarg.com --- src/glsl/strtod.cpp | 29 +++-- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/src/glsl/strtod.cpp b/src/glsl/strtod.cpp

[Mesa-dev] [PATCHv2 01/13] mesa: protect the debug state with a mutex

2014-07-09 Thread Chia-I Wu
We are about to change mesa to spawn threads for deferred glCompileShader and glLinkProgram, and we need to make sure those threads can send compiler warnings/errors to the debug output safely. Signed-off-by: Chia-I Wu o...@lunarg.com --- src/mesa/main/errors.c | 172

[Mesa-dev] [PATCHv2 11/13] i965: refactor do_gs_prog

2014-07-09 Thread Chia-I Wu
Split do_gs_prog into brw_gs_init_compile brw_gs_do_compile brw_gs_upload_compile brw_gs_clear_complile Signed-off-by: Chia-I Wu o...@lunarg.com --- src/mesa/drivers/dri/i965/brw_vec4_gs.c | 153 1 file changed, 96 insertions(+), 57 deletions(-) diff

[Mesa-dev] [PATCHv2 08/13] mesa: add infrastructure for threaded shader compilation

2014-07-09 Thread Chia-I Wu
parts: the first part links and error checks while the second part optimizes and generates the machine code. With the split, we can always defer the second part to the thread pool. Signed-off-by: Chia-I Wu o...@lunarg.com --- src/mesa/main/context.c | 29 +++ src/mesa/main/context.h

[Mesa-dev] [PATCHv2 13/13] i965: enable threaded precompile

2014-07-09 Thread Chia-I Wu
. brw_shader_program_precompile_key is introduced and initialized in NofityLinkShader for we cannot inspect the context during precompiling. Signed-off-by: Chia-I Wu o...@lunarg.com --- src/mesa/drivers/dri/i965/brw_context.c | 4 +- src/mesa/drivers/dri/i965/brw_fs.cpp | 33 -- src

[Mesa-dev] [PATCHv2 09/13] i965: add drirc option multithread_glsl_compiler

2014-07-09 Thread Chia-I Wu
Setting it to a non-zero value N will cause shader compilation to be deferred to a thread pool. When N is greater than 1, it indicates the maximum number of threads in the pool. When N is 1, the number of threads is up to the driver (two for i965). Signed-off-by: Chia-I Wu o...@lunarg.com

[Mesa-dev] [PATCHv2 05/13] glsl: protect glsl_type with a mutex

2014-07-09 Thread Chia-I Wu
glsl_type has several static hash tables and a static ralloc context. They need to be protected by a mutex as they are not thread-safe. Signed-off-by: Chia-I Wu o...@lunarg.com --- src/glsl/glsl_types.cpp | 57 +++-- src/glsl/glsl_types.h | 15

[Mesa-dev] [PATCHv2 12/13] i965: refactor do_wm_prog

2014-07-09 Thread Chia-I Wu
Split do_wm_prog into brw_wm_init_compile brw_wm_do_compile brw_wm_upload_compile brw_wm_clear_complile Add struct brw_wm_compile to be passed around them. Signed-off-by: Chia-I Wu o...@lunarg.com --- src/mesa/drivers/dri/i965/brw_wm.c | 119 - src

[Mesa-dev] [PATCHv2 04/13] glsl: protect anonymous struct id with a mutex

2014-07-09 Thread Chia-I Wu
There may be two contexts compiling shaders at the same time, and we want the anonymous struct id to be globally unique. Signed-off-by: Chia-I Wu o...@lunarg.com --- src/glsl/glsl_parser_extras.cpp | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/glsl

Re: [Mesa-dev] [PATCHv2 06/13] glsl: add a generic thread pool data structure

2014-07-09 Thread Chia-I Wu
On Wed, Jul 9, 2014 at 10:42 PM, Brian Paul bri...@vmware.com wrote: On 07/09/2014 01:47 AM, Chia-I Wu wrote: It can be used to implement, for example, threaded glCompileShader and glLinkProgram. v2: allow tasks to complete other tasks Signed-off-by: Chia-I Wu o...@lunarg.com --- src

Re: [Mesa-dev] [PATCHv2 08/13] mesa: add infrastructure for threaded shader compilation

2014-07-09 Thread Chia-I Wu
On Wed, Jul 9, 2014 at 10:42 PM, Brian Paul bri...@vmware.com wrote: On 07/09/2014 01:47 AM, Chia-I Wu wrote: Add _mesa_enable_glsl_threadpool to enable the thread pool for a context, and add ctx-Const.DeferCompileShader and ctx-Const.DeferLinkProgram to fine-control what gets threaded

Re: [Mesa-dev] Static/shared pipe-drivers (was megadriver/pipe-loader-to-all)

2014-06-18 Thread Chia-I Wu
Hi Emil, On Fri, Jun 13, 2014 at 3:56 AM, Emil Velikov emil.l.veli...@gmail.com wrote: Hi all, These patches add support for building (grouping) the various targets per API, meaning that only one library will be created for e.g. vdpau (libvdpau_gallium) with individual ones (libvdpau_r600)

Re: [Mesa-dev] Static/shared pipe-drivers (was megadriver/pipe-loader-to-all)

2014-06-18 Thread Chia-I Wu
On Wed, Jun 18, 2014 at 8:14 PM, Emil Velikov emil.l.veli...@gmail.com wrote: On 18 June 2014 08:21, Chia-I Wu olva...@gmail.com wrote: Hi Emil, On Fri, Jun 13, 2014 at 3:56 AM, Emil Velikov emil.l.veli...@gmail.com wrote: Hi all, These patches add support for building (grouping

Re: [Mesa-dev] [PATCH] egl/dri2: do not leak dri2_dpy-driver_name

2014-06-02 Thread Chia-I Wu
. Cc: Chia-I Wu o...@lunarg.com Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- Normally I prefer strn* functions, although in this case looks ugly. Thanks for the suggestion Ilia. -Emil src/egl/drivers/dri2/egl_dri2.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion

Re: [Mesa-dev] [PATCH 2/2] egl-static: resolve library linking

2014-05-28 Thread Chia-I Wu
from st/egl, and added to egl_gallium_la_LIBADD here when HAVE_EGL_PLATFORM_DRM. The idea is that we don't usually do LIBADD for state trackers, but rely on targets to do the right thing. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=79263 Cc: José Fonseca jfons...@vmware.com Cc: Chia-I

Re: [Mesa-dev] [PATCH] st/egl: do not link against libloader

2014-05-28 Thread Chia-I Wu
of `loader_get_pci_id_for_fd' Thanks for working on this. This patch is Reviewed-by: Chia-I Wu o...@lunarg.com Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=79263 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=79382 Cc: Chia-I Wu o...@lunarg.com Signed-off-by: Emil Velikov emil.l.veli

Re: [Mesa-dev] [PATCH 2/3] gallium/egl: st_profiles are build time decision, treat them as such

2014-05-18 Thread Chia-I Wu
On Tue, May 13, 2014 at 10:35 AM, Emil Velikov emil.l.veli...@gmail.com wrote: On 13/05/14 02:57, Chia-I Wu wrote: On Sat, May 10, 2014 at 10:41 AM, Emil Velikov emil.l.veli...@gmail.com wrote: The profiles are present depending on the defines at build time. Drop the extra functions and feed

Re: [Mesa-dev] [PATCH 2/3] gallium/egl: st_profiles are build time decision, treat them as such

2014-05-12 Thread Chia-I Wu
? The current code deals with st/vega and st/mesa entirely in targets/egl-static, which is good separation IMHO, but can also be viewed as unnecessary as this patch demonstrates. Cc: Chia-I Wu olva...@gmail.com Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- src/gallium/state_trackers

Re: [Mesa-dev] [PATCH 3/3] egl-static: include libradeonwinsys.la only once

2014-05-12 Thread Chia-I Wu
On Tue, May 13, 2014 at 7:15 AM, Emil Velikov emil.l.veli...@gmail.com wrote: With this and the previous patch, we no longer have multiple definitions in the final egl_gallium.so. Looks good to me. Cc: Chia-I Wu o...@lunarg.com Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- src

Re: [Mesa-dev] [Mesa-stable] A candidate branch for the next stable release

2014-05-12 Thread Chia-I Wu
Hi Carl, On Fri, May 2, 2014 at 1:44 AM, Carl Worth cwo...@cworth.org wrote: I've recently pushed an update to the 10.1 branch. I anticipate making a release from this branch tomorrow. The state of this branch is summarized here: http://cworth.org/~cworth/mesa-stable-queue/ As

Re: [Mesa-dev] [PATCH] ilo: destroy the mutex, if winsys creation fails

2014-05-08 Thread Chia-I Wu
On Fri, May 9, 2014 at 2:09 AM, Emil Velikov emil.l.veli...@gmail.com wrote: Cc: Chia-I Wu olva...@gmail.com Signed-off-by: Emil Velikov emil.l.veli...@gmail.com Reviewed-by: Chia-I Wu olva...@gmail.com --- src/gallium/winsys/intel/drm/intel_drm_winsys.c | 1 + 1 file changed, 1 insertion

Re: [Mesa-dev] [PATCH 00/21] deferred and threaded glCompileShader

2014-05-06 Thread Chia-I Wu
On Tue, May 6, 2014 at 5:27 AM, Fredrik Höglund fred...@kde.org wrote: On Tuesday 22 April 2014, Chia-I Wu wrote: Hi list, This series adds a thread pool to the GLSL compiler, and a drirc option to defer glCompileShader calls to the pool. The goal is to reduce the start-up time

Re: [Mesa-dev] [PATCH 02/21] glsl: protect locale_t with a mutex

2014-05-06 Thread Chia-I Wu
On Tue, May 6, 2014 at 6:04 AM, Kenneth Graunke kenn...@whitecape.org wrote: On 05/05/2014 10:01 AM, Ian Romanick wrote: On 05/04/2014 02:14 PM, Chia-I Wu wrote: On Sat, May 3, 2014 at 1:52 AM, Ian Romanick i...@freedesktop.org wrote: On 04/22/2014 01:58 AM, Chia-I Wu wrote: There may be two

Re: [Mesa-dev] [PATCH 7/8] i965/vs: Enable SPF when the shader contains no control flow.

2014-05-06 Thread Chia-I Wu
On Wed, May 7, 2014 at 9:38 AM, Matt Turner matts...@gmail.com wrote: --- src/mesa/drivers/dri/i965/gen6_vs_state.c | 3 ++- src/mesa/drivers/dri/i965/gen7_vs_state.c | 3 ++- src/mesa/drivers/dri/i965/gen8_vs_state.c | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git

Re: [Mesa-dev] [PATCH 20/21] mesa: add support for threaded glCompileShader

2014-05-06 Thread Chia-I Wu
On Mon, May 5, 2014 at 5:37 AM, Chia-I Wu olva...@gmail.com wrote: On Sat, May 3, 2014 at 1:59 AM, Ian Romanick i...@freedesktop.org wrote: On 04/22/2014 01:58 AM, Chia-I Wu wrote: From: Chia-I Wu o...@lunarg.com Threaded glCompileShader can be enabled for a context by calling

Re: [Mesa-dev] [PATCH 02/21] glsl: protect locale_t with a mutex

2014-05-04 Thread Chia-I Wu
On Sat, May 3, 2014 at 1:52 AM, Ian Romanick i...@freedesktop.org wrote: On 04/22/2014 01:58 AM, Chia-I Wu wrote: There may be two contexts compiling shaders at the same time. locale_t needs to be protected. Rather than calling glsl_initialize_strtod from other places in the compiler

Re: [Mesa-dev] [PATCH 03/21] glsl: protect anonymous struct id with a mutex

2014-05-04 Thread Chia-I Wu
On Sat, May 3, 2014 at 1:33 AM, Ian Romanick i...@freedesktop.org wrote: On 04/22/2014 01:58 AM, Chia-I Wu wrote: There may be two contexts compiling shaders at the same time, and we want the anonymous struct id to be globally unique. I am not very excited about this. Is there any chance

Re: [Mesa-dev] [PATCH 20/21] mesa: add support for threaded glCompileShader

2014-05-04 Thread Chia-I Wu
On Sat, May 3, 2014 at 1:59 AM, Ian Romanick i...@freedesktop.org wrote: On 04/22/2014 01:58 AM, Chia-I Wu wrote: From: Chia-I Wu o...@lunarg.com Threaded glCompileShader can be enabled for a context by calling _mesa_enable_glsl_threadpool. It will initialize the singleton GLSL thread pool

Re: [Mesa-dev] [PATCH] st/egl: Flush resources before presentation (android - bug 77966)

2014-05-04 Thread Chia-I Wu
On Sun, May 4, 2014 at 7:02 PM, Marek Olšák mar...@gmail.com wrote: Reviewed-by: Marek Olšák marek.ol...@amd.com Looks good to me too, except please use your real name. Marek On Fri, May 2, 2014 at 5:00 PM, pstglia pstg...@gmail.com wrote: ---

Re: [Mesa-dev] [PATCH] st/egl: Flush resources before presentation (android - bug 77966)

2014-05-04 Thread Chia-I Wu
On Mon, May 5, 2014 at 6:12 AM, Paulo Sergio pstg...@gmail.com wrote: Ok. Name is Paulo Sergio Travaglia. Shall I resend the patch? I've committed it. Thanks. Thanks Em 04/05/2014 18:40, Chia-I Wu olva...@gmail.com escreveu: On Sun, May 4, 2014 at 7:02 PM, Marek Olšák mar...@gmail.com wrote

Re: [Mesa-dev] [PATCH 05/21 v3] meta: Fix saving the program pipeline state

2014-05-01 Thread Chia-I Wu
, it fixes the bug. The patch looks good to me. A few minor comments/questions below. Signed-off-by: Ian Romanick ian.d.roman...@intel.com Cc: Chia-I Wu olva...@gmail.com --- src/mesa/drivers/common/meta.c | 86 ++ src/mesa/drivers/common/meta.h | 1 - 2

Re: [Mesa-dev] [PATCH 05/21] meta: Fix saving the program pipeline state

2014-04-30 Thread Chia-I Wu
On Thu, May 1, 2014 at 12:11 AM, Ian Romanick i...@freedesktop.org wrote: On 04/29/2014 08:43 PM, Chia-I Wu wrote: On Wed, Apr 30, 2014 at 8:52 AM, Ian Romanick i...@freedesktop.org wrote: From: Ian Romanick ian.d.roman...@intel.com This code was broken in some odd ways before. Too much

[Mesa-dev] [PATCH 04/18] mesa: refactor debug out log_msg

2014-04-25 Thread Chia-I Wu
Move message logging to debug_log_message. Replace store_message_details by debug_message_store. No functional change. Signed-off-by: Chia-I Wu o...@lunarg.com --- src/mesa/main/errors.c | 134 +++-- 1 file changed, 75 insertions(+), 59 deletions

[Mesa-dev] [PATCH 03/21] glsl: protect anonymous struct id with a mutex

2014-04-22 Thread Chia-I Wu
There may be two contexts compiling shaders at the same time, and we want the anonymous struct id to be globally unique. Signed-off-by: Chia-I Wu o...@lunarg.com --- src/glsl/glsl_parser_extras.cpp | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/glsl

[Mesa-dev] [PATCH 07/21] mesa: refactor debug output set_message_state

2014-04-22 Thread Chia-I Wu
Move message state update to debug_set_message_filter. Signed-off-by: Chia-I Wu o...@lunarg.com --- src/mesa/main/errors.c | 70 -- 1 file changed, 39 insertions(+), 31 deletions(-) diff --git a/src/mesa/main/errors.c b/src/mesa/main/errors.c

[Mesa-dev] [PATCH 09/21] mesa: refactor debug output get_msg

2014-04-22 Thread Chia-I Wu
Move message fetching to debug_fetch_message and message deletion to debug_delete_messages. Signed-off-by: Chia-I Wu o...@lunarg.com --- src/mesa/main/errors.c | 61 +- 1 file changed, 50 insertions(+), 11 deletions(-) diff --git a/src/mesa/main

[Mesa-dev] [PATCH 04/21] glsl: protect glsl_type with a mutex

2014-04-22 Thread Chia-I Wu
glsl_type has several static hash tables and a static ralloc context. They need to be protected by a mutex as they are not thread-safe. Signed-off-by: Chia-I Wu o...@lunarg.com --- src/glsl/glsl_types.cpp | 57 +++-- src/glsl/glsl_types.h | 15

  1   2   3   4   5   6   7   >