code: Cleanup and warning fixes from the Vulkan PR (#6163)

Co-authored-by: emufan4568 <geoster3d@gmail.com>
Co-authored-by: Kyle Kienapfel <Docteh@users.noreply.github.com>
This commit is contained in:
Tobias 2022-11-04 23:32:57 +01:00 committed by GitHub
parent aa84022704
commit 1ddea27ac8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
72 changed files with 895 additions and 626 deletions

View file

@ -428,6 +428,8 @@ static GLenum GetCurrentPrimitiveMode() {
default:
UNREACHABLE();
}
return GL_TRIANGLES;
}
bool RasterizerOpenGL::AccelerateDrawBatchInternal(bool is_indexed) {

View file

@ -89,7 +89,7 @@ void OGLTexture::CopyFrom(const OGLTexture& other, GLenum target, GLsizei levels
glActiveTexture(GL_TEXTURE0);
glBindTexture(GL_TEXTURE_2D, handle);
for (u32 level = 0; level < levels; level++) {
for (GLsizei level = 0; level < levels; level++) {
glCopyImageSubData(other.handle, target, level, 0, 0, 0, handle, target, level, 0, 0, 0,
width >> level, height >> level, 1);
}

View file

@ -744,7 +744,7 @@ void RendererOpenGL::ReloadShader() {
void RendererOpenGL::ConfigureFramebufferTexture(TextureInfo& texture,
const GPU::Regs::FramebufferConfig& framebuffer) {
GPU::Regs::PixelFormat format = framebuffer.color_format;
GLint internal_format;
GLint internal_format{};
texture.format = format;
texture.width = framebuffer.width;

View file

@ -208,7 +208,7 @@ GLuint TextureDownloaderES::ConvertDepthToColor(GLuint level, GLenum& format, GL
void TextureDownloaderES::GetTexImage(GLenum target, GLuint level, GLenum format, GLenum type,
GLint height, GLint width, void* pixels) {
OpenGLState state = OpenGLState::GetCurState();
GLuint texture;
GLuint texture{};
const GLuint old_read_buffer = state.draw.read_framebuffer;
switch (target) {
case GL_TEXTURE_2D: