yuzu-emu
/
yuzu-mainline
Archived
1
0
Fork 0

GLRenderer: Remove unused vertex buffer and increase the size of the stream buffer to 128 MB.

The stream buffer is where all the vertex data is copied, some games require this to be much bigger than the 4 MB we used to have.
This commit is contained in:
Subv 2018-05-19 11:36:09 -05:00
parent 1b5c02fc37
commit 370ab5df9b
2 changed files with 3 additions and 9 deletions

View File

@ -75,14 +75,11 @@ RasterizerOpenGL::RasterizerOpenGL() {
// Clipping plane 0 is always enabled for PICA fixed clip plane z <= 0 // Clipping plane 0 is always enabled for PICA fixed clip plane z <= 0
state.clip_distance[0] = true; state.clip_distance[0] = true;
// Generate VBO, VAO and UBO // Generate VAO and UBO
vertex_buffer = OGLStreamBuffer::MakeBuffer(GLAD_GL_ARB_buffer_storage, GL_ARRAY_BUFFER);
vertex_buffer->Create(VERTEX_BUFFER_SIZE, VERTEX_BUFFER_SIZE / 2);
sw_vao.Create(); sw_vao.Create();
uniform_buffer.Create(); uniform_buffer.Create();
state.draw.vertex_array = sw_vao.handle; state.draw.vertex_array = sw_vao.handle;
state.draw.vertex_buffer = vertex_buffer->GetHandle();
state.draw.uniform_buffer = uniform_buffer.handle; state.draw.uniform_buffer = uniform_buffer.handle;
state.Apply(); state.Apply();

View File

@ -141,14 +141,11 @@ private:
Tegra::Engines::Maxwell3D::Regs::MaxShaderStage> Tegra::Engines::Maxwell3D::Regs::MaxShaderStage>
ssbos; ssbos;
static constexpr size_t VERTEX_BUFFER_SIZE = 128 * 1024 * 1024; static constexpr size_t STREAM_BUFFER_SIZE = 128 * 1024 * 1024;
std::unique_ptr<OGLStreamBuffer> vertex_buffer; std::unique_ptr<OGLStreamBuffer> stream_buffer;
OGLBuffer uniform_buffer; OGLBuffer uniform_buffer;
OGLFramebuffer framebuffer; OGLFramebuffer framebuffer;
static constexpr size_t STREAM_BUFFER_SIZE = 4 * 1024 * 1024;
std::unique_ptr<OGLStreamBuffer> stream_buffer;
size_t CalculateVertexArraysSize() const; size_t CalculateVertexArraysSize() const;
std::pair<u8*, GLintptr> SetupVertexArrays(u8* array_ptr, GLintptr buffer_offset); std::pair<u8*, GLintptr> SetupVertexArrays(u8* array_ptr, GLintptr buffer_offset);