Skip to content

Commit

Permalink
Merge pull request RPCS3#1516 from kd-11/rsx_textureutils_fix
Browse files Browse the repository at this point in the history
Handle swizzled CELL_GCM_B8 textures
  • Loading branch information
vlj committed Feb 24, 2016
2 parents 422f5c0 + 8a3d15d commit 0f0de47
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion rpcs3/Emu/RSX/Common/TextureUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,10 @@ std::vector<MipmapLevelInfo> upload_placed_texture(gsl::span<gsl::byte> mapped_b
else
return copy_texture_data<copy_unmodified_block, true, 4>(as_span_workaround<u128>(mapped_buffer), reinterpret_cast<const u128*>(pixels), w, h, depth, layer, texture.mipmap(), texture.pitch());
case CELL_GCM_TEXTURE_B8:
return copy_texture_data<copy_unmodified_block, true, 1>(as_span_workaround<u8>(mapped_buffer), reinterpret_cast<const u8*>(pixels), w, h, depth, layer, texture.mipmap(), texture.pitch());
if (is_swizzled)
return copy_texture_data<copy_unmodified_block_swizzled, false, 1>(as_span_workaround<u8>(mapped_buffer), reinterpret_cast<const u8*>(pixels), w, h, depth, layer, texture.mipmap(), texture.pitch());
else
return copy_texture_data<copy_unmodified_block, true, 1>(as_span_workaround<u8>(mapped_buffer), reinterpret_cast<const u8*>(pixels), w, h, depth, layer, texture.mipmap(), texture.pitch());
}
throw EXCEPTION("Wrong format %d", format);
}
Expand Down

0 comments on commit 0f0de47

Please sign in to comment.