On Mon, Sep 29, 2014 at 7:16 PM, Jordan Justen <jljus...@gmail.com> wrote: > > On 2014-09-29 16:33:33, Anuj Phogat wrote: > > SampleMap{2,4,8}x variables are used in later patches to implement > > EXT_framebuffer_multisample_blit_scaled extension. > > > > V2: Use integer array instead of a string. > > Bump up the comment. > > > > Signed-off-by: Anuj Phogat <anuj.pho...@gmail.com> > > --- > > src/mesa/main/mtypes.h | 32 ++++++++++++++++++++++++++++++++ > > 1 file changed, 32 insertions(+) > > > > diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h > > index 0d50be8..162dc44 100644 > > --- a/src/mesa/main/mtypes.h > > +++ b/src/mesa/main/mtypes.h > > @@ -3608,6 +3608,38 @@ struct gl_constants > > GLint MaxDepthTextureSamples; > > GLint MaxIntegerSamples; > > > > + /** > > + * GL_EXT_texture_multisample_blit_scaled implementation assumes that > > + * samples are laid out in a rectangular grid roughly corresponding to > > + * sample locations within a pixel. Below SampleMap{2,4,8}x variables > > + * are used to map indices of rectangular grid to sample numbers within > > + * a pixel. This mapping of indices to sample numbers must be > > initialized > > + * by the driver for the target hardware. For example, if we have the 8X > > + * MSAA sample number layout (sample positions) for XYZ hardware: > > + * > > + * sample indices layout sample number layout > > + * --------- --------- > > + * | 0 | 1 | | a | b | > > + * --------- --------- > > + * | 2 | 3 | | c | d | > > + * --------- --------- > > + * | 4 | 5 | | e | f | > > + * --------- --------- > > + * | 6 | 7 | | g | h | > > + * --------- --------- > > + * > > + * Where a,b,c,d,e,f,g,h are integers between [0-7]. > > + * > > + * Then, initialize the SampleMap8x variable for XYZ hardware as shown > > + * below: > > + * SampleMap8x = {a, b, c, d, e, f, g, h}; > > + * > > + * Follow the logic for other sample counts. > > + */ > > + unsigned *SampleMap2x; > > + unsigned *SampleMap4x; > > + unsigned *SampleMap8x; > > Wouldn't uint8_t work given the 0-7 range? > Yes, that'll work. > Also, I thought we could include the bytes directly in the structure, > and let the driver write the bytes rather than setting a pointer to > the array. > > uint8_t SampleMap2x[2]; > uint8_t SampleMap4x[4]; > uint8_t SampleMap8x[8]; > I'll make the changes and send out a V4.
> -Jordan > > > /** GL_ARB_shader_atomic_counters */ > > GLuint MaxAtomicBufferBindings; > > GLuint MaxAtomicBufferSize; > > -- > > 1.9.3 > > _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev