[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 o...@lunarg.com --- 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

[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 o...@lunarg.com --- 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

[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 o...@lunarg.com --- src/mesa/main/errors.c | 127 + 1 file changed, 64

[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

[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 o...@lunarg.com --- 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

[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 o...@lunarg.com --- 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

[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 o...@lunarg.com --- src/glsl/builtin_types.cpp | 2 +- src/glsl/builtin_variables.cpp | 63 + src/glsl/glsl_parser.yy

[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 o...@lunarg.com --- 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

[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 o...@lunarg.com --- src/glsl/glsl_lexer.ll | 1 + src/glsl/ir_reader.cpp | 2 ++ src/glsl/strtod.c | 36 src/glsl/strtod.h | 3

[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 o...@lunarg.com --- 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

[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 o...@lunarg.com --- src/mesa/main/errors.c | 100 + 1 file changed, 59 insertions(+), 41 deletions(-) diff --git

[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 o...@lunarg.com --- src/mesa/main/errors.c | 83 +++--- 1 file changed, 17 insertions(+), 66 deletions(-) diff --git a/src/mesa/main

[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 o...@lunarg.com --- 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 o

[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 o...@lunarg.com --- src/mesa/main/errors.c | 40 +++- 1 file changed, 11 insertions(+), 29 deletions(-) diff --git a/src/mesa/main/errors.c b

[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 o...@lunarg.com --- 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 o...@lunarg.com --- src/mesa/drivers

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

2014-04-22 Thread Chia-I Wu
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 and defer glCompileShader calls to the thread pool. For applications to benefit from threaded glCompileShader

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 t_arc...@yahoo.com.au 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 reduce the start-up

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 i...@freedesktop.org wrote: From: Ian Romanick ian.d.roman...@intel.com 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

Re: [Mesa-dev] [Mesa-stable] [PATCH] i965: Fix buffer overruns in MSAA MCS buffer clearing.

2014-04-15 Thread Chia-I Wu
On Wed, Apr 16, 2014 at 3:18 AM, Eric Anholt e...@anholt.net wrote: Kenneth Graunke kenn...@whitecape.org writes: On 04/14/2014 05:33 PM, Eric Anholt wrote: This manifested as rendering failures or sometimes GPU hangs in compositors when they accidentally got MSAA visuals due to a bug in the

Re: [Mesa-dev] [PATCH 2/2] i965: Disable Z16 in all APIs.

2014-04-14 Thread Chia-I Wu
, then saw the table immediately following with DEPTH_COMPONENT* formats, and assumed it was 3.17. Based on a batch by Chia-I Wu, but without the driconf option to force s/batch/patch/ Both patches look good to me. Unless I overlooked your patch for piglit, this is needed http

[Mesa-dev] [PATCH] i965/vec4: unit test for copy propagation and writemask

2014-04-14 Thread Chia-I Wu
This unit test demonstrates a subtle bug fixed by 4ddf51db6af36736d5d42c1043eeea86e47459ce. Signed-off-by: Chia-I Wu o...@lunarg.com Cc: Eric Anholt e...@anholt.net --- .../dri/i965/test_vec4_copy_propagation.cpp| 30 ++ 1 file changed, 30 insertions(+) diff --git

Re: [Mesa-dev] [PATCH] i965/vec4: fix record clearing in copy propagation

2014-04-08 Thread Chia-I Wu
On Tue, Apr 8, 2014 at 2:52 AM, Eric Anholt e...@anholt.net wrote: Chia-I Wu olva...@gmail.com writes: From: Chia-I Wu o...@lunarg.com Given mov vgrf7, vgrf9.xyxz add vgrf9.xyz, vgrf4.xyzw, vgrf5.xyzw add vgrf10.x, vgrf6.xyzw, vgrf7. the last instruction would be wrongly

[Mesa-dev] [PATCH] i965/vec4: fix record clearing in copy propagation

2014-04-06 Thread Chia-I Wu
From: Chia-I Wu o...@lunarg.com Given mov vgrf7, vgrf9.xyxz add vgrf9.xyz, vgrf4.xyzw, vgrf5.xyzw add vgrf10.x, vgrf6.xyzw, vgrf7. the last instruction would be wrongly changed to add vgrf10.x, vgrf6.xyzw, vgrf9. during copy propagation. The issue is that when deciding

Re: [Mesa-dev] [PATCH 13/19] linker: Modify cross_validate_outputs_to_inputs to match using explicit locations

2014-03-28 Thread Chia-I Wu
On Fri, Mar 28, 2014 at 5:40 AM, Ian Romanick i...@freedesktop.org wrote: From: Ian Romanick ian.d.roman...@intel.com This will be used for GL_ARB_separate_shader_objects. That extension not only allows separable shaders to rendezvous by location, but it also allows traditionally linked

Re: [Mesa-dev] [PATCH 5/6] mapi_abi: Make ES1 and ES2 static_dispatch=false functions hidden

2014-03-27 Thread Chia-I Wu
to detect this case, but we have to paper over failures every time a new extension is added. Reviewed-by: Chia-I Wu o...@lunarg.com This change will cause a big pile of functions to disappear from libGLESv2 and libGLESv1_CM. libGLESv2 loses (20 functions): glBindVertexArrayOES

[Mesa-dev] [PATCH 1/2] glsl: remove {add, get}_type_ast from glsl_symbol_table

2014-03-25 Thread Chia-I Wu
They are not needed since 0da1a2cc369052643ccaea75a1722cc37652d82a. --- src/glsl/glsl_parser.yy| 1 - src/glsl/glsl_symbol_table.cpp | 25 - src/glsl/glsl_symbol_table.h | 2 -- 3 files changed, 28 deletions(-) diff --git a/src/glsl/glsl_parser.yy

[Mesa-dev] [PATCH 2/2] glsl: remove UBO fields from _mesa_glsl_parse_state

2014-03-25 Thread Chia-I Wu
They are not needed since 514f8c7ec7cc1ab18be93cebb5b9bf970b1955a9. --- src/glsl/glsl_parser_extras.cpp | 10 -- src/glsl/glsl_parser_extras.h | 4 src/mesa/main/mtypes.h | 3 +-- 3 files changed, 1 insertion(+), 16 deletions(-) diff --git

Re: [Mesa-dev] [PATCH] egl: Fix eglMakeCurrent behaviour when used with EGL_NO_SURFACE and EGL_NO_CONTEXT.

2014-03-16 Thread Chia-I Wu
On Sun, Mar 16, 2014 at 5:20 AM, Beren Minor beren.mi...@gmail.com wrote: EGL 1.4 Specification says that eglMakeCurrent(display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT) can be used to release the current thread's ownership on the surfaces and context. MESA's egl implementation was

Re: [Mesa-dev] [PATCH 07/20] targets/dri: use install-gallium-links.mk

2014-03-15 Thread Chia-I Wu
On Thu, Mar 13, 2014 at 3:35 PM, Emil Velikov emil.l.veli...@gmail.com wrote: On 13/03/14 07:09, Steven Newbury wrote: On Tue, 2014-03-04 at 21:12 +, Emil Velikov wrote: Drop the duplication accross all dri targets. ... diff --git a/src/gallium/targets/dri-ilo/Makefile.am

[Mesa-dev] [PATCH] targets/dri-ilo: make the driver installable

2014-03-15 Thread Chia-I Wu
, ilo_dri.so will never be loaded even enabled and installed. The change should not create any more confusion. Signed-off-by: Chia-I Wu olva...@gmail.com Cc: Emil Velikov emil.l.veli...@gmail.com --- src/gallium/targets/dri-ilo/Makefile.am | 7 +++ 1 file changed, 3 insertions(+), 4 deletions

[Mesa-dev] removal of _glthread_GetID() breaks libglapi.so's ABI

2014-03-12 Thread Chia-I Wu
Hi Brian, _glthread_GetID() was removed by this commit commit 02cb04c68ffbdaffaf7513ddc951584cac29f209 Author: Brian Paul bri...@vmware.com Date: Tue Mar 4 15:24:16 2014 -0700 mesa: remove remaining uses of _glthread_GetID() It turns out the function, declared in glapi.h, is a part of

Re: [Mesa-dev] [PATCH 2/2] glapi: remove u_mutex wrapper code, use c99 thread mutexes directly

2014-03-06 Thread Chia-I Wu
On Thu, Mar 6, 2014 at 11:03 PM, Brian Paul bri...@vmware.com wrote: On 03/05/2014 08:37 PM, Chia-I Wu wrote: On Thu, Mar 6, 2014 at 7:06 AM, Brian Paul bri...@vmware.com wrote: --- src/mapi/mapi.c | 10 +- src/mapi/stub.c |6 +++--- src/mapi/u_current.c |6

Re: [Mesa-dev] [PATCH] st/mesa: Add R8G8B8A8_SRGB case to st_pipe_format_to_mesa_format.

2014-03-06 Thread Chia-I Wu
___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev -- o...@lunarg.com From a600bf561a9c3d5776fd60d3ae3d14bd4ab417e6 Mon Sep 17 00:00:00 2001 From: Chia-I Wu olva...@gmail.com Date: Fri, 7 Mar 2014 11:39:24 +0800 Subject: [PATCH] st

Re: [Mesa-dev] [PATCH] st/mesa: use new MESA_FORMAT_R8G8B8A8_SRGB

2014-03-06 Thread Chia-I Wu
On Fri, Mar 7, 2014 at 2:39 AM, Brian Paul bri...@vmware.com wrote: To fix the problem that Jose worked around in 1d8e3067fd9. Looks good to me. --- src/mesa/state_tracker/st_format.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git

Re: [Mesa-dev] [PATCH] st/mesa: Add R8G8B8A8_SRGB case to st_pipe_format_to_mesa_format.

2014-03-06 Thread Chia-I Wu
On Fri, Mar 7, 2014 at 11:56 AM, Chia-I Wu olva...@gmail.com wrote: On Fri, Mar 7, 2014 at 2:04 AM, Jose Fonseca jfons...@vmware.com wrote: - Original Message - Am 06.03.2014 18:32, schrieb Jose Fonseca: - Original Message - - Original Message - On 03/06

Re: [Mesa-dev] [PATCH 1/2] glapi: replace 'user' with 'context' in u_current.[ch] code

2014-03-05 Thread Chia-I Wu
On Wed, Mar 5, 2014 at 10:48 PM, Brian Paul bri...@vmware.com wrote: To make the functions more understandable. Both patches are Reviewed-by: Chia-I Wu o...@lunarg.com --- src/mapi/glapi/glapi.c |2 +- src/mapi/mapi_glapi.c |2 +- src/mapi/u_current.c | 32

Re: [Mesa-dev] [PATCH 1/2] glapi: use 'Mesa' in error messages

2014-03-05 Thread Chia-I Wu
On Thu, Mar 6, 2014 at 7:06 AM, Brian Paul bri...@vmware.com wrote: A user would have no idea what _glthread_ is. This removes the last remaining instance of the _glthread_ string in Mesa. Reviewed-by: Chia-I Wu o...@lunarg.com --- src/mapi/u_thread.h |6 +++--- 1 file changed, 3

Re: [Mesa-dev] [PATCH 2/2] glapi: remove u_mutex wrapper code, use c99 thread mutexes directly

2014-03-05 Thread Chia-I Wu
generate) { - u_mutex_declare_static(dynamic_mutex); + static mtx_t dynamic_mutex = _MTX_INITIALIZER_NP PTHREAD_MUTEX_INITIALIZER; PTHREAD_MUTEX_INITIALIZER should be dropped. With that fixed, Reviewed-by: Chia-I Wu o...@lunarg.com struct mapi_stub *stub = NULL; int count, i

[Mesa-dev] [PATCH 2/3] st/mesa: add mappings for MESA_FORMAT_B8G8R8X8_SRGB

2014-03-04 Thread Chia-I Wu
The format is mapped to PIPE_FORMAT_B8G8R8X8_SRGB. --- src/mesa/state_tracker/st_format.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/mesa/state_tracker/st_format.c b/src/mesa/state_tracker/st_format.c index 5f951eb..25577ac 100644 ---

[Mesa-dev] [PATCH 1/3] mesa: add MESA_FORMAT_B8G8R8X8_SRGB

2014-03-04 Thread Chia-I Wu
The format is needed to represent an RGB-only winsys framebuffer that is sRGB-capable. --- src/mesa/main/format_pack.c | 18 ++ src/mesa/main/format_unpack.c | 15 +++ src/mesa/main/formats.c | 21 + src/mesa/main/formats.h | 3 +++

[Mesa-dev] [PATCHv2 0/3] st/mesa: make winsys framebuffer sRGB-capable

2014-03-04 Thread Chia-I Wu
Hi, Until now, we do not support sRGB write for winsys framebuffers. This series changes that so that winsys framebuffers are marked sRGB-capable when the pipe driver supports it. This is not to be confused with GLX_FRAMEBUFFER_SRGB_CAPABLE_ARB. The attribute guarantees the created winsys

[Mesa-dev] [PATCHv2 3/3] st/mesa: make winsys fbo sRGB-capable when supported

2014-03-04 Thread Chia-I Wu
The texture formats of winsys fbo are always linear becase the st manager (st/dri for example) could not know the colorspace used. But it does not mean that we cannot make the fbo sRGB-capable. By - setting rb-Visual.sRGBCapable to GL_TRUE when the pipe driver supports the format in sRGB

Re: [Mesa-dev] [PATCH] mesa: fix packing/unpacking for MESA_FORMAT_A4R4G4B4_UNORM

2014-03-04 Thread Chia-I Wu
On Wed, Mar 5, 2014 at 12:10 AM, Brian Paul bri...@vmware.com wrote: Spotted by Chia-I Wu. unpack_ubyte_ARGB_REV() needs the same care too. With that fixed, this patch is Reviewed-by: Chia-I Wu o...@lunarg.com --- src/mesa/main/format_pack.c |2 +- src/mesa/main

[Mesa-dev] [PATCH] st/mesa: make winsys fbo sRGB-capable when supported

2014-03-03 Thread Chia-I Wu
colorspace, - giving rb an sRGB internal format, and - updating code to check rb-Format instead of strb-texture-format, we should be good. Fixed bug 75226 for at least llvmpipe and ilo, with no piglit regression. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75226 Signed-off-by: Chia-I

Re: [Mesa-dev] [PATCH] st/mesa: make winsys fbo sRGB-capable when supported

2014-03-03 Thread Chia-I Wu
On Mon, Mar 3, 2014 at 6:06 PM, Michel Dänzer mic...@daenzer.net wrote: On Mon, 2014-03-03 at 16:22 +0800, Chia-I Wu wrote: The texture formats of winsys fbo are always linear becase the st manager (st/dri for example) could not know the colorspace used. But it does not mean that we cannot

[Mesa-dev] confusions about new MESA_FORMAT_xxx convention

2014-03-03 Thread Chia-I Wu
Hi list, From formats.h, we have /* Type P formats */ /* msb -- TEXEL BITS --- lsb */ /* */ MESA_FORMAT_A8B8G8R8_UNORM, /* */ But in format_unpack.c,

Re: [Mesa-dev] [PATCH] mesa: update packed format layout comments

2014-03-03 Thread Chia-I Wu
-significant position of the 32-bit word. Two comments below, and the patch is Reviewed-by: Chia-I Wu o...@lunarg.com --- src/mesa/main/formats.h | 98 +++ 1 file changed, 49 insertions(+), 49 deletions(-) diff --git a/src/mesa/main/formats.h b/src

Re: [Mesa-dev] gallium and ARB_texture_query_levels

2014-02-24 Thread Chia-I Wu
On Mon, Feb 24, 2014 at 5:03 PM, Ilia Mirkin imir...@alum.mit.edu wrote: On Mon, Feb 24, 2014 at 3:38 AM, Dave Airlie airl...@gmail.com wrote: I've taken a quick look at ARB_texture_query_levels, and the HW generally seems to implement this by returning it in the W channel of RESINFO, which

Re: [Mesa-dev] [PATCH 20/25] gallium/ilo: handle query_renderer caps

2014-02-22 Thread Chia-I Wu
from intel_winsys to intel_winsys_info and ultimatelly to ilo_dev_info, due to the design of the former two. Cc: Chia-I Wu olva...@gmail.com Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- Hi Chia-I I've looked at a cleaner way of doing things but I fell a bit short. Perhaps you can

Re: [Mesa-dev] [PATCH 01/25] glx/drisw: Move private structure declarations to a header file

2014-02-22 Thread Chia-I Wu
On Sat, Feb 22, 2014 at 11:03 AM, Emil Velikov emil.l.veli...@gmail.com wrote: Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- src/glx/drisw_glx.c | 41 + src/glx/drisw_priv.h | 64 2 files

Re: [Mesa-dev] [PATCH-RFC] i965: do not advertise MESA_FORMAT_Z_UNORM16 support

2014-02-19 Thread Chia-I Wu
On Thu, Feb 20, 2014 at 7:03 AM, Kenneth Graunke kenn...@whitecape.org wrote: On 02/19/2014 02:27 PM, Ian Romanick wrote: On 02/19/2014 12:08 PM, Kenneth Graunke wrote: On 02/18/2014 09:48 PM, Chia-I Wu wrote: Since 73bc6061f5c3b6a3bb7a8114bb2e1ab77d23cfdb, Z16 support is not advertised

[Mesa-dev] [PATCH 3/3] i965: fix the size of HiZ buffers

2014-02-18 Thread Chia-I Wu
of the paddings. But it should be necessary, at least according to the PRM. No piglit regression on Sandy Bridge and Haswell. Signed-off-by: Chia-I Wu o...@lunarg.com --- src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 59 --- 1 file changed, 44 insertions(+), 15 deletions(-) diff

[Mesa-dev] [PATCH 2/3] i965: replace hiz_mt by hiz_region

2014-02-18 Thread Chia-I Wu
HiZ buffers are opaque to the driver, and keeping the miptree around does not gain us anything. Signed-off-by: Chia-I Wu o...@lunarg.com --- src/mesa/drivers/dri/i965/brw_misc_state.c| 9 - src/mesa/drivers/dri/i965/gen6_blorp.cpp | 2 +- src/mesa/drivers/dri/i965

[Mesa-dev] [PATCH 1/3] i965: calculate hiz offset from hiz region

2014-02-18 Thread Chia-I Wu
It worked only because depth region and hiz region have the same cpp, tiling, and pitch. Signed-off-by: Chia-I Wu o...@lunarg.com --- src/mesa/drivers/dri/i965/brw_misc_state.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/brw_misc_state.c b/src

Re: [Mesa-dev] [PATCH 04/10] egl: Unhide functionality in _eglInitSync()

2014-02-18 Thread Chia-I Wu
On Tue, Feb 18, 2014 at 5:02 PM, Juha-Pekka Heikkilä juhapekka.heikk...@gmail.com wrote: On Tue, Feb 18, 2014 at 9:40 AM, Chia-I Wu olva...@gmail.com wrote: On Tue, Feb 18, 2014 at 12:21 AM, Juha-Pekka Heikkila juhapekka.heikk...@gmail.com wrote: _eglInitResource() was used to memset entire

[Mesa-dev] [PATCH-RFC] i965: do not advertise MESA_FORMAT_Z_UNORM16 support

2014-02-18 Thread Chia-I Wu
. In light of that, and per Ian's suggestion, stop advertising Z16 support by default, and add a drirc option, gl30_sized_format_rules, so that users can override. This regresses required-sized-texture-formats on GL 3.0. Signed-off-by: Chia-I Wu o...@lunarg.com Cc: Ian Romanick ian.d.roman

[Mesa-dev] [PATCH] mesa: propogate FragDepthLayout to gl_program

2014-02-17 Thread Chia-I Wu
From: Chia-I Wu o...@lunarg.com The information was lost during linking, causing the layout to be treated as FRAG_DEPTH_LAYOUT_NONE. Signed-off-by: Chia-I Wu o...@lunarg.com --- src/mesa/main/shaderapi.c | 5 + 1 file changed, 5 insertions(+) diff --git a/src/mesa/main/shaderapi.c b/src

Re: [Mesa-dev] [PATCH 04/10] egl: Unhide functionality in _eglInitSync()

2014-02-17 Thread Chia-I Wu
On Tue, Feb 18, 2014 at 12:21 AM, Juha-Pekka Heikkila juhapekka.heikk...@gmail.com wrote: _eglInitResource() was used to memset entire _EGLSync by writing more than size of pointed target. This does work as long as Resource is the first element in _EGLSync, this patch fixes such dependency.

[Mesa-dev] slow depth test on Intel gen7+

2014-02-04 Thread Chia-I Wu
Hi, I am looking at performance issues for some benchmark for a while, and am able to identify three issues so far, all related to depth test. The first issue is slow 16-bit depth buffer. This is already known and is fixed for GLES contexts by commit 73bc6061f5c3b6a3bb7a8114bb2e1a. It is not

Re: [Mesa-dev] [PATCH 08/16] ilo: Set PIPE_CAP_MIN_MAP_BUFFER_ALIGNMENT to 64

2014-01-23 Thread Chia-I Wu
is Reviewed-by: Chia-I Wu olva...@gmail.com v2 (idr): Use 64 instead of 4096 Tested-by: Ian Romanick ian.d.roman...@intel.com Cc: Chia-I Wu olva...@gmail.com --- src/gallium/drivers/ilo/ilo_screen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/ilo

Re: [Mesa-dev] [PATCH] ilo: build pipe-loader driver]

2014-01-08 Thread Chia-I Wu
On Wed, Jan 8, 2014 at 8:23 PM, Steven Newbury st...@snewbury.org.uk wrote: On Fri, 2014-01-03 at 13:14 +0800, Chia-I Wu wrote: On Thu, Jan 2, 2014 at 10:39 PM, Steven Newbury st...@snewbury.org.uk wrote: Forgot to add signed-off-by... In trying to get gallium-nine working with the ilo

Re: [Mesa-dev] [PATCH] ilo: build pipe-loader driver]

2014-01-02 Thread Chia-I Wu
On Thu, Jan 2, 2014 at 10:39 PM, Steven Newbury st...@snewbury.org.uk wrote: Forgot to add signed-off-by... In trying to get gallium-nine working with the ilo Gallium driver I noticed there's no ilo pipe-loader driver being built. This patch simply puts in place the missing pieces. The

[Mesa-dev] [PATCHv2] i965: Avoid extraneous fast depth clears

2014-01-02 Thread Chia-I Wu
improvement is 1.32134% +/- 0.161878% (n=13). v2: - unset hiz_cleared automatically in intel_miptree_slice_set_needs_hiz_resolve - set/unset hiz_cleared with intel_renderbuffer_att_set_needs_depth_resolve Signed-off-by: Chia-I Wu o...@lunarg.com --- src/mesa/drivers/dri/i965/brw_clear.c

Re: [Mesa-dev] [PATCH] i965: Avoid extraneous fast depth clears

2014-01-02 Thread Chia-I Wu
On Fri, Dec 27, 2013 at 7:25 AM, Chad Versace chad.vers...@linux.intel.com wrote: On 12/10/2013 09:54 PM, Chia-I Wu wrote: When the depth buffer is already cleared, skip GEN6_HIZ_OP_DEPTH_CLEAR. This is made possible by tracking which slices have been cleared in struct intel_mipmap_level

[Mesa-dev] [PATCH] i965: Avoid extraneous fast depth clears

2013-12-10 Thread Chia-I Wu
When the depth buffer is already cleared, skip GEN6_HIZ_OP_DEPTH_CLEAR. This is made possible by tracking which slices have been cleared in struct intel_mipmap_level. The hiz_cleared flag is unset when the depth buffer is rendered to or when a HiZ resolve is needed. For Unigine Tropics, the FPS

Re: [Mesa-dev] [PATCH] i965/fs: In the pre-regalloc schedule, try harder at reducing reg pressure.

2013-10-21 Thread Chia-I Wu
On Tue, Oct 22, 2013 at 3:05 AM, Eric Anholt e...@anholt.net wrote: Chia-I Wu olva...@gmail.com writes: On Thu, Oct 17, 2013 at 3:24 AM, Matt Turner matts...@gmail.com wrote: On Mon, Oct 14, 2013 at 4:14 PM, Eric Anholt e...@anholt.net wrote: Previously, the best thing we had was to schedule

Re: [Mesa-dev] [PATCH] i965/fs: In the pre-regalloc schedule, try harder at reducing reg pressure.

2013-10-18 Thread Chia-I Wu
On Thu, Oct 17, 2013 at 3:24 AM, Matt Turner matts...@gmail.com wrote: On Mon, Oct 14, 2013 at 4:14 PM, Eric Anholt e...@anholt.net wrote: Previously, the best thing we had was to schedule the things unblocked by the current instruction, on the hope that it would be consuming two values at the

Re: [Mesa-dev] [PATCH] i965/fs: In the pre-regalloc schedule, try harder at reducing reg pressure.

2013-10-18 Thread Chia-I Wu
On Tue, Oct 15, 2013 at 7:14 AM, Eric Anholt e...@anholt.net wrote: Previously, the best thing we had was to schedule the things unblocked by the current instruction, on the hope that it would be consuming two values at the end of their live intervals while only producing one new value.

Re: [Mesa-dev] Mesa (master): i965/fs: Convert gen7 to using GRFs for texture messages.

2013-10-17 Thread Chia-I Wu
On Thu, Oct 17, 2013 at 1:53 PM, Chia-I Wu olva...@gmail.com wrote: Hi Eric, On Sat, Oct 12, 2013 at 3:18 AM, Eric Anholt e...@anholt.net wrote: Chia-I Wu olva...@gmail.com writes: Hi Eric, The frame rate of Unigine Tropics (with low shader quality) dropped from 40.8 to 23.5 after

Re: [Mesa-dev] Mesa (master): i965/fs: Convert gen7 to using GRFs for texture messages.

2013-10-17 Thread Chia-I Wu
On Thu, Oct 17, 2013 at 3:29 PM, Chia-I Wu olva...@gmail.com wrote: On Thu, Oct 17, 2013 at 1:53 PM, Chia-I Wu olva...@gmail.com wrote: Hi Eric, On Sat, Oct 12, 2013 at 3:18 AM, Eric Anholt e...@anholt.net wrote: Chia-I Wu olva...@gmail.com writes: Hi Eric, The frame rate of Unigine

Re: [Mesa-dev] [PATCH v2 1/3] i965: add FS_OPCODE_OVERWRITE_DST

2013-10-16 Thread Chia-I Wu
On Wed, Oct 16, 2013 at 2:08 AM, Ian Romanick i...@freedesktop.org wrote: On 10/09/2013 12:06 AM, Chia-I Wu wrote: From: Chia-I Wu o...@lunarg.com FS_OPCODE_OVERWRITE_DST is used to indicate that the destination register is (completely) overwritten. No code is emitted, but the liveness

[Mesa-dev] [PATCHv3 1/3] i965/fs: improve liveness analysis for partial writes

2013-10-16 Thread Chia-I Wu
From: Chia-I Wu o...@lunarg.com When two partial writes write the first and second halves of a variable respectively before the variable is used, the variable can be added to the def bitset. v2: no change v3: no longer rely on hints from by the visitor Signed-off-by: Chia-I Wu o...@lunarg.com

[Mesa-dev] [PATCHv3 2/3] i965: refactor texture instruction emission

2013-10-16 Thread Chia-I Wu
From: Chia-I Wu o...@lunarg.com Add fs_visitor::emit_texture, which is used to emit the texture instruction after the message payload has been set up. v2: rebased because of texture gather changes v3: rebased because of texture-from-GRF changes Signed-off-by: Chia-I Wu o...@lunarg.com --- src

[Mesa-dev] [PATCHv3 3/3] i965/gen7: emulate SIMD16 sample_d with dual SIMD8 sample_d

2013-10-16 Thread Chia-I Wu
From: Chia-I Wu o...@lunarg.com Add fs_visitor::emit_dual_texture_gen7 that emulate SIMD16 sample_d with dual SIMD8 sample_d on gen7+. No piglit quick.tests regression on Ivy Bridge and Haswell. Improved Xonotic with Ultra effects by 6.0209% +/- 0.396586% (N=11) on Haswell. v2: no change v3

Re: [Mesa-dev] [PATCH v2 1/3] i965: add FS_OPCODE_OVERWRITE_DST

2013-10-16 Thread Chia-I Wu
On Wed, Oct 16, 2013 at 6:26 AM, Eric Anholt e...@anholt.net wrote: Chia-I Wu olva...@gmail.com writes: From: Chia-I Wu o...@lunarg.com FS_OPCODE_OVERWRITE_DST is used to indicate that the destination register is (completely) overwritten. No code is emitted, but the liveness analysis can

Re: [Mesa-dev] Mesa (master): i965/fs: Convert gen7 to using GRFs for texture messages.

2013-10-16 Thread Chia-I Wu
Hi Eric, On Sat, Oct 12, 2013 at 3:18 AM, Eric Anholt e...@anholt.net wrote: Chia-I Wu olva...@gmail.com writes: Hi Eric, The frame rate of Unigine Tropics (with low shader quality) dropped from 40.8 to 23.5 after this change. Thanks for the note. I see the regression as well, and I see

Re: [Mesa-dev] Mesa (master): i965/fs: Convert gen7 to using GRFs for texture messages.

2013-10-13 Thread Chia-I Wu
On Sat, Oct 12, 2013 at 3:18 AM, Eric Anholt e...@anholt.net wrote: Chia-I Wu olva...@gmail.com writes: Hi Eric, The frame rate of Unigine Tropics (with low shader quality) dropped from 40.8 to 23.5 after this change. Thanks for the note. I see the regression as well, and I see a shader

Re: [Mesa-dev] [PATCH RFC 3/6] i965: add FS_OPCODE_OVERWRITE_DST

2013-10-09 Thread Chia-I Wu
On Wed, Oct 9, 2013 at 3:35 AM, Eric Anholt e...@anholt.net wrote: Chia-I Wu olva...@gmail.com writes: From: Chia-I Wu o...@lunarg.com FS_OPCODE_OVERWRITE_DST is used to indicate that the destination register is (completely) overwritten. No code is emitted, but the liveness analysis can

[Mesa-dev] [PATCH v2 1/3] i965: add FS_OPCODE_OVERWRITE_DST

2013-10-09 Thread Chia-I Wu
From: Chia-I Wu o...@lunarg.com FS_OPCODE_OVERWRITE_DST is used to indicate that the destination register is (completely) overwritten. No code is emitted, but the liveness analysis can use it as a hint to add the destination register to DEF bitset. This is needed because it is hard to figure

[Mesa-dev] [PATCH v2 2/3] i965: refactor texture instruction emission

2013-10-09 Thread Chia-I Wu
From: Chia-I Wu o...@lunarg.com Add fs_visitor::emit_texture, which is used to emit the texture instruction after the message payload has been set up. Signed-off-by: Chia-I Wu o...@lunarg.com --- src/mesa/drivers/dri/i965/brw_fs.h | 10 +- src/mesa/drivers/dri/i965/brw_fs_fp.cpp

[Mesa-dev] [PATCH v2 3/3] i965/gen7: emulate SIMD16 sample_d with dual SIMD8 sample_d

2013-10-09 Thread Chia-I Wu
From: Chia-I Wu o...@lunarg.com Add fs_visitor::emit_dual_texture_gen7 that emulate SIMD16 sample_d with dual SIMD8 sample_d on gen7+. No piglit quick.tests regression on Ivy Bridge and Haswell. Improved Xonotic with Ultra effects by 6.76479% +/- 0.619064% (at 95.0% confidence) on Haswell

Re: [Mesa-dev] [PATCH] i965: compute DDX in a subspan based only on top row

2013-10-02 Thread Chia-I Wu
the problem. I have posted my other series that emulates SIMD16 sample_d with dual SIMD8 sample_d for review. On Wed, Oct 2, 2013 at 6:38 AM, Ian Romanick i...@freedesktop.org wrote: On 09/30/2013 10:54 PM, Chia-I Wu wrote: From: Chia-I Wu o...@lunarg.com I agree with both of Ken's comments

Re: [Mesa-dev] [PATCH] i965/hsw: approximate DDX with a uniform value across a subspan

2013-10-01 Thread Chia-I Wu
On Tue, Oct 1, 2013 at 12:16 PM, Kenneth Graunke kenn...@whitecape.org wrote: On 09/30/2013 07:16 PM, Ian Romanick wrote: On 09/11/2013 10:00 PM, Chia-I Wu wrote: From: Chia-I Wu o...@lunarg.com Replicate the gradient of the top-left pixel to the other three pixels in the subspan, as how

[Mesa-dev] [PATCH RFC 0/6] i965: emulate SIMD16 sample_d with dual SIMD8 ones

2013-09-30 Thread Chia-I Wu
From: Chia-I Wu o...@lunarg.com Hi, This series of patches implements the emulation SIMD16 sample_d with dual SIMD8 sample_d. Before the changes, the compiler would fail to generate SIMD16 code for fragment shaders that use textureGrad. And that hurts the performance. The first four patches

[Mesa-dev] [PATCH RFC 1/6] i965: make BRW_COMPRESSION_2NDHALF valid for brw_SAMPLE

2013-09-30 Thread Chia-I Wu
From: Chia-I Wu o...@lunarg.com SIMD8 sampler messages are allowed in SIMD16 mode, and they could not work without BRW_COMPRESSION_2NDHALF. Later PRMs (gen5 and later) do not explicitly state whether BRW_COMPRESSION_2NDHALF is allowed, but they do have examples using send with SecHalf

[Mesa-dev] [PATCH RFC 2/6] i965: allow SIMD8 sampler messages in SIMD16 mode

2013-09-30 Thread Chia-I Wu
From: Chia-I Wu o...@lunarg.com When the instruction to send the sampler message is forced uncompressed or sechalf, send SIMD8 one even in SIMD16 mode. Signed-off-by: Chia-I Wu o...@lunarg.com --- src/mesa/drivers/dri/i965/brw_fs_generator.cpp | 3 ++- 1 file changed, 2 insertions(+), 1

[Mesa-dev] [PATCH RFC 3/6] i965: add FS_OPCODE_OVERWRITE_DST

2013-09-30 Thread Chia-I Wu
From: Chia-I Wu o...@lunarg.com FS_OPCODE_OVERWRITE_DST is used to indicate that the destination register is (completely) overwritten. No code is emitted, but the liveness analysis can use it as a hint to add the destination register to DEF bitset. This is needed because it is hard to figure

[Mesa-dev] [PATCH RFC 4/6] i965: keep SecHalf flag after register coalescing

2013-09-30 Thread Chia-I Wu
From: Chia-I Wu o...@lunarg.com Copy sechalf to the new register, otherwise we would read wrong HW registers. Signed-off-by: Chia-I Wu o...@lunarg.com --- src/mesa/drivers/dri/i965/brw_fs.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa

[Mesa-dev] [PATCH RFC 5/6] i965: refactor texture instruction emission

2013-09-30 Thread Chia-I Wu
From: Chia-I Wu o...@lunarg.com Add fs_visitor::emit_texture, which is used to emit the texture instruction after the message payload has been set up. Signed-off-by: Chia-I Wu o...@lunarg.com --- src/mesa/drivers/dri/i965/brw_fs.h | 10 ++- src/mesa/drivers/dri/i965/brw_fs_fp.cpp

[Mesa-dev] [PATCH RFC 6/6] i965/gen7: emulate SIMD16 sample_d with dual SIMD8 sample_d

2013-09-30 Thread Chia-I Wu
From: Chia-I Wu o...@lunarg.com Add fs_visitor::emit_dual_texture_gen7 that emulate SIMD16 sample_d with dual SIMD8 sample_d on gen7+. Fix fs_generator::generate_tex to send SIMD8 messages when force_uncompressed or force_sechalf is set. No piglit quick.tests regression on Ivy Bridge

[Mesa-dev] [PATCH] i965: compute DDX in a subspan based only on top row

2013-09-30 Thread Chia-I Wu
From: Chia-I Wu o...@lunarg.com Consider only the top-left and top-right pixels to approximate DDX in a 2x2 subspan, unless the application requests a more accurate approximation via GL_FRAGMENT_SHADER_DERIVATIVE_HINT or this optimization is disabled from the new driconf option

Re: [Mesa-dev] [PATCH] i965/hsw: compute DDX in a subspan based only on top row

2013-09-23 Thread Chia-I Wu
On Mon, Sep 23, 2013 at 12:09 PM, Chia-I Wu olva...@gmail.com wrote: On Fri, Sep 20, 2013 at 10:50 PM, Paul Berry stereotype...@gmail.com wrote: On 17 September 2013 19:54, Chia-I Wu olva...@gmail.com wrote: Hi Paul, On Mon, Sep 16, 2013 at 3:46 PM, Chia-I Wu olva...@gmail.com wrote

Re: [Mesa-dev] [PATCH] i965/hsw: compute DDX in a subspan based only on top row

2013-09-22 Thread Chia-I Wu
On Fri, Sep 20, 2013 at 10:50 PM, Paul Berry stereotype...@gmail.com wrote: On 17 September 2013 19:54, Chia-I Wu olva...@gmail.com wrote: Hi Paul, On Mon, Sep 16, 2013 at 3:46 PM, Chia-I Wu olva...@gmail.com wrote: On Sat, Sep 14, 2013 at 5:15 AM, Paul Berry stereotype...@gmail.com wrote

Re: [Mesa-dev] [PATCH] i965/hsw: compute DDX in a subspan based only on top row

2013-09-17 Thread Chia-I Wu
On Wed, Sep 18, 2013 at 6:27 AM, Mark Mueller markkmuel...@gmail.com wrote: On Mon, Sep 16, 2013 at 1:31 AM, Chia-I Wu olva...@gmail.com wrote: On Mon, Sep 16, 2013 at 4:12 PM, Chia-I Wu olva...@gmail.com wrote: On Mon, Sep 16, 2013 at 3:50 AM, Mark Mueller markkmuel...@gmail.com wrote

Re: [Mesa-dev] [PATCH] i965/hsw: compute DDX in a subspan based only on top row

2013-09-17 Thread Chia-I Wu
Hi Paul, On Mon, Sep 16, 2013 at 3:46 PM, Chia-I Wu olva...@gmail.com wrote: On Sat, Sep 14, 2013 at 5:15 AM, Paul Berry stereotype...@gmail.com wrote: On 12 September 2013 22:06, Chia-I Wu olva...@gmail.com wrote: From: Chia-I Wu o...@lunarg.com Consider only the top-left and top-right

Re: [Mesa-dev] [PATCH] i965/hsw: compute DDX in a subspan based only on top row

2013-09-16 Thread Chia-I Wu
On Sat, Sep 14, 2013 at 5:15 AM, Paul Berry stereotype...@gmail.com wrote: On 12 September 2013 22:06, Chia-I Wu olva...@gmail.com wrote: From: Chia-I Wu o...@lunarg.com Consider only the top-left and top-right pixels to approximate DDX in a 2x2 subspan, unless the application or the user

Re: [Mesa-dev] [PATCH] i965/hsw: compute DDX in a subspan based only on top row

2013-09-16 Thread Chia-I Wu
On Mon, Sep 16, 2013 at 3:50 AM, Mark Mueller markkmuel...@gmail.com wrote: On Fri, Sep 13, 2013 at 2:15 PM, Paul Berry stereotype...@gmail.com wrote: On 12 September 2013 22:06, Chia-I Wu olva...@gmail.com wrote: From: Chia-I Wu o...@lunarg.com Consider only the top-left and top-right

Re: [Mesa-dev] [PATCH] i965/hsw: compute DDX in a subspan based only on top row

2013-09-16 Thread Chia-I Wu
On Mon, Sep 16, 2013 at 4:12 PM, Chia-I Wu olva...@gmail.com wrote: On Mon, Sep 16, 2013 at 3:50 AM, Mark Mueller markkmuel...@gmail.com wrote: On Fri, Sep 13, 2013 at 2:15 PM, Paul Berry stereotype...@gmail.com wrote: On 12 September 2013 22:06, Chia-I Wu olva...@gmail.com wrote: From

<    1   2   3   4   5   6   7   >