gl_rasterizer: Fix texel buffer size overflow (#6458)

Co-authored-by: GPUCode <geoster3d@gmail.com>
This commit is contained in:
Vitor K 2023-04-22 15:43:29 -03:00 committed by GitHub
parent 81d24dd7fb
commit 1b944f3255
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -68,8 +68,7 @@ GLenum MakeAttributeType(Pica::PipelineRegs::VertexAttributeFormat format) {
// which corresponds to GL_RG32F // which corresponds to GL_RG32F
GLint max_texel_buffer_size; GLint max_texel_buffer_size;
glGetIntegerv(GL_MAX_TEXTURE_BUFFER_SIZE, &max_texel_buffer_size); glGetIntegerv(GL_MAX_TEXTURE_BUFFER_SIZE, &max_texel_buffer_size);
LOG_INFO(Render_OpenGL, "Max texture buffer size: {}", max_texel_buffer_size); return std::min<GLsizeiptr>(max_texel_buffer_size * 8ULL, TEXTURE_BUFFER_SIZE);
return std::min<GLsizeiptr>(max_texel_buffer_size * 8, TEXTURE_BUFFER_SIZE);
} }
} // Anonymous namespace } // Anonymous namespace