mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-07-02 04:45:54 +02:00
[video_core] raise bindless texture array length to 1024
notably fixes TL:LTD grass Authored-by: Mythrax <mythrax@mytrax-rs.org> Signed-off-by: lizzie <lizzie@eden-emu.dev>
This commit is contained in:
parent
d69bd86183
commit
f0685cc0c9
2 changed files with 4 additions and 4 deletions
|
|
@ -32,6 +32,7 @@ using TextureInstVector = boost::container::small_vector<TextureInst, 24>;
|
||||||
|
|
||||||
constexpr u32 DESCRIPTOR_SIZE = 8;
|
constexpr u32 DESCRIPTOR_SIZE = 8;
|
||||||
constexpr u32 DESCRIPTOR_SIZE_SHIFT = static_cast<u32>(std::countr_zero(DESCRIPTOR_SIZE));
|
constexpr u32 DESCRIPTOR_SIZE_SHIFT = static_cast<u32>(std::countr_zero(DESCRIPTOR_SIZE));
|
||||||
|
constexpr u32 BINDLESS_ARRAY_LENGTH = 1024;
|
||||||
|
|
||||||
IR::Opcode IndexedInstruction(const IR::Inst& inst) {
|
IR::Opcode IndexedInstruction(const IR::Inst& inst) {
|
||||||
switch (inst.GetOpcode()) {
|
switch (inst.GetOpcode()) {
|
||||||
|
|
@ -362,7 +363,7 @@ std::optional<ConstBufferAddr> TryGetConstBuffer(const IR::Inst* inst, Environme
|
||||||
.secondary_offset = 0,
|
.secondary_offset = 0,
|
||||||
.secondary_shift_left = 0,
|
.secondary_shift_left = 0,
|
||||||
.dynamic_offset = dynamic_offset,
|
.dynamic_offset = dynamic_offset,
|
||||||
.count = 8,
|
.count = BINDLESS_ARRAY_LENGTH,
|
||||||
.has_secondary = false,
|
.has_secondary = false,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
@ -716,8 +717,7 @@ void TexturePass(Environment& env, IR::Program& program, const HostTranslateInfo
|
||||||
const auto insert_point{IR::Block::InstructionList::s_iterator_to(*inst)};
|
const auto insert_point{IR::Block::InstructionList::s_iterator_to(*inst)};
|
||||||
IR::IREmitter ir{*texture_inst.block, insert_point};
|
IR::IREmitter ir{*texture_inst.block, insert_point};
|
||||||
const IR::U32 shift{ir.Imm32(DESCRIPTOR_SIZE_SHIFT)};
|
const IR::U32 shift{ir.Imm32(DESCRIPTOR_SIZE_SHIFT)};
|
||||||
inst->SetArg(0, ir.UMin(ir.ShiftRightLogical(cbuf.dynamic_offset, shift),
|
inst->SetArg(0, ir.UMin(ir.ShiftRightLogical(cbuf.dynamic_offset, shift), ir.Imm32(BINDLESS_ARRAY_LENGTH - 1)));
|
||||||
ir.Imm32(DESCRIPTOR_SIZE - 1)));
|
|
||||||
} else {
|
} else {
|
||||||
inst->SetArg(0, IR::Value{});
|
inst->SetArg(0, IR::Value{});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -127,7 +127,7 @@ void ComputePipeline::Configure(Tegra::Engines::KeplerCompute& kepler_compute,
|
||||||
|
|
||||||
texture_cache.SynchronizeComputeDescriptors();
|
texture_cache.SynchronizeComputeDescriptors();
|
||||||
|
|
||||||
static constexpr size_t max_elements = 64;
|
static constexpr size_t max_elements = 16384;
|
||||||
boost::container::static_vector<VideoCommon::ImageViewInOut, max_elements> views;
|
boost::container::static_vector<VideoCommon::ImageViewInOut, max_elements> views;
|
||||||
boost::container::static_vector<VideoCommon::SamplerId, max_elements> samplers;
|
boost::container::static_vector<VideoCommon::SamplerId, max_elements> samplers;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue