[Mesa-dev] [PATCH 0.1/2] mesa: Add new variables in gl_context to store sample number layout

Jordan Justen jljusten at gmail.com
Fri Sep 26 12:50:50 PDT 2014


On Tue, Sep 23, 2014 at 5:38 PM, Anuj Phogat <anuj.phogat at gmail.com> wrote:
> Variables are used in later patches to implement
> EXT_framebuffer_multisample_blit_scaled extension.
>
> Signed-off-by: Anuj Phogat <anuj.phogat at gmail.com>
> ---
>  src/mesa/main/mtypes.h | 9 +++++++++
>  1 file changed, 9 insertions(+)
>
> diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
> index 0d50be8..1cb3461 100644
> --- a/src/mesa/main/mtypes.h
> +++ b/src/mesa/main/mtypes.h
> @@ -3608,6 +3608,15 @@ struct gl_constants
>     GLint MaxDepthTextureSamples;
>     GLint MaxIntegerSamples;
>
> +   /**
> +    * Layout of sample numbers in a rectangular grid roughly corresponding
> +    * to real sample locations within a pixel. Used by
> +    * GL_EXT_texture_multisample_blit_scaled implementation.
> +    */
> +   GLchar* sample_map_2x;
> +   GLchar* sample_map_4x;
> +   GLchar* sample_map_8x;

I think this would be better:
   uint8_t SampleMap2x[2];

Using a string here seems confusing. The meta code can use asprintf to
build the string.

The CamelCase name seems to follow the convention of this structure.

uint8_t doesn't follow the convection of the structure. :) (But, Ian
seems to often try to move us away from GL types when not API facing.)

Do you think the comment could be improved to help drivers understand
the purpose of the constants? The comment in the 0.2 patch was pretty
clear, but it is i965 specific.

If you agree to my suggestions, then you should probably send out all
4 patches as a series.

-Jordan

>     /** GL_ARB_shader_atomic_counters */
>     GLuint MaxAtomicBufferBindings;
>     GLuint MaxAtomicBufferSize;
> --
> 1.9.3
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list