mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-04 15:19:09 +00:00
TextureCache: Ensure that all render target textures have as many layers as the frame buffer.
Also fixes a case where the D3D code path did not initialize num_layers leading to undefined behaviour.
This commit is contained in:
parent
02ad1a36ea
commit
8210b9c915
7 changed files with 13 additions and 15 deletions
|
@ -221,10 +221,7 @@ TextureCache::TCacheEntryBase* TextureCache::CreateRenderTargetTexture(
|
|||
gl_type = GL_UNSIGNED_BYTE;
|
||||
|
||||
glTexParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_MAX_LEVEL, 0);
|
||||
|
||||
entry->num_layers = FramebufferManager::GetEFBLayers();
|
||||
|
||||
glTexImage3D(GL_TEXTURE_2D_ARRAY, 0, gl_iformat, scaled_tex_w, scaled_tex_h, entry->num_layers, 0, gl_format, gl_type, nullptr);
|
||||
glTexImage3D(GL_TEXTURE_2D_ARRAY, 0, gl_iformat, scaled_tex_w, scaled_tex_h, FramebufferManager::GetEFBLayers(), 0, gl_format, gl_type, nullptr);
|
||||
glBindTexture(GL_TEXTURE_2D_ARRAY, 0);
|
||||
|
||||
glGenFramebuffers(1, &entry->framebuffer);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue