[PyCUDA] OpenGL missing feature
lists at informa.tiker.net
Wed Mar 9 13:56:50 PST 2011
On Tue, 08 Mar 2011 22:10:37 +0100, "=?UTF-8?B?VG9tYXN6IFJ5YmFr?=" <bogomips at post.pl> wrote:
> Some time ago I have sent new-style OpenGL wrapper. Don't worry, it works.
> But recently I have been working on new program and noticed that new-style
> OpenGL wrapper requires calling separate functions when mapping buffer and
> surface objects. When mapping ordinary textures, they are treated as
> surfaces, when texture is backed by a buffer, one can just map buffer -
> and this is how I missed this function during testing functionality of
> wrapper. I attach the patch that adds needed function (it also removes old
> comment about missing feature).
> Few problems with current situation (even after applyting this patch):
> 1. Programmer needs to remember which mapping contains surface and which
> contains buffer. Would it be better to create separete classes that
> would deal with those cases separately? Even if so, could you Andreas
> apply this patch (to have fully working OpenGL wrapper) and deal with
> changes in API later?
I don't see a big need. IIUC, the only difference would be who generates
the error message--the CUDA implementation or PyCUDA. And in this case,
I prefer letting CUDA do the complaining.
> 2. CUDA API returns CUarray. So far the only way of accessing it in PyCUDA
> is through GPUArray, but when attaching to CUarray GPUArray creates new
> object; we need ability to attach to existing CUarray without changing it.
> Sorry for missing this so far. The only explanation is that accessing bare
> textures in CUDA
> is not used very often - especially as noone has complained about this
> missing feature so far :-)
Applied (with minor fixes), thanks!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: not available
More information about the PyCUDA