mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2024-11-26 19:44:16 +01:00
Fix Mali GPU Performance issues on OpenGL
Co-authored-by: zhang wei <zwdreams@gmail.com>
This commit is contained in:
parent
d9f2d771ce
commit
cdd70e1f0c
@ -73,6 +73,11 @@ GLenum MakeAttributeType(Pica::PipelineRegs::VertexAttributeFormat format) {
|
||||
|
||||
} // Anonymous namespace
|
||||
|
||||
static bool IsVendorMali() {
|
||||
std::string gpu_vendor{reinterpret_cast<char const*>(glGetString(GL_VENDOR))};
|
||||
return gpu_vendor.find("ARM") != std::string::npos;
|
||||
}
|
||||
|
||||
RasterizerOpenGL::RasterizerOpenGL(Memory::MemorySystem& memory, Pica::PicaCore& pica,
|
||||
VideoCore::CustomTexManager& custom_tex_manager,
|
||||
VideoCore::RendererBase& renderer, Driver& driver_)
|
||||
@ -83,8 +88,14 @@ RasterizerOpenGL::RasterizerOpenGL(Memory::MemorySystem& memory, Pica::PicaCore&
|
||||
vertex_buffer{driver, GL_ARRAY_BUFFER, VERTEX_BUFFER_SIZE},
|
||||
uniform_buffer{driver, GL_UNIFORM_BUFFER, UNIFORM_BUFFER_SIZE},
|
||||
index_buffer{driver, GL_ELEMENT_ARRAY_BUFFER, INDEX_BUFFER_SIZE},
|
||||
texture_buffer{driver, GL_TEXTURE_BUFFER, texture_buffer_size},
|
||||
texture_lf_buffer{driver, GL_TEXTURE_BUFFER, texture_buffer_size} {
|
||||
texture_buffer{driver, GL_TEXTURE_BUFFER,
|
||||
IsVendorMali()
|
||||
? (GL_MAX_TEXTURE_BUFFER_SIZE == 65536 ? 11264 : texture_buffer_size)
|
||||
: texture_buffer_size},
|
||||
texture_lf_buffer{driver, GL_TEXTURE_BUFFER,
|
||||
IsVendorMali()
|
||||
? (GL_MAX_TEXTURE_BUFFER_SIZE == 65536 ? 525312 : texture_buffer_size)
|
||||
: texture_buffer_size} {
|
||||
|
||||
// Clipping plane 0 is always enabled for PICA fixed clip plane z <= 0
|
||||
state.clip_distance[0] = true;
|
||||
|
Loading…
Reference in New Issue
Block a user