summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/GraphicsModSystem/Runtime
diff options
context:
space:
mode:
authorJMC47 <JMC4789@gmail.com>2023-09-03 18:29:00 -0400
committerGitHub <noreply@github.com>2023-09-03 18:29:00 -0400
commit900439ea0d3cfdfae259890a94dfc383103f1bad (patch)
tree3bba0bfc72346aee1301dcc3f118098c48ae7881 /Source/Core/VideoCommon/GraphicsModSystem/Runtime
parent6f6eb73667d461073b44f993c00095c30ac35414 (diff)
parent62fee2f3b60c84b27efbb0792e3695bbe812ac1a (diff)
Merge pull request #12102 from iwubcode/cubemap_custom_texture
VideoCommon: add ability to load cube maps into custom texture data
Diffstat (limited to 'Source/Core/VideoCommon/GraphicsModSystem/Runtime')
-rw-r--r--Source/Core/VideoCommon/GraphicsModSystem/Runtime/Actions/CustomPipelineAction.cpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/Source/Core/VideoCommon/GraphicsModSystem/Runtime/Actions/CustomPipelineAction.cpp b/Source/Core/VideoCommon/GraphicsModSystem/Runtime/Actions/CustomPipelineAction.cpp
index b774324a58..4d8df6a218 100644
--- a/Source/Core/VideoCommon/GraphicsModSystem/Runtime/Actions/CustomPipelineAction.cpp
+++ b/Source/Core/VideoCommon/GraphicsModSystem/Runtime/Actions/CustomPipelineAction.cpp
@@ -423,15 +423,23 @@ void CustomPipelineAction::OnTextureCreate(GraphicsModActionData::TextureCreate*
auto data = game_texture.m_asset->GetData();
if (data)
{
- if (create->texture_width != data->m_levels[0].width ||
- create->texture_height != data->m_levels[0].height)
+ if (data->m_slices.empty() || data->m_slices[0].m_levels.empty())
+ {
+ ERROR_LOG_FMT(
+ VIDEO,
+ "Custom pipeline for texture '{}' has asset '{}' that does not have any texture data",
+ create->texture_name, game_texture.m_asset->GetAssetId());
+ m_valid = false;
+ }
+ else if (create->texture_width != data->m_slices[0].m_levels[0].width ||
+ create->texture_height != data->m_slices[0].m_levels[0].height)
{
ERROR_LOG_FMT(VIDEO,
"Custom pipeline for texture '{}' has asset '{}' that does not match "
"the width/height of the texture loaded. Texture {}x{} vs asset {}x{}",
create->texture_name, game_texture.m_asset->GetAssetId(),
- create->texture_width, create->texture_height, data->m_levels[0].width,
- data->m_levels[0].height);
+ create->texture_width, create->texture_height,
+ data->m_slices[0].m_levels[0].width, data->m_slices[0].m_levels[0].height);
m_valid = false;
}
}