Ian Romanick <i...@freedesktop.org> writes:

> From: Ian Romanick <ian.d.roman...@intel.com>
>
> Signed-off-by: Ian Romanick <ian.d.roman...@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.

Attachment: pgp2dfw94j4gt.pgp
Description: PGP signature

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to