예제 #1
0
파일: gsp_gpu.cpp 프로젝트: OnePlays/citra
static inline FrameBufferUpdate* GetFrameBufferInfo(u32 thread_id, u32 screen_index) {
    _dbg_assert_msg_(GSP, screen_index < 2, "Invalid screen index");

    // For each thread there are two FrameBufferUpdate fields
    u32 offset = 0x200 + (2 * thread_id + screen_index) * sizeof(FrameBufferUpdate);
    ResultVal<u8*> ptr = Kernel::GetSharedMemoryPointer(g_shared_memory, offset);
    return reinterpret_cast<FrameBufferUpdate*>(ptr.ValueOr(nullptr));
}
예제 #2
0
파일: gsp_gpu.cpp 프로젝트: OnePlays/citra
/// Gets a pointer to the interrupt relay queue for a given thread index
static inline InterruptRelayQueue* GetInterruptRelayQueue(u32 thread_id) {
    ResultVal<u8*> ptr = Kernel::GetSharedMemoryPointer(g_shared_memory, sizeof(InterruptRelayQueue) * thread_id);
    return reinterpret_cast<InterruptRelayQueue*>(ptr.ValueOr(nullptr));
}