[MPlayer-dev-eng] vo_gl PBO patch ..

Matthias Hopf mat at mshopf.de
Tue Jun 10 18:47:59 CEST 2008


I'm pretty late about this, but you're probably still interrested.

On May 03, 08 15:10:17 +0200, Reimar Döffinger wrote:
> > DMA can be any memory transfer not handled by the CPU in PIO mode.
> > On a system, there are many DMA controller available.
> > 
> > The GPU one usually is able to handle:
> > 	GPUMem <-> SystemMem
> > 	GPUMem <-> GPUMem
> 
> Where did you get this information from? I don't see much sense and

ScreenToScreenCopy, EXT_pimap_to_texture, glCopyTexImage2D etc. use the
GPU's DMA engine for that.
GPU's can even DMA from memory to register space in some occasions...

> quite a few technical problems for a GPU memory to GPU memory DMA engine
> (unless you count the GPU itself as a DMA engine).

The GPU *has* a DMA engine, it's only a small part of it.

> > maybe even (AMD GPU's can do this for sure):
> > 	SystemMem <-> SystemMem
> Huh? Why would they implement that, doing memory to memory copies over
> the PCIe bus? That would be really slow...

1st) Consistency (you don't have to check pointers first)
2nd) Textures might be tiled (e.g. in AGP memory) and you might want to
     access them in an untiled manner

> > The system memory controller under some architectures is able to do the same,
> > at least SystemMem <-> SystemMem.

Typically not for PCs.

> For all I know, there actually is not guarantee that PBO transfer
> operations will use DMA. They usually will, but e.g. if you create so
> many PBOs that they no longer fit in the DMA area they will use normal
> copy. Though it might be that the problem of fixed-size DMA areas
> has been finally solved, I haven't paid attention to that, and there
> certainly are enough possible solutions.

The main source of confusion is that nowadays memcpy *can* be faster
than DMA in some cases, if setting up the DMA engine (and potentially
converting data) is slow... Typically, for texture uploads at least one
memcpy is always involved. But typically in WriteBack or
WriteThrough/WriteCombined memory, which might be faster than the mapped
frame buffer. Might.

Better to not argue about DMA or not, but used total and processor time.

CU

Matthias

-- 
Matthias Hopf <mhopf at suse.de>      __        __   __
Maxfeldstr. 5 / 90409 Nuernberg   (_   | |  (_   |__          mat at mshopf.de
Phone +49-911-74053-715           __)  |_|  __)  |__  R & D   www.mshopf.de



More information about the MPlayer-dev-eng mailing list