mirror of
https://git.h3cjp.net/H3cJP/yuzu.git
synced 2024-11-14 10:52:53 +00:00
gl_texture_cache: Correct asserts
This commit is contained in:
parent
88bc39374f
commit
5aeabd9a17
|
@ -149,7 +149,7 @@ void OGLBuffer::Release() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void OGLBuffer::MakeStreamCopy(std::size_t buffer_size) {
|
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);
|
glNamedBufferData(handle, buffer_size, nullptr, GL_STREAM_COPY);
|
||||||
}
|
}
|
||||||
|
|
|
@ -590,7 +590,7 @@ void TextureCacheOpenGL::BufferCopy(Surface& src_surface, Surface& dst_surface)
|
||||||
}
|
}
|
||||||
|
|
||||||
GLuint TextureCacheOpenGL::FetchPBO(std::size_t buffer_size) {
|
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<u64>(buffer_size));
|
const u32 l2 = Common::Log2Ceil64(static_cast<u64>(buffer_size));
|
||||||
OGLBuffer& cp = copy_pbo_cache[l2];
|
OGLBuffer& cp = copy_pbo_cache[l2];
|
||||||
if (cp.handle == 0) {
|
if (cp.handle == 0) {
|
||||||
|
|
Loading…
Reference in a new issue