Doesn't this make two DRI2GetBuffers protocol calls, in case of a resize?

A way to avoid this would be to have the first call update the
sequence number and store the buffer names (also destroying textures
whose names have changed), and the second call actually creating
textures for these names.

The cleanest way seems to me to split validate into an "update" part
(with only a sequence number and dimensions output)s and a "get
textures" part (with only a textures output). Or alternatively taking
the sequence number as input as I did.

Something like:
dri2_surface_update(struct native_surface *nsurf,
                              const enum native_attachment *natts,
                              unsigned num_natts,
                             unsigned int *seq_num,
                              int *width, int *height);

dri2_surface_get_textures(struct native_surface *nsurf,
                              const enum native_attachment *natts,
                              unsigned num_natts, struct pipe_texture
**textures);

The alternative is to have validate not call DRI2GetBuffers if
textures is not null or when given an additional flag, but that seems
more hacky.

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Mesa3d-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to