On Mon, 2 Jun 2003, Sottek, Matthew J wrote:

> 
> Let me preface my comment with "I don't know a lot about OGL" so some
> further clarification may be needed.
> 
> I am assuming that pbuffers are basically buffers that can be used
> as textures by OGL. I would then assume that the OGL driver would
> have some mapping of pbuffer id to the texture memory it represents,
> maybe this memory is in video memory maybe it has been "swapped out"
> so-to-speak by some texture manager etc.

   A pbuffer is a GLXDrawable like a window is.  You can make
current on it and draw to it.  The intention of pbuffers is that
they're always in hardware.


> 
> So basically this copies data from an XvMC offscreen surface to an
> OGL offscreen surface to be used by OGL for normal rendering purposes.
> Seems easy enough... I expect anyone doing XvMC would use the drm
> for the direct access (or their own drm equivalent) which would also
> be the same drm used for OGL and therefore whatever texture management
> needs to be done should be possible without much of a problem.
> 
> My main problem with the concept is that it seems that a copy is not
> always required, and is costly at 24fps. For YUV packed surfaces at
> least, an XvMC surface could be directly used as a texture. Some way
> to associate an XvMC surface with a pbuffer without a copy seems
> like something that would have a large performance gain.

   Can you use those non-power-of-two mpeg surfaces as normal
textures without limitations?  I don't think most hardware can
do that, some possibly can't at all.

   I expect binding an XvMC surface as a texture isn't implementable
without limitations on most hardware.  It also requires that OpenGL do
all the work for this since XvMC doesn't have access to OpenGL's texture
namespace.  It would also require cooperation between OpenGL and XvMC 
that makes me nervous.  OpenGL would have to make sure that XvMC's
Surface didn't go away while it was using it as a texture.  An
explict copy from the XvMCSurface to a pbuffer solves these problems
with the cost of the extra copy, which at least for my hardware,
isn't a big issue.

> Also, what is the goal exactly? 

   I am interested in getting mpeg into textures for the purpose
of incorporating into 3D scenes and video editing/post production.


                        Mark.

_______________________________________________
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel

Reply via email to