mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2024-12-29 18:35:44 +00:00
Fix TXQ not using the component mask.
This commit is contained in:
parent
b0b027d2d0
commit
0306c50339
|
@ -981,6 +981,10 @@ union Instruction {
|
|||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool IsComponentEnabled(std::size_t component) const {
|
||||
return ((1ul << component) & component_mask) != 0;
|
||||
}
|
||||
} txq;
|
||||
|
||||
union {
|
||||
|
|
|
@ -324,15 +324,18 @@ u32 ShaderIR::DecodeMemory(BasicBlock& bb, const BasicBlock& code, u32 pc) {
|
|||
const auto& sampler =
|
||||
GetSampler(instr.sampler, Tegra::Shader::TextureType::Texture2D, false, false);
|
||||
|
||||
u32 indexer = 0;
|
||||
switch (instr.txq.query_type) {
|
||||
case Tegra::Shader::TextureQueryType::Dimension: {
|
||||
for (u32 element = 0; element < 4; ++element) {
|
||||
if (instr.txq.IsComponentEnabled(element)) {
|
||||
MetaTexture meta{sampler, element};
|
||||
const Node value = Operation(OperationCode::F4TextureQueryDimensions,
|
||||
std::move(meta), GetRegister(instr.gpr8));
|
||||
SetTemporal(bb, element, value);
|
||||
SetTemporal(bb, indexer++, value);
|
||||
}
|
||||
for (u32 i = 0; i < 4; ++i) {
|
||||
}
|
||||
for (u32 i = 0; i < indexer; ++i) {
|
||||
SetRegister(bb, instr.gpr0.Value() + i, GetTemporal(i));
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue