Compare commits
5 Commits
android-21
...
android-16
Author | SHA1 | Date | |
---|---|---|---|
93d90b5e87 | |||
c2ecdaabb5 | |||
39fe6e4516 | |||
f2e9fcb6a2 | |||
5888f2c3cb |
12
README.md
12
README.md
@ -1,3 +1,15 @@
|
|||||||
|
| Pull Request | Commit | Title | Author | Merged? |
|
||||||
|
|----|----|----|----|----|
|
||||||
|
| [12390](https://github.com/yuzu-emu/yuzu//pull/12390) | [`fba3fa705`](https://github.com/yuzu-emu/yuzu//pull/12390/files) | renderer_vulkan: work around turnip binding bug in a610 | [liamwhite](https://github.com/liamwhite/) | Yes |
|
||||||
|
| [12400](https://github.com/yuzu-emu/yuzu//pull/12400) | [`a2b567dfd`](https://github.com/yuzu-emu/yuzu//pull/12400/files) | vk_query_cache: Fix prefix sum max_accumulation_limit logic | [ameerj](https://github.com/ameerj/) | Yes |
|
||||||
|
| [12403](https://github.com/yuzu-emu/yuzu//pull/12403) | [`fcfa8b680`](https://github.com/yuzu-emu/yuzu//pull/12403/files) | shader_recompiler: use minimal clip distance array | [liamwhite](https://github.com/liamwhite/) | Yes |
|
||||||
|
| [12409](https://github.com/yuzu-emu/yuzu//pull/12409) | [`93c19a40b`](https://github.com/yuzu-emu/yuzu//pull/12409/files) | nce: fix read size in simd immediate emulation | [liamwhite](https://github.com/liamwhite/) | Yes |
|
||||||
|
|
||||||
|
|
||||||
|
End of merge log. You can find the original README.md below the break.
|
||||||
|
|
||||||
|
-----
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
SPDX-FileCopyrightText: 2018 yuzu Emulator Project
|
SPDX-FileCopyrightText: 2018 yuzu Emulator Project
|
||||||
SPDX-License-Identifier: GPL-2.0-or-later
|
SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
@ -39,7 +39,7 @@ fpsimd_context* GetFloatingPointState(mcontext_t& host_ctx) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
using namespace Common::Literals;
|
using namespace Common::Literals;
|
||||||
constexpr u32 StackSize = 32_KiB;
|
constexpr u32 StackSize = 128_KiB;
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
|
@ -249,6 +249,7 @@ bool InterpreterVisitor::LDR_lit_fpsimd(Imm<2> opc, Imm<19> imm19, Vec Vt) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Size in bytes
|
||||||
const u64 size = 4 << opc.ZeroExtend();
|
const u64 size = 4 << opc.ZeroExtend();
|
||||||
const u64 offset = imm19.SignExtend<u64>() << 2;
|
const u64 offset = imm19.SignExtend<u64>() << 2;
|
||||||
const u64 address = this->GetPc() + offset;
|
const u64 address = this->GetPc() + offset;
|
||||||
@ -530,7 +531,7 @@ bool InterpreterVisitor::SIMDImmediate(bool wback, bool postindex, size_t scale,
|
|||||||
}
|
}
|
||||||
case MemOp::Load: {
|
case MemOp::Load: {
|
||||||
u128 data{};
|
u128 data{};
|
||||||
m_memory.ReadBlock(address, &data, datasize);
|
m_memory.ReadBlock(address, &data, datasize / 8);
|
||||||
this->SetVec(Vt, data);
|
this->SetVec(Vt, data);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -74,6 +74,11 @@ std::optional<OutAttr> OutputAttrPointer(EmitContext& ctx, IR::Attribute attr) {
|
|||||||
case IR::Attribute::ClipDistance7: {
|
case IR::Attribute::ClipDistance7: {
|
||||||
const u32 base{static_cast<u32>(IR::Attribute::ClipDistance0)};
|
const u32 base{static_cast<u32>(IR::Attribute::ClipDistance0)};
|
||||||
const u32 index{static_cast<u32>(attr) - base};
|
const u32 index{static_cast<u32>(attr) - base};
|
||||||
|
if (index >= ctx.profile.max_user_clip_distances) {
|
||||||
|
LOG_WARNING(Shader, "Ignoring clip distance store {} >= {} supported", index,
|
||||||
|
ctx.profile.max_user_clip_distances);
|
||||||
|
return std::nullopt;
|
||||||
|
}
|
||||||
const Id clip_num{ctx.Const(index)};
|
const Id clip_num{ctx.Const(index)};
|
||||||
return OutputAccessChain(ctx, ctx.output_f32, ctx.clip_distances, clip_num);
|
return OutputAccessChain(ctx, ctx.output_f32, ctx.clip_distances, clip_num);
|
||||||
}
|
}
|
||||||
|
@ -1528,7 +1528,8 @@ void EmitContext::DefineOutputs(const IR::Program& program) {
|
|||||||
if (stage == Stage::Fragment) {
|
if (stage == Stage::Fragment) {
|
||||||
throw NotImplementedException("Storing ClipDistance in fragment stage");
|
throw NotImplementedException("Storing ClipDistance in fragment stage");
|
||||||
}
|
}
|
||||||
const Id type{TypeArray(F32[1], Const(8U))};
|
const Id type{TypeArray(
|
||||||
|
F32[1], Const(std::min(info.used_clip_distances, profile.max_user_clip_distances)))};
|
||||||
clip_distances = DefineOutput(*this, type, invocations, spv::BuiltIn::ClipDistance);
|
clip_distances = DefineOutput(*this, type, invocations, spv::BuiltIn::ClipDistance);
|
||||||
}
|
}
|
||||||
if (info.stores[IR::Attribute::Layer] &&
|
if (info.stores[IR::Attribute::Layer] &&
|
||||||
|
@ -913,7 +913,11 @@ void GatherInfoFromHeader(Environment& env, Info& info) {
|
|||||||
}
|
}
|
||||||
for (size_t index = 0; index < 8; ++index) {
|
for (size_t index = 0; index < 8; ++index) {
|
||||||
const u16 mask{header.vtg.omap_systemc.clip_distances};
|
const u16 mask{header.vtg.omap_systemc.clip_distances};
|
||||||
info.stores.Set(IR::Attribute::ClipDistance0 + index, ((mask >> index) & 1) != 0);
|
const bool used{((mask >> index) & 1) != 0};
|
||||||
|
info.stores.Set(IR::Attribute::ClipDistance0 + index, used);
|
||||||
|
if (used) {
|
||||||
|
info.used_clip_distances = static_cast<u32>(index) + 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
info.stores.Set(IR::Attribute::PrimitiveId,
|
info.stores.Set(IR::Attribute::PrimitiveId,
|
||||||
header.vtg.omap_systemb.primitive_array_id != 0);
|
header.vtg.omap_systemb.primitive_array_id != 0);
|
||||||
|
@ -87,6 +87,8 @@ struct Profile {
|
|||||||
bool has_broken_robust{};
|
bool has_broken_robust{};
|
||||||
|
|
||||||
u64 min_ssbo_alignment{};
|
u64 min_ssbo_alignment{};
|
||||||
|
|
||||||
|
u32 max_user_clip_distances{};
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Shader
|
} // namespace Shader
|
||||||
|
@ -227,6 +227,8 @@ struct Info {
|
|||||||
bool requires_layer_emulation{};
|
bool requires_layer_emulation{};
|
||||||
IR::Attribute emulated_layer{};
|
IR::Attribute emulated_layer{};
|
||||||
|
|
||||||
|
u32 used_clip_distances{};
|
||||||
|
|
||||||
boost::container::static_vector<ConstantBufferDescriptor, MAX_CBUFS>
|
boost::container::static_vector<ConstantBufferDescriptor, MAX_CBUFS>
|
||||||
constant_buffer_descriptors;
|
constant_buffer_descriptors;
|
||||||
boost::container::static_vector<StorageBufferDescriptor, MAX_SSBOS> storage_buffers_descriptors;
|
boost::container::static_vector<StorageBufferDescriptor, MAX_SSBOS> storage_buffers_descriptors;
|
||||||
|
@ -233,6 +233,7 @@ ShaderCache::ShaderCache(RasterizerOpenGL& rasterizer_, Core::Frontend::EmuWindo
|
|||||||
.ignore_nan_fp_comparisons = true,
|
.ignore_nan_fp_comparisons = true,
|
||||||
.gl_max_compute_smem_size = device.GetMaxComputeSharedMemorySize(),
|
.gl_max_compute_smem_size = device.GetMaxComputeSharedMemorySize(),
|
||||||
.min_ssbo_alignment = device.GetShaderStorageBufferAlignment(),
|
.min_ssbo_alignment = device.GetShaderStorageBufferAlignment(),
|
||||||
|
.max_user_clip_distances = 8,
|
||||||
},
|
},
|
||||||
host_info{
|
host_info{
|
||||||
.support_float64 = true,
|
.support_float64 = true,
|
||||||
|
@ -563,22 +563,27 @@ void BufferCacheRuntime::BindVertexBuffers(VideoCommon::HostBindings<Buffer>& bi
|
|||||||
}
|
}
|
||||||
buffer_handles.push_back(handle);
|
buffer_handles.push_back(handle);
|
||||||
}
|
}
|
||||||
|
const u32 device_max = device.GetMaxVertexInputBindings();
|
||||||
|
const u32 min_binding = std::min(bindings.min_index, device_max);
|
||||||
|
const u32 max_binding = std::min(bindings.max_index, device_max);
|
||||||
|
const u32 binding_count = max_binding - min_binding;
|
||||||
|
if (binding_count == 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (device.IsExtExtendedDynamicStateSupported()) {
|
if (device.IsExtExtendedDynamicStateSupported()) {
|
||||||
scheduler.Record([this, bindings_ = std::move(bindings),
|
scheduler.Record([bindings_ = std::move(bindings),
|
||||||
buffer_handles_ = std::move(buffer_handles)](vk::CommandBuffer cmdbuf) {
|
buffer_handles_ = std::move(buffer_handles),
|
||||||
cmdbuf.BindVertexBuffers2EXT(bindings_.min_index,
|
binding_count](vk::CommandBuffer cmdbuf) {
|
||||||
std::min(bindings_.max_index - bindings_.min_index,
|
cmdbuf.BindVertexBuffers2EXT(bindings_.min_index, binding_count, buffer_handles_.data(),
|
||||||
device.GetMaxVertexInputBindings()),
|
bindings_.offsets.data(), bindings_.sizes.data(),
|
||||||
buffer_handles_.data(), bindings_.offsets.data(),
|
bindings_.strides.data());
|
||||||
bindings_.sizes.data(), bindings_.strides.data());
|
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
scheduler.Record([this, bindings_ = std::move(bindings),
|
scheduler.Record([bindings_ = std::move(bindings),
|
||||||
buffer_handles_ = std::move(buffer_handles)](vk::CommandBuffer cmdbuf) {
|
buffer_handles_ = std::move(buffer_handles),
|
||||||
cmdbuf.BindVertexBuffers(bindings_.min_index,
|
binding_count](vk::CommandBuffer cmdbuf) {
|
||||||
std::min(bindings_.max_index - bindings_.min_index,
|
cmdbuf.BindVertexBuffers(bindings_.min_index, binding_count, buffer_handles_.data(),
|
||||||
device.GetMaxVertexInputBindings()),
|
bindings_.offsets.data());
|
||||||
buffer_handles_.data(), bindings_.offsets.data());
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -374,6 +374,7 @@ PipelineCache::PipelineCache(RasterizerVulkan& rasterizer_, const Device& device
|
|||||||
.has_broken_robust =
|
.has_broken_robust =
|
||||||
device.IsNvidia() && device.GetNvidiaArch() <= NvidiaArchitecture::Arch_Pascal,
|
device.IsNvidia() && device.GetNvidiaArch() <= NvidiaArchitecture::Arch_Pascal,
|
||||||
.min_ssbo_alignment = device.GetStorageBufferAlignment(),
|
.min_ssbo_alignment = device.GetStorageBufferAlignment(),
|
||||||
|
.max_user_clip_distances = device.GetMaxUserClipDistances(),
|
||||||
};
|
};
|
||||||
|
|
||||||
host_info = Shader::HostTranslateInfo{
|
host_info = Shader::HostTranslateInfo{
|
||||||
|
@ -289,12 +289,15 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (has_multi_queries) {
|
if (has_multi_queries) {
|
||||||
size_t intermediary_buffer_index = ObtainBuffer<false>(num_slots_used);
|
const size_t min_accumulation_limit =
|
||||||
|
std::min(first_accumulation_checkpoint, num_slots_used);
|
||||||
|
const size_t max_accumulation_limit =
|
||||||
|
std::max(last_accumulation_checkpoint, num_slots_used);
|
||||||
|
const size_t intermediary_buffer_index = ObtainBuffer<false>(num_slots_used);
|
||||||
resolve_buffers.push_back(intermediary_buffer_index);
|
resolve_buffers.push_back(intermediary_buffer_index);
|
||||||
queries_prefix_scan_pass->Run(*accumulation_buffer, *buffers[intermediary_buffer_index],
|
queries_prefix_scan_pass->Run(*accumulation_buffer, *buffers[intermediary_buffer_index],
|
||||||
*buffers[resolve_buffer_index], num_slots_used,
|
*buffers[resolve_buffer_index], num_slots_used,
|
||||||
std::min(first_accumulation_checkpoint, num_slots_used),
|
min_accumulation_limit, max_accumulation_limit);
|
||||||
last_accumulation_checkpoint);
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
scheduler.RequestOutsideRenderPassOperationContext();
|
scheduler.RequestOutsideRenderPassOperationContext();
|
||||||
|
@ -695,6 +695,11 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR
|
|||||||
std::min(properties.properties.limits.maxVertexInputBindings, 16U);
|
std::min(properties.properties.limits.maxVertexInputBindings, 16U);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (is_turnip) {
|
||||||
|
LOG_WARNING(Render_Vulkan, "Turnip requires higher-than-reported binding limits");
|
||||||
|
properties.properties.limits.maxVertexInputBindings = 32;
|
||||||
|
}
|
||||||
|
|
||||||
if (!extensions.extended_dynamic_state && extensions.extended_dynamic_state2) {
|
if (!extensions.extended_dynamic_state && extensions.extended_dynamic_state2) {
|
||||||
LOG_INFO(Render_Vulkan,
|
LOG_INFO(Render_Vulkan,
|
||||||
"Removing extendedDynamicState2 due to missing extendedDynamicState");
|
"Removing extendedDynamicState2 due to missing extendedDynamicState");
|
||||||
|
@ -665,6 +665,10 @@ public:
|
|||||||
return properties.properties.limits.maxViewports;
|
return properties.properties.limits.maxViewports;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
u32 GetMaxUserClipDistances() const {
|
||||||
|
return properties.properties.limits.maxClipDistances;
|
||||||
|
}
|
||||||
|
|
||||||
bool SupportsConditionalBarriers() const {
|
bool SupportsConditionalBarriers() const {
|
||||||
return supports_conditional_barriers;
|
return supports_conditional_barriers;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user