summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/OnScreenUI.cpp
diff options
context:
space:
mode:
authorMai <mai.iam2048@gmail.com>2023-12-17 14:40:39 -0500
committerGitHub <noreply@github.com>2023-12-17 14:40:39 -0500
commitf589c04aa7684e72f9866d1d85e9cb32b3d281ca (patch)
treed5cf7a22f818ad48ee5c6f4e333772058b9660ab /Source/Core/VideoCommon/OnScreenUI.cpp
parente6c85bf8f09c54297bc71fd37432d7daa7f22bcc (diff)
parent12dd15c8ddb587e2f76351b59e0097940061485b (diff)
Merge pull request #12372 from iwubcode/texture_usage_flag
VideoBackends / VideoCommon: add type enum to dictate how the texture is used; support texture 2d
Diffstat (limited to 'Source/Core/VideoCommon/OnScreenUI.cpp')
-rw-r--r--Source/Core/VideoCommon/OnScreenUI.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/Core/VideoCommon/OnScreenUI.cpp b/Source/Core/VideoCommon/OnScreenUI.cpp
index 88141736e4..fdb5d49af7 100644
--- a/Source/Core/VideoCommon/OnScreenUI.cpp
+++ b/Source/Core/VideoCommon/OnScreenUI.cpp
@@ -77,7 +77,8 @@ bool OnScreenUI::Initialize(u32 width, u32 height, float scale)
io.Fonts->GetTexDataAsRGBA32(&font_tex_pixels, &font_tex_width, &font_tex_height);
TextureConfig font_tex_config(font_tex_width, font_tex_height, 1, 1, 1,
- AbstractTextureFormat::RGBA8, 0);
+ AbstractTextureFormat::RGBA8, 0,
+ AbstractTextureType::Texture_2DArray);
std::unique_ptr<AbstractTexture> font_tex =
g_gfx->CreateTexture(font_tex_config, "ImGui font texture");
if (!font_tex)
@@ -362,7 +363,8 @@ void OnScreenUI::DrawChallenges()
continue;
const u32 width = icon->width;
const u32 height = icon->height;
- TextureConfig tex_config(width, height, 1, 1, 1, AbstractTextureFormat::RGBA8, 0);
+ TextureConfig tex_config(width, height, 1, 1, 1, AbstractTextureFormat::RGBA8, 0,
+ AbstractTextureType::Texture_2DArray);
auto res = m_challenge_texture_map.insert_or_assign(name, g_gfx->CreateTexture(tex_config));
res.first->second->Load(0, width, height, width, icon->rgba_data.data(),
sizeof(u32) * width * height);