Re: [Mesa-dev] [PATCH] meta: do fallback when texture is enabled for DrawPixels

2012-05-04 Thread Liu Aleaxander
On Sat, May 5, 2012 at 10:19 AM, Roland Scheidegger wrote: > Am 05.05.2012 04:07, schrieb Liu Aleaxander: >> On Sat, May 5, 2012 at 9:44 AM, Roland Scheidegger >> wrote: >> [snip]... >> >>>> +    * or the original texture stuff would not work >>

Re: [Mesa-dev] [PATCH] meta: do fallback when texture is enabled for DrawPixels

2012-05-04 Thread Liu Aleaxander
On Sat, May 5, 2012 at 9:44 AM, Roland Scheidegger wrote: [snip]... >> +    * or the original texture stuff would not work >> +    * >> +    * FIXME: we may use multi-texture to handle this case. But fallback is >> +    * definitely a much simple and straight way. >> +    */ >> +   if (ctx->Textu

Re: [Mesa-dev] [PATCH] meta: do fallback when texture is enabled for DrawPixels

2012-05-04 Thread Liu Aleaxander
On Sat, May 5, 2012 at 2:56 AM, Eric Anholt wrote: > On Fri, 4 May 2012 22:33:41 +0800, Liu Aleaxander > wrote: >> From: Yuanhan Liu >> >> If there are already some texture unit enabled, a fallback is needed, >> or the original texture stuff would not work. >

[Mesa-dev] [PATCH] meta: do fallback when texture is enabled for DrawPixels

2012-05-04 Thread Liu Aleaxander
From: Yuanhan Liu If there are already some texture unit enabled, a fallback is needed, or the original texture stuff would not work. A much better way is to use multi-texture to handle this case: like treat the pixels as texture 1 and the original texture as texture 2. I haven't do much inverst

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

2012-03-16 Thread Liu Aleaxander
On Sat, Mar 17, 2012 at 1:57 AM, Eric Anholt wrote: > On Mon, 12 Mar 2012 16:04:00 +0800, Yuanhan Liu > wrote: >> When SPRITE_POINT_ENABLE bit is set, the texture coord would be >> replaced, and this is only needed when we called something like >> glTexEnvi(GL_POINT_SPRITE, GL_COORD_REPLACE, GL_

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

2012-02-21 Thread Liu Aleaxander
Sorry that I send the patch twice, the network connection here was terrifying bad just now. On 2/21/12, Liu Aleaxander wrote: > This patch(the way to fix this issue) is a little weird, as we already > fallbacked to swrast when handling gl_PointSize(in vertex shader). > Sounds that

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

2012-02-21 Thread Liu Aleaxander
This patch(the way to fix this issue) is a little weird, as we already fallbacked to swrast when handling gl_PointSize(in vertex shader). Sounds that we didn't fallback enough;) This patch servers as fixing the gl_PointSize issue on Pineview platform. Since the patch is a little weird, I thought a

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

2012-02-21 Thread Liu Aleaxander
This patch(the way to fix this issue) is a little weird, as we already fallbacked to swrast when handling gl_PointSize(in vertex shader). Sounds that we didn't fallback enough;) This patch servers as fixing the gl_PointSize issue on Pineview platform. Since the patch is a little weird, I thought a

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

2012-02-20 Thread Liu Aleaxander
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 --- src/mesa/tnl/t_context.c |3 +-- 1 files changed, 1 insertion

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

2012-02-18 Thread Liu Aleaxander
On Sun, Feb 19, 2012 at 8:54 AM, Eric Anholt wrote: > On Sat, 18 Feb 2012 23:07:32 +0800, Liu Aleaxander > wrote: >> This patch add the support of gl_PointCoord gl builtin var for platform >> gen4 and gen5(ILK). >> >> We can get the point start coord and t

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

2012-02-18 Thread Liu Aleaxander
This patch add the support of gl_PointCoord gl builtin var for platform gen4 and gen5(ILK). We can get the point start coord and the current pixel coord from PS payload, and the only left element needed is the point size. Then handle that in SF thread. Bugzilla: https://bugs.freedesktop.org/show_

[Mesa-dev] [PATCH 1/2] i965: fix wrong urb entries per attr for platform under SNB

2012-02-18 Thread Liu Aleaxander
For SNB+, One attribute takes 2 urb entries. While for platform under SNB, we write 4 MRF registers for each attribute, thus it takes 4 urb entries, right? NOTE: this is a candidate for stable release branches. I didn't see this fix anything, meanwhile I didn't see this broke anything so

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

2012-02-18 Thread Liu Aleaxander
On Sat, Feb 18, 2012 at 3:45 AM, Eric Anholt wrote: > On Fri, 17 Feb 2012 16:09:37 +0800, Yuanhan Liu > wrote: >> This patch add the support of gl_PointCoord gl builtin var for platform >> gen4 and gen5(ILK). >> >> We can get the point start coord and the current pixel coord, and the >> only lef

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

2012-01-20 Thread Liu Aleaxander
On Jan 20, 2012 9:07 PM, "Jonathan Coome" wrote: > > On 19/01/2012 23:48, 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 th

Re: [Mesa-dev] [PATCH] i965: Fix border color on Sandybridge and Ivybridge.

2012-01-20 Thread Liu Aleaxander
Thanks for the patch. Reviewed-by: Yuanhan Liu On Jan 20, 2012 9:40 PM, "Kenneth Graunke" wrote: > While reading through the simulator, I found some interesting code that > looks like it checks the sampler default color pointer against the bound > set in STATE_BASE_ADDRESS. On failure, it appe

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

2012-01-19 Thread Liu Aleaxander
Thanks for the reviewed-by. Ian, would you please help me to push this patch? I'm on the way to home for chines new year, and I can't access the net(both at home). Thanks advance! -- Yuanhan Liu (Sent by my phone, please forgive the poor format) On Jan 20, 2012 10:25 AM, "Ian Romanick" wrote:

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

2011-12-24 Thread Liu Aleaxander
On Sun, Dec 25, 2011 at 8:03 AM, Eric Anholt wrote: > On Thu, 22 Dec 2011 18:55:50 +0800, Yuanhan Liu > wrote: >> 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_minm

Re: [Mesa-dev] [PATCH 2/2] swrast: fix unmatched span->array->ChanType

2011-11-19 Thread Liu Aleaxander
On Sat, Nov 19, 2011 at 12:49 AM, Brian Paul wrote: > On 11/18/2011 12:38 AM, Yuanhan Liu wrote: >> >> texture_combine converts the result rgba to CHAN_TYPE from FLOAT. At the >> same time, make sure the span->array->ChanType is changed, too. >> >> Signed-off-by: Yuanhan Liu >> --- >>  src/mesa/sw

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

2011-11-19 Thread Liu Aleaxander
On Sat, Nov 19, 2011 at 3:25 AM, Eric Anholt wrote: > On Fri, 18 Nov 2011 15:38:46 +0800, Yuanhan Liu > wrote: >> >> +     glDrawPixels(20, 20, GL_RGBA, GL_FLOAT, pixels); >> + >> +     /* Here just sample a small set of pixels */ >> +     pass &= piglit_probe_pixel_rgba(5, 5, expected); >> +  

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

2011-11-19 Thread Liu Aleaxander
On Sat, Nov 19, 2011 at 1:02 AM, Brian Paul wrote: > On 11/18/2011 12:38 AM, Yuanhan Liu wrote: >> >> 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. > > Can you resend?  I can't deta

[Mesa-dev] [PATCH] mesa: fix inverted pbo test error at _mesa_GetnCompressedTexImageARB

2011-10-15 Thread Liu Aleaxander
>From d91661686e8d7def96561700092adda57215f0ab Mon Sep 17 00:00:00 2001 From: Yuanhan Liu Date: Sun, 16 Oct 2011 09:35:33 +0800 Subject: [PATCH] mesa: fix inverted pbo test error at _mesa_GetnCompressedTexImageARB It seems like a typo. Signed-off-by: Yuanhan Liu --- src/mesa/main/texgetimage.c

[Mesa-dev] mesa: handle PBO access error in display list mode

2011-10-15 Thread Liu Aleaxander
>From 98d4600d74829d16045dd577855b7c9f25e762c2 Mon Sep 17 00:00:00 2001 From: Yuanhan Liu Date: Sun, 16 Oct 2011 09:13:10 +0800 Subject: [PATCH] mesa: handle PBO access error in display list mode While dealing with pbo data in display list mode, it does check the pbo access error at unpack_image.

[Mesa-dev] mesa: handle the pbo case for save_Bitmap

2011-10-15 Thread Liu Aleaxander
>From af5e640575db5f7e2db94a98aa75a84a01ee0cf0 Mon Sep 17 00:00:00 2001 From: Yuanhan Liu Date: Sat, 15 Oct 2011 22:44:18 +0800 Subject: [PATCH] mesa: handle the pbo case for save_Bitmap Wrap _mesa_unpack_bitmap to handle the case that data is stored in pixel buffer object. This would make calli

Re: [Mesa-dev] [PATCH] mesa: generate error if pbo offset is not aligned with the size of specified type

2011-10-15 Thread Liu Aleaxander
On Fri, Oct 14, 2011 at 11:14 PM, Liu Aleaxander wrote: > > On Oct 14, 2011 10:38 PM, "Brian Paul" wrote: >> >> On 10/13/2011 09:47 PM, Yuanhan Liu wrote: >>> >>> v2: quote the spec; explicitly exclude the GL_BITMAP case to make code >>> m

Re: [Mesa-dev] [PATCH] i965: setup address rounding enable bits

2011-10-14 Thread Liu Aleaxander
On Sat, Oct 15, 2011 at 2:11 AM, Eric Anholt wrote: > On Thu, 13 Oct 2011 11:34:34 +0800, Yuanhan Liu > wrote: >> The patch(based on the reading of the emulator) came from while I was >> trying to fix the oglc pbo texImage.1PBODefaults fail. This case >> generates a texture with the width and he

Re: [Mesa-dev] [PATCH] mesa: generate error if pbo offset is not aligned with the size of specified type

2011-10-14 Thread Liu Aleaxander
On Oct 14, 2011 10:38 PM, "Brian Paul" wrote: > > On 10/13/2011 09:47 PM, Yuanhan Liu wrote: >> >> v2: quote the spec; explicitly exclude the GL_BITMAP case to make code >> more readable. (comments from Ian) >> >> Signed-off-by: Yuanhan Liu >> --- >> src/mesa/main/pbo.c | 12 >> 1

Re: [Mesa-dev] [PATCH] mesa: add a function to do the image data copy stuff for save_CompressedTex(Sub)Image

2011-10-14 Thread Liu Aleaxander
On Oct 14, 2011 10:32 PM, "Brian Paul" wrote: > > On 10/14/2011 12:39 AM, Yuanhan Liu wrote: >> >> Introuduce a simple function called copy_data to do the image data copy >> stuff for all the save_CompressedTex*Image function. The function check >> the NULL data case to avoid some potential segfau

Re: [Mesa-dev] [PATCH] mesa: fix error handling for dlist image unpacking

2011-09-15 Thread Liu Aleaxander
a_bytes_per_pixel(format, type) <= 0) { > +      /* bad format and/or type */ > +      return NULL; > +   } > + >    if (!_mesa_is_bufferobj(unpack->BufferObj)) { >       /* no PBO */ >       GLvoid *image = _mesa_unpack_image(dimensions, width, height, depth, >

Re: [Mesa-dev] [PATCH] mesa: handle errors in _mesa_unpack_image instead in unpack_image

2011-09-15 Thread Liu Aleaxander
On Thu, Sep 15, 2011 at 11:04 PM, Brian Paul wrote: > On 09/15/2011 08:44 AM, Liu Aleaxander wrote: >> >> On Thu, Sep 15, 2011 at 10:17 PM, Brian Paul  wrote: >>> >>> On 09/14/2011 11:34 PM, Yuanhan Liu wrote: >>>> >>>> Handle errors in _m

Re: [Mesa-dev] [PATCH] mesa: handle errors in _mesa_unpack_image instead in unpack_image

2011-09-15 Thread Liu Aleaxander
On Thu, Sep 15, 2011 at 10:44 PM, Liu Aleaxander wrote: > On Thu, Sep 15, 2011 at 10:17 PM, Brian Paul wrote: [snip] ... >> >> The attached patch fixes the issues you've raised but defers error >> generation from compile-time to execute-time.  OK? > > It

Re: [Mesa-dev] [PATCH] mesa: handle errors in _mesa_unpack_image instead in unpack_image

2011-09-15 Thread Liu Aleaxander
On Thu, Sep 15, 2011 at 10:17 PM, Brian Paul wrote: > On 09/14/2011 11:34 PM, Yuanhan Liu wrote: >> >> Handle errors in _mesa_unpack_image instead in unpack_image. This >> would make the error message more detailed and specified. >> >> This patch does: >>  1. trigger a GL_INVALID_VALUE if (width<

Re: [Mesa-dev] [PATCH] intel: fix build error

2011-09-03 Thread Liu Aleaxander
On Sat, Sep 3, 2011 at 10:24 PM, Paul Berry wrote: > On 3 September 2011 07:07, Liu Aleaxander wrote: >> >> From f02de851ba728642e26cce6fe76e5482619813e7 Mon Sep 17 00:00:00 2001 >> From: Yuanhan Liu >> Date: Sun, 4 Sep 2011 06:02:14 +0800 >> Subject: [PATCH] i

[Mesa-dev] [PATCH] intel: fix build error

2011-09-03 Thread Liu Aleaxander
>From f02de851ba728642e26cce6fe76e5482619813e7 Mon Sep 17 00:00:00 2001 From: Yuanhan Liu Date: Sun, 4 Sep 2011 06:02:14 +0800 Subject: [PATCH] intel: fix build error Fix a build error introduced by commit 6862b54f: i965_dri.so.tmp: undefined reference to `strerr' Signed-off-by: Yuanhan Liu ---