[Mesa-dev] [PATCH 1/2] swrast: simplify the prototype of function texture_combine

2011-11-17 Thread Yuanhan Liu
Parameter n and rgbaChan are both from structure span, thus using span as paramter to simplify the prototype. Function texture_combine is only used by _swrast_texture_span, so I guess it's safe to do so. This patch is mainly for the next patch. Signed-off-by: Yuanhan Liu yuanhan

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

2011-11-17 Thread Yuanhan Liu
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 yuanhan@linux.intel.com --- src/mesa/swrast/s_texcombine.c |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff

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

2011-11-17 Thread Yuanhan Liu
On Fri, Nov 18, 2011 at 03:38:46PM +0800, 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. Yuanhan Liu (2): swrast: simplify the prototype of function

Re: [Mesa-dev] [PATCH] mesa: make sure all lighting tables are updated before the computation

2011-11-15 Thread Yuanhan Liu
On Tue, Nov 15, 2011 at 07:26:52AM -0700, Brian Paul wrote: On 11/15/2011 12:51 AM, Yuanhan Liu wrote: Make sure all lighting tables are updated before using the table to calculate something, say using _SpotExpTable to calculate _VP_inf_spot_attenuation. Signed-off-by: Yuanhan Liuyuanhan

Re: [Mesa-dev] [PATCH] mesa: do not skip att and spot calculation for infinite light

2011-11-15 Thread Yuanhan Liu
On Tue, Nov 15, 2011 at 07:22:29AM -0700, Brian Paul wrote: On 11/15/2011 12:11 AM, Yuanhan Liu wrote: glspec doesn't say that we should skip the attenuation and spot calculation for infinite light(Ppli.w == 0). Instead, it gives a same formula to do the light calculation for both finite light

[Mesa-dev] [PATCH] mesa: do not skip att and spot calculation for infinite light

2011-11-14 Thread Yuanhan Liu
.pdf, we can skip attenuation calculation if Ppli.w == 0. This would fix all the intel oglc l_sed fail subcases and introduces no intel oglc regressions. Signed-off-by: Yuanhan Liu yuanhan@linux.intel.com --- src/mesa/main/ffvertex_prog.c | 115 ++--- 1 files

[Mesa-dev] [PATCH] mesa: make sure all lighting tables are updated before the computation

2011-11-14 Thread Yuanhan Liu
Make sure all lighting tables are updated before using the table to calculate something, say using _SpotExpTable to calculate _VP_inf_spot_attenuation. Signed-off-by: Yuanhan Liu yuanhan@linux.intel.com --- src/mesa/main/light.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions

Re: [Mesa-dev] [PATCH 2/2] [RFC] Linker: handle built-in uniform variables like normal uniform variables

2011-11-13 Thread Yuanhan Liu
On Sat, Nov 12, 2011 at 12:54:37PM -0800, Ian Romanick wrote: On 11/09/2011 01:10 AM, Yuanhan Liu wrote: The original comments just tell me that I'm doing wrong. Here I sent a patch for comments and explanation, and I may then try to write the code to process those built-in uniform variables

Re: [Mesa-dev] [PATCH 2/2] intel: make sure hardware choose the right filter mode

2011-11-13 Thread Yuanhan Liu
On Fri, Nov 11, 2011 at 08:53:13AM -0800, Eric Anholt wrote: On Thu, 3 Nov 2011 10:16:06 +0800, Yuanhan Liu yuanhan@linux.intel.com wrote: On Wed, Nov 02, 2011 at 02:18:46PM -0700, Eric Anholt wrote: On Wed, 2 Nov 2011 11:12:07 +0800, Yuanhan Liu yuanhan@linux.intel.com wrote

[Mesa-dev] [PATCH 1/2] ir_to_mesa: don't init unfirom if link failed

2011-11-09 Thread Yuanhan Liu
Don't call set_unfiform_initializers if link failed, or it would trigger a GL_INVALID_OPERATION error. That's not an expected behavior of glLinkProgram function. Signed-off-by: Yuanhan Liu yuanhan@linux.intel.com --- src/mesa/program/ir_to_mesa.cpp |4 +++- 1 files changed, 3 insertions

Re: [Mesa-dev] [PATCH 2/2] intel: make sure hardware choose the right filter mode

2011-11-09 Thread Yuanhan Liu
On Thu, Nov 03, 2011 at 10:16:06AM +0800, Yuanhan Liu wrote: On Wed, Nov 02, 2011 at 02:18:46PM -0700, Eric Anholt wrote: On Wed, 2 Nov 2011 11:12:07 +0800, Yuanhan Liu yuanhan@linux.intel.com wrote: On Tue, Nov 01, 2011 at 05:57:36PM +0800, Yuanhan Liu wrote: According to bspec

Re: [Mesa-dev] [PATCH 4/5] mesa: fix the low limit of width and height for glRenderbufferStorage

2011-11-03 Thread Yuanhan Liu
On Wed, Nov 02, 2011 at 07:23:31AM -0600, Brian Paul wrote: On 11/02/2011 03:56 AM, Yuanhan Liu wrote: glRenderbufferStorage man page says: GL_INVALID_VALUE is generated if either of width or height is negative, or greater than the value of GL_MAX_RENDERBUFFER_SIZE. Signed-off

[Mesa-dev] [PATCH] intel: don't call unmap pbo if pbo is not mapped

2011-11-02 Thread Yuanhan Liu
_mesa_validate_pbo_teximage may fail, result the pbo not mapped. If then unmap function is called, an abort would be triggered by assert(obj-Pointer). This would fix: https://bugs.freedesktop.org/show_bug.cgi?id=42268 NOTE: this is just for 7.11 stable branch Signed-off-by: Yuanhan Liu yuanhan

[Mesa-dev] [PATCH 1/5] mesa: remove the redundant check

2011-11-02 Thread Yuanhan Liu
Signed-off-by: Yuanhan Liu yuanhan@linux.intel.com --- src/mesa/main/texparam.c | 11 +-- 1 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c index dc5ee33..b031e18 100644 --- a/src/mesa/main/texparam.c +++ b/src/mesa

[Mesa-dev] [PATCH 2/5] mesa: complete the GL_TEXTURE_SWIZZLE* setup

2011-11-02 Thread Yuanhan Liu
is legal for glTexParameterf(v) Signed-off-by: Yuanhan Liu yuanhan@linux.intel.com --- src/mesa/main/texparam.c | 27 +++ 1 files changed, 27 insertions(+), 0 deletions(-) diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c index b031e18..2ebf383 100644

[Mesa-dev] [PATCH 3/5] mesa: fix inital value for new renderbuffer

2011-11-02 Thread Yuanhan Liu
-off-by: Yuanhan Liu yuanhan@linux.intel.com --- src/mesa/main/renderbuffer.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/mesa/main/renderbuffer.c b/src/mesa/main/renderbuffer.c index 70011e6..b6eea79 100644 --- a/src/mesa/main/renderbuffer.c +++ b/src/mesa

[Mesa-dev] [PATCH 4/5] mesa: fix the low limit of width and height for glRenderbufferStorage

2011-11-02 Thread Yuanhan Liu
glRenderbufferStorage man page says: GL_INVALID_VALUE is generated if either of width or height is negative, or greater than the value of GL_MAX_RENDERBUFFER_SIZE. Signed-off-by: Yuanhan Liu yuanhan@linux.intel.com --- src/mesa/main/fbobject.c |4 ++-- 1 files changed, 2 insertions

[Mesa-dev] [PATCH 5/5] swrast: simply the condition test for _swrast_choose_texture_sample_func

2011-11-02 Thread Yuanhan Liu
remove another long if condition test. I don't feel a strong need of this patch. But for it make the code a little simpler(I do think so), I send it out. Signed-off-by: Yuanhan Liu yuanhan@linux.intel.com --- src/mesa/swrast/s_texfilter.c | 22 +- 1 files changed, 9

Re: [Mesa-dev] 7.11.1 release, and picking NormalMatrix fix

2011-11-02 Thread Yuanhan Liu
running the full round of tests, and they've found one or two regressions (e.g., bug #42268). Hi Ian, I sent out a patch[0] to fix this issue. Did you see that? [0]: [PATCH] intel: don't call unmap pbo if pbo is not mapped Thanks, Yuanhan Liu Once those get resolved, I don't think there's

Re: [Mesa-dev] [PATCH 2/2] intel: make sure hardware choose the right filter mode

2011-11-02 Thread Yuanhan Liu
On Wed, Nov 02, 2011 at 02:18:46PM -0700, Eric Anholt wrote: On Wed, 2 Nov 2011 11:12:07 +0800, Yuanhan Liu yuanhan@linux.intel.com wrote: On Tue, Nov 01, 2011 at 05:57:36PM +0800, Yuanhan Liu wrote: According to bspec, MIPCnt(was set to intelObj-_MaxLevel) was used for min/mag

[Mesa-dev] [PATCH 1/2] intel: fix potential segfault error

2011-11-01 Thread Yuanhan Liu
Signed-off-by: Yuanhan Liu yuanhan@linux.intel.com --- src/mesa/drivers/dri/intel/intel_tex_validate.c |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/mesa/drivers/dri/intel/intel_tex_validate.c b/src/mesa/drivers/dri/intel/intel_tex_validate.c index 4012400

[Mesa-dev] [PATCH 2/2] intel: make sure hardware choose the right filter mode

2011-11-01 Thread Yuanhan Liu
would always choose mag filter(GL_LINEAR) here since MIPCnt was set to 0 zero, then would make LOD be zero. Then according the formula: MagMode = (LOD - Base = 0) Thus hardware choose Mag filter. This would fix all oglc filtercubemin subcase fail Signed-off-by: Yuanhan Liu yuanhan

Re: [Mesa-dev] [PATCH 2/2] intel: make sure hardware choose the right filter mode

2011-11-01 Thread Yuanhan Liu
On Tue, Nov 01, 2011 at 05:57:36PM +0800, Yuanhan Liu wrote: According to bspec, MIPCnt(was set to intelObj-_MaxLevel) was used for min/mag filter mode determination. For a normal case with no mipmap like this: glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST

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

2011-10-18 Thread Yuanhan Liu
Simply generate GL_INVALID_OPERATION error at display list mode. As explained by Brian, we are going to access PBO data at compile time. No need to defer the error at execution time. Signed-off-by: Yuanhan Liu yuanhan@linux.intel.com --- src/mesa/main/dlist.c |2 ++ 1 files changed, 2

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

2011-10-18 Thread Yuanhan Liu
handle the error at execution time but not compile time. Updated patch sent. Thanks, Yuanhan Liu ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

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

2011-10-16 Thread Yuanhan Liu
pixel type, like GL_UNSIGNED_SHORT_5_6_5. Signed-off-by: Yuanhan Liu yuanhan@linux.intel.com --- src/mesa/main/pbo.c | 13 + 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/src/mesa/main/pbo.c b/src/mesa/main/pbo.c index 4e7e6f9..41ff2ff 100644 --- a/src/mesa/main

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

2011-10-16 Thread Yuanhan Liu
On Sat, Oct 15, 2011 at 08:59:52AM +0800, Liu Aleaxander wrote: On Sat, Oct 15, 2011 at 2:11 AM, Eric Anholt e...@anholt.net wrote: On Thu, 13 Oct 2011 11:34:34 +0800, Yuanhan Liu yuanhan@linux.intel.com wrote: The patch(based on the reading of the emulator) came from while I

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

2011-10-14 Thread Yuanhan Liu
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 segfault. This also would make the code a bit simpler and less redundance. Signed-off-by: Yuanhan Liu yuanhan

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

2011-10-13 Thread Yuanhan Liu
Signed-off-by: Yuanhan Liu yuanhan@linux.intel.com --- src/mesa/main/pbo.c |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/src/mesa/main/pbo.c b/src/mesa/main/pbo.c index 4e7e6f9..4611c5d 100644 --- a/src/mesa/main/pbo.c +++ b/src/mesa/main/pbo.c @@ -82,6 +82,11

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

2011-10-13 Thread Yuanhan Liu
On Thu, Oct 13, 2011 at 08:01:32PM -0700, Ian Romanick wrote: On 10/13/2011 06:46 PM, Yuanhan Liu wrote: Signed-off-by: Yuanhan Liuyuanhan@linux.intel.com --- src/mesa/main/pbo.c |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/src/mesa/main/pbo.c b/src

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

2011-10-13 Thread Yuanhan Liu
v2: quote the spec; explicitly exclude the GL_BITMAP case to make code more readable. (comments from Ian) Signed-off-by: Yuanhan Liu yuanhan@linux.intel.com --- src/mesa/main/pbo.c | 12 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/src/mesa/main/pbo.c b/src

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

2011-10-13 Thread Yuanhan Liu
On Thu, Oct 13, 2011 at 09:12:09PM -0700, Ian Romanick wrote: On 10/12/2011 08:34 PM, 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 height equal

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

2011-10-13 Thread Yuanhan Liu
. (the sampler is alread memset to 0 by the xxx_update_samper_state caller, so need to assign 0 first) Signed-off-by: Yuanhan Liu yuanhan@linux.intel.com --- src/mesa/drivers/dri/i965/brw_defines.h |7 +++ src/mesa/drivers/dri/i965/brw_wm_sampler_state.c |9

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

2011-10-12 Thread Yuanhan Liu
tex address. This will break the one texel for one pixel rule in this case. Thus the linear result is taken, with tiny error. This patch would fix several oglc pbo subcase fail on both ILK, SNB and IVB. Signed-off-by: Yuanhan Liu yuanhan@linux.intel.com --- src/mesa/drivers/dri/i965

[Mesa-dev] [PATCH] mesa: do not define NDEBUG to make sure assert work

2011-10-08 Thread Yuanhan Liu
If you include mtypes.h, which would define macro NDEBUG, before including compiler.h, you would find that the assert macro will no longer work; it just make it slient by replacing it with ((void) (0)); Signed-off-by: Yuanhan Liu yuanhan@linux.intel.com --- src/mesa/main/mtypes.h |3

Re: [Mesa-dev] [PATCH] mesa: do not define NDEBUG to make sure assert work

2011-10-08 Thread Yuanhan Liu
On Sat, Oct 08, 2011 at 02:17:29AM -0700, Kenneth Graunke wrote: On 10/08/2011 02:08 AM, Yuanhan Liu wrote: If you include mtypes.h, which would define macro NDEBUG, before including compiler.h, you would find that the assert macro will no longer work; it just make it slient by replacing

Re: [Mesa-dev] [PATCH] intel: fix potential segfault error at intel_(un)map_texture_image

2011-09-25 Thread Yuanhan Liu
On Fri, Sep 23, 2011 at 10:06:52AM -0700, Eric Anholt wrote: On Thu, 15 Sep 2011 16:02:49 +0800, Yuanhan Liu yuanhan@linux.intel.com wrote: intel_image-mt might be NULL, say with border width set. It then would trigger a segfault at intel_map/unmap_texture_image function

Re: [Mesa-dev] [PATCH] intel: Remove pointless boolean return value from *_miptree_layout.

2011-09-22 Thread Yuanhan Liu
On Thu, Sep 08, 2011 at 09:14:08PM -0700, Kenneth Graunke wrote: i915_miptree_layout, i945_miptree_layout, and brw_miptree_layout always just return GL_TRUE, so there's really no point to it. Change them to void functions and remove the (dead) error checking code. Reviewed-by: Yuanhan Liu

Re: [Mesa-dev] [PATCH] intel: fix the wrong code to detect null texture.

2011-09-22 Thread Yuanhan Liu
On Thu, Sep 08, 2011 at 09:12:44PM -0700, Kenneth Graunke wrote: On 09/08/2011 07:56 PM, Yuanhan Liu wrote: There is already comments show how to detect a null texture. Fix the code to match the comments. This would fix the oglc divzero(basic.texQOrWEqualsZero) and divzero

Re: [Mesa-dev] [PATCH] intel: fix potential segfault error at intel_(un)map_texture_image

2011-09-22 Thread Yuanhan Liu
On Thu, Sep 15, 2011 at 04:02:49PM +0800, Yuanhan Liu wrote: intel_image-mt might be NULL, say with border width set. It then would trigger a segfault at intel_map/unmap_texture_image function. This would fix the oglc misctest(basic.textureBorderIgnore) fail. Hello, any comments

Re: [Mesa-dev] [RFC] [PATCH 1/2] mesa: let GL3 buf obj queries not depend on opengl major version

2011-09-22 Thread Yuanhan Liu
On Mon, Sep 19, 2011 at 06:25:54PM +0800, Yuanhan Liu wrote: If I understand correctly, the new GL3 buffer object queries parameters, like BUFFER_MAP_ACCESS_FLAGS, depends on ARB_map_buffer_range extension. Hello, Any more comments? BTW, it doesn't make sense for me that we can set

Re: [Mesa-dev] [PATCH] intel: fix the wrong code to detect null texture.

2011-09-22 Thread Yuanhan Liu
On Thu, Sep 22, 2011 at 10:26:37PM -0700, Eric Anholt wrote: On Fri, 23 Sep 2011 11:09:14 +0800, Yuanhan Liu yuanhan@linux.intel.com wrote: On Thu, Sep 08, 2011 at 09:12:44PM -0700, Kenneth Graunke wrote: On 09/08/2011 07:56 PM, Yuanhan Liu wrote: There is already comments show how

Re: [Mesa-dev] [PATCH 1/8] mesa: fix error handling for glBegin

2011-09-20 Thread Yuanhan Liu
On Tue, Sep 20, 2011 at 08:51:26AM -0600, Brian Paul wrote: On 09/20/2011 08:36 AM, Brian Paul wrote: On 09/19/2011 08:39 PM, Yuanhan Liu wrote: On Mon, Sep 19, 2011 at 08:09:09AM -0600, Brian Paul wrote: On 09/19/2011 01:02 AM, Yuanhan Liu wrote: According to opengl spec, trigger

Re: [Mesa-dev] [PATCH] mesa: check glBegin()/glDrawArrays()/etc mode with _mesa_valid_prim_mode()

2011-09-20 Thread Yuanhan Liu
the mode validation after the if(ctx-NewState) code block to make sure the previous states are updated? Thanks, Yuanhan Liu if (ctx-NewState) { _mesa_update_state( ctx ); -- 1.7.3.4 ___ mesa-dev mailing list mesa-dev

Re: [Mesa-dev] [PATCH] mesa: check glBegin()/glDrawArrays()/etc mode with _mesa_valid_prim_mode()

2011-09-20 Thread Yuanhan Liu
On Tue, Sep 20, 2011 at 08:30:07PM -0600, Brian Paul wrote: On Tue, Sep 20, 2011 at 7:54 PM, Yuanhan Liu yuanhan@linux.intel.com wrote: On Tue, Sep 20, 2011 at 08:51:45AM -0600, Brian Paul wrote: From: Brian Paul bri...@vmware.com We now raise an GL_INVALID_ENUM in glBegin() if mode

[Mesa-dev] [PATCH 0/8] fix error handling for some gl functions

2011-09-19 Thread Yuanhan Liu
The following patchs fixed some error handling for some gl functions. Yuanhan Liu (8): mesa: fix error handling for glBegin mesa: fix error handling for glEvalMesh1/2D mesa: fix error handling for some glGet* functions mesa: fix error handling for glTexEnv mesa: fix error handling

[Mesa-dev] [PATCH 1/8] mesa: fix error handling for glBegin

2011-09-19 Thread Yuanhan Liu
According to opengl spec, trigger GL_INVALID_ENUM error if mode is not one of those valid primitive mode while calling glBegin. Signed-off-by: Yuanhan Liu yuanhan@linux.intel.com --- src/mesa/vbo/vbo_exec_api.c | 24 1 files changed, 24 insertions(+), 0 deletions

[Mesa-dev] [PATCH 2/8] mesa: fix error handling for glEvalMesh1/2D

2011-09-19 Thread Yuanhan Liu
According man page, trigger error when calling glEvalMesh1/2D inside glBegin/glEnd. Signed-off-by: Yuanhan Liu yuanhan@linux.intel.com --- src/mesa/main/api_noop.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/src/mesa/main/api_noop.c b/src/mesa/main/api_noop.c

[Mesa-dev] [PATCH 3/8] mesa: fix error handling for some glGet* functions

2011-09-19 Thread Yuanhan Liu
According to the man page, it should trigger a GL_INVALID_OPERATION while calling some glGet* functions inside glBegin and glEnd. This patch dose handle the following functions: glGetBooleanv glGetFloatv glGetIntegerv glGetInteger64v glGetDoublev Signed-off-by: Yuanhan Liu yuanhan

[Mesa-dev] [PATCH 4/8] mesa: fix error handling for glTexEnv

2011-09-19 Thread Yuanhan Liu
Fix error handling while calling glTexEnv with invalid texture environment parameters. Signed-off-by: Yuanhan Liu yuanhan@linux.intel.com --- src/mesa/main/texenv.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/src/mesa/main/texenv.c b/src/mesa/main/texenv.c

[Mesa-dev] [PATCH 5/8] mesa: fix error handling for glIsEnabled

2011-09-19 Thread Yuanhan Liu
According the man page, GL_INVALID_OPERATION should be generated if glIsEnabled is executed betwwen the execution of glBegin and the correspoding execution of glEnd. Signed-off-by: Yuanhan Liu yuanhan@linux.intel.com --- src/mesa/main/enable.c |2 ++ 1 files changed, 2 insertions(+), 0

[Mesa-dev] [PATCH 6/8] mesa: fix error handling for glMaterial*

2011-09-19 Thread Yuanhan Liu
Trigger GL_INVALID_ENUM error if the face paramter is not a valid value. Trigger GL_INVALID_VALUE error if the GL_SHININESS value is out side [0,128]. Signed-off-by: Yuanhan Liu yuanhan@linux.intel.com --- src/mesa/vbo/vbo_attrib_tmp.h | 10 +- 1 files changed, 9 insertions(+), 1

[Mesa-dev] [PATCH 7/8] mesa: fix error handling for glPixelZoom

2011-09-19 Thread Yuanhan Liu
According the man page, GL_INVALID_OPERATION should generated if glPixelZoom is executed between the execution of glBegin and the corresponding execution of glEnd. Signed-off-by: Yuanhan Liu yuanhan@linux.intel.com --- src/mesa/main/pixel.c |2 ++ 1 files changed, 2 insertions(+), 0

[Mesa-dev] [PATCH 8/8] mesa: fix error handling for glSelectBuffer

2011-09-19 Thread Yuanhan Liu
According the man page, trigger a GL_INVALID_VALUE if size 0. Signed-off-by: Yuanhan Liu yuanhan@linux.intel.com --- src/mesa/main/feedback.c |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/src/mesa/main/feedback.c b/src/mesa/main/feedback.c index 597ec1e

[Mesa-dev] [RFC] [PATCH 1/2] mesa: let GL3 buf obj queries not depend on opengl major version

2011-09-19 Thread Yuanhan Liu
If I understand correctly, the new GL3 buffer object queries parameters, like BUFFER_MAP_ACCESS_FLAGS, depends on ARB_map_buffer_range extension. Signed-off-by: Yuanhan Liu yuanhan@linux.intel.com --- src/mesa/main/bufferobj.c | 12 ++-- 1 files changed, 6 insertions(+), 6

[Mesa-dev] [PATCH 2/2] mesa: fix error handling for glMapBufferRange

2011-09-19 Thread Yuanhan Liu
Accroding the man page, GL_INVALID_VALUE would generated if access has any bits set other than those valid defined bits. Signed-off-by: Yuanhan Liu yuanhan@linux.intel.com --- src/mesa/main/bufferobj.c | 10 ++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/src

Re: [Mesa-dev] [RFC] [PATCH 1/2] mesa: let GL3 buf obj queries not depend on opengl major version

2011-09-19 Thread Yuanhan Liu
On Mon, Sep 19, 2011 at 09:17:42AM -0700, Ian Romanick wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 09/19/2011 07:20 AM, Brian Paul wrote: On 09/19/2011 04:25 AM, Yuanhan Liu wrote: If I understand correctly, the new GL3 buffer object queries parameters, like

Re: [Mesa-dev] [PATCH 2/2] mesa: fix error handling for glMapBufferRange

2011-09-19 Thread Yuanhan Liu
On Mon, Sep 19, 2011 at 11:54:44AM -0700, Eric Anholt wrote: On Mon, 19 Sep 2011 18:25:55 +0800, Yuanhan Liu yuanhan@linux.intel.com wrote: Accroding the man page, GL_INVALID_VALUE would generated if access has any bits set other than those valid defined bits. Signed-off-by: Yuanhan

Re: [Mesa-dev] [PATCH 6/8] mesa: fix error handling for glMaterial*

2011-09-19 Thread Yuanhan Liu
On Mon, Sep 19, 2011 at 08:08:18AM -0600, Brian Paul wrote: On 09/19/2011 01:03 AM, Yuanhan Liu wrote: Trigger GL_INVALID_ENUM error if the face paramter is not a valid value. Trigger GL_INVALID_VALUE error if the GL_SHININESS value is out side [0,128]. Signed-off-by: Yuanhan Liuyuanhan

Re: [Mesa-dev] [PATCH 1/8] mesa: fix error handling for glBegin

2011-09-19 Thread Yuanhan Liu
On Mon, Sep 19, 2011 at 08:09:09AM -0600, Brian Paul wrote: On 09/19/2011 01:02 AM, Yuanhan Liu wrote: According to opengl spec, trigger GL_INVALID_ENUM error if mode is not one of those valid primitive mode while calling glBegin. Signed-off-by: Yuanhan Liuyuanhan@linux.intel.com

[Mesa-dev] [PATCH] mesa: fix error handling for glMaterial*

2011-09-19 Thread Yuanhan Liu
Trigger GL_INVALID_ENUM error if the face paramter is not a valid value. Trigger GL_INVALID_VALUE error if the GL_SHININESS value is out side [0, ctx-Constant.MaxShiniess]. v2: fix the max shininess value. Signed-off-by: Yuanhan Liu yuanhan@linux.intel.com --- src/mesa/vbo/vbo_attrib_tmp.h

Re: [Mesa-dev] [PATCH 1/2] i965: Add missing _NEW_POLYGON flag to polygon stipple upload.

2011-09-19 Thread Yuanhan Liu
On Mon, Sep 19, 2011 at 09:31:36AM -0700, Eric Anholt wrote: Because we skip the pattern upload when stippling is disabled, we need to check again when it might have been turned on. Reviewed-by: Yuanhan Liu yuanhan@linux.intel.com --- src/mesa/drivers/dri/i965/brw_misc_state.c |4

[Mesa-dev] [PATCH] mesa: fix error handling for glMaterial*

2011-09-19 Thread Yuanhan Liu
duplicate. Also, refactor the error message. Signed-off-by: Yuanhan Liu yuanhan@linux.intel.com --- src/mesa/vbo/vbo_attrib_tmp.h | 13 - 1 files changed, 12 insertions(+), 1 deletions(-) diff --git a/src/mesa/vbo/vbo_attrib_tmp.h b/src/mesa/vbo/vbo_attrib_tmp.h index 65717eb

Re: [Mesa-dev] [PATCH] mesa: fix error handling for glMaterial*

2011-09-19 Thread Yuanhan Liu
On Mon, Sep 19, 2011 at 09:25:54PM -0600, Brian Paul wrote: On Mon, Sep 19, 2011 at 9:16 PM, Yuanhan Liu yuanhan@linux.intel.com wrote: Trigger GL_INVALID_ENUM error if the face paramter is not a valid value. Trigger GL_INVALID_VALUE error if the GL_SHININESS value is out side [0

[Mesa-dev] [PATCH] intel: fix potential segfault error at intel_(un)map_texture_image

2011-09-15 Thread Yuanhan Liu
intel_image-mt might be NULL, say with border width set. It then would trigger a segfault at intel_map/unmap_texture_image function. This would fix the oglc misctest(basic.textureBorderIgnore) fail. Signed-off-by: Yuanhan Liu yuanhan@linux.intel.com --- src/mesa/drivers/dri/intel

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

2011-09-14 Thread Yuanhan Liu
. Signed-off-by: Yuanhan Liu yuanhan@linux.intel.com --- src/mesa/main/dlist.c |9 + src/mesa/main/pack.c | 27 ++- 2 files changed, 19 insertions(+), 17 deletions(-) diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c index 6e075b4..21840e6 100644

Re: [Mesa-dev] [RFC] [PATCH 2/2] i965: setup the edge flag enable bit in VE on SNB+

2011-09-13 Thread Yuanhan Liu
On Fri, Sep 09, 2011 at 10:08:38AM -0700, Eric Anholt wrote: On Fri, 9 Sep 2011 13:21:57 +0800, Yuanhan Liu yuanhan@linux.intel.com wrote: On Thu, Sep 08, 2011 at 09:25:30PM -0700, Kenneth Graunke wrote: On 09/08/2011 06:59 PM, Yuanhan Liu wrote: On Thu, Sep 08, 2011 at 08:39:46AM

[Mesa-dev] [PATCH] intel: fix null 1D texture handling

2011-09-08 Thread Yuanhan Liu
. This would fix the oglc divzero(basic.texQOrWEqualsZero) and divzero(basic.texTrivialPrim) test case fail. Signed-off-by: Yuanhan Liu yuanhan@linux.intel.com --- src/mesa/drivers/dri/intel/intel_tex_layout.c | 12 1 files changed, 12 insertions(+), 0 deletions(-) diff --git

Re: [Mesa-dev] [PATCH] intel: fix null 1D texture handling

2011-09-08 Thread Yuanhan Liu
On Thu, Sep 08, 2011 at 01:16:23PM -0700, Ian Romanick wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 09/08/2011 03:16 AM, Yuanhan Liu wrote: If user call glTexImage1D with width = 0 and height = 0(the last level) like this: glTexImage1D(GL_TEXTURE_1D, level, interfomart, 0, 0

[Mesa-dev] [PATCH] intel: fix the wrong code to detect null texture.

2011-09-08 Thread Yuanhan Liu
There is already comments show how to detect a null texture. Fix the code to match the comments. This would fix the oglc divzero(basic.texQOrWEqualsZero) and divzero(basic.texTrivialPrim) test case fail. Signed-off-by: Yuanhan Liu yuanhan@linux.intel.com --- src/mesa/drivers/dri/intel

Re: [Mesa-dev] [PATCH] intel: fix the wrong code to detect null texture.

2011-09-08 Thread Yuanhan Liu
On Fri, Sep 09, 2011 at 10:56:36AM +0800, Yuanhan Liu wrote: There is already comments show how to detect a null texture. Fix the code to match the comments. This would fix the oglc divzero(basic.texQOrWEqualsZero) and divzero(basic.texTrivialPrim) test case fail. Signed-off-by: Yuanhan

Re: [Mesa-dev] [PATCH] intel: fix the wrong code to detect null texture.

2011-09-08 Thread Yuanhan Liu
On Thu, Sep 08, 2011 at 09:12:44PM -0700, Kenneth Graunke wrote: On 09/08/2011 07:56 PM, Yuanhan Liu wrote: There is already comments show how to detect a null texture. Fix the code to match the comments. This would fix the oglc divzero(basic.texQOrWEqualsZero) and divzero

Re: [Mesa-dev] [RFC] [PATCH 2/2] i965: setup the edge flag enable bit in VE on SNB+

2011-09-08 Thread Yuanhan Liu
On Thu, Sep 08, 2011 at 09:25:30PM -0700, Kenneth Graunke wrote: On 09/08/2011 06:59 PM, Yuanhan Liu wrote: On Thu, Sep 08, 2011 at 08:39:46AM -0700, Eric Anholt wrote: On Thu, 8 Sep 2011 11:00:52 +0800, Yuanhan Liu yuanhan@linux.intel.com wrote: BTW, this patch fix the oglc pntrast

[Mesa-dev] [RFC] [PATCH 2/2] i965: setup the edge flag enable bit in VE on SNB+

2011-09-07 Thread Yuanhan Liu
format. This patch did 1, 2, but didn't do 3, 4. As it simply seems wrong to me just change the last vetex element's component setting and source element format. Thoughts? BTW, this patch fix the oglc pntrast fail on SNB(haven't tested it on IVB yet). Signed-off-by: Yuanhan Liu yuanhan

[Mesa-dev] [PATCH] i965: fix the constant interp bitmask for flat mode

2011-09-05 Thread Yuanhan Liu
Fix the constant interpolation enable bit mask for flat light mode. FRAG_BIT_COL0 attribute bit might be 0, in which case we need to shift one more bit right. This would fix the oglc specularColor test fail on both Sandybridge and Ivybridge. Signed-off-by: Yuanhan Liu yuanhan@linux.intel.com

[Mesa-dev] [PATCH] i965: fix the constant interp bitmask for flat mode

2011-09-05 Thread Yuanhan Liu
into for(; attr FRAG_ATTRIB_MAX; attr++) loop suggested by Eric. Signed-off-by: Yuanhan Liu yuanhan@linux.intel.com Signed-off-by: Xiang, Haihao haihao.xi...@intel.com --- src/mesa/drivers/dri/i965/gen6_sf_state.c | 19 +-- src/mesa/drivers/dri/i965/gen7_sf_state.c | 19

<    1   2