summaryrefslogtreecommitdiffstats
path: root/servers/rendering/rendering_device.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge commit godotengine/godot@f128f383e892865379cb8b14e7bcc9858efe2973Spartan3222024-11-271-214/+192
|\
| * Resolve load and store ops automatically for render passes for discardable ↵Dario2024-11-251-214/+192
| | | | | | | | textures.
* | Merge commit godotengine/godot@9e6098432aac35bae42c9089a29ba2a80320d823Spartan3222024-11-201-0/+4
|\|
| * Improve dependency detection in render graph for draw lists with partial ↵Dario2024-11-191-0/+4
| | | | | | | | coverage.
* | Merge commit godotengine/godot@6c05ec3d6732cac44cf85c91db7d3fd1075bcb23Spartan3222024-11-151-5/+8
|\|
| * Give the barrier pool its own mutex to avoid a deadlock with transfer workers.Dario2024-11-111-5/+8
| |
* | Merge commit godotengine/godot@87318a2fb7fffeb72adca934e31915be077c3d1fSpartan3222024-11-061-0/+9
|\|
| * Fix splash screen upside down on AndroidMatias N. Goldberg2024-10-311-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes an issue introduced in #96439 (see https://github.com/godotengine/godot/pull/96439#issuecomment-2447288702) Godot was relying on Java's activity.getWindowManager().getDefaultDisplay().getRotation(); to apply pre-rotation but this is wrong. First, getRotation() may temporarily return a different value from the correct one; which is what was causing the splash screen to be upside down. It would return -90 instead of 90 for the first rendered frame. But unfortunately, the splash screen is just one frame rendered for a very long time, so the error lingered for a long time for everyone to see. Second, to determine what rotation to use, we should be looking at what Vulkan told us, which is the value we pass to VkSurfaceTransformFlagBitsKHR::preTransform. This commit removes the now-unnecessary screen_get_internal_current_rotation() function (which was introduced by #96439) and now saves the preTransform value in the swapchain.
* | Merge commit godotengine/godot@8004c7524fb9f43425c4d6f614410a76678e0f7cSpartan3222024-10-301-5/+122
|\|
| * Merge pull request #97247 from thimenesup/draw_indirect_rdThaddeus Crews2024-10-291-0/+112
| |\ | | | | | | | | | Add draw indirect to Rendering Device
| | * Add draw indirect to Rendering Devicethimenesup2024-10-291-0/+112
| | |
| * | Merge pull request #98612 from DarioSamo/alignment-transfer-fixThaddeus Crews2024-10-291-5/+4
| |\ \ | | | | | | | | | | | | Fix transfer alignment on initial texture transfer.
| | * | Fix transfer alignment on initial texture transfer.Dario2024-10-281-5/+4
| | | | | | | | | | | | | | | | Fixes the regression caused by transfer workers with textures with non-standard dimensions such as the ones provided in #98601.
| * | | Merge pull request #96439 from darksylinc/matias-TheForge-pr03-rebasedClay John2024-10-291-0/+6
| |\ \ \ | | |/ / | |/| | Add Swappy & Pre-Transformed Swapchain
| | * | Add Swappy & Pre-Transformed SwapchainMatias N. Goldberg2024-10-281-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Adds Swappy for Android for stable frame pacing - Implements pre-transformed Swapchain so that Godot's compositor is in charge of rotating the screen instead of Android's compositor (performance optimization for phones that don't have HW rotator) ============================ The work was performed by collaboration of TheForge and Google. I am merely splitting it up into smaller PRs and cleaning it up. Changes from original PR: - Removed "display/window/frame_pacing/android/target_frame_rate" option to use Engine::get_max_fps instead. - Target framerate can be changed at runtime using Engine::set_max_fps. - Swappy is enabled by default. - Added documentation. - enable_auto_swap setting is replaced with swappy_mode.
* | | | Fix copyright headers referring to GodotSpartan3222024-10-271-2/+2
| | | |
* | | | Merge commit godotengine/godot@1015a481ff43edb1126ab39a147fefda290131e5Spartan3222024-10-241-0/+4
|\| | |
| * | | Implement thread ownership change for RenderingDevicePedro J. Estébanez2024-10-211-0/+4
| | | |
* | | | Merge commit godotengine/godot@80f0b33313dae52d072ba2771a88ebcc4f0b4d6dSpartan3222024-10-181-23/+58
|\| | |
| * | | Move transitions of textures initialized by transfer workers to the main ↵Dario2024-10-181-11/+35
| | | | | | | | | | | | | | | | | | | | | | | | graphics queue. Also adds a new possible texture layout and API trait to support a particular behavior in D3D12 where only the COMMON layout is supported in copy queues. Fixes #98158.
| * | | Rewrite semaphore handling for transfer workers.Dario2024-10-171-13/+24
| |/ /
* / / Rebrand preambles to RedotDubhghlas McLaughlin2024-10-111-0/+2
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Credits: Co-authored-by: Skogi <skogi.b@gmail.com> Co-authored-by: Spartan322 <Megacake1234@gmail.com> Co-authored-by: swashberry <swashdev@pm.me> Co-authored-by: Christoffer Sundbom <christoffer_karlsson@live.se> Co-authored-by: Dubhghlas McLaughlin <103212704+mcdubhghlas@users.noreply.github.com> Co-authored-by: McDubh <103212704+mcdubhghlas@users.noreply.github.com> Co-authored-by: Dubhghlas McLaughlin <103212704+mcdubhghlas@users.noreply.github.com> Co-authored-by: radenthefolf <radenthefolf@gmail.com> Co-authored-by: John Knight <80524176+Tekisasu-JohnK@users.noreply.github.com> Co-authored-by: Adam Vondersaar <adam.vondersaar@uphold.com> Co-authored-by: decryptedchaos <nixgod@gmail.com> Co-authored-by: zaftnotameni <122100803+zaftnotameni@users.noreply.github.com> Co-authored-by: Aaron Benjamin <lifeartstudios@gmail.com> Co-authored-by: wesam <108880473+wesamdev@users.noreply.github.com> Co-authored-by: Mister Puma <MisterPuma80@gmail.com> Co-authored-by: Aaron Benjamin <lifeartstudios@gmail.com> Co-authored-by: SingleError <isaaconeoneone@gmail.com> Co-authored-by: Bioblaze Payne <BioblazePayne@gmail.com>
* / Implement asynchronous transfer queues, thread guards on RenderingDevice. ↵Dario2024-10-021-334/+929
|/ | | | | | | | | | | Add ubershaders and rework pipeline caches for Forward+ and Mobile. - Implements asynchronous transfer queues from PR #87590. - Adds ubershaders that can run with specialization constants specified as push constants. - Pipelines with specialization constants can compile in the background. - Added monitoring for pipeline compilations. - Materials and shaders can now be created asynchronously on background threads. - Meshes that are loaded on background threads can also compile pipelines as part of the loading process.
* [Editor,Servers]: Minor optimizationsStuart Carnie2024-09-121-8/+8
|
* RenderingDevice: Fix uncapped mipmap sizes causing div-by-zeroPedro J. Estébanez2024-09-091-2/+2
|
* Merge pull request #94477 from RedMser/typos-batch-1Rémi Verschelde2024-08-281-2/+2
|\ | | | | | | Fix various typos
| * Fix typosRedMser2024-07-171-2/+2
| |
* | Merge pull request #93985 from alvinhochun/windows-gpu-prefRémi Verschelde2024-08-281-2/+3
|\ \ | | | | | | | | | Respect integrated GPU preference in Windows Settings
| * | Respect integrated GPU preference in Windows SettingsAlvin Wong2024-07-161-2/+3
| |/
* | Disable extra memory tracking by defaultMatias N. Goldberg2024-08-241-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR #90993 added several debugging utilities. Among them, advanced memory tracking through the use of custom allocators and VK_EXT_device_memory_report. However as issue #95967 reveals, it is dangerous to leave it on by default because drivers (or even the Vulkan loader) can too easily accidentally break custom allocators by allocating memory through std malloc but then request us to deallocate it (or viceversa). This PR fixes the following problems: - Adds --extra-gpu-memory-tracking cmd line argument - Adds missing enum entries to RenderingContextDriverVulkan::VkTrackedObjectType - Adds RenderingDevice::get_driver_and_device_memory_report - GDScript users can easily check via print( RenderingServer.get_rendering_device().get_driver_and_device_memory_report() ) - Uses get_driver_and_device_memory_report on device lost for appending further info. Fixes #95967
* | Add debug utilities for VulkanMatias N. Goldberg2024-08-211-6/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Features: - Debug-only tracking of objects by type. See get_driver_allocs_by_object_type et al. - Debug-only Breadcrumb info for debugging GPU crashes and device lost - Performance report per frame from get_perf_report - Some VMA calls had to be modified in order to insert the necessary memory callbacks Functionality marked as "debug-only" is only available in debug or dev builds. Misc fixes: - Early break optimization in RenderingDevice::uniform_set_create ============================ The work was performed by collaboration of TheForge and Google. I am merely splitting it up into smaller PRs and cleaning it up.
* | Add Metal support for macOS (arm64) and iOSStuart Carnie2024-08-201-0/+2
| |
* | Fail when submit or sync called on main rendering deviceclayjohn2024-08-121-3/+9
| | | | | | | | Fail if submit or sync called multiple times in a row
* | RenderingDevice: Use the correct amount of layers for Cubemaps for boundary ↵BlueCube33102024-07-241-24/+6
| | | | | | | | checks
* | RenderingDevice: Fix getting cubemap dataBlueCube33102024-07-231-3/+0
| |
* | Merge pull request #94069 from RandomShaper/fix_vk_vali_blockyRémi Verschelde2024-07-181-5/+6
|\ \ | |/ |/| | | RenderingDevice: Leave handling of compressed block granularity to the driver
| * RenderingDevice: Leave handling of compressed block granularity to the driverPedro J. Estébanez2024-07-081-5/+6
| |
* | Silence Vulkan "Unable to acquire framebuffer." swapchain errorHugo Locurcio2024-07-091-1/+6
|/ | | | This error is harmless and can be safely ignored.
* Merge pull request #91551 from m4rr5/configure_timestamp_query_elementsRémi Verschelde2024-07-071-2/+2
|\ | | | | | | Add a project setting to configure the maximum number of timestamps.
| * Added a project setting to configure the maximum amount of timestamps, with ↵Marcel Offermans2024-05-051-2/+2
| | | | | | | | a description and a reference to the setting when the limit is hit and an ERR_FAIL_COND is hit.
* | Improve handling of rendering startup errorsPedro J. Estébanez2024-06-281-1/+1
| |
* | Merge pull request #92587 from RandomShaper/validate_tex_usageRémi Verschelde2024-05-311-0/+2
|\ \ | | | | | | | | | RenderingDevice: Reject creation of textures with no usage
| * | RenderingDevice: Reject creation of textures with no usagePedro J. Estébanez2024-05-311-0/+2
| | |
* | | Merge pull request #91769 from DarioSamo/d3d12_enhanced_barriersRémi Verschelde2024-05-311-18/+336
|\ \ \ | |/ / |/| | | | | Add support for enhanced barriers in D3D12.
| * | Add support for enhanced barriers in D3D12.Dario2024-05-201-18/+336
| | | | | | | | | | | | | | | | | | | | | | | | Enables support for enhanced barriers if available. Gets rid of the implementation of [CROSS_FAMILY_FALLBACK] in the D3D12 driver. The logic has been reimplemented at a higher level in RenderingDevice itself. This fallback is only used if the RenderingDeviceDriver reports the API traits and the capability of sharing texture formats correctly. Aliases created in this way can only be used for sampling: never for writing. In most cases, the formats that do not support sharing do not support unordered access/storage writes in the first place.
* | | Merge pull request #92258 from DarioSamo/render_list_pass_allocRémi Verschelde2024-05-231-3/+6
|\ \ \ | | | | | | | | | | | | Reduce allocations each time a render pass begins in RenderingDevice.
| * | | Switch vectors in each render pass to use TLS.Dario2024-05-231-3/+6
| |/ /
* / / [DisplayServer] Add method to check if window transparency is supported and ↵bruvzg2024-05-231-0/+4
|/ / | | | | | | enabled.
* | Merge pull request #88289 from DarioSamo/rd_minimized_windowRémi Verschelde2024-05-171-3/+0
|\ \ | | | | | | | | | Fix swap chain errors when application starts minimized.
| * | Handle error when setting boot image if swap chain is not available. Skip ↵Dario2024-02-131-3/+0
| | | | | | | | | | | | resizing swap chain during screen creation as it's not necessary and can fail when it starts minimized.