[Mesa-dev] [PATCH 9/9] intel: Enable GL_ARB_internalformat_query

Eric Anholt eric at anholt.net
Thu Dec 20 17:20:37 PST 2012


Ian Romanick <idr at freedesktop.org> writes:

> From: Ian Romanick <ian.d.romanick at intel.com>
>
> Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
> ---
>  src/mesa/drivers/dri/i965/brw_context.c       | 23 +++++++++++++++++++++++
>  src/mesa/drivers/dri/intel/intel_extensions.c |  1 +
>  2 files changed, 24 insertions(+)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c
> index df0f8d6..eb8de1f 100644
> --- a/src/mesa/drivers/dri/i965/brw_context.c
> +++ b/src/mesa/drivers/dri/i965/brw_context.c
> @@ -58,6 +58,28 @@
>   * Mesa's Driver Functions
>   ***************************************/
>  
> +static size_t
> +brw_query_samples_for_format(struct gl_context *ctx, GLenum internalFormat,
> +                             int samples[16])
> +{
> +   struct intel_context *intel = intel_context(ctx);
> +
> +   switch (intel->gen) {
> +   case 7:
> +      samples[0] = 8;
> +      samples[1] = 4;
> +      return 2;
> +
> +   case 6:
> +      samples[0] = 4;
> +      return 1;
> +
> +   default:
> +      samples[0] = 1;
> +      return 1;
> +   }
> +}

This might more appropriately live next to intel_quantize_num_samples(),
especially since the extension is being turned on for gen2/3 as well.
-------------- 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/20121220/321b44e5/attachment.pgp>


More information about the mesa-dev mailing list