i trying cross card communication cuda running on k20 , opengl running on quadro seem unable register texture want use cuda.
my code looks this
glgentextures(1, &texid); glbindtexture(gl_texture_2d, texid); glteximage2d(gl_texture_2d, 0, gl_rgba, texturesize, texturesize, 0, gl_rgba, gl_unsigned_byte, 0); glbindtexture(gl_texture_2d, 0); checkglerror(); // passes // cause access violation when run visual studio 10 debugger cudagraphicsglregisterimage(&texres, texid, gl_texture_2d,cudagraphicsregisterflagsnone); // if ran out debugger, cudageterrorstring() spit out "invalid argument" checkcudaerror();
cudagraphicsglregisterimage causes access violation when run visual studio 10 debugger
but...
if ran out debugger, cudageterrorstring() spit out "invalid argument"
i not sure problem , made more confusing different error messages.
well seem have figured out wrong changed line...
glteximage2d(gl_texture_2d, 0, gl_rgba, texturesize, texturesize, 0, gl_rgba, gl_unsigned_byte, 0);
to...
glteximage2d (gl_texture_2d, 0, gl_rgba8, texturesize, texturesize, 0, gl_rgba, gl_unsigned_byte, 0);
i not sure why cuda has problem gl_rgba seems case.
Comments
Post a Comment