mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2024-11-27 10:44:27 +01:00
Merge pull request #7077 from FernandoS27/face-down
A series of fixes to queries and indexed samplers.
This commit is contained in:
commit
3791c7ca82
@ -492,7 +492,8 @@ void TexturePass(Environment& env, IR::Program& program) {
|
|||||||
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(std::countr_zero(DESCRIPTOR_SIZE))};
|
const IR::U32 shift{ir.Imm32(std::countr_zero(DESCRIPTOR_SIZE))};
|
||||||
inst->SetArg(0, ir.ShiftRightArithmetic(cbuf.dynamic_offset, shift));
|
inst->SetArg(0, ir.SMin(ir.ShiftRightArithmetic(cbuf.dynamic_offset, shift),
|
||||||
|
ir.Imm32(DESCRIPTOR_SIZE - 1)));
|
||||||
} else {
|
} else {
|
||||||
inst->SetArg(0, IR::Value{});
|
inst->SetArg(0, IR::Value{});
|
||||||
}
|
}
|
||||||
|
@ -258,9 +258,9 @@ private:
|
|||||||
|
|
||||||
void AsyncFlushQuery(VAddr addr) {
|
void AsyncFlushQuery(VAddr addr) {
|
||||||
if (!uncommitted_flushes) {
|
if (!uncommitted_flushes) {
|
||||||
uncommitted_flushes = std::make_shared<std::unordered_set<VAddr>>();
|
uncommitted_flushes = std::make_shared<std::vector<VAddr>>();
|
||||||
}
|
}
|
||||||
uncommitted_flushes->insert(addr);
|
uncommitted_flushes->push_back(addr);
|
||||||
}
|
}
|
||||||
|
|
||||||
static constexpr std::uintptr_t PAGE_SIZE = 4096;
|
static constexpr std::uintptr_t PAGE_SIZE = 4096;
|
||||||
@ -276,8 +276,8 @@ private:
|
|||||||
|
|
||||||
std::array<CounterStream, VideoCore::NumQueryTypes> streams;
|
std::array<CounterStream, VideoCore::NumQueryTypes> streams;
|
||||||
|
|
||||||
std::shared_ptr<std::unordered_set<VAddr>> uncommitted_flushes{};
|
std::shared_ptr<std::vector<VAddr>> uncommitted_flushes{};
|
||||||
std::list<std::shared_ptr<std::unordered_set<VAddr>>> committed_flushes;
|
std::list<std::shared_ptr<std::vector<VAddr>>> committed_flushes;
|
||||||
};
|
};
|
||||||
|
|
||||||
template <class QueryCache, class HostCounter>
|
template <class QueryCache, class HostCounter>
|
||||||
|
@ -117,7 +117,8 @@ u64 HostCounter::BlockingQuery() const {
|
|||||||
cache.GetScheduler().Wait(tick);
|
cache.GetScheduler().Wait(tick);
|
||||||
u64 data;
|
u64 data;
|
||||||
const VkResult query_result = cache.GetDevice().GetLogical().GetQueryResults(
|
const VkResult query_result = cache.GetDevice().GetLogical().GetQueryResults(
|
||||||
query.first, query.second, 1, sizeof(data), &data, sizeof(data), VK_QUERY_RESULT_64_BIT);
|
query.first, query.second, 1, sizeof(data), &data, sizeof(data),
|
||||||
|
VK_QUERY_RESULT_64_BIT | VK_QUERY_RESULT_WAIT_BIT);
|
||||||
|
|
||||||
switch (query_result) {
|
switch (query_result) {
|
||||||
case VK_SUCCESS:
|
case VK_SUCCESS:
|
||||||
|
Loading…
Reference in New Issue
Block a user