diff options
author | bunnei <bunneidev@gmail.com> | 2023-05-06 09:40:10 +0200 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2023-06-03 09:06:00 +0200 |
commit | 8dc7fe0c968ef110d987dea75bad30817035372c (patch) | |
tree | d4ddb7bd8f4b29bb92169512ed1a2e072edf8dbf | |
parent | android: Update progard to fix settings crash (diff) | |
download | yuzu-8dc7fe0c968ef110d987dea75bad30817035372c.tar yuzu-8dc7fe0c968ef110d987dea75bad30817035372c.tar.gz yuzu-8dc7fe0c968ef110d987dea75bad30817035372c.tar.bz2 yuzu-8dc7fe0c968ef110d987dea75bad30817035372c.tar.lz yuzu-8dc7fe0c968ef110d987dea75bad30817035372c.tar.xz yuzu-8dc7fe0c968ef110d987dea75bad30817035372c.tar.zst yuzu-8dc7fe0c968ef110d987dea75bad30817035372c.zip |
-rw-r--r-- | src/android/app/src/main/jni/config.cpp | 4 | ||||
-rw-r--r-- | src/android/app/src/main/jni/default_ini.h | 2 | ||||
-rw-r--r-- | src/video_core/renderer_vulkan/vk_buffer_cache.cpp | 10 | ||||
-rw-r--r-- | src/video_core/renderer_vulkan/vk_buffer_cache.h | 2 | ||||
-rw-r--r-- | src/video_core/vulkan_common/vulkan_device.h | 4 |
5 files changed, 17 insertions, 5 deletions
diff --git a/src/android/app/src/main/jni/config.cpp b/src/android/app/src/main/jni/config.cpp index 7a83fea42..34aa1ee4c 100644 --- a/src/android/app/src/main/jni/config.cpp +++ b/src/android/app/src/main/jni/config.cpp @@ -214,7 +214,6 @@ void Config::ReadValues() { ReadSetting("Renderer", Settings::values.shader_backend); ReadSetting("Renderer", Settings::values.use_asynchronous_shaders); ReadSetting("Renderer", Settings::values.nvdec_emulation); - ReadSetting("Renderer", Settings::values.accelerate_astc); ReadSetting("Renderer", Settings::values.use_fast_gpu_time); ReadSetting("Renderer", Settings::values.use_vulkan_driver_pipeline_cache); ReadSetting("Renderer", Settings::values.async_presentation); @@ -227,6 +226,9 @@ void Config::ReadValues() { ReadSetting("Renderer", Settings::values.bg_green); ReadSetting("Renderer", Settings::values.bg_blue); + // Disable ASTC compute by default on Android + Settings::values.accelerate_astc = config->GetBoolean("Renderer", "accelerate_astc", false); + // Enable force_max_clock by default on Android Settings::values.renderer_force_max_clock = config->GetBoolean("Renderer", "force_max_clock", true); diff --git a/src/android/app/src/main/jni/default_ini.h b/src/android/app/src/main/jni/default_ini.h index d6bf458a6..da541851e 100644 --- a/src/android/app/src/main/jni/default_ini.h +++ b/src/android/app/src/main/jni/default_ini.h @@ -333,7 +333,7 @@ use_asynchronous_shaders = nvdec_emulation = # Accelerate ASTC texture decoding. -# 0: Off, 1 (default): On +# 0 (default): Off, 1: On accelerate_astc = # Turns on the speed limiter, which will limit the emulation speed to the desired speed limit value diff --git a/src/video_core/renderer_vulkan/vk_buffer_cache.cpp b/src/video_core/renderer_vulkan/vk_buffer_cache.cpp index 9627eb129..daa128399 100644 --- a/src/video_core/renderer_vulkan/vk_buffer_cache.cpp +++ b/src/video_core/renderer_vulkan/vk_buffer_cache.cpp @@ -303,9 +303,13 @@ BufferCacheRuntime::BufferCacheRuntime(const Device& device_, MemoryAllocator& m DescriptorPool& descriptor_pool) : device{device_}, memory_allocator{memory_allocator_}, scheduler{scheduler_}, staging_pool{staging_pool_}, guest_descriptor_queue{guest_descriptor_queue_}, - uint8_pass(device, scheduler, descriptor_pool, staging_pool, compute_pass_descriptor_queue), quad_index_pass(device, scheduler, descriptor_pool, staging_pool, compute_pass_descriptor_queue) { + if (device.GetDriverID() != VK_DRIVER_ID_QUALCOMM_PROPRIETARY) { + // TODO: FixMe: Uint8Pass compute shader does not build on some Qualcomm drivers. + uint8_pass = std::make_unique<Uint8Pass>(device, scheduler, descriptor_pool, staging_pool, + compute_pass_descriptor_queue); + } quad_array_index_buffer = std::make_shared<QuadArrayIndexBuffer>(device_, memory_allocator_, scheduler_, staging_pool_); quad_strip_index_buffer = std::make_shared<QuadStripIndexBuffer>(device_, memory_allocator_, @@ -442,7 +446,9 @@ void BufferCacheRuntime::BindIndexBuffer(PrimitiveTopology topology, IndexFormat topology == PrimitiveTopology::QuadStrip); } else if (vk_index_type == VK_INDEX_TYPE_UINT8_EXT && !device.IsExtIndexTypeUint8Supported()) { vk_index_type = VK_INDEX_TYPE_UINT16; - std::tie(vk_buffer, vk_offset) = uint8_pass.Assemble(num_indices, buffer, offset); + if (uint8_pass) { + std::tie(vk_buffer, vk_offset) = uint8_pass->Assemble(num_indices, buffer, offset); + } } if (vk_buffer == VK_NULL_HANDLE) { // Vulkan doesn't support null index buffers. Replace it with our own null buffer. diff --git a/src/video_core/renderer_vulkan/vk_buffer_cache.h b/src/video_core/renderer_vulkan/vk_buffer_cache.h index 5e9602905..794dd0758 100644 --- a/src/video_core/renderer_vulkan/vk_buffer_cache.h +++ b/src/video_core/renderer_vulkan/vk_buffer_cache.h @@ -139,7 +139,7 @@ private: vk::Buffer null_buffer; MemoryCommit null_buffer_commit; - Uint8Pass uint8_pass; + std::unique_ptr<Uint8Pass> uint8_pass; QuadIndexedPass quad_index_pass; }; diff --git a/src/video_core/vulkan_common/vulkan_device.h b/src/video_core/vulkan_common/vulkan_device.h index 3c9d11617..b692b4be4 100644 --- a/src/video_core/vulkan_common/vulkan_device.h +++ b/src/video_core/vulkan_common/vulkan_device.h @@ -500,6 +500,10 @@ public: } bool HasTimelineSemaphore() const { + if (GetDriverID() == VK_DRIVER_ID_QUALCOMM_PROPRIETARY) { + // Timeline semaphores do not work properly on all Qualcomm drivers. + return false; + } return features.timeline_semaphore.timelineSemaphore; } |