[Mesa-dev] [PATCH 5/7] mesa: allow multisample texture targets in [Get]TexParameter*
Eric Anholt
eric at anholt.net
Mon Mar 18 09:22:13 PDT 2013
Chris Forbes <chrisf at ijw.co.nz> writes:
> ARB_texture_storage_multisample allows texture parameters to be
> queried for TEXTURE_2D_MULTISAMPLE and TEXTURE_2D_MULTISAMPLE_ARRAY
> targets.
>
> Some parameters may also be set, with the following exceptions:
>
> - TEXTURE_BASE_LEVEL may not be set to a nonzero value; generates
> INVALID_OPERATION
>
> - any state which appears in the `per-sampler` state table may not
> be set; generates INVALID_OPERATION
>
> @@ -348,6 +392,11 @@ set_tex_parameteri(struct gl_context *ctx,
> case GL_TEXTURE_MAX_LEVEL:
> if (texObj->MaxLevel == params[0])
> return GL_FALSE;
> +
> + if ((texObj->Target == GL_TEXTURE_2D_MULTISAMPLE ||
> + texObj->Target == GL_TEXTURE_2D_MULTISAMPLE_ARRAY) && params[0] != 0)
> + goto invalid_operation;
I don't see anything banning MAX_LEVEL != 0 -- it's not sampler state,
and it's not otherwise called out. On the other hand, there's no
useful thing you could do with MAX_LEVEL != 0, since it's a single-level
texture type.
I don't have an opinion either way, really.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20130318/46fcc706/attachment.pgp>
More information about the mesa-dev
mailing list