You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to use DepthBuf as inputs for my use case. The code that I've written is similar to the gRenderKernel sample which actually is working correctly in my computer.
extern "C" __global__ void allocate_bricks (VDBInfo* gvdb, uchar chan, uchar4* outBuf )
{
int u = blockIdx.x * blockDim.x + threadIdx.x;
int v = blockIdx.y * blockDim.y + threadIdx.y;
printf("%d %d\n", scn.width, scn.height);
if ( u >= scn.width || v >= scn.height ) return;
// do something
}
And the problem that I'm facing is that width and height values of scn (ScnInfo) (can be used through macros SCN_WIDTH and SCN_HEIGHT) are 0, so this kernel is doing nothing. I've been reading the gvdb core to find some clues but now I'm more confused because actually when RenderKernel is called, PrepareRender is executed setting up mScnInfo and then transferring the new ScnInfo to device.
Then, does anyone know where I'm losing?
The text was updated successfully, but these errors were encountered:
Let me answer myself. I made a mistake, I forgot to add in host code part
gvdb.SetModule ( cuCustom );
This has made me realize how important is this member method to work with custom modules since actually this function synchronize global members in custom modules (.ptx).
Hi,
I'm trying to use DepthBuf as inputs for my use case. The code that I've written is similar to the gRenderKernel sample which actually is working correctly in my computer.
The host part looks like the following:
And the kernel part is like this:
And the problem that I'm facing is that width and height values of scn (ScnInfo) (can be used through macros SCN_WIDTH and SCN_HEIGHT) are 0, so this kernel is doing nothing. I've been reading the gvdb core to find some clues but now I'm more confused because actually when RenderKernel is called, PrepareRender is executed setting up mScnInfo and then transferring the new ScnInfo to device.
Then, does anyone know where I'm losing?
The text was updated successfully, but these errors were encountered: