diff options
Diffstat (limited to 'nvexec_raw.cpp')
-rw-r--r-- | nvexec_raw.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/nvexec_raw.cpp b/nvexec_raw.cpp index 550202f..a55bf8d 100644 --- a/nvexec_raw.cpp +++ b/nvexec_raw.cpp @@ -11,13 +11,14 @@ int main(int argc, char** argv) if(channel < 0) throw runtime_error("Unable to find idle channel for GL process.\n"); - unique_ptr<nv_channel> chan(new nv_channel_vram(&*dev, channel)); - //chan.reset(new nv_channel_parasite(&*dev, channel, &*runner)); + std::shared_ptr<nv_hwchannel> hwchan(dev->hwchannel(channel)); + unique_ptr<nv_channel> chan(new nv_channel_vram(hwchan)); + //unique_ptr<nv_channel> chan(new nv_channel_parasite(hwchan, &*runner)); - cerr << "Channel " << chan->channel << endl; + cerr << "Channel " << hwchan->channel << endl; unsigned grclasses[8]; - dev->get_grclasses(chan->channel, grclasses); + hwchan->get_grclasses(grclasses); // for(unsigned i = 0; i < 8; ++i) // cout << grclasses[i] << endl; |