CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!
CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!
Path: blob/master/Common/GPU/OpenGL/GLFrameData.h
Views: 1401
#pragma once12#include <mutex>3#include <condition_variable>4#include <vector>5#include <string>6#include <set>78#include "Common/GPU/OpenGL/GLCommon.h"910class GLRShader;11class GLRBuffer;12class GLRTexture;13class GLRInputLayout;14class GLRFramebuffer;15class GLPushBuffer;16class GLRProgram;17class GLRenderManager;1819class GLDeleter {20public:21void Perform(GLRenderManager *renderManager, bool skipGLCalls);2223bool IsEmpty() const {24return shaders.empty() && programs.empty() && buffers.empty() && textures.empty() && inputLayouts.empty() && framebuffers.empty() && pushBuffers.empty();25}2627void Take(GLDeleter &other);2829std::vector<GLRShader *> shaders;30std::vector<GLRProgram *> programs;31std::vector<GLRBuffer *> buffers;32std::vector<GLRTexture *> textures;33std::vector<GLRInputLayout *> inputLayouts;34std::vector<GLRFramebuffer *> framebuffers;35std::vector<GLPushBuffer *> pushBuffers;36};3738struct GLQueueProfileContext {39bool enabled;40double cpuStartTime;41double cpuEndTime;42std::string passesString;43int commandCounts[25]; // Can't grab count from the enum as it would mean a circular include. Might clean this up later.44};454647// Per-frame data, round-robin so we can overlap submission with execution of the previous frame.48struct GLFrameData {49bool skipSwap = false;5051// Frames need unique IDs to wait for present on, let's keep them here.52// Also used for indexing into the frame timing history buffer.53uint64_t frameId;5455std::mutex fenceMutex;56std::condition_variable fenceCondVar;57bool readyForFence = true;5859// Swapchain.60bool hasBegun = false;6162GLDeleter deleter;63GLDeleter deleter_prev;64std::set<GLPushBuffer *> activePushBuffers;6566GLQueueProfileContext profile;67};686970