mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 05:40:01 -06:00
VideoCommon: add loading cube maps from DDS files and loading it into our custom texture object. Custom texture object now has the concept of slices in addition to levels. Traditional custom textures have a single slice
This commit is contained in:
@ -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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user