aboutsummaryrefslogtreecommitdiff
path: root/src/core/memory.cpp
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2020-03-12 17:28:49 -0300
committerReinUsesLisp <reinuseslisp@airmail.cc>2020-03-12 18:22:05 -0300
commit9fce105f45bd28549e9ef157a0803719eb7ba3e0 (patch)
treee71542579df3628d0ec5ad0ba9d2b2078bccc4de /src/core/memory.cpp
parent91dab10af0f5cd8965b12ed83d1999fa18a8c323 (diff)
texture_cache: Report incompatible textures as black
Some games bind incompatible texture types to certain types. For example Astral Chain binds a 2D texture with 1 layer (non-array) to a cubemap slot (that's how it's used in the shader). After testing this in hardware, the expected "undefined behavior" is to report all pixels as black. We already have a path for reporting black textures in the texture cache. When textures types are incompatible, this commit binds these kind of textures. This is done on the API agnostic texture cache so no extra code has to be inserted on OpenGL or Vulkan. As a side effect, this fixes invalidations of ASTC textures on Astral Chain. This happened because yuzu detected a cube texture and forced 6 faces, generating a texture larger than what the TIC reported.
Diffstat (limited to 'src/core/memory.cpp')
0 files changed, 0 insertions, 0 deletions