#define nv_rs_clock_store_alloc original_clock_alloc #include "../pf-software/ffi.c" #undef nv_rs_clock_store_alloc #include static unsigned char *gpu_image; void *nv_rs_clock_store_alloc(size_t bytes) { void *p=original_clock_alloc(bytes); if(bytes==0x6e70) gpu_image=p; return p; } uint64_t fixture_timeout_word(size_t offset, size_t bytes) { uint64_t value=0; assert(gpu_image && bytes<=8 && offset+bytes<=0x6e70); memcpy(&value,gpu_image+offset,bytes); return value; }