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

2014-04-18 Thread Chia-I Wu
On Fri, Mar 28, 2014 at 5:40 AM, Ian Romanick wrote: > From: Ian Romanick > > This code was broken in some odd ways before. To much state was being > saved, it was being restored in the wrong order, and in the wrong way. > The biggest problem was that the pipeline object was restored before > re

[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 --- src/glsl/glsl_parser_extras.cpp | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/glsl/glsl_parser_extras.cpp b

[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 --- 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 index 66896c4

[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 --- src/mesa/main/errors.c | 61 +- 1 file changed, 50 insertions(+), 11 deletions(-) diff --git a/src/mesa/main/errors.c b/src

[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 --- src/glsl/glsl_types.cpp | 57 +++-- src/glsl/glsl_types.h | 15 + 2

[Mesa-dev] [PATCH 06/21] mesa: refactor debug output should_log

2014-04-22 Thread Chia-I Wu
Move the message filtering logic to debug_is_message_filtered. Signed-off-by: Chia-I Wu --- src/mesa/main/errors.c | 111 +++-- 1 file changed, 61 insertions(+), 50 deletions(-) diff --git a/src/mesa/main/errors.c b/src/mesa/main/errors.c index

[Mesa-dev] [PATCH 13/21] mesa: refactor _mesa_GetDebugMessageLog

2014-04-22 Thread Chia-I Wu
Merge get_msg into the function. Signed-off-by: Chia-I Wu --- src/mesa/main/errors.c | 99 +- 1 file changed, 26 insertions(+), 73 deletions(-) diff --git a/src/mesa/main/errors.c b/src/mesa/main/errors.c index 139e31d..5136f75 100644 --- a/src

[Mesa-dev] [PATCH 12/21] mesa: refactor _mesa_PopDebugGroup and _mesa_free_errors_data

2014-04-22 Thread Chia-I Wu
Move group clearing to debug_clear_group. Add debug_pop_group and debug_destroy for use in _mesa_PopDebugGroup and _mesa_free_errors_data respectively. Signed-off-by: Chia-I Wu --- src/mesa/main/errors.c | 127 + 1 file changed, 64 insertions

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

2014-04-22 Thread Chia-I Wu
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 of applications that are aware of this feature. That is, applications that compile shaders first and check the compile status later

[Mesa-dev] [PATCH 05/21] mesa: refactor _mesa_get_debug_state

2014-04-22 Thread Chia-I Wu
Move gl_debug_state allocation to a new function, debug_create. Signed-off-by: Chia-I Wu --- src/mesa/main/errors.c | 62 ++ 1 file changed, 37 insertions(+), 25 deletions(-) diff --git a/src/mesa/main/errors.c b/src/mesa/main/errors.c index

[Mesa-dev] [PATCH 10/21] mesa: refactor debug output control_messages

2014-04-22 Thread Chia-I Wu
Move most of the code to debug_set_default_filter. Signed-off-by: Chia-I Wu --- src/mesa/main/errors.c | 113 +++-- 1 file changed, 62 insertions(+), 51 deletions(-) diff --git a/src/mesa/main/errors.c b/src/mesa/main/errors.c index 0d26285..1dc4d3a

[Mesa-dev] [PATCH 01/21] glsl: make static constant variables "static const"

2014-04-22 Thread Chia-I Wu
This allows them to be moved to .rodata, and allow us to be sure that they will not be modified. Signed-off-by: Chia-I Wu --- src/glsl/builtin_types.cpp | 2 +- src/glsl/builtin_variables.cpp | 63 + src/glsl/glsl_parser.yy | 4 +-- src

[Mesa-dev] [PATCH 08/21] mesa: refactor debug out log_msg

2014-04-22 Thread Chia-I Wu
Move message logging to debug_log_message. Signed-off-by: Chia-I Wu --- src/mesa/main/errors.c | 136 - 1 file changed, 77 insertions(+), 59 deletions(-) diff --git a/src/mesa/main/errors.c b/src/mesa/main/errors.c index c478aac..930e801 100644

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

2014-04-22 Thread Chia-I Wu
There may be two contexts compiling shaders at the same time. locale_t needs to be protected. Signed-off-by: Chia-I Wu --- src/glsl/glsl_lexer.ll | 1 + src/glsl/ir_reader.cpp | 2 ++ src/glsl/strtod.c | 36 src/glsl/strtod.h | 3 +++ 4 files

[Mesa-dev] [PATCH 16/21] mesa: eliminate debug output message_insert

2014-04-22 Thread Chia-I Wu
Add validate_length and use it and log_msg directly. Signed-off-by: Chia-I Wu --- src/mesa/main/errors.c | 46 -- 1 file changed, 20 insertions(+), 26 deletions(-) diff --git a/src/mesa/main/errors.c b/src/mesa/main/errors.c index bf0886f..0aa9c8a

[Mesa-dev] [PATCH 11/21] mesa: refactor _mesa_PushDebugGroup

2014-04-22 Thread Chia-I Wu
Move group copying to debug_push_group. Save group message in the group before pushing instead of after. Signed-off-by: Chia-I Wu --- src/mesa/main/errors.c | 100 + 1 file changed, 59 insertions(+), 41 deletions(-) diff --git a/src/mesa/main

[Mesa-dev] [PATCH 14/21] mesa: refactor _mesa_DebugMessageControl

2014-04-22 Thread Chia-I Wu
Merge set_message_state, control_messages, and control_app_messages into the function. Signed-off-by: Chia-I Wu --- src/mesa/main/errors.c | 83 +++--- 1 file changed, 17 insertions(+), 66 deletions(-) diff --git a/src/mesa/main/errors.c b/src/mesa

[Mesa-dev] [PATCH 19/21] glsl: add a generic thread pool data structure

2014-04-22 Thread Chia-I Wu
It will be used to implement threaded glCompileShader. Signed-off-by: Chia-I Wu --- src/glsl/Makefile.am | 12 +- src/glsl/Makefile.sources | 3 +- src/glsl/tests/threadpool_test.cpp | 137 + src/glsl/threadpool.c | 394

[Mesa-dev] [PATCH 18/21] mesa: protect the debug state with a mutex

2014-04-22 Thread Chia-I Wu
When GL_DEBUG_OUTPUT_SYNCHRONOUS is GL_TRUE, drivers are allowed to log debug messages from other threads. The debug state needs to be protected. We are about to change mesa to spawn threads for deferred glCompileShader calls and we will need this groundwork. Signed-off-by: Chia-I Wu --- src

[Mesa-dev] [PATCH 15/21] mesa: eliminate debug output should_log

2014-04-22 Thread Chia-I Wu
In both call sites, it could be easily replaced by direct debug_is_message_filtered calls. Signed-off-by: Chia-I Wu --- src/mesa/main/errors.c | 40 +++- 1 file changed, 11 insertions(+), 29 deletions(-) diff --git a/src/mesa/main/errors.c b/src/mesa/main

[Mesa-dev] [PATCH 17/21] mesa: kill wasted type conversions in debug output

2014-04-22 Thread Chia-I Wu
Signed-off-by: Chia-I Wu --- src/mesa/main/errors.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mesa/main/errors.c b/src/mesa/main/errors.c index 0aa9c8a..b9f8fc6 100644 --- a/src/mesa/main/errors.c +++ b/src/mesa/main/errors.c @@ -924,9 +924,9

[Mesa-dev] [PATCH 21/21] i965: add drirc option multithread_glsl_compiler

2014-04-22 Thread Chia-I Wu
Setting it to a non-zero value N will cause glCompileShader 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. Signed-off-by: Chia-I Wu --- src/mesa/drivers/dri/common

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

2014-04-22 Thread Chia-I Wu
From: Chia-I Wu Threaded glCompileShader can be enabled for a context by calling _mesa_enable_glsl_threadpool. It will initialize the singleton GLSL thread pool and defer glCompileShader calls to the thread pool. For applications to benefit from threaded glCompileShader, they have to compile

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

2014-04-22 Thread Chia-I Wu
On Tue, Apr 22, 2014 at 8:10 PM, Timothy Arceri wrote: > On Tue, 2014-04-22 at 16:58 +0800, 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 red

[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 --- src/mesa/main/errors.c | 134 +++-- 1 file changed, 75 insertions(+), 59 deletions(-) diff --git a

[Mesa-dev] [PATCH 09/18] mesa: eliminate debug output get_msg

2014-04-25 Thread Chia-I Wu
Merge get_msg with the only caller. No functional change. Signed-off-by: Chia-I Wu --- src/mesa/main/errors.c | 99 +- 1 file changed, 26 insertions(+), 73 deletions(-) diff --git a/src/mesa/main/errors.c b/src/mesa/main/errors.c index f363049

[Mesa-dev] [PATCH 05/18] mesa: refactor debug output get_msg

2014-04-25 Thread Chia-I Wu
Move message fetching to debug_fetch_message and message deletion to debug_delete_messages. No functional change. Signed-off-by: Chia-I Wu --- src/mesa/main/errors.c | 58 -- 1 file changed, 47 insertions(+), 11 deletions(-) diff --git a/src

[Mesa-dev] [PATCH 01/18] mesa: refactor _mesa_get_debug_state

2014-04-25 Thread Chia-I Wu
Move gl_debug_state allocation to a new function, debug_create. No functional change. Signed-off-by: Chia-I Wu --- src/mesa/main/errors.c | 62 ++ 1 file changed, 37 insertions(+), 25 deletions(-) diff --git a/src/mesa/main/errors.c b/src/mesa

[Mesa-dev] [PATCH 08/18] mesa: refactor _mesa_PopDebugGroup and _mesa_free_errors_data

2014-04-25 Thread Chia-I Wu
Replace free_errors_data by debug_clear_group. Add debug_pop_group and debug_destroy for use in _mesa_PopDebugGroup and _mesa_free_errors_data respectively. No funcitonal change. Signed-off-by: Chia-I Wu --- src/mesa/main/errors.c | 125 + 1

[Mesa-dev] [PATCH 12/18] mesa: eliminate debug output message_insert

2014-04-25 Thread Chia-I Wu
Add validate_length, and call it together with log_msg directly instead of message_insert. No functional change. v2: make sure length is non-negative (i.e., known) before calling validate_length, noted by Timothy Arceri Signed-off-by: Chia-I Wu --- src/mesa/main/errors.c | 45

[Mesa-dev] [PATCH 02/18] mesa: refactor debug output should_log

2014-04-25 Thread Chia-I Wu
Move the message filtering logic to debug_is_message_enabled. No functional change. Signed-off-by: Chia-I Wu --- src/mesa/main/errors.c | 111 +++-- 1 file changed, 61 insertions(+), 50 deletions(-) diff --git a/src/mesa/main/errors.c b/src/mesa

[Mesa-dev] [PATCH 03/18] mesa: refactor debug output set_message_state

2014-04-25 Thread Chia-I Wu
Move message state update to debug_set_message_enable. No functional change. Signed-off-by: Chia-I Wu --- 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

[Mesa-dev] [PATCH 16/18] mesa: clean up debug output namespace handling

2014-04-25 Thread Chia-I Wu
of all elements get(): get the value of an element A debug namespace is like a sparse array. The length of the array is huge, 2^sizeof(GLuint), but most of the elements assume the same value sepcified by set_all(). Signed-off-by: Chia-I Wu --- src/mesa/main/errors.c | 350

[Mesa-dev] [PATCH 13/18] mesa: use accessors for struct gl_debug_state

2014-04-25 Thread Chia-I Wu
. Since the definition of struct gl_debug_state is no longer needed by the rest of the driver, move it to main/errors.c. This should make it even harder to use the struct incorrectly. Signed-off-by: Chia-I Wu --- src/mesa/drivers/dri/common/dri_util.c | 5 +- src/mesa/main/enable.c

[Mesa-dev] [PATCH 07/18] mesa: refactor _mesa_PushDebugGroup

2014-04-25 Thread Chia-I Wu
Move group copying to debug_push_group. Save the group message before pushing instead of after, since we will need it after popping. No functional change otherwise. Signed-off-by: Chia-I Wu --- src/mesa/main/errors.c | 102 + 1 file changed, 60

[Mesa-dev] [PATCH 14/18] mesa: clean up debug message log

2014-04-25 Thread Chia-I Wu
Remove NextMsgLength, and move members of struct gl_debug_state that belong to the message log to a new struct, gl_debug_log. Rename gl_debug_msg to gl_debug_message. Signed-off-by: Chia-I Wu --- src/mesa/main/errors.c | 78 +++--- 1 file changed, 42

[Mesa-dev] [PATCH 15/18] mesa: clean up debug groups

2014-04-25 Thread Chia-I Wu
gl_debug_namespace. Signed-off-by: Chia-I Wu --- src/mesa/main/errors.c | 90 +++--- 1 file changed, 48 insertions(+), 42 deletions(-) diff --git a/src/mesa/main/errors.c b/src/mesa/main/errors.c index 762da1e..7baf2d3 100644 --- a/src/mesa/main/errors.c

[Mesa-dev] [PATCH 10/18] mesa: eliminate debug output control_app_messages

2014-04-25 Thread Chia-I Wu
Merge control_app_messages with the only caller. Eliminate set_message_state and control_messages too as they are unused. No functional change. Signed-off-by: Chia-I Wu --- src/mesa/main/errors.c | 83 +++--- 1 file changed, 17 insertions(+), 66

[Mesa-dev] [PATCH 11/18] mesa: eliminate debug output should_log

2014-04-25 Thread Chia-I Wu
In both call sites, it could be easily replaced by direct debug_is_message_enabled calls. No functional change. Signed-off-by: Chia-I Wu --- src/mesa/main/errors.c | 40 +++- 1 file changed, 11 insertions(+), 29 deletions(-) diff --git a/src/mesa/main

[Mesa-dev] [PATCH 00/18] improvements for GL_KHR_debug support

2014-04-25 Thread Chia-I Wu
Hi, This series cleans up GL_KHR_debug support, fixes message control for some corner cases, and makes one enhancement: cheap glPushDebugGroup/glPopDebugGroup for command stream annotation. Patch 1-12 refactor the code. There should be no functional difference. These patches are also part of the

[Mesa-dev] [PATCH 18/18] mesa: overhaul debug namespace support

2014-04-25 Thread Chia-I Wu
different severities. Signed-off-by: Chia-I Wu --- src/mesa/main/errors.c | 264 - 1 file changed, 86 insertions(+), 178 deletions(-) diff --git a/src/mesa/main/errors.c b/src/mesa/main/errors.c index 8ef19d2..8a857ec 100644 --- a/src/mesa/main

[Mesa-dev] [PATCH 17/18] mesa: delay copying of debug groups

2014-04-25 Thread Chia-I Wu
reduces the initial size of gl_debug_state from 306KB to 7KB. Signed-off-by: Chia-I Wu --- src/mesa/main/errors.c | 130 + 1 file changed, 89 insertions(+), 41 deletions(-) diff --git a/src/mesa/main/errors.c b/src/mesa/main/errors.c index fc23189

[Mesa-dev] [PATCH 06/18] mesa: refactor debug output control_messages

2014-04-25 Thread Chia-I Wu
Move most of the code to debug_set_message_enable_all. No functional change. Signed-off-by: Chia-I Wu --- src/mesa/main/errors.c | 113 +++-- 1 file changed, 62 insertions(+), 51 deletions(-) diff --git a/src/mesa/main/errors.c b/src/mesa/main

Re: [Mesa-dev] [PATCH 18/18] mesa: overhaul debug namespace support

2014-04-25 Thread Chia-I Wu
On Fri, Apr 25, 2014 at 10:30 PM, Brian Paul wrote: > On 04/25/2014 04:42 AM, Chia-I Wu wrote: >> >> _mesa_HashTable is not well-suited for us: it locks a mutex unnecessarily >> and >> it does not accept 0 as the key (and have branches to handle 1 specially). >>

Re: [Mesa-dev] [PATCH 13/18] mesa: use accessors for struct gl_debug_state

2014-04-25 Thread Chia-I Wu
On Fri, Apr 25, 2014 at 10:30 PM, Brian Paul wrote: > On 04/25/2014 04:42 AM, Chia-I Wu wrote: >> >> When GL_DEBUG_OUTPUT_SYNCHRONOUS is GL_TRUE, drivers are allowed to log >> debug >> messages from other threads. That requires gl_debug_state to be protected >>

Re: [Mesa-dev] [PATCH 00/18] improvements for GL_KHR_debug support

2014-04-25 Thread Chia-I Wu
On Sat, Apr 26, 2014 at 2:53 AM, Emil Velikov wrote: > On 25/04/14 11:41, Chia-I Wu wrote: >> Hi, >> >> This series cleans up GL_KHR_debug support, fixes message control for some >> corner cases, and makes one enhancement: cheap >> glPushDebugGroup/glPopDebugGr

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

2014-04-29 Thread Chia-I Wu
l_shader_program *Shader[MESA_SHADER_STAGES]; > struct gl_shader_program *ActiveShader; > - struct gl_pipeline_object *_Shader; > struct gl_pipeline_object *Pipeline; > > /** MESA_META_STENCIL_TEST */ > -- > 1.8.1.4 > > ___

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 wrote: > On 04/29/2014 08:43 PM, Chia-I Wu wrote: >> On Wed, Apr 30, 2014 at 8:52 AM, Ian Romanick wrote: >>> From: Ian Romanick >>> >>> This code was broken in some odd ways before. Too much state was being >

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

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

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 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 > c

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 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

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 wrote: > On 04/22/2014 01:58 AM, Chia-I Wu wrote: >> From: Chia-I Wu >> >> Threaded glCompileShader can be enabled for a context by calling >> _mesa_enable_glsl_threadpool. It will initialize the singleton GL

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 wrote: > Reviewed-by: Marek Olšák Looks good to me too, except please use your real name. > Marek > > On Fri, May 2, 2014 at 5:00 PM, pstglia wrote: >> --- >> src/gallium/state_trackers/egl/android/native_android.cpp | 7 +++ >> 1 file changed, 7

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 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" escreveu: > >> On Sun, May 4, 2014 at 7:02 PM, Marek Olšák wrote: >

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 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

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 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 wrote: >>>> On 04/22/2014 01:58 AM, Chia-I Wu wrote: >>>>>

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 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 a/src/mesa/driv

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 wrote: > On Sat, May 3, 2014 at 1:59 AM, Ian Romanick wrote: >> On 04/22/2014 01:58 AM, Chia-I Wu wrote: >>> From: Chia-I Wu >>> >>> Threaded glCompileShader can be enabled for a context by calling >>> _mes

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 wrote: > Cc: Chia-I Wu > Signed-off-by: Emil Velikov Reviewed-by: Chia-I Wu > --- > src/gallium/winsys/intel/drm/intel_drm_winsys.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/src/gallium/winsys/intel/drm/intel_

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
rent 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 > Signed-off-by: Emil Velikov > --- > src/gallium/state_trackers/egl/Android.mk |

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 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 > Signed-off-by: Emil Velikov > --- > src/gallium/targets/egl-st

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 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 always, pleas

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 wrote: > On 13/05/14 02:57, Chia-I Wu wrote: >> On Sat, May 10, 2014 at 10:41 AM, Emil Velikov >> wrote: >>> The profiles are present depending on the defines at build time. >>> Drop the extra functions and f

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

2014-05-28 Thread Chia-I Wu
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 > Cc: Chia-I Wu > S

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

2014-05-28 Thread Chia-I Wu
_for_fd' Thanks for working on this. This patch is Reviewed-by: Chia-I Wu > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=79263 > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=79382 > Cc: Chia-I Wu > Signed-off-by: Emil Velikov > --- > > Strange... I

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

2014-06-01 Thread Chia-I Wu
ring at dri2_terminate(). Sounds fine to me. But from a quick look, platform_drm gets the driver name from gbm, without strdup() on it. Does that need a similar treatment too? Maybe every platform should switch to use libloader at some point. > > v2: Use strdup over strndup. Suggested by Il

Re: [Mesa-dev] renaming i965g

2013-04-19 Thread Chia-I Wu
On Thu, Apr 18, 2013 at 2:29 PM, Chia-I Wu wrote: > Hi list, > > Per the discussion, i965g is confusing and misleading. Instead of > preventing the confusions via > > --with-gallium-drivers=i965g-unofficial or > --with-gallium-drivers=experimental-i965g, > >

Re: [Mesa-dev] renaming i965g

2013-04-26 Thread Chia-I Wu
On Sat, Apr 20, 2013 at 1:06 AM, Chia-I Wu wrote: > On Thu, Apr 18, 2013 at 2:29 PM, Chia-I Wu wrote: >> Hi list, >> >> Per the discussion, i965g is confusing and misleading. Instead of >> preventing the confusions via >> >> --with-gallium-drivers=

Re: [Mesa-dev] renaming i965g

2013-04-27 Thread Chia-I Wu
Hi Chris, On Fri, Apr 26, 2013 at 5:42 PM, Chris Wilson wrote: > On Fri, Apr 26, 2013 at 04:26:05PM +0800, Chia-I Wu wrote: >> I just pushed the driver to master, under the name ilo. The driver is >> still new and has many bugs or known issues, but I will continue >> impro

[Mesa-dev] [PATCH 0/6] util/prim: clean up

2013-05-02 Thread Chia-I Wu
Hi list, This patch series attemps to clean up u_prim.h, with an exception that a new function to get the tessellated (as opposed to decomposed) primitive count is added by the last patch. I need that function for ilo to update PIPE_QUERY_PRIMITIVES_GENERATED.

[Mesa-dev] [PATCH 1/7] util/prim: fix primitive trimming for triangles with adjacency

2013-05-02 Thread Chia-I Wu
Fix for PIPE_PRIM_TRIANGLES_ADJACENCY and PIPE_PRIM_TRIANGLE_STRIP_ADJACENCY. Signed-off-by: Chia-I Wu --- src/gallium/auxiliary/util/u_prim.h |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gallium/auxiliary/util/u_prim.h b/src/gallium/auxiliary/util/u_prim.h

[Mesa-dev] [PATCH 2/7] util/prim: clean up and add comments

2013-05-02 Thread Chia-I Wu
Move together (or add) functions to decompose/reduce/assemble a primitive, give them consistent names, and document them. Add u_prim_vertex_count() so that the vertex count information can be used elsewhere. u_assembled_primitive() will be removed in a folow-on commit. Signed-off-by: Chia-I Wu

[Mesa-dev] [PATCH 3/7] draw: use u_assembled_prim() instead of u_assembled_primitive()

2013-05-02 Thread Chia-I Wu
The latter function is also removed as a result of the change. Signed-off-by: Chia-I Wu --- src/gallium/auxiliary/draw/draw_prim_assembler.c |4 ++-- src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c |2 +- src/gallium/auxiliary/util/u_prim.h

[Mesa-dev] [PATCH 4/7] util/prim: fix the name of the include guard

2013-05-02 Thread Chia-I Wu
It should be U_PRIM_H, not U_BLIT_H. Signed-off-by: Chia-I Wu --- src/gallium/auxiliary/util/u_prim.h |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gallium/auxiliary/util/u_prim.h b/src/gallium/auxiliary/util/u_prim.h index b9c0c15..c6a0708 100644 --- a/src

[Mesa-dev] [PATCH 5/7] util/prim: use vertex count info in u_validate_pipe_prim()

2013-05-02 Thread Chia-I Wu
As a side effect, primitives with adjacency are now correctly validated. Signed-off-by: Chia-I Wu --- src/gallium/auxiliary/util/u_prim.h | 34 ++ 1 file changed, 2 insertions(+), 32 deletions(-) diff --git a/src/gallium/auxiliary/util/u_prim.h b/src/gallium

[Mesa-dev] [PATCH 6/7] util/prim: assorted fixes for u_decomposed_prims_for_vertices()

2013-05-02 Thread Chia-I Wu
Switch to '>=' for comparisons, and it becomes obvious that the comparison for PIPE_PRIM_QUAD_STRIP was wrong. Add minimum vertex count check for PIPE_PRIM_LINE_LOOP. Return 1 for PIPE_PRIM_POLYGON with 3 vertices. Signed-off-by: Chia-I Wu --- src/gallium/auxiliary/util/u_

[Mesa-dev] [PATCH 7/7] util/prim: add u_reduced_prims_for_vertices()

2013-05-02 Thread Chia-I Wu
The function returns the number of reduced/tessellated primitives for the given vertex count. Signed-off-by: Chia-I Wu --- src/gallium/auxiliary/util/u_prim.h | 20 1 file changed, 20 insertions(+) diff --git a/src/gallium/auxiliary/util/u_prim.h b/src/gallium/auxiliary

[Mesa-dev] [PATCH] gallium: fix type of flags in pipe_context::flush()

2013-05-02 Thread Chia-I Wu
It should be unsigned, not enum pipe_flush_flags. Fixed a build error: src/gallium/state_trackers/egl/android/native_android.cpp:426:29: error: invalid conversion from 'int' to 'pipe_flush_flags' [-fpermissive] Signed-off-by: Chia-I Wu --- src/gallium/include/pipe/p_co

[Mesa-dev] [PATCH 0/2] android: add ilo

2013-05-03 Thread Chia-I Wu
Hi, This patch series allows ilo to be selected as the GPU driver on Android-IA. The second patch fixes a linking error, which should be common to other Gallium-based drivers. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesk

[Mesa-dev] [PATCH 1/2] android: add ilo to the build system

2013-05-03 Thread Chia-I Wu
It can be selected with BOARD_GPU_DRIVERS := ilo Signed-off-by: Chia-I Wu --- Android.mk|4 +-- src/egl/main/Android.mk |6 + src/gallium/Android.mk|5 src/gallium/drivers/ilo/Android.mk| 39

[Mesa-dev] [PATCH 2/2] android: libsync is needed on Android 4.2+ for any driver

2013-05-03 Thread Chia-I Wu
Add libsync not only for MESA_BUILD_CLASSIC, but also for MESA_BUILD_GALLIUM. Signed-off-by: Chia-I Wu --- src/egl/main/Android.mk |8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/egl/main/Android.mk b/src/egl/main/Android.mk index b2cbe05..30e5ea7 100644 --- a

[Mesa-dev] [PATCHv2] gallium: fix type of flags in pipe_context::flush()

2013-05-03 Thread Chia-I Wu
igned Signed-off-by: Chia-I Wu --- src/gallium/drivers/freedreno/freedreno_context.c |2 +- src/gallium/drivers/galahad/glhd_context.c|2 +- src/gallium/drivers/i915/i915_batch.h |2 +- src/gallium/drivers/i915/i915_flush.c |4 ++-- src/gall

Re: [Mesa-dev] [PATCH] gallium: fix type of flags in pipe_context::flush()

2013-05-03 Thread Chia-I Wu
On Fri, May 3, 2013 at 4:00 PM, Jose Fonseca wrote: > - Original Message - >> It should be unsigned, not enum pipe_flush_flags. >> >> Fixed a build error: >> >> src/gallium/state_trackers/egl/android/native_android.cpp:426:29: error: >> invalid conversion from 'int' to 'pipe_flush_flag

[Mesa-dev] [PATCH 0/4] tgsi: clean up opcode type inference

2013-05-05 Thread Chia-I Wu
Hi, The first three patches of this series move the code around such that tgsi_opcode_infer_src_type() and tgsi_opcode_infer_dst_type() both call a helper function. The idea is that most opcodes should expect the same data type for their src and dst operands so most code can be shared. No functi

[Mesa-dev] [PATCH 1/4] tgsi: reorder opcodes in opcode type inference

2013-05-05 Thread Chia-I Wu
Reorder opcodes by their assigned numbers. This makes it easier to see the differences between tgsi_opcode_infer_src_type() and tgsi_opcode_infer_dst_type(). Signed-off-by: Chia-I Wu --- src/gallium/auxiliary/tgsi/tgsi_info.c | 48 1 file changed, 24

[Mesa-dev] [PATCH 2/4] tgsi: refactor tgsi_opcode_infer_dst_type()

2013-05-05 Thread Chia-I Wu
tgsi_opcode_infer_type(). Signed-off-by: Chia-I Wu --- src/gallium/auxiliary/tgsi/tgsi_info.c | 60 +++- 1 file changed, 35 insertions(+), 25 deletions(-) diff --git a/src/gallium/auxiliary/tgsi/tgsi_info.c b/src/gallium/auxiliary/tgsi/tgsi_info.c index f3d15c9

[Mesa-dev] [PATCH 3/4] tgsi: refactor tgsi_opcode_infer_src_type()

2013-05-05 Thread Chia-I Wu
Call tgsi_opcode_infer_type() from tgsi_opcode_infer_src_type(). Signed-off-by: Chia-I Wu --- src/gallium/auxiliary/tgsi/tgsi_info.c | 44 +++- 1 file changed, 9 insertions(+), 35 deletions(-) diff --git a/src/gallium/auxiliary/tgsi/tgsi_info.c b/src/gallium

[Mesa-dev] [PATCH 4/4] tgsi: fix operand type of TGSI_OPCODE_NOT

2013-05-05 Thread Chia-I Wu
It should be TGSI_TYPE_UNSIGNED, not TGSI_TYPE_FLOAT. Fixed also gallivm not_emit_cpu() to use uint build context. Signed-off-by: Chia-I Wu --- src/gallium/auxiliary/gallivm/lp_bld_tgsi_action.c |2 +- src/gallium/auxiliary/tgsi/tgsi_info.c |1 + 2 files changed, 2

Re: [Mesa-dev] [PATCH] ilo: Add missing break statement in aos_tex TGSI_OPCODE_TEX2 case.

2013-05-06 Thread Chia-I Wu
On Mon, May 6, 2013 at 3:51 AM, Vinson Lee wrote: > Fixes "Missing break in switch" defect reported by Coverity. > > Signed-off-by: Vinson Lee Applied. Thanks. > --- > src/gallium/drivers/ilo/shader/toy_tgsi.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/src/gallium/drivers/ilo/shad

Re: [Mesa-dev] [PATCH 4/4] tgsi: fix operand type of TGSI_OPCODE_NOT

2013-05-06 Thread Chia-I Wu
On Mon, May 6, 2013 at 6:45 PM, Roland Scheidegger wrote: > Am 05.05.2013 18:34, schrieb Chia-I Wu: >> It should be TGSI_TYPE_UNSIGNED, not TGSI_TYPE_FLOAT. >> >> Fixed also gallivm not_emit_cpu() to use uint build context. >> >> Signed-off-by: Chia-I Wu >>

Re: [Mesa-dev] non x11/xlib based EGL and software only renderer

2013-05-07 Thread Chia-I Wu
On Tue, May 7, 2013 at 1:28 PM, Divick Kishore wrote: > Hi, > is there a possibility in mesa to have egl backend based on > complete offscreen buffers and complete s/w only gles renderer? If > yes, then could someone please guide me how to build it? You may try $ ./configure --disable-dri -

Re: [Mesa-dev] [PATCH] egl/android: Fix error condition for EGL_ANDROID_image_native_buffer

2013-05-07 Thread Chia-I Wu
On Tue, May 7, 2013 at 3:49 PM, Pohjolainen, Topi wrote: > On Mon, May 06, 2013 at 02:23:52PM -0700, Chad Versace wrote: >> Emit EGL_BAD_CONTEXT if the user passes a context to >> eglCreateImageKHR(type=EGL_ANDROID_image_native_buffer). >> >> From the EGL_ANDROID_image_native_buffer spec: >> * I

Re: [Mesa-dev] non x11/xlib based EGL and software only renderer

2013-05-07 Thread Chia-I Wu
On Tue, May 7, 2013 at 5:40 PM, Divick Kishore wrote: > Hi Chia, > >> $ ./configure --disable-dri --enable-gallium-egl --with-egl-platforms=null >> \ >> --with-gallium-drivers=swrast >> >> It will give you an EGL/GLES driver that uses a software renderer and >> supports onl

[Mesa-dev] [PATCH 0/2] tgsi/exec: clean up exec_tex()

2013-05-07 Thread Chia-I Wu
Hi, This series adds a util function to get the dimension of texture coordinates given a texture target. The function allows exec_tex() in tgsi_exec.c to be greatly simplified. There is a subtle difference in how TXP works on array texture. That is, layer is now also projected. You can find th

[Mesa-dev] [PATCH 1/2] tgsi: add tgsi_util_get_texture_coord_dim()

2013-05-07 Thread Chia-I Wu
, the Z channel). Signed-off-by: Chia-I Wu --- src/gallium/auxiliary/tgsi/tgsi_util.c | 91 src/gallium/auxiliary/tgsi/tgsi_util.h |3 ++ 2 files changed, 94 insertions(+) diff --git a/src/gallium/auxiliary/tgsi/tgsi_util.c b/src/gallium/auxiliary/tgsi

[Mesa-dev] [PATCH 2/2] tgsi: clean up exec_tex()

2013-05-07 Thread Chia-I Wu
sure which behavior is correct or preferred. Signed-off-by: Chia-I Wu --- src/gallium/auxiliary/tgsi/tgsi_exec.c | 220 1 file changed, 52 insertions(+), 168 deletions(-) diff --git a/src/gallium/auxiliary/tgsi/tgsi_exec.c b/src/gallium/auxiliary/tgsi

Re: [Mesa-dev] [PATCH] egl/android: Fix error condition for EGL_ANDROID_image_native_buffer

2013-05-07 Thread Chia-I Wu
On Wed, May 8, 2013 at 12:15 AM, Chad Versace wrote: > On 05/07/2013 01:19 AM, Chia-I Wu wrote: >> >> On Tue, May 7, 2013 at 3:49 PM, Pohjolainen, Topi >> wrote: >>> >>> On Mon, May 06, 2013 at 02:23:52PM -0700, Chad Versace wrote: >>>> >&g

Re: [Mesa-dev] non x11/xlib based EGL and software only renderer

2013-05-07 Thread Chia-I Wu
On Wed, May 8, 2013 at 2:34 AM, Divick Kishore wrote: > Hi Chia, > >> I haven't tried that for a while, but it should not have X11 >> dependencies. You probably need to disable other stuffs such as >> --disable-glx and etc. It might still require X11 at compile time, >> because eglplatform.h may

Re: [Mesa-dev] [PATCH] ilo: Initialize read_back in transfer_map_sys.

2013-05-10 Thread Chia-I Wu
On Fri, May 10, 2013 at 1:42 PM, Vinson Lee wrote: > Fixes "Uninitialized scalar variable" defect reported by Coverity. Committed, thanks. > Signed-off-by: Vinson Lee > --- > src/gallium/drivers/ilo/ilo_resource.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/galli

Re: [Mesa-dev] [PATCH 5/5] i965 gen7: add support for layered color renderbuffers

2013-05-17 Thread Chia-I Wu
On Sat, May 18, 2013 at 10:11 AM, Jordan Justen wrote: > Rather than pointing the surface_state directly at a single > sub-image of the texture for rendering, we now point the > surface_state at the top level of the texture, and configure > the surface_state as needed based on this. > > We now als

<    1   2   3   4   5   6   7   8   >