mirror of
https://git.suyu.dev/suyu/suyu
synced 2024-12-25 10:52:48 -06:00
shader: Fix secondary textures
This commit is contained in:
parent
dd39b87b0c
commit
627161c38e
1 changed files with 2 additions and 2 deletions
|
@ -283,8 +283,8 @@ TextureInst MakeInst(Environment& env, IR::Block* block, IR::Inst& inst) {
|
||||||
}
|
}
|
||||||
|
|
||||||
TextureType ReadTextureType(Environment& env, const ConstBufferAddr& cbuf) {
|
TextureType ReadTextureType(Environment& env, const ConstBufferAddr& cbuf) {
|
||||||
const u32 secondary_index{cbuf.has_secondary ? cbuf.index : cbuf.secondary_index};
|
const u32 secondary_index{cbuf.has_secondary ? cbuf.secondary_index : cbuf.index };
|
||||||
const u32 secondary_offset{cbuf.has_secondary ? cbuf.offset : cbuf.secondary_offset};
|
const u32 secondary_offset{cbuf.has_secondary ? cbuf.secondary_offset : cbuf.offset };
|
||||||
const u32 lhs_raw{env.ReadCbufValue(cbuf.index, cbuf.offset)};
|
const u32 lhs_raw{env.ReadCbufValue(cbuf.index, cbuf.offset)};
|
||||||
const u32 rhs_raw{env.ReadCbufValue(secondary_index, secondary_offset)};
|
const u32 rhs_raw{env.ReadCbufValue(secondary_index, secondary_offset)};
|
||||||
return env.ReadTextureType(lhs_raw | rhs_raw);
|
return env.ReadTextureType(lhs_raw | rhs_raw);
|
||||||
|
|
Loading…
Reference in a new issue