[Mesa-dev] [PATCH] i965: fix wrong cube/3D texture layout

2012-05-02 Thread Yuanhan Liu
platforms: conformance/textures/texture-size-cube-maps.html NOTE: This is a candidate for stable release branches. Signed-off-by: Yuanhan Liu yuanhan@linux.intel.com --- src/mesa/drivers/dri/i965/brw_tex_layout.c |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git

[Mesa-dev] [PATCH v4] i915: set SPRITE_POINT_ENABLE bit correctly

2012-03-29 Thread Yuanhan Liu
enabled tex coord units need do CoordReplace (Eric) v3: move the sprite point validate code at I915InvalidateState (Eric) v4: sprite point enable bit update based on _NEW_PROGRAM, too add relative _NEW-state comments to show what state is being used(Eric) Signed-off-by: Yuanhan Liu yuanhan

Re: [Mesa-dev] [PATCH 1/2] i915: set SPRITE_POINT_ENABLE bit correctly

2012-03-28 Thread Yuanhan Liu
On Wed, Mar 28, 2012 at 01:21:18PM -0700, Eric Anholt wrote: On Sat, 17 Mar 2012 10:58:27 +0800, Liu Aleaxander aleaxan...@gmail.com wrote: On Sat, Mar 17, 2012 at 1:57 AM, Eric Anholt e...@anholt.net wrote: On Mon, 12 Mar 2012 16:04:00 +0800, Yuanhan Liu yuanhan@linux.intel.com

Re: [Mesa-dev] [Intel-gfx] [PATCH] intel: Fix a case when mapping large texture fails

2012-03-27 Thread Yuanhan Liu
3ce3f93d3378fd31df6dca24230edb52407cb9d8 Mon Sep 17 00:00:00 2001 From: Yuanhan Liu yuanhan@linux.intel.com Date: Tue, 27 Mar 2012 15:41:52 +0800 Subject: [PATCH] intel: fix un-blanced map_refcount issue This is a regression introduced by commit cdcfd5, which forget to increase the map_refcount for successfully-mapped

[Mesa-dev] [PATCH] glx: fix compile warnings

2012-03-27 Thread Yuanhan Liu
Fix 'set but not used' warnings; gl_version, gl_versions_profiles and glx_extensions variables are used just only HAVE_XCB_GLX_CREATE_CONTEXT is defined. Thus those warnings are shown when that macro isn't defined. Signed-off-by: Yuanhan Liu yuanhan@linux.intel.com --- src/glx/clientinfo.c

Re: [Mesa-dev] [PATCH 3/6] intel: Handle devid overrides using libdrm.

2012-03-20 Thread Yuanhan Liu
On Tue, Mar 20, 2012 at 10:36:24AM -0700, Eric Anholt wrote: On Mon, 19 Mar 2012 09:38:03 +0800, Yuanhan Liu yuanhan@linux.intel.com wrote: On Fri, Mar 16, 2012 at 04:26:43PM -0700, Eric Anholt wrote: --- src/mesa/drivers/dri/intel/intel_screen.c | 23

Re: [Mesa-dev] [PATCH] glx:dri_common.c: check psc-driScreen-createDrawable return value

2012-03-20 Thread Yuanhan Liu
; + } + Looks good to me, except the minor indent issue. Otherwise, Reviewed-by: Yuanhan Liu yuanhan@linux.intel.com if (__glxHashInsert(priv-drawHash, glxDrawable, pdraw)) { (*pdraw-destroyDrawable) (pdraw); return NULL; -- 1.7.9.2.315.g25a78

Re: [Mesa-dev] [PATCH] intel:i915:i965: enable mipmap layout right mode

2012-03-19 Thread Yuanhan Liu
On Fri, Mar 16, 2012 at 11:13:23AM -0700, Eric Anholt wrote: On Thu, 15 Mar 2012 14:42:53 +0800, Yuanhan Liu yuanhan@linux.intel.com wrote: There are two mipmap layout modes: below and right. And we currently just use _below_ mode. And in some cases, like height is greater than width

Re: [Mesa-dev] [PATCH 2/6] intel: Ask libdrm to dump an AUB file if INTEL_DEBUG=aub.

2012-03-18 Thread Yuanhan Liu
3 files changed, 37 insertions(+), 0 deletions(-) Reviewed-by: Yuanhan Liu yuanhan@linux.intel.com diff --git a/src/mesa/drivers/dri/intel/intel_context.c b/src/mesa/drivers/dri/intel/intel_context.c index 7b2bdad..ff721fb 100644 --- a/src/mesa/drivers/dri/intel

Re: [Mesa-dev] [PATCH 3/6] intel: Handle devid overrides using libdrm.

2012-03-18 Thread Yuanhan Liu
On Fri, Mar 16, 2012 at 04:26:43PM -0700, Eric Anholt wrote: --- src/mesa/drivers/dri/intel/intel_screen.c | 23 --- 1 files changed, 4 insertions(+), 19 deletions(-) diff --git a/src/mesa/drivers/dri/intel/intel_screen.c b/src/mesa/drivers/dri/intel/intel_screen.c

Re: [Mesa-dev] [PATCH] softpipe: set max cube texture size to 4Kx4K

2012-03-18 Thread Yuanhan Liu
test. Reviewed-by: Yuanhan Liu yuanhan@linux.intel.com --- src/gallium/drivers/softpipe/sp_limits.h |1 + src/gallium/drivers/softpipe/sp_screen.c |2 +- 2 files changed, 2 insertions(+), 1 deletions(-) diff --git a/src/gallium/drivers/softpipe/sp_limits.h b/src/gallium

Re: [Mesa-dev] Doing 8.0.1 release?

2012-03-15 Thread Yuanhan Liu
On Thu, Mar 15, 2012 at 01:22:10PM +0800, Yuanhan Liu wrote: On Tue, Mar 13, 2012 at 07:29:02AM -0700, Jakob Bornecrantz wrote: - Original Message - On Mon, Mar 12, 2012 at 05:05:08PM -0700, Jakob Bornecrantz wrote: Hi all We well over due for a 8.0.1 release, so I

Re: [Mesa-dev] Doing 8.0.1 release?

2012-03-15 Thread Yuanhan Liu
On Thu, Mar 15, 2012 at 08:32:34PM -0700, Jakob Bornecrantz wrote: - Original Message - On Thu, Mar 15, 2012 at 01:22:10PM +0800, Yuanhan Liu wrote: On Tue, Mar 13, 2012 at 07:29:02AM -0700, Jakob Bornecrantz wrote: - Original Message - On Mon, Mar 12, 2012 at 05:05

Re: [Mesa-dev] Doing 8.0.1 release?

2012-03-14 Thread Yuanhan Liu
should be inclued in the next release(aka 8.0.2 here). Should I do cherry-pick myself? (Usually, Ian will do that for me before). Thanks, Yuanhan Liu ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo

Re: [Mesa-dev] Doing 8.0.1 release?

2012-03-13 Thread Yuanhan Liu
relased for a while, see http://lists.freedesktop.org/archives/mesa-dev/2012-February/019167.html Thanks, Yuanhan Liu ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH] i915: fallback when point sprite is enabled while handling varying inputs

2012-03-12 Thread Yuanhan Liu
On Mon, Mar 12, 2012 at 10:14:06AM +0800, Yuanhan Liu wrote: On Fri, Mar 09, 2012 at 10:35:33AM -0800, Eric Anholt wrote: On Thu, 8 Mar 2012 19:21:23 +0800, Yuanhan Liu yuanhan@linux.intel.com wrote: From ddd1a9d8f0d82c2f5fcb78a471608a005a6a077c Mon Sep 17 00:00:00 2001 From

[Mesa-dev] [PATCH 1/2] i915: set SPRITE_POINT_ENABLE bit correctly

2012-03-12 Thread Yuanhan Liu
). Signed-off-by: Yuanhan Liu yuanhan@linux.intel.com --- src/mesa/drivers/dri/i915/i915_context.h |1 + src/mesa/drivers/dri/i915/i915_state.c | 13 +--- src/mesa/drivers/dri/i915/intel_tris.c | 52 ++ 3 files changed, 54 insertions(+), 12 deletions

[Mesa-dev] [PATCH 2/2] i915: set SPRITE_POINT_ENABLE bit only for points

2012-03-12 Thread Yuanhan Liu
Signed-off-by: Yuanhan Liu yuanhan@linux.intel.com --- src/mesa/drivers/dri/i915/i915_state.c |8 +++- src/mesa/drivers/dri/i915/i915_vtbl.c |9 + 2 files changed, 16 insertions(+), 1 deletions(-) diff --git a/src/mesa/drivers/dri/i915/i915_state.c b/src/mesa/drivers

Re: [Mesa-dev] [PATCH 2/2] i915: set SPRITE_POINT_ENABLE bit only for points

2012-03-12 Thread Yuanhan Liu
On Mon, Mar 12, 2012 at 12:30:20PM -0700, Eric Anholt wrote: On Mon, 12 Mar 2012 16:04:01 +0800, Yuanhan Liu yuanhan@linux.intel.com wrote: Signed-off-by: Yuanhan Liu yuanhan@linux.intel.com Is there a reason for this change? What test does it fix? No big reason and it doesn't

Re: [Mesa-dev] [PATCH] i915: fallback when point sprite is enabled while handling varying inputs

2012-03-11 Thread Yuanhan Liu
On Fri, Mar 09, 2012 at 10:35:33AM -0800, Eric Anholt wrote: On Thu, 8 Mar 2012 19:21:23 +0800, Yuanhan Liu yuanhan@linux.intel.com wrote: From ddd1a9d8f0d82c2f5fcb78a471608a005a6a077c Mon Sep 17 00:00:00 2001 From: Yuanhan Liu yuanhan@linux.intel.com Date: Thu, 8 Mar 2012 18:48

Re: [Mesa-dev] [PATCH] i915: fallback when point sprite is enabled while handling varying inputs

2012-03-08 Thread Yuanhan Liu
On Thu, Mar 08, 2012 at 02:30:30PM +0800, Yuanhan Liu wrote: The current code would use tex coord to implement varying inputs. If point sprite is enabled(always enabled in chrome and firefox), the tex coord would be replaced with the value (x, y, 0, 1) where x and y vary from 0 to 1. Thus you

[Mesa-dev] about varying support for i915

2012-03-07 Thread Yuanhan Liu
will try to understand that by reading more, of course). BTW, any thoughts on handling varying inputs better(I mean, don't use texture coord)? You can use the program I attached to reproduce this issue on pineview. Thanks, Yuanhan Liu #include stdio.h #include stdlib.h #include GL/glut.h #include

[Mesa-dev] [PATCH] i915: fallback when point sprite is enabled while handling varying inputs

2012-03-07 Thread Yuanhan Liu
. This would _really_ fix the following webglc case on pineview this time: https://cvs.khronos.org/svn/repos/registry/trunk/public/webgl/conformance-suites/1.0.1/conformance/rendering/point-size.html NOTE: This is a candidate for stable release branches. Signed-off-by: Yuanhan Liu yuanhan

Re: [Mesa-dev] [PATCH 2/2] i915: fallback for NPOT cubemap texture

2012-03-07 Thread Yuanhan Liu
On Fri, Mar 02, 2012 at 01:52:00PM +0800, Yuanhan Liu wrote: On Thu, Mar 01, 2012 at 04:04:59PM +0800, Yuanhan Liu wrote: On Wed, Feb 29, 2012 at 11:44:59AM -0800, Eric Anholt wrote: On Wed, 29 Feb 2012 15:11:06 +0800, Yuanhan Liu yuanhan@linux.intel.com wrote: According

Re: [Mesa-dev] [PATCH] i965: handle gl_PointCoord for Gen4 and Gen5 platforms

2012-03-06 Thread Yuanhan Liu
On Tue, Mar 06, 2012 at 08:25:10AM -0800, Eric Anholt wrote: On Mon, 27 Feb 2012 15:46:32 +0800, Yuanhan Liu yuanhan@linux.intel.com wrote: diff --git a/src/mesa/drivers/dri/i965/brw_sf.c b/src/mesa/drivers/dri/i965/brw_sf.c index 6e63583..7950c47 100644 --- a/src/mesa/drivers/dri

[Mesa-dev] [PATCH] i915: move the FALLBACK_DRAW_OFFSET check outside the drawing rect check

2012-03-05 Thread Yuanhan Liu
We have to do fallback when the 'Clipped Drawing Rectangle X/Y Max' exceed the hardware's limit no matter the drawing rectangle offset changed or not. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=46665 NOTE: This is a candidate for stable release branches. Signed-off-by: Yuanhan Liu

Re: [Mesa-dev] [PATCH 2/2] i915: fallback for NPOT cubemap texture

2012-03-01 Thread Yuanhan Liu
On Wed, Feb 29, 2012 at 11:44:59AM -0800, Eric Anholt wrote: On Wed, 29 Feb 2012 15:11:06 +0800, Yuanhan Liu yuanhan@linux.intel.com wrote: According to 3DSTATE_MAP_STATE at page of 104 in Bspec vol3d 3D Instructions: [DevGDG and DevAlv]: Must be a power of 2 for cube maps Well

Re: [Mesa-dev] [PATCH 2/2] i915: fix wrong rendering of gl_PointSize on Pineview

2012-03-01 Thread Yuanhan Liu
On Thu, Mar 01, 2012 at 09:54:46AM -0800, Eric Anholt wrote: On Thu, 23 Feb 2012 14:19:19 +0800, Yuanhan Liu yuanhan@linux.intel.com wrote: The current code would ignore the point size specified by gl_PointSize builtin variable in vertex shader on Pineview. This patch servers

Re: [Mesa-dev] [PATCH] i965: handle gl_PointCoord for Gen4 and Gen5 platforms

2012-02-28 Thread Yuanhan Liu
Ping.. Comments? Thanks, Yuanhan Liu On Mon, Feb 27, 2012 at 03:46:32PM +0800, Yuanhan Liu wrote: This patch add the support of gl_PointCoord gl builtin variable for platform gen4 and gen5(ILK). Unlike gen6+, we don't have a hardware support of gl_PointCoord, means hardware

Re: [Mesa-dev] [PATCH 1/2] tnl: let _TNL_ATTRIB_POINTSIZE do not depend on ctx-VertexProgram._Enabled

2012-02-28 Thread Yuanhan Liu
Hi Brian, comments? Thanks, Yuanhan Liu On Thu, Feb 23, 2012 at 02:19:18PM +0800, Yuanhan Liu wrote: We may specify the point size in a glsl vertex shader. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=46311 piglit: glsl-vs-point-size NOTE: This is a candidate for stable release

Re: [Mesa-dev] [PATCH 2/2] i915: fix wrong rendering of gl_PointSize on Pineview

2012-02-28 Thread Yuanhan Liu
ping.. comments? Thanks, Yuanhan Liu On Thu, Feb 23, 2012 at 02:19:19PM +0800, Yuanhan Liu wrote: The current code would ignore the point size specified by gl_PointSize builtin variable in vertex shader on Pineview. This patch servers as fixing that. This patch fixes the following

Re: [Mesa-dev] [PATCH 2/2] i965: handle gl_PointCoord for Gen4 and Gen5 platform

2012-02-26 Thread Yuanhan Liu
On Thu, Feb 23, 2012 at 02:37:06PM +0800, Yuanhan Liu wrote: On Tue, Feb 21, 2012 at 11:59:17AM -0800, Eric Anholt wrote: On Sun, 19 Feb 2012 13:31:33 +0800, Liu Aleaxander aleaxan...@gmail.com wrote: On Sun, Feb 19, 2012 at 8:54 AM, Eric Anholt e...@anholt.net wrote: On Sat, 18 Feb

[Mesa-dev] [PATCH] i965: handle gl_PointCoord for Gen4 and Gen5 platforms

2012-02-26 Thread Yuanhan Liu
=45975 Piglit: glsl-fs-pointcoord and fbo-gl_pointcoord NOTE: This is a candidate for stable release branches. Signed-off-by: Yuanhan Liu yuanhan@linux.intel.com --- src/mesa/drivers/dri/i965/brw_context.h |6 ++ src/mesa/drivers/dri/i965/brw_fs.cpp|9 + src/mesa

Re: [Mesa-dev] [PATCH] i915: fallback to swrast when gl_PointSize met

2012-02-22 Thread Yuanhan Liu
to emit _TNL_ATTRIB_PSZ with S4_VFMT_POINT_WIDTH in i915ValidateFragmentProgram just before COLOR0. I tried it and it worked. This is so *cool*! Thanks for the nice tip. Will make a patch for that. Thanks, Yuanhan Liu ___ mesa-dev mailing list mesa-dev

[Mesa-dev] [PATCH 1/2] tnl: let _TNL_ATTRIB_POINTSIZE do not depend on ctx-VertexProgram._Enabled

2012-02-22 Thread Yuanhan Liu
We may specify the point size in a glsl vertex shader. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=46311 piglit: glsl-vs-point-size NOTE: This is a candidate for stable release branches. Signed-off-by: Yuanhan Liu yuanhan@linux.intel.com --- src/mesa/tnl/t_context.c |3

[Mesa-dev] [PATCH 2/2] i915: fix wrong rendering of gl_PointSize on Pineview

2012-02-22 Thread Yuanhan Liu
/rendering/point-size.html piglit: glsl-vs-point-size NOTE: This is a candidate for stable release branches. v2: pick Eric's nice tip for fixing this issue in hardware rendering. Signed-off-by: Yuanhan Liu yuanhan@linux.intel.com --- src/mesa/drivers/dri/i915/i915_fragprog.c |4 1

Re: [Mesa-dev] [PATCH 2/2] i965: handle gl_PointCoord for Gen4 and Gen5 platform

2012-02-22 Thread Yuanhan Liu
(), but it does work when set to 4. I may not quite understand the urb layout now; and I'm trying to figure it out. Thanks, Yuanhan Liu ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

[Mesa-dev] [PATCH] i965: handle gl_PointCoord for Gen4 and Gen5 platform

2012-02-17 Thread Yuanhan Liu
: This is a candidate for stable release branches. Signed-off-by: Yuanhan Liu yuanhan@linux.intel.com --- src/mesa/drivers/dri/i965/brw_fs.cpp | 27 + src/mesa/drivers/dri/i965/brw_fs.h |1 + src/mesa/drivers/dri/i965/brw_fs_visitor.cpp |2 + src/mesa

Re: [Mesa-dev] [PATCH] mesa: add missing texture integer test in glTexSubImage()

2012-02-15 Thread Yuanhan Liu
)) { + _mesa_error(ctx, GL_INVALID_OPERATION, + glTexSubImage%d(integer/non-integer format mismatch), ^ I guess you missed one 'D' here. Other than that, Reviewed-by: Yuanhan Liu yuanhan@linux.intel.com + dimensions

Re: [Mesa-dev] [PATCH] i965: fix inverted point sprite origin when rendering to FBO

2012-01-19 Thread Yuanhan Liu
On Thu, Jan 19, 2012 at 09:51:32AM -0800, Eric Anholt wrote: On Thu, 19 Jan 2012 10:30:53 +0800, Yuanhan Liu yuanhan@linux.intel.com wrote: When rendering to FBO, rendering is inverted. At the same time, we would also make sure the point sprite origin is inverted. Or, we will get

Re: [Mesa-dev] [PATCH] i965: fix inverted point sprite origin when rendering to FBO

2012-01-19 Thread Yuanhan Liu
On Thu, Jan 19, 2012 at 10:32:30AM -0700, Brian Paul wrote: On 01/19/2012 10:17 AM, Ian Romanick wrote: On 01/18/2012 06:30 PM, Yuanhan Liu wrote: When rendering to FBO, rendering is inverted. At the same time, we would also make sure the point sprite origin is inverted. Or, we will get

[Mesa-dev] [PATCH] i965: fix inverted point sprite origin when rendering to FBO

2012-01-19 Thread Yuanhan Liu
: This is a candidate for stable release branches. v2: add the simliar logic to ivb, too (comments from Ian) simplify the logic operation (comments from Brian) v3: pick a better comment from Eric use != for the logic instead of ^ (comments from Ian) Signed-off-by: Yuanhan Liu yuanhan@linux.intel.com

[Mesa-dev] [PATCH] i965: fix inverted point sprite origin when rendering to FBO

2012-01-18 Thread Yuanhan Liu
-by: Yuanhan Liu yuanhan@linux.intel.com --- src/mesa/drivers/dri/i965/brw_defines.h |1 + src/mesa/drivers/dri/i965/gen6_sf_state.c | 19 +-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_defines.h b/src/mesa/drivers/dri/i965

Re: [Mesa-dev] [PATCH] i965: fix inverted point sprite origin when rendering to FBO

2012-01-18 Thread Yuanhan Liu
On Wed, Jan 18, 2012 at 06:23:52PM +0800, Yuanhan Liu wrote: When rendering to FBO, rendering is inverted. At the same time, we would also make sure the point sprite origin is inverted. Or, we will get an inverted result correspoinding to rendering to the default winsys FBO. Bugzilla: https

Re: [Mesa-dev] [PATCH] i965: fix inverted point sprite origin when rendering to FBO

2012-01-18 Thread Yuanhan Liu
On Wed, Jan 18, 2012 at 12:13:28PM -0800, Ian Romanick wrote: On 01/18/2012 02:21 AM, Yuanhan Liu wrote: On Wed, Jan 18, 2012 at 06:23:52PM +0800, Yuanhan Liu wrote: When rendering to FBO, rendering is inverted. At the same time, we would also make sure the point sprite origin is inverted

Re: [Mesa-dev] [PATCH] i965: fix inverted point sprite origin when rendering to FBO

2012-01-18 Thread Yuanhan Liu
On Wed, Jan 18, 2012 at 11:53:20AM -0800, Ian Romanick wrote: On 01/18/2012 02:23 AM, Yuanhan Liu wrote: When rendering to FBO, rendering is inverted. At the same time, we would also make sure the point sprite origin is inverted. Or, we will get an inverted result correspoinding to rendering

[Mesa-dev] [PATCH] i965: fix inverted point sprite origin when rendering to FBO

2012-01-18 Thread Yuanhan Liu
: This is a candidate for stable release branches. v2: add the simliar logic to ivb, too (comments from Ian) simplify the logic operation (comments from Brian) Signed-off-by: Yuanhan Liu yuanhan@linux.intel.com --- src/mesa/drivers/dri/i965/brw_defines.h |1 + src/mesa/drivers/dri/i965

Re: [Mesa-dev] [PATCH] vbo: introduce vbo_get_minmax_indices function

2012-01-11 Thread Yuanhan Liu
On Tue, Jan 10, 2012 at 08:43:18PM -0700, Brian Paul wrote: On Tue, Jan 3, 2012 at 8:59 PM, Yuanhan Liu yuanhan@linux.intel.com wrote: On Wed, Jan 04, 2012 at 11:20:07AM +0800, Yuanhan Liu wrote: On Tue, Jan 03, 2012 at 08:25:31PM +0100, Roland Scheidegger wrote: Ah index scanning

Re: [Mesa-dev] [PATCH] vbo: introduce vbo_get_minmax_indices function

2012-01-10 Thread Yuanhan Liu
On Wed, Jan 04, 2012 at 07:23:24PM +0100, Roland Scheidegger wrote: Am 04.01.2012 04:59, schrieb Yuanhan Liu: On Wed, Jan 04, 2012 at 11:20:07AM +0800, Yuanhan Liu wrote: On Tue, Jan 03, 2012 at 08:25:31PM +0100, Roland Scheidegger wrote: Ah index scanning... I don't like

Re: [Mesa-dev] [PATCH] mesa: only map src/dest regions in _mesa_copy_buffer_subdata()

2012-01-04 Thread Yuanhan Liu
On Wed, Jan 04, 2012 at 02:55:44PM -0700, Brian Paul wrote: We were wastefully mapping the whole source/dest buffers before. --- src/mesa/main/bufferobj.c | 12 ++-- 1 files changed, 6 insertions(+), 6 deletions(-) Looks good to me. Reviewed-by: Yuanhan Liu yuanhan

Re: [Mesa-dev] [PATCH] vbo: introduce vbo_get_minmax_indices function

2012-01-03 Thread Yuanhan Liu
to reduce some map/unmap. actually map the ib, you lose anyway). Hopefully won't hit that performance hog often... A comment inline. Am 31.12.2011 07:32, schrieb Yuanhan Liu: [snip]... + for (i = 0; i nr_prims; i++) { + tmp_ib.ptr = ib-ptr + prims[i].start * vbo_sizeof_ib_type

Re: [Mesa-dev] [PATCH] vbo: introduce vbo_get_minmax_indices function

2012-01-03 Thread Yuanhan Liu
On Wed, Jan 04, 2012 at 11:20:07AM +0800, Yuanhan Liu wrote: On Tue, Jan 03, 2012 at 08:25:31PM +0100, Roland Scheidegger wrote: Ah index scanning... I don't like that this will map/unmap the ib once for each prim, Me either :) though I don't really see a nice way to avoid that (I

Re: [Mesa-dev] [PATCH 2/2] i965: fix the wrong min/max_index for nr_prims 1

2011-12-30 Thread Yuanhan Liu
On Thu, Dec 29, 2011 at 09:10:03AM +0100, Michel Dänzer wrote: On Don, 2011-12-29 at 10:03 +0800, Yuanhan Liu wrote: On Wed, Dec 28, 2011 at 12:07:08PM -0800, Eric Anholt wrote: On Wed, 28 Dec 2011 13:54:43 +0800, Yuanhan Liu yuanhan@linux.intel.com wrote: The current code would

[Mesa-dev] [PATCH] vbo: introduce vbo_get_minmax_indices function

2011-12-30 Thread Yuanhan Liu
. As when nr_prims = 1, we can pass 1 to paramter nr_prims, thus I made vbo_get_minmax_index() static. Signed-off-by: Yuanhan Liu yuanhan@linux.intel.com --- src/mesa/drivers/dri/i965/brw_draw.c |2 +- src/mesa/drivers/dri/nouveau/nouveau_vbo_t.c |3 +- src/mesa/main/api_validate.c

Re: [Mesa-dev] [PATCH 2/2] i965: fix the wrong min/max_index for nr_prims 1

2011-12-28 Thread Yuanhan Liu
On Wed, Dec 28, 2011 at 12:07:08PM -0800, Eric Anholt wrote: On Wed, 28 Dec 2011 13:54:43 +0800, Yuanhan Liu yuanhan@linux.intel.com wrote: The current code would just calculate min/max_index for the first prim unconditionally, which is wrong if nr_prims 1. This would some cases

[Mesa-dev] [PATCH 1/2] vbo: introduce vbo_sizeof_ib_type() function

2011-12-27 Thread Yuanhan Liu
introduce vbo_sizeof_ib_type() function to return the index data type size. I see some place use switch(ib-type) to get the index data type, which is sort of duplicate. Signed-off-by: Yuanhan Liu yuanhan@linux.intel.com --- src/mesa/state_tracker/st_draw.c | 15 + src/mesa

[Mesa-dev] [PATCH 2/2] i965: fix the wrong min/max_index for nr_prims 1

2011-12-27 Thread Yuanhan Liu
-off-by: Yuanhan Liu yuanhan@linux.intel.com --- src/mesa/drivers/dri/i965/brw_draw.c | 18 -- 1 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_draw.c b/src/mesa/drivers/dri/i965/brw_draw.c index 621195d..3d0cc7c 100644 --- a/src

Re: [Mesa-dev] [PATCH] vbo: count min/max_index before vbo-draw_prims

2011-12-27 Thread Yuanhan Liu
On Tue, Dec 27, 2011 at 11:15:42AM -0800, Eric Anholt wrote: On Sun, 25 Dec 2011 12:26:25 +0800, Liu Aleaxander aleaxan...@gmail.com wrote: On Sun, Dec 25, 2011 at 8:03 AM, Eric Anholt e...@anholt.net wrote: On Thu, 22 Dec 2011 18:55:50 +0800, Yuanhan Liu yuanhan@linux.intel.com

[Mesa-dev] [PATCH] vbo: count min/max_index before vbo-draw_prims

2011-12-22 Thread Yuanhan Liu
For the case that index data is stored in element array buffer object, and user called glMultiDrawElements, count the min/max_index before calling vbo-draw_prims. vbo_get_minmax_index() isn't friendly to this case. So do it while building the prim info. Signed-off-by: Yuanhan Liu yuanhan

Re: [Mesa-dev] [PATCH 0/8] i965: dynamic eu instruction store size

2011-12-22 Thread Yuanhan Liu
On Thu, Dec 22, 2011 at 02:37:58PM -0800, Kenneth Graunke wrote: On 12/21/2011 01:33 AM, Yuanhan Liu wrote: Hi, this is a new series of patches for dynamic eu instruction store size. The first 4 is from Eric. I just grabed it to make it rebase to current repo. The last 4 patch is from mine

Re: [Mesa-dev] [PATCH 8/8] i965: increase the brw eu instruction store size dynamically

2011-12-22 Thread Yuanhan Liu
On Thu, Dec 22, 2011 at 02:33:03PM -0800, Kenneth Graunke wrote: On 12/21/2011 01:33 AM, Yuanhan Liu wrote: Here is the final patch to enable dynamic eu instruction store size: increase the brw eu instruction store size dynamically instead of just allocating it statically with a constant

Re: [Mesa-dev] [PATCH 7/8] i965: call next_insn() before referencing a instruction by index

2011-12-22 Thread Yuanhan Liu
On Thu, Dec 22, 2011 at 11:09:12AM -0800, Kenneth Graunke wrote: On 12/21/2011 01:33 AM, Yuanhan Liu wrote: [snip] + int emit_endif = 1; Please use bool and true/false rather than int. Yes, right. Will fix it. /* In single program flow mode, we can express IF and ELSE

Re: [Mesa-dev] [PATCH 8/8] i965: increase the brw eu instruction store size dynamically

2011-12-22 Thread Yuanhan Liu
On Thu, Dec 22, 2011 at 07:51:46PM -0800, Kenneth Graunke wrote: On 12/22/2011 07:04 PM, Yuanhan Liu wrote: On Thu, Dec 22, 2011 at 02:33:03PM -0800, Kenneth Graunke wrote: On 12/21/2011 01:33 AM, Yuanhan Liu wrote: [snip] -#define BRW_EU_MAX_INSN_STACK 5 -#define BRW_EU_MAX_INSN 1

[Mesa-dev] [PATCH 0/8] i965: dynamic eu instruction store size

2011-12-21 Thread Yuanhan Liu
oglc test cases, and found no regression. (Sandybridge only). Thanks, Yuanhan Liu -- Eric Anholt (4): i965: Drop unused do_insn argument from gen6_CONT(). i965: Don't make consumers of brw_DO()/brw_WHILE() track loop start i965: Don't make consumers of brw_WHILE do pre-gen6 BREAK/CONT

[Mesa-dev] [PATCH 1/8] i965: Drop unused do_insn argument from gen6_CONT().

2011-12-21 Thread Yuanhan Liu
From: Eric Anholt e...@anholt.net The branch distances get patched up later at the WHILE instruction. Reviewed-by: Yuanhan Liu yuanhan@linux.intel.com --- src/mesa/drivers/dri/i965/brw_eu_emit.c |3 +-- src/mesa/drivers/dri/i965/brw_fs_emit.cpp |2 +- src/mesa/drivers/dri/i965

[Mesa-dev] [PATCH 2/8] i965: Don't make consumers of brw_DO()/brw_WHILE() track loop start

2011-12-21 Thread Yuanhan Liu
From: Eric Anholt e...@anholt.net This is a similar cleanup to what we did for brw_IF(), brw_ELSE(), brw_ENDIF() handling. Reviewed-by: Yuanhan Liu yuanhan@linux.intel.com --- src/mesa/drivers/dri/i965/brw_clip_line.c |5 +-- src/mesa/drivers/dri/i965/brw_clip_tri.c | 15

[Mesa-dev] [PATCH 3/8] i965: Don't make consumers of brw_WHILE do pre-gen6 BREAK/CONT patching

2011-12-21 Thread Yuanhan Liu
From: Eric Anholt e...@anholt.net The EU code itself can just do this work, since all the consumers were duplicating it. Reviewed-by: Yuanhan Liu yuanhan@linux.intel.com --- src/mesa/drivers/dri/i965/brw_eu_emit.c | 36 +- src/mesa/drivers/dri/i965

[Mesa-dev] [PATCH 4/8] i965: Don't make consumers of brw_CONT/brw_WHILE track if depth in loop

2011-12-21 Thread Yuanhan Liu
From: Eric Anholt e...@anholt.net The codegen backends all had this same tracking, so just do it at the EU level. Reviewed-by: Yuanhan Liu yuanhan@linux.intel.com --- src/mesa/drivers/dri/i965/brw_eu.c |1 + src/mesa/drivers/dri/i965/brw_eu.h | 10 -- src

[Mesa-dev] [PATCH 5/8] i965: let the if_stack just store the instruction index

2011-12-21 Thread Yuanhan Liu
address. Signed-off-by: Yuanhan Liu yuanhan@linux.intel.com --- src/mesa/drivers/dri/i965/brw_eu.c |3 +-- src/mesa/drivers/dri/i965/brw_eu.h |4 +++- src/mesa/drivers/dri/i965/brw_eu_emit.c | 22 +++--- 3 files changed, 19 insertions(+), 10 deletions

[Mesa-dev] [PATCH 6/8] i965: get the jmp distance by instruction index

2011-12-21 Thread Yuanhan Liu
-by: Yuanhan Liu yuanhan@linux.intel.com --- src/mesa/drivers/dri/i965/brw_eu.h |8 +--- src/mesa/drivers/dri/i965/brw_eu_emit.c | 17 - src/mesa/drivers/dri/i965/brw_sf_emit.c |2 +- src/mesa/drivers/dri/i965/brw_wm_emit.c |2 +- 4 files changed, 15 insertions

Re: [Mesa-dev] [PATCH 6/8] i965: get the jmp distance by instruction index

2011-12-21 Thread Yuanhan Liu
On Wed, Dec 21, 2011 at 05:57:35AM -0800, Eric Anholt wrote: On Wed, 21 Dec 2011 17:33:41 +0800, Yuanhan Liu yuanhan@linux.intel.com wrote: If dynamic instruction store size is enabled, while after the brw_JMPI() and before the brw_land_fwd_jump() function, the eu instruction store

[Mesa-dev] [PATCH 0/5] i965: dynamic eu instruction store size

2011-12-05 Thread Yuanhan Liu
brw_DO/JMPI, to let them return the instruction index. -- Yuanhan Liu (5): i965: Add a help function brw_insn_index to get the instruction index i965: prepare work for dynamic instruction store size on IF/ELSE/ENDIF i965: prepare work for dynamic instruction store size on DO/WHILE i965

[Mesa-dev] [PATCH 1/5] i965: Add a help function brw_insn_index to get the instruction index

2011-12-05 Thread Yuanhan Liu
The reason to add a help function instead of just use 'insn - p-store' instead is that this help function includes an assert. Signed-off-by: Yuanhan Liu yuanhan@linux.intel.com --- src/mesa/drivers/dri/i965/brw_eu.h |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git

[Mesa-dev] [PATCH 2/5] i965: prepare work for dynamic instruction store size on IF/ELSE/ENDIF

2011-12-05 Thread Yuanhan Liu
the instruction memory address. Signed-off-by: Yuanhan Liu yuanhan@linux.intel.com --- src/mesa/drivers/dri/i965/brw_eu.c |3 +-- src/mesa/drivers/dri/i965/brw_eu.h |4 +++- src/mesa/drivers/dri/i965/brw_eu_emit.c | 16 3 files changed, 12 insertions(+), 11 deletions

[Mesa-dev] [PATCH 3/5] i965: prepare work for dynamic instruction store size on DO/WHILE

2011-12-05 Thread Yuanhan Liu
the loop_stack to store the instruction index instead. Signed-off-by: Yuanhan Liu yuanhan@linux.intel.com --- src/mesa/drivers/dri/i965/brw_clip_line.c |2 +- src/mesa/drivers/dri/i965/brw_clip_tri.c |6 ++-- src/mesa/drivers/dri/i965/brw_clip_unfilled.c |4 +- src/mesa/drivers/dri

[Mesa-dev] [PATCH 4/5] i965: prepare work for dynamic instruction store size on JMPI

2011-12-05 Thread Yuanhan Liu
-by: Yuanhan Liu yuanhan@linux.intel.com --- src/mesa/drivers/dri/i965/brw_eu.h |8 +--- src/mesa/drivers/dri/i965/brw_eu_emit.c | 17 - src/mesa/drivers/dri/i965/brw_sf_emit.c |2 +- src/mesa/drivers/dri/i965/brw_wm_emit.c |2 +- 4 files changed, 15 insertions

[Mesa-dev] [PATCH 5/5] i965: increase the brw eu instruction store size dynamically

2011-12-05 Thread Yuanhan Liu
it to 1'. Signed-off-by: Yuanhan Liu yuanhan@linux.intel.com --- src/mesa/drivers/dri/i965/brw_eu.c |7 +++ src/mesa/drivers/dri/i965/brw_eu.h |7 --- src/mesa/drivers/dri/i965/brw_eu_emit.c | 22 +++--- 3 files changed, 30 insertions(+), 6 deletions

Re: [Mesa-dev] [PATCH 0/6] patches to increase the brw eu instruction store size dynamically

2011-12-05 Thread Yuanhan Liu
On Fri, Dec 02, 2011 at 11:25:55AM -0800, Eric Anholt wrote: On Thu, 1 Dec 2011 18:26:50 +0800, Yuanhan Liu yuanhan@linux.intel.com wrote: Actually the first 5 patches are all prepare work for patch 6. I checked those patches will all intel oglc testcases, and found

[Mesa-dev] [PATCH 0/6] patches to increase the brw eu instruction store size dynamically

2011-12-01 Thread Yuanhan Liu
Actually the first 5 patches are all prepare work for patch 6. I checked those patches will all intel oglc testcases, and found no regressions. What's better, it fixed something. Yuanhan Liu (6): i965: let all the brw_OPCODE functions return an instruction index instead i965: remove

[Mesa-dev] [PATCH 1/6] i965: let all the brw_OPCODE functions return an instruction index instead

2011-12-01 Thread Yuanhan Liu
Let all the brw_OPCODE functions return an instruction index instead, and use brw_insn_of(p, index) macro to reference the instruction stored at p-store[]. This is a prepare work of let us increase the instruction store size dynamically by reralloc. Signed-off-by: Yuanhan Liu yuanhan

[Mesa-dev] [PATCH 2/6] i965: remove the second unused parameter of gen6_CONT

2011-12-01 Thread Yuanhan Liu
Signed-off-by: Yuanhan Liu yuanhan@linux.intel.com --- src/mesa/drivers/dri/i965/brw_eu.h |2 +- src/mesa/drivers/dri/i965/brw_eu_emit.c |2 +- src/mesa/drivers/dri/i965/brw_fs_emit.cpp |2 +- src/mesa/drivers/dri/i965/brw_vec4_emit.cpp |2 +- src/mesa/drivers

[Mesa-dev] [PATCH 3/6] i965: let all the while loop stack to store an instruction index instead

2011-12-01 Thread Yuanhan Liu
Let all the while loop stack just store the instruction index. This is somehow more flexible than store the instruction memory address. This is a prepare work of let us increase the instruction store size dynamically by reralloc. Signed-off-by: Yuanhan Liu yuanhan@linux.intel.com --- src

[Mesa-dev] [PATCH 4/6] i965: let if_stack just store the instruction index

2011-12-01 Thread Yuanhan Liu
Let if_stack just store the instruction pointer(an index). This is somehow more flexible than store the instruction memory address. This is a prepare work of let us increase the instruction store size dynamically by reralloc. Signed-off-by: Yuanhan Liu yuanhan@linux.intel.com --- src/mesa

[Mesa-dev] [PATCH 5/6] i965: let brw_lan_fwd_jump() get the jmp_insn by the instruction index

2011-12-01 Thread Yuanhan Liu
This is a prepare work of let us increase the instruction store size dynamically by reralloc. Signed-off-by: Yuanhan Liu yuanhan@linux.intel.com --- src/mesa/drivers/dri/i965/brw_eu.h |3 +-- src/mesa/drivers/dri/i965/brw_eu_emit.c |4 ++-- src/mesa/drivers/dri/i965

[Mesa-dev] [PATCH 6/6] i965: increase the brw eu instruction store size dynamically

2011-12-01 Thread Yuanhan Liu
Here is the final patch to increase the brw eu instruction store size dynamically instead of just allocating it statically with a constant limit. This would fix something like 'GL_MAX_PROGRAM_INSTRUCTIONS_ARB was 16384 while the driver would limit it to 1'. Signed-off-by: Yuanhan Liu yuanhan

[Mesa-dev] [PATCH 1/4] glx: remove the unused var

2011-11-29 Thread Yuanhan Liu
Silence the compile warning Signed-off-by: Yuanhan Liu yuanhan@linux.intel.com --- src/glx/drisw_glx.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/src/glx/drisw_glx.c b/src/glx/drisw_glx.c index a150c61..7ba491b 100644 --- a/src/glx/drisw_glx.c +++ b/src/glx

[Mesa-dev] [PATCH 3/4] i965: let if_stack just store the instruction index

2011-11-29 Thread Yuanhan Liu
Let if_stack just store the instruction pointer(an index). This is somehow more flexible than store the instruction memory address. This patch is mainly for the next patch. Signed-off-by: Yuanhan Liu yuanhan@linux.intel.com --- src/mesa/drivers/dri/i965/brw_eu.c |3 +-- src/mesa

[Mesa-dev] [PATCH 4/4] i965: increase the brw eu instruction store size dynamically

2011-11-29 Thread Yuanhan Liu
Increase the brw eu instruction store size dynamically instead of just allocating it statically with a constant limit. This would fix something that 'GL_MAX_PROGRAM_INSTRUCTIONS_ARB was 16384 while the driver would limit it to 1'. Signed-off-by: Yuanhan Liu yuanhan@linux.intel.com

Re: [Mesa-dev] [PATCH 3/4] i965: let if_stack just store the instruction index

2011-11-29 Thread Yuanhan Liu
On Tue, Nov 29, 2011 at 10:35:42AM -0800, Eric Anholt wrote: On Tue, 29 Nov 2011 16:08:38 +0800, Yuanhan Liu yuanhan@linux.intel.com wrote: Let if_stack just store the instruction pointer(an index). This is somehow more flexible than store the instruction memory address. I'd be more

Re: [Mesa-dev] [PATCH 4/4] i965: increase the brw eu instruction store size dynamically

2011-11-29 Thread Yuanhan Liu
On Tue, Nov 29, 2011 at 10:40:46AM -0800, Eric Anholt wrote: On Tue, 29 Nov 2011 16:08:39 +0800, Yuanhan Liu yuanhan@linux.intel.com wrote: Increase the brw eu instruction store size dynamically instead of just allocating it statically with a constant limit. This would fix something

Re: [Mesa-dev] [PATCH] mesa: move ElementArrayBufferObj to gl_array_object

2011-11-28 Thread Yuanhan Liu
On Sat, Nov 26, 2011 at 09:01:51AM -0700, Brian Paul wrote: On 11/23/2011 06:15 PM, Yuanhan Liu wrote: On Wed, Nov 23, 2011 at 08:25:59AM -0700, Brian Paul wrote: On 11/23/2011 02:26 AM, Yuanhan Liu wrote: According opengl spec 4.2.pdf table 6.12 (Vertex Array Object State) at page 515

Re: [Mesa-dev] [Piglit] [PATCH] Add a simple testcase to test that GL_ELEMENT_ARRAY_BUFFER is per vao

2011-11-27 Thread Yuanhan Liu
On Thu, Nov 24, 2011 at 11:25:23AM -0800, Eric Anholt wrote: On Wed, 23 Nov 2011 12:24:37 -0700, Brian Paul bri...@vmware.com wrote: On 11/23/2011 12:12 PM, Eric Anholt wrote: On Wed, 23 Nov 2011 17:34:30 +0800, Yuanhan Liuyuanhan@linux.intel.com wrote: From

[Mesa-dev] [PATCH] mesa: move ElementArrayBufferObj to gl_array_object

2011-11-23 Thread Yuanhan Liu
Signed-off-by: Yuanhan Liu yuanhan@linux.intel.com --- src/mesa/main/api_arrayelt.c |2 +- src/mesa/main/api_validate.c | 14 ++-- src/mesa/main/arrayobj.c |4 +++ src/mesa/main/attrib.c|7 ++--- src/mesa/main/bufferobj.c |9 ++- src/mesa/main

[Mesa-dev] [PATCH] Add a simple testcase to test that GL_ELEMENT_ARRAY_BUFFER is per vao

2011-11-23 Thread Yuanhan Liu
According opengl spec 4.2.pdf table 6.12 (Vertex Array Object State) at page 515: the element buffer object is listed in vertex array object. Add a testcase to test that. Signed-off-by: Yuanhan Liu yuanhan@linux.intel.com --- tests/all.tests |1 + tests/general

Re: [Mesa-dev] [PATCH] Add a simple testcase to test that GL_ELEMENT_ARRAY_BUFFER is per vao

2011-11-23 Thread Yuanhan Liu
On Wed, Nov 23, 2011 at 05:27:32PM +0800, Yuanhan Liu wrote: According opengl spec 4.2.pdf table 6.12 (Vertex Array Object State) at page 515: the element buffer object is listed in vertex array object. Add a testcase to test that. Signed-off-by: Yuanhan Liu yuanhan@linux.intel.com

Re: [Mesa-dev] [Piglit] [PATCH] Add a simple testcase to test that GL_ELEMENT_ARRAY_BUFFER is per vao

2011-11-23 Thread Yuanhan Liu
On Wed, Nov 23, 2011 at 11:12:19AM -0800, Eric Anholt wrote: On Wed, 23 Nov 2011 17:34:30 +0800, Yuanhan Liu yuanhan@linux.intel.com wrote: From 9a1da8748f0faa23f34398213ff7ee45fda6bf36 Mon Sep 17 00:00:00 2001 From: Yuanhan Liu yuanhan@linux.intel.com Date: Wed, 23 Nov 2011 17:37

Re: [Mesa-dev] [Piglit] [PATCH] Add a simple testcase to test that GL_ELEMENT_ARRAY_BUFFER is per vao

2011-11-23 Thread Yuanhan Liu
On Wed, Nov 23, 2011 at 08:33:00AM -0700, Brian Paul wrote: On 11/23/2011 02:34 AM, Yuanhan Liu wrote: +GLuint element; +GLfloat vertics[] = { minor nit: s/vertics/vertices/ +-1, -1, 0, + 1, -1, 0, + 1, 1, 0, +-1, 1, 0

[Mesa-dev] [PATCH] mesa: attach ElementArrayBufferObj to vertex array object

2011-11-22 Thread Yuanhan Liu
the Elelemnt array buffer to vao. This would fix most of(3 left) intel oglc vao test fail [0]: http://www.opengl.org/registry/specs/ARB/vertex_array_object.txt [1]: http://www.opengl.org/wiki/Vertex_Array_Object Cc: i...@freedesktop.org Signed-off-by: Yuanhan Liu yuanhan@linux.intel.com --- src

[Mesa-dev] [PATCH] Add a draw-pixel-with-texture testcase

2011-11-21 Thread Yuanhan Liu
Add a draw-pixel-with-texture testcase to check if texture sampling is happened while drawing pixels by glDrawPixels. v2: use piglit_probe_rect_rgba instead of just sampling a set of pixels(comments from Eric) Signed-off-by: Yuanhan Liu yuanhan@linux.intel.com --- tests/all.tests

[Mesa-dev] [PATCH 0/2] Patches to try to fix draw-pixel-with-textures in swrast

2011-11-17 Thread Yuanhan Liu
The two patches tries to fix an issue that happened while calling glDrawPixels with texture enabled. Here I attached a piglit testcase for this issue. Yuanhan Liu (2): swrast: simplify the prototype of function texture_combine swrast: fix unmatched span-array-ChanType src/mesa/swrast

  1   2   >