VideoBackends / VideoCommon: add type enum to dictate whether a texture is a 2D texture, a texture array, or a cube map; support 2D texture type across backends

Co-authored-by: TellowKrinkle <tellowkrinkle@gmail.com>
This commit is contained in:
iwubcode
2023-12-09 19:00:11 -06:00
parent 370474a7cb
commit 12dd15c8dd
16 changed files with 271 additions and 81 deletions

View File

@ -82,7 +82,7 @@ bool FrameDumper::CheckFrameDumpRenderTexture(u32 target_width, u32 target_heigh
m_frame_dump_render_texture.reset();
m_frame_dump_render_texture = g_gfx->CreateTexture(
TextureConfig(target_width, target_height, 1, 1, 1, AbstractTextureFormat::RGBA8,
AbstractTextureFlag_RenderTarget),
AbstractTextureFlag_RenderTarget, AbstractTextureType::Texture_2DArray),
"Frame dump render texture");
if (!m_frame_dump_render_texture)
{
@ -102,9 +102,10 @@ bool FrameDumper::CheckFrameDumpReadbackTexture(u32 target_width, u32 target_hei
return true;
rbtex.reset();
rbtex = g_gfx->CreateStagingTexture(
StagingTextureType::Readback,
TextureConfig(target_width, target_height, 1, 1, 1, AbstractTextureFormat::RGBA8, 0));
rbtex = g_gfx->CreateStagingTexture(StagingTextureType::Readback,
TextureConfig(target_width, target_height, 1, 1, 1,
AbstractTextureFormat::RGBA8, 0,
AbstractTextureType::Texture_2DArray));
if (!rbtex)
return false;