On Fri, Dec 20, 2013 at 9:21 PM, Ian Romanick <i...@freedesktop.org> wrote: > > I think there are two ways a driver could implement this function, and I > suspect that drivers for UMA systems may dynamically switch between the > two. I'm pretty sure the i965 driver will, anyway. > > A driver could implement this using a blitter-based or CPU-based memcpy > function. In that case, having a pointer to raw data in the destination > format is what you would want. > > A driver could also implement this using a blitter-based or render-based > clear function. That is, they'd wrap the buffer object in a fake > surface and do whatever is done for glClearBuffer*. I had originally > thought you'd want the internalformat in that case, but after discussing > a number of implementation strategies with Ken, I don't think it's > actually needed. > > I also support Marek's suggestion. > > For the record, the possible implementation strategies Ken and I discussed: > > - Repeating memcpy on the CPU. > > - Using the blit engine with clever source strides. > > - Using the render engine with some sort of uint outputs of raw bits. > > - Using transform feedback with some sort of uint outputs of raw bits.
We use DMA (memset on the GPU) for clearValueSize <= 4 and transform feedback in the other cases. The latter sets the clear value as a vertex with a stride of zero. Marek _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev