mirror of
https://github.com/yuzu-mirror/yuzu.git
synced 2024-11-08 11:09:58 +00:00
gl_texture_cache: Attach view instead of base texture for layered attachments
This way we are not ignoring the base layer of the current texture.
This commit is contained in:
parent
449255675d
commit
6c8f9f40d7
1 changed files with 2 additions and 2 deletions
|
@ -411,14 +411,13 @@ CachedSurfaceView::~CachedSurfaceView() = default;
|
||||||
void CachedSurfaceView::Attach(GLenum attachment, GLenum target) const {
|
void CachedSurfaceView::Attach(GLenum attachment, GLenum target) const {
|
||||||
ASSERT(params.num_levels == 1);
|
ASSERT(params.num_levels == 1);
|
||||||
|
|
||||||
const GLuint texture = surface.GetTexture();
|
|
||||||
if (params.num_layers > 1) {
|
if (params.num_layers > 1) {
|
||||||
// Layered framebuffer attachments
|
// Layered framebuffer attachments
|
||||||
UNIMPLEMENTED_IF(params.base_layer != 0);
|
UNIMPLEMENTED_IF(params.base_layer != 0);
|
||||||
|
|
||||||
switch (params.target) {
|
switch (params.target) {
|
||||||
case SurfaceTarget::Texture2DArray:
|
case SurfaceTarget::Texture2DArray:
|
||||||
glFramebufferTexture(target, attachment, texture, params.base_level);
|
glFramebufferTexture(target, attachment, GetTexture(), params.base_level);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
UNIMPLEMENTED();
|
UNIMPLEMENTED();
|
||||||
|
@ -427,6 +426,7 @@ void CachedSurfaceView::Attach(GLenum attachment, GLenum target) const {
|
||||||
}
|
}
|
||||||
|
|
||||||
const GLenum view_target = surface.GetTarget();
|
const GLenum view_target = surface.GetTarget();
|
||||||
|
const GLuint texture = surface.GetTexture();
|
||||||
switch (surface.GetSurfaceParams().target) {
|
switch (surface.GetSurfaceParams().target) {
|
||||||
case SurfaceTarget::Texture1D:
|
case SurfaceTarget::Texture1D:
|
||||||
glFramebufferTexture1D(target, attachment, view_target, texture, params.base_level);
|
glFramebufferTexture1D(target, attachment, view_target, texture, params.base_level);
|
||||||
|
|
Loading…
Reference in a new issue