early-access version 2079
This commit is contained in:
parent
945f9b6650
commit
beb20c8cb8
@ -1,7 +1,7 @@
|
||||
yuzu emulator early access
|
||||
=============
|
||||
|
||||
This is the source code for early-access 2078.
|
||||
This is the source code for early-access 2079.
|
||||
|
||||
## Legal Notice
|
||||
|
||||
|
@ -492,7 +492,8 @@ void TexturePass(Environment& env, IR::Program& program) {
|
||||
const auto insert_point{IR::Block::InstructionList::s_iterator_to(*inst)};
|
||||
IR::IREmitter ir{*texture_inst.block, insert_point};
|
||||
const IR::U32 shift{ir.Imm32(std::countr_zero(DESCRIPTOR_SIZE))};
|
||||
inst->SetArg(0, ir.ShiftRightArithmetic(cbuf.dynamic_offset, shift));
|
||||
inst->SetArg(0, ir.UMin(ir.ShiftRightArithmetic(cbuf.dynamic_offset, shift),
|
||||
ir.Imm32(DESCRIPTOR_SIZE - 1)));
|
||||
} else {
|
||||
inst->SetArg(0, IR::Value{});
|
||||
}
|
||||
|
@ -257,9 +257,9 @@ private:
|
||||
|
||||
void AsyncFlushQuery(VAddr addr) {
|
||||
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;
|
||||
@ -275,8 +275,8 @@ private:
|
||||
|
||||
std::array<CounterStream, VideoCore::NumQueryTypes> streams;
|
||||
|
||||
std::shared_ptr<std::unordered_set<VAddr>> uncommitted_flushes{};
|
||||
std::list<std::shared_ptr<std::unordered_set<VAddr>>> committed_flushes;
|
||||
std::shared_ptr<std::vector<VAddr>> uncommitted_flushes{};
|
||||
std::list<std::shared_ptr<std::vector<VAddr>>> committed_flushes;
|
||||
};
|
||||
|
||||
template <class QueryCache, class HostCounter>
|
||||
|
@ -117,7 +117,8 @@ u64 HostCounter::BlockingQuery() const {
|
||||
cache.GetScheduler().Wait(tick);
|
||||
u64 data;
|
||||
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) {
|
||||
case VK_SUCCESS:
|
||||
|
@ -127,7 +127,7 @@ constexpr VkBorderColor ConvertBorderColor(const std::array<float, 4>& color) {
|
||||
const auto format_info = MaxwellToVK::SurfaceFormat(device, FormatType::Optimal, false, format);
|
||||
VkImageCreateFlags flags = VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT;
|
||||
if (info.type == ImageType::e2D && info.resources.layers >= 6 &&
|
||||
info.size.width == info.size.height) {
|
||||
info.size.width == info.size.height && !device.HasBrokenCubeImageCompability()) {
|
||||
flags |= VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT;
|
||||
}
|
||||
if (info.type == ImageType::e3D) {
|
||||
|
@ -588,22 +588,27 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR
|
||||
ext_extended_dynamic_state = false;
|
||||
}
|
||||
}
|
||||
|
||||
sets_per_pool = 64;
|
||||
if (driver_id == VK_DRIVER_ID_AMD_PROPRIETARY || driver_id == VK_DRIVER_ID_AMD_OPEN_SOURCE) {
|
||||
|
||||
const bool is_amd =
|
||||
driver_id == VK_DRIVER_ID_AMD_PROPRIETARY || driver_id == VK_DRIVER_ID_AMD_OPEN_SOURCE;
|
||||
if (is_amd) {
|
||||
// AMD drivers need a higher amount of Sets per Pool in certain circunstances like in XC2.
|
||||
sets_per_pool = 96;
|
||||
}
|
||||
|
||||
const bool is_amd = driver_id == VK_DRIVER_ID_AMD_PROPRIETARY ||
|
||||
driver_id == VK_DRIVER_ID_MESA_RADV ||
|
||||
driver_id == VK_DRIVER_ID_AMD_OPEN_SOURCE;
|
||||
if (ext_sampler_filter_minmax && is_amd) {
|
||||
// Disable ext_sampler_filter_minmax on AMD GCN4 and lower as it is broken.
|
||||
// Disable VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT on AMD GCN4 and lower as it is broken.
|
||||
if (!is_float16_supported) {
|
||||
LOG_WARNING(
|
||||
Render_Vulkan,
|
||||
"Blacklisting AMD GCN4 and lower for VK_EXT_SAMPLER_FILTER_MINMAX_EXTENSION_NAME");
|
||||
"AMD GCN4 and earlier do not properly support VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT");
|
||||
has_broken_cube_compatibility = true;
|
||||
}
|
||||
}
|
||||
const bool is_amd_or_radv = is_amd || driver_id == VK_DRIVER_ID_MESA_RADV;
|
||||
if (ext_sampler_filter_minmax && is_amd_or_radv) {
|
||||
// Disable ext_sampler_filter_minmax on AMD GCN4 and lower as it is broken.
|
||||
if (!is_float16_supported) {
|
||||
LOG_WARNING(Render_Vulkan,
|
||||
"Blacklisting AMD GCN4 and earlier for VK_EXT_sampler_filter_minmax");
|
||||
ext_sampler_filter_minmax = false;
|
||||
}
|
||||
}
|
||||
|
@ -309,6 +309,11 @@ public:
|
||||
return has_renderdoc || has_nsight_graphics;
|
||||
}
|
||||
|
||||
/// Returns true when the device does not properly support cube compatibility.
|
||||
bool HasBrokenCubeImageCompability() const {
|
||||
return has_broken_cube_compatibility;
|
||||
}
|
||||
|
||||
/// Returns the vendor name reported from Vulkan.
|
||||
std::string_view GetVendorName() const {
|
||||
return vendor_name;
|
||||
@ -421,6 +426,7 @@ private:
|
||||
bool ext_conservative_rasterization{}; ///< Support for VK_EXT_conservative_rasterization.
|
||||
bool ext_provoking_vertex{}; ///< Support for VK_EXT_provoking_vertex.
|
||||
bool nv_device_diagnostics_config{}; ///< Support for VK_NV_device_diagnostics_config.
|
||||
bool has_broken_cube_compatibility{}; ///< Has broken cube compatiblity bit
|
||||
bool has_renderdoc{}; ///< Has RenderDoc attached
|
||||
bool has_nsight_graphics{}; ///< Has Nsight Graphics attached
|
||||
bool supports_d24_depth{}; ///< Supports D24 depth buffers.
|
||||
|
Loading…
Reference in New Issue
Block a user