mesa: complete the GL_TEXTURE_SWIZZLE* setup
authorYuanhan Liu <yuanhan.liu@linux.intel.com>
Fri, 21 Oct 2011 03:27:25 +0000 (11:27 +0800)
committerYuanhan Liu <yuanhan.liu@linux.intel.com>
Thu, 3 Nov 2011 02:19:49 +0000 (10:19 +0800)
commit77cd3bf18d509dcbb2f121e4082027f4048ca623
tree68580a7f7487b3760314c1fb657534eac225beef
parentd9f05ac828986a2fcdca9fcae29d76f79847d8d3
mesa: complete the GL_TEXTURE_SWIZZLE* setup

The ARB_texture_swizzle spec says:
    The error INVALID_OPERATION is generated if TexParameteri,
    TexParameterf, TexParameteriv, or TexParameterfv, parameter <pname>
    is TEXTURE_SWIZZLE_R, TEXTURE_SWIZZLE_G,  TEXTURE_SWIZZLE_B,
    or TEXTURE_SWIZZLE_A, and <param> is not RED, GREEN, BLUE, ALPHA,
    ZERO, or ONE.

    The error INVALID_OPERATION is generated if TexParameteriv, or
    TexParameterfv, parameter <pname> TEXTURE_SWIZZLE_RGBA, and the four
    consecutive values pointed to by <param> are not all RED, GREEN, BLUE,
    ALPHA, ZERO, or ONE.

So, the GL_TEXTURE_SWIZZLE* pname is legal for glTexParameterf(v)

NOTE: this is a candidate for the 7.11 branch

Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/mesa/main/texparam.c