mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-20 03:25:16 +00:00
rsx: Verify that channel remap is initialized before applying swizzles
This commit is contained in:
parent
e9a45a6d06
commit
e9bc99253d
1 changed files with 3 additions and 1 deletions
|
@ -8,13 +8,15 @@ namespace rsx
|
|||
{
|
||||
struct texture_channel_remap_t
|
||||
{
|
||||
u32 encoded;
|
||||
u32 encoded = 0xDEAD;
|
||||
std::array<u8, 4> control_map;
|
||||
std::array<u8, 4> channel_map;
|
||||
|
||||
template <typename T>
|
||||
std::array<T, 4> remap(const std::array<T, 4>& components, T select_zero, T select_one) const
|
||||
{
|
||||
ensure(encoded != 0xDEAD, "Channel remap was not initialized");
|
||||
|
||||
std::array<T, 4> remapped{};
|
||||
for (u8 channel = 0; channel < 4; ++channel)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue