crueter
1 month ago
No known key found for this signature in database
GPG Key ID: 425ACD2D4830EBC6
1 changed files with
2 additions and
19 deletions
-
src/shader_recompiler/ir_opt/texture_pass.cpp
|
|
|
@ -330,31 +330,14 @@ std::optional<ConstBufferAddr> TryGetConstBuffer(const IR::Inst* inst, Environme |
|
|
|
}; |
|
|
|
} |
|
|
|
|
|
|
|
// TODO:xbzk: shall be dropped when Track method cover all bindless stuff
|
|
|
|
static ConstBufferAddr last_valid_addr = ConstBufferAddr{ |
|
|
|
.index = 0, |
|
|
|
.offset = 0, |
|
|
|
.shift_left = 0, |
|
|
|
.secondary_index = 0, |
|
|
|
.secondary_offset = 0, |
|
|
|
.secondary_shift_left = 0, |
|
|
|
.dynamic_offset = {}, |
|
|
|
.count = 1, |
|
|
|
.has_secondary = false, |
|
|
|
}; |
|
|
|
|
|
|
|
TextureInst MakeInst(Environment& env, IR::Block* block, IR::Inst& inst) { |
|
|
|
ConstBufferAddr addr; |
|
|
|
if (IsBindless(inst)) { |
|
|
|
const std::optional<ConstBufferAddr> track_addr{Track(inst.Arg(0), env)}; |
|
|
|
|
|
|
|
if (!track_addr) { |
|
|
|
//throw NotImplementedException("Failed to track bindless texture constant buffer");
|
|
|
|
addr = last_valid_addr; // TODO:xbzk: shall be dropped when Track method cover all bindless stuff
|
|
|
|
} else { |
|
|
|
addr = *track_addr; |
|
|
|
last_valid_addr = addr; // TODO:xbzk: shall be dropped when Track method cover all bindless stuff
|
|
|
|
throw NotImplementedException("Failed to track bindless texture constant buffer"); |
|
|
|
} |
|
|
|
addr = *track_addr; |
|
|
|
} else { |
|
|
|
addr = ConstBufferAddr{ |
|
|
|
.index = env.TextureBoundBuffer(), |
|
|
|
|