[Mesa-dev] [PATCH] Allow glTexImage2D with a depth component cube map

Chad Versace chad.versace at linux.intel.com
Fri Nov 18 14:15:18 PST 2011


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 11/16/2011 07:56 PM, Anuj Phogat wrote:
> From: Anuj Phogat <anuj.phogat at gmail.com>
> 
> Hi,
> 
> Here is a patch to allow glTexImage2D and glCopyTexImage2D with depth component cubemap.
> It is listed in mesa work queue with a label "CUBE1". I've tested the patch and output looks visually correct. 
> Please review the fix and let me know if i'm missing something.
> 
> Thanks
> Anuj
> ---
>  src/mesa/main/teximage.c |   10 ++++++++--
>  1 files changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
> index acf7187..81f75c8 100644
> --- a/src/mesa/main/teximage.c
> +++ b/src/mesa/main/teximage.c
> @@ -1596,7 +1596,7 @@ texture_error_check( struct gl_context *ctx,
>  
>     /* additional checks for depth textures */
>     if (_mesa_base_tex_format(ctx, internalFormat) == GL_DEPTH_COMPONENT) {
> -      /* Only 1D, 2D, rect and array textures supported, not 3D or cubes */
> +      /* Only 1D, 2D, rect, array and cube textures are supported, not 3D*/
>        if (target != GL_TEXTURE_1D &&
>            target != GL_PROXY_TEXTURE_1D &&
>            target != GL_TEXTURE_2D &&
> @@ -1606,7 +1606,13 @@ texture_error_check( struct gl_context *ctx,
>            target != GL_TEXTURE_2D_ARRAY &&
>            target != GL_PROXY_TEXTURE_2D_ARRAY &&
>            target != GL_TEXTURE_RECTANGLE_ARB &&
> -          target != GL_PROXY_TEXTURE_RECTANGLE_ARB) {
> +          target != GL_PROXY_TEXTURE_RECTANGLE_ARB &&
> +	  target != GL_TEXTURE_CUBE_MAP_POSITIVE_X &&
> +	  target != GL_TEXTURE_CUBE_MAP_NEGATIVE_X &&
> +	  target != GL_TEXTURE_CUBE_MAP_POSITIVE_Y &&
> +          target != GL_TEXTURE_CUBE_MAP_NEGATIVE_Y &&
> +	  target != GL_TEXTURE_CUBE_MAP_POSITIVE_Z &&
> +	  target != GL_TEXTURE_CUBE_MAP_NEGATIVE_Z) {
>           if (!isProxy)
>              _mesa_error(ctx, GL_INVALID_ENUM,
>                          "glTexImage(target/internalFormat)");


Anuj, the patch looks good, except that the lines are not vertically aligned.
Could you resubmit this with the alignment fixed?

To highlight hard tabs in vim, the magic invocation is `:set list`.

Also, could you share that test with us?

- ----
Chad Versace
chad.versace at linux.intel.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJOxtjzAAoJEAIvNt057x8iR2EQAJsNSps6eJ/pPipE4/AQS3nU
WDYIuvNUMXwKWXcduJWu3MdMtCj33owDXU1kg3zWQ0bqHfHqXywBtXE9Cb9oU40P
SAsyygLNDIajwD1VnxpL+NxSyZ3JLTlVk16MjOQrxfzPB1yzI1hL7sdc42ZvYmQl
8r0F9Z/zxnlvRa8jys76z1DGJg9f7R68hRYtvkzu7AZd1mlDKHzgyIFvUFAgKTm2
5pzCiCf47KPezPgTPPbWMPpOgez8haeWuqnowyVudpAdUuAVu7pA31VVvhiuQBZk
lj+RgTvEPs1CCvEmrFwlfZpTparyn946EekR8ClmrQ8x9c5oV+z1wGFE4tON3ghf
IhoDXSqJw+76tqTUVDFO0b/BwQSu+HHlDxRuRiccq102AP9I8xOPfwHP/ZxeuS7E
O7PcqYTvziBWXWydNhVo1IxWN/FOgH4tj5FJwhxwCtvgB8jujk63XvkeT5nPoWxn
DqYOUBC2DsXkjwI6gWRSS+b2OvcRt/UlyE4wgLmvjDe+m9JS2VZFqgzaUqgd4TJH
D0uNFRvlptFfzU1LiM+MDnxDgvqsB86HvSw4idEFkKuMgGWxtDZn94IczJ5OiEyn
7P/0HiJXaYW0EcmF1/y/OO1ZljxhJ0w77MRBLCYiJFnLHgYHEDnjRBBM+i+b/V5x
P8pYjx+DDbR0DZs5pmHQ
=MS0g
-----END PGP SIGNATURE-----


More information about the mesa-dev mailing list