From 5aeabd9a1777de5d0d4ab540edbda325c8fec64e Mon Sep 17 00:00:00 2001 From: Fernando Sahmkow Date: Tue, 25 Jun 2019 19:26:59 -0400 Subject: gl_texture_cache: Correct asserts --- src/video_core/renderer_opengl/gl_resource_manager.cpp | 2 +- src/video_core/renderer_opengl/gl_texture_cache.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/video_core/renderer_opengl/gl_resource_manager.cpp b/src/video_core/renderer_opengl/gl_resource_manager.cpp index a5f83a8f7..5c96c1d46 100644 --- a/src/video_core/renderer_opengl/gl_resource_manager.cpp +++ b/src/video_core/renderer_opengl/gl_resource_manager.cpp @@ -149,7 +149,7 @@ void OGLBuffer::Release() { } void OGLBuffer::MakeStreamCopy(std::size_t buffer_size) { - ASSERT_OR_EXECUTE((handle == 0 || buffer_size == 0), { return; }); + ASSERT_OR_EXECUTE((handle != 0 && buffer_size != 0), { return; }); glNamedBufferData(handle, buffer_size, nullptr, GL_STREAM_COPY); } diff --git a/src/video_core/renderer_opengl/gl_texture_cache.cpp b/src/video_core/renderer_opengl/gl_texture_cache.cpp index d539bf07c..672f26f37 100644 --- a/src/video_core/renderer_opengl/gl_texture_cache.cpp +++ b/src/video_core/renderer_opengl/gl_texture_cache.cpp @@ -590,7 +590,7 @@ void TextureCacheOpenGL::BufferCopy(Surface& src_surface, Surface& dst_surface) } GLuint TextureCacheOpenGL::FetchPBO(std::size_t buffer_size) { - ASSERT_OR_EXECUTE(buffer_size <= 0, { return 0; }); + ASSERT_OR_EXECUTE(buffer_size > 0, { return 0; }); const u32 l2 = Common::Log2Ceil64(static_cast(buffer_size)); OGLBuffer& cp = copy_pbo_cache[l2]; if (cp.handle == 0) { -- cgit v1.2.3