Add GL Stream Buffer from Duckstation

This commit is contained in:
wheremyfoodat 2024-08-25 01:47:02 +03:00
parent a8b30ee2dc
commit e34bdb6841
7 changed files with 461 additions and 2 deletions

View file

@ -3,6 +3,7 @@
#include <array>
#include <cstring>
#include <functional>
#include <memory>
#include <optional>
#include <span>
#include <unordered_map>
@ -10,11 +11,12 @@
#include "PICA/float_types.hpp"
#include "PICA/pica_frag_config.hpp"
#include "PICA/pica_vert_config.hpp"
#include "PICA/pica_hash.hpp"
#include "PICA/pica_vert_config.hpp"
#include "PICA/pica_vertex.hpp"
#include "PICA/regs.hpp"
#include "PICA/shader_gen.hpp"
#include "gl/stream_buffer.h"
#include "gl_state.hpp"
#include "helpers.hpp"
#include "logger.hpp"
@ -83,6 +85,10 @@ class RendererGL final : public Renderer {
// UBO for uploading the PICA uniforms when using hw shaders
GLuint hwShaderUniformUBO;
using StreamBuffer = OpenGLStreamBuffer;
std::unique_ptr<StreamBuffer> hwVertexBuffer;
std::unique_ptr<StreamBuffer> hwIndexBuffer;
// Cached recompiled fragment shader
struct CachedProgram {
OpenGL::Program program;