diff options
Diffstat (limited to 'ramin.cpp')
-rw-r--r-- | ramin.cpp | 25 |
1 files changed, 12 insertions, 13 deletions
@@ -16,26 +16,25 @@ int main(int argc, char** argv) ostringstream ss; //ss << "RAMHT[" << dec << i << "] " << make_pair(&*dev, entry); ss << (unsigned)entry.channel << ":" << hex08 << entry.handle; - nv_object obj(&*dev->ramin, entry.instance); + nv_object obj(dev->ramin, entry.instance); objects.push_back(make_tuple(entry.instance, entry.instance + obj.size, ss.str())); } for(unsigned i = 0; i < dev->channels; ++i) { - unsigned grctx = dev->get_grctx(i); - if(!grctx) + shared_ptr<nv_hwchannel> hwchan = dev->hwchannel(i); + if(!hwchan) continue; - ostringstream ss; - ss << "GRCTX(" << i << ")"; - objects.push_back(make_tuple(grctx, grctx + dev->grctx_size, ss.str())); - } - - for(unsigned i = 0; i < dev->channels; ++i) { - int fc_offset = dev->ramfc->fc[i]->offset_in(*dev->ramin); - if(fc_offset >= 0) { + if(hwchan->grctx) { + unsigned offset = hwchan->grctx->offset_in(*dev->ramin); ostringstream ss; - ss << "RAMFC(" << i << ")"; - objects.push_back(make_tuple((unsigned)fc_offset, (unsigned)(fc_offset + dev->ramfc->fc[i]->size), ss.str())); + ss << "GRCTX(" << i << ")"; + objects.push_back(make_tuple(offset, offset + hwchan->grctx->size, ss.str())); } + + ostringstream ss; + ss << "FIFOCTX(" << i << ")"; + unsigned offset = hwchan->fifoctx->offset_in(*dev->ramin); + objects.push_back(make_tuple(offset, offset + hwchan->fifoctx->size, ss.str())); } int ramht_offset = dev->ramht->offset_in(*dev->ramin); |