Commit Graph

3923 Commits

Author SHA1 Message Date
Rémi Verschelde f648de1a83
Merge pull request #96209 from stuartcarnie/sgc/96077/fix_sdfgi
Metal: Use correct operator to ensure specialisation constants are sorted
2024-08-28 13:14:34 +02:00
Stuart Carnie 4b02c9bb0a
Metal: Use correct operator to ensure all specialisation constants are applied
Fixes #96077
2024-08-28 20:07:19 +10:00
bruvzg ae334e069c
[Windows] Always use absolute UNC paths and long path aware APIs, add "long path aware" flag to the application manifest. 2024-08-28 11:15:57 +03:00
Chaosus f538376c3b Add `CLIP_SPACE_FAR` built-in to spatial shader 2024-08-27 08:48:46 +03:00
Rémi Verschelde 850067d686
Merge pull request #96089 from stuartcarnie/sgc/metal_tidy_up
Metal: Minor improvements to shader cache
2024-08-26 22:45:54 +02:00
Stuart Carnie 6de70e6b8a
Metal: Minor improvements to #96052; update logger subsystem name 2024-08-27 05:47:06 +10:00
BlueCube3310 e8b4568900 Compatibility: Fix crash when initializing certain compressed layered textures 2024-08-26 13:24:00 +02:00
Rémi Verschelde 28a72fa434
Merge pull request #95934 from bruvzg/win_ang_fb
Enable fallback from ANGLE to native and improve ANGLE error messages.
2024-08-25 22:51:38 +02:00
Rémi Verschelde 5f7060c18a
Merge pull request #96052 from stuartcarnie/sgc/metal_shader_compilation
Metal: Improve startup times by using concurrent shader compilation APIs
2024-08-25 22:24:24 +02:00
bruvzg a07f92a81c [Windows] Move __REQUIRED_RPCNDR_H_VERSION__ to the header. 2024-08-25 22:57:35 +03:00
bruvzg f8a6c0e8ab
Enable fallback from ANGLE to native and improve ANGLE error messages. 2024-08-25 21:19:54 +03:00
Rémi Verschelde 68d188d521
Merge pull request #95888 from clayjohn/Lightmap-SH-coefficients
Use correct lightmap coefficients to ensure that the directional lightmap mode looks correct
2024-08-25 20:18:18 +02:00
Matias N. Goldberg 59d0422dcd Disable extra memory tracking by default
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
2024-08-24 20:52:39 -03:00
Stuart Carnie 2ef1ef63a5
Metal: Improve startup times by using concurrent shader compilation APIs 2024-08-25 09:05:58 +10:00
Rémi Verschelde e3550cb20f
Merge pull request #95975 from darksylinc/matias-TheForge-hotfix
Fix build error in arm32
2024-08-24 01:01:37 +02:00
Matias N. Goldberg 38ae58bda2 Fix build error in arm32
Fixes #95973
2024-08-23 12:52:47 -03:00
Stuart Carnie bbc7962fe2
Metal: fix artefacts for mobile render method and return false for multi-view support 2024-08-22 21:34:53 +10:00
Rémi Verschelde 568589c9d8
Merge pull request #90993 from darksylinc/matias-TheForge
Add debug utilities for Vulkan
2024-08-22 00:38:22 +02:00
Rémi Verschelde 37ae2a2900
Merge pull request #95921 from akien-mga/scons-validate-opt-in-drivers
SCons: Better validation for platform-specific opt-in drivers
2024-08-22 00:10:56 +02:00
Rémi Verschelde 39b77ea04e
Merge pull request #95790 from aaronfranke/rect-aabb-support
Simplify Rect2/AABB `get_support` function
2024-08-22 00:10:39 +02:00
Matias N. Goldberg 364f916f3f
Add debug utilities for Vulkan
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.
2024-08-21 23:48:08 +02:00
Rémi Verschelde 6e9bcc0f18
SCons: Better validation for platform-specific opt-in drivers
This replaces cryptic compilation errors with a clear error message
and early build termination.
2024-08-21 22:53:34 +02:00
clayjohn f4ccba7508 Use correct lightmap coefficients to ensure that the directional lightmap mode looks correct
Also remove the metallic option from directional lightmap as it is guaranteed to return negative numbers in many cases
2024-08-21 10:24:32 -07:00
Stuart Carnie 2d0165574d
Add Metal support for macOS (arm64) and iOS 2024-08-20 12:11:06 +02:00
Stuart Carnie 41875d8aef
macOS/iOS: Fix various warnings when targeting newer SDKs 2024-08-20 11:55:21 +02:00
Rémi Verschelde 033054f182
Merge pull request #95838 from olawlor/vertex65536bugfix
Fix GLES3 crash with Mesh surface with exactly 65536 vertices
2024-08-20 10:03:06 +02:00
Rémi Verschelde 6a9ecdcf0c
Merge pull request #91818 from rburing/fti_multimesh
Physics interpolation: `MultiMesh`
2024-08-20 10:01:46 +02:00
Rémi Verschelde 8acd82f70e
Merge pull request #89919 from BlueCube3310/bicubic-lightmap
Implement bicubic sampling for lightmaps
2024-08-20 10:01:41 +02:00
Rémi Verschelde 333f0f910f
Merge pull request #86000 from jsjtxietian/add-missing-model_normal_matrix
Add `model_normal_matrix` for fragment shader
2024-08-20 10:01:36 +02:00
Orion Lawlor bde165ccb3
Fix GLES3 crash with Mesh surface with exactly 65536 vertices
Fixes #95837.
2024-08-20 09:08:16 +02:00
Aaron Franke 7db24a9ad5
Simplify and fix Rect2/AABB get_support function 2024-08-19 23:55:31 -07:00
jsjtxietian e698351db2 Add model_normal_matrix for fragment shader 2024-08-20 12:39:29 +08:00
Rémi Verschelde 6bf64027b7
Merge pull request #94785 from Chaosus/shader_fix_samplers_order
Fix texture samplers to not being last in the property list
2024-08-19 16:05:21 +02:00
Rémi Verschelde 8b39d7f326
Merge pull request #95666 from kleonc/parallax2d_repeat_offsets_relative_to_source
Fix `Parallax2D` repeats being not relative to its transform
2024-08-19 14:34:21 +02:00
Rémi Verschelde c6400a8fe4
Merge pull request #95662 from clayjohn/GLES3-sky-fog
Add fixed fog to the sky in the Compatibility renderer
2024-08-19 12:09:10 +02:00
Rémi Verschelde 824a97120e
Merge pull request #92213 from clayjohn/ambient-disabled
Disable all sources of ambient light when `ambient_light_disabled` render mode is used
2024-08-19 12:08:31 +02:00
kleonc 1bd8372813 Fix Parallax2D repeats being not relative to its transform 2024-08-19 11:43:16 +02:00
BlueCube3310 ef9bb1a207 Implement support for bicubic lightmap filtering
Co-authored-by: Calinou <hugo.locurcio@hugo.pro>
2024-08-19 09:52:09 +02:00
Ricardo Buring 1728f80e7c Fixed Timestep Interpolation: MultiMesh
Adds fixed timestep interpolation to multimeshes.

Co-authored-by: lawnjelly <lawnjelly@gmail.com>
2024-08-18 17:14:59 +02:00
clayjohn 578049b7b9 Add fixed fog to the sky in the Compatibility renderer
And apply luminance multiplier after fog in RD renderer
2024-08-17 23:33:26 -07:00
Rémi Verschelde 851d0a764d
Merge pull request #95536 from jsjtxietian/rename-alpha-scissor
Fix undefined `alpha_scissor` in standard shader
2024-08-16 14:35:38 +02:00
Rémi Verschelde a298512bc4
Merge pull request #95452 from clayjohn/GLES3-skeleton
Increase precision of skeleton transforms in the skeleton shader in the Compatibility renderer
2024-08-16 10:36:16 +02:00
Rémi Verschelde ae9fb96a36
Merge pull request #95433 from dsnopek/openxr-composition-layers-srgb
OpenGL: Unconditionally do `glDisable(GL_FRAMEBUFFER_SRGB)` because we do our own sRGB conversion
2024-08-16 10:35:56 +02:00
Rémi Verschelde a8bbb09bd5
Merge pull request #95143 from TV4Fun/fix_non_windows_library_load
Fix reload of GDExtension libraries in framework package on macOS
2024-08-16 10:35:19 +02:00
Rémi Verschelde 074d8b0938
Merge pull request #94835 from MileyHollenberg/bugfix-powervr-gpu-crash
Fix crash on powerVR GPUs when a cached shader wasn't loaded in properly
2024-08-16 10:34:55 +02:00
Rémi Verschelde 1fea6ed01c
Merge pull request #94733 from RandomShaper/d3d12_tex_barr_fast
D3D12: Be explicit about all-resources texture barriers
2024-08-16 10:34:49 +02:00
Rémi Verschelde cddf321d30
Merge pull request #94731 from RandomShaper/d3d12_no_null_barr_grps
D3D12: Avoid validation warnings about zero-sized barrier groups
2024-08-16 10:34:42 +02:00
jsjtxietian 970a237c20 Fix undefined `alpha_scissor` in standard shader 2024-08-15 11:44:11 +08:00
clayjohn 1bf594fb5a Increase precision of skeleton transforms in the skeleton shader in the Compatibility renderer 2024-08-12 16:12:04 -07:00
David Snopek dfcff4ef46 OpenGL: Unconditionally do `glDisable(GL_FRAMEBUFFER_SRGB)` because we do our own sRGB conversion 2024-08-12 12:40:38 -05:00