[PyCUDA] OpenGL missing feature

Tomasz Rybak bogomips at post.pl
Tue Mar 8 13:10:37 PST 2011


Hello.
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?
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 :-)
Best regards
Tomasz Rybak
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gl.diff
Type: application/octet-stream
Size: 2264 bytes
Desc: not available
URL: <http://lists.tiker.net/pipermail/pycuda/attachments/20110308/192c7e9b/attachment.obj>


More information about the PyCUDA mailing list