Commit Graph

13816 Commits

Author SHA1 Message Date
Jake Turner e36062b989 Apple added drawableID to MetalDrawableInfo
If MTL:Drawable is not found by pointer, fallback and search for it by drawableID (which should be unique and monotonically increasing).

This fixes a problem preventing frame capture when launching RenderDoc UI from Xcode with "GPU Frame Capture" enabled.
2023-04-12 17:30:27 +01:00
William Pearson e6fb67c1e1 Support spaces in clang-format path
This allows setting the CLANG_FORMAT environment variable to (e.g.)
`C:/Program Files/LLVM3.8.1/bin/clang-format.exe` and then using the
script from Git Bash on Windows. Before, it would break if there
were spaces in the path. (If a suitable clang-format were in the PATH
environment variable, though, I don't think spaces caused problems.)
2023-04-12 10:54:19 +01:00
Jake Turner 1c925494ef Default Xcode option GPU Frame Capture to Disabled
The CMake option "CMAKE_XCODE_SCHEME_ENABLE_GPU_FRAME_CAPTURE_MODE" is available starting from CMake version 3.23.0.

Increase the minimum CMake version for building Apple to 3.23.0 from 3.20.0
2023-04-12 10:50:27 +01:00
Jake Turner b692626839 Synchronize Metal-CPP from renderdoc to demos 2023-04-12 10:50:09 +01:00
Jake Turner 7bcbc5a257 Update Metal CPP to support tests project
Add extensions from Learn Metal-cpp project: https://developer.apple.com/metal/cpp/

https://developer.apple.com/metal/LearnMetalCPP.zip

Custom additions to Metal CPP to get NSApplication, NSMenu, NSMenuItem, NSRunningApplication, NSView, NSWindow
2023-04-12 10:50:09 +01:00
Jake Turner 114d646cc2 Metal-CPP: extend CA::MetalLayer* methods
Add:

CGFloat CA::MetalLayer::contentsScale() const;
CGRect CA::MetalLayer::bounds() const;
2023-04-12 10:50:09 +01:00
Jake Turner 57f9ac6fed Metal-CPP: extend NS:Data* & NS::Bundle* methods
Add:
NS::String* NS::Bundle::pathForResource(const class String* pName, const class String* pExt) const;
NS::Data *NS::Data::dataWithContentsOfFile(const String* path);
const void* NS::Data::bytes() const;
2023-04-12 10:50:09 +01:00
Jake Turner 946c6fef11 Tweak MTL type declarations in metal-cpp.h
Changes to make metal-cpp options work nicely with RenderDoc serialization
_MTL_OPTIONS -> _NS_ENUM

RenderDoc serialization works with fixed sized types
2023-04-12 10:50:09 +01:00
Jake Turner cf246ebad7 Tweak NS type declarations in metal-cpp.h
Changes to make metal-cpp enums work nicely with RenderDoc serialization
NS::Integer -> std::int64_t
NS::UInteger -> std::uint64_t

RenderDoc serialization works with fixed sized types
2023-04-12 10:50:09 +01:00
Jake Turner fcc721c2e4 Fix compile warnings/errors in metal-cpp.h
Forward declare MTL::Drawable to avoid conflicts. "Drawable" is a common type name
2023-04-12 10:50:09 +01:00
Jake Turner 21325315ac Apple metal-cpp macOS13.3-iOS16.4
Raw header file from Metal-cpp project
Generated using

./SingleHeader/MakeSingleHeader.py Foundation/Foundation.hpp QuartzCore/QuartzCore.hpp Metal/Metal.hpp

Metal-cpp project: https://developer.apple.com/metal/cpp/files/metal-cpp_macOS13.3_iOS16.4.zip
2023-04-12 10:50:09 +01:00
Jake Turner 6f5b849f45 Update Metal wrapped objects to match MacOS13.3
MTLDevice changes

Change API availability:

supportsBCTextureCompression : API_AVAILABLE(macos(11.0), ios(16.4))

Added protocols:

- (BOOL)shouldMaximizeConcurrentCompilation API_AVAILABLE(macos(13.3)) API_UNAVAILABLE(ios)

- (void)setShouldMaximizeConcurrentCompilation:(BOOL)value API_AVAILABLE(macos(13.3))API_UNAVAILABLE(ios)

-(NSUInteger)maximumConcurrentCompilationTaskCount API_AVAILABLE(macos(13.3)) API_UNAVAILABLE(ios)

MTLFunction changes

Change API availability:

newArgumentEncoderWithBufferIndex : API_DEPRECATED("Use MTLDevice's newArgumentEncoderWithBufferBinding: instead", macos(10.13, 13.0), ios(11.0, 16.0))

Added:

bool WrappedMTLDevice::shouldMaximizeConcurrentCompilation();
NS::UInteger WrappedMTLDevice::maximumConcurrentCompilationTaskCount();
2023-04-12 10:50:09 +01:00
Jake Turner 4ae4116f85 Synchronise Metal-CPP between driver and demos
Added

CA::Layer* NS::View::layer() const;
2023-04-12 10:50:09 +01:00
derhass c5e58a6024 Improve robustness of fbconfig selection for cloned GL context (glX)
The glXGetConfig(..., GLX_FBCONFIG_ID, &fbcfgID) call does not work
reliably on many implementations. In this case, all available fbconfigs
are queried and the first one is chosen, but this might be incompatible
to the visual of the window, resulting in a failure when the cloned
context is made current for the first time (issue: #2898).

This adds a fallback to query the fbconfig ID from the GL context if
querying it from the VisualInfo failed.
2023-04-10 16:03:32 +01:00
baldurk 8009df5027 Add note of rules to bug report template and README 2023-04-06 16:39:22 +01:00
baldurk 04a0fdb538 Add marker regions for GL pixel history 2023-04-05 17:33:44 +01:00
baldurk 24b0857b00 Use D32S8 instead of D24S8 for custom depth on GL pixel history
* We handwave the additional depth accuracy and hope that it's not an issue, but
  it's important not to potentially lose accuracy.
2023-04-05 17:33:20 +01:00
baldurk a4a2beac24 Force the use of a stencil for fragment counting in GL. Closes #2894 2023-04-05 17:32:17 +01:00
baldurk 64b511a1fa Ensure that stencil is available for fragment counting. Refs #2894 2023-04-05 15:42:03 +01:00
baldurk bb4caf7546 Remove reset notification EGL context attribute. Closes #2888 2023-04-05 15:08:03 +01:00
baldurk 1b72599382 Only require GLSL extensions on proper GL, not on GLES 2023-04-05 15:06:05 +01:00
baldurk b74f2bd593 Promote SINGLE_FLUSH_VALIDATE compile option to runtime debug config 2023-04-05 13:22:14 +01:00
baldurk 41901b55c6 Handle binding D3D12 descriptor tables off the end of the heap
* We truncate the size of the table, even if it isn't bigger than the heap it
  may be bound such that it runs off the end of the heap.
2023-04-04 16:45:00 +01:00
baldurk 4ffade076a Only show discard resource usage on final subpass. Refs #2895 2023-04-04 13:06:23 +01:00
baldurk 244a3e671b Bump version to v1.27 2023-03-31 21:15:48 +01:00
baldurk 4524cddca9 Update documentation to account for GL pixel history support v1.26 2023-03-31 19:56:04 +01:00
baldurk 65042f1e0d Build local llvm in new docker to support spirv-tools 2023-03-31 19:55:04 +01:00
baldurk 3ff12d4067 Update path in build script to use latest cmake 2023-03-31 10:31:30 +01:00
baldurk 743a60e753 Update used cmake version for building spirv-tools 2023-03-31 10:19:07 +01:00
baldurk a0863b2aed Check for DDS files having legacy header but no bitmask 2023-03-29 10:29:37 +01:00
baldurk e9708d909e Add handling for binop DXIL constants 2023-03-28 13:53:22 +01:00
baldurk f36a9f8845 Handle empty/NULL shading rate info structs 2023-03-28 10:58:22 +01:00
baldurk b2832d11a6 Do manual sRGB conversion on ReadPixels path for pixel history 2023-03-24 16:46:42 +00:00
baldurk 0eb7062d66 Add handling for pixel history on MRT 2023-03-24 16:30:03 +00:00
baldurk 75bfff3481 Mark UAV writes appropriately in GL pixel history 2023-03-24 15:04:15 +00:00
baldurk b388aeb7b7 Update window params before processing context activate. Closes #2890 2023-03-24 14:48:24 +00:00
baldurk c353f6fe6d Add memory readback microbenchmark 2023-03-23 16:16:03 +00:00
baldurk 448b78ca68 Bare bones port of demos project to android 2023-03-23 16:16:03 +00:00
baldurk 28f4af1e5c Avoid deadlock if resource is unmapped during capture end on D3D12 2023-03-23 16:16:03 +00:00
baldurk 5fbc3ab8ca Enable GPU readback path on D3D12 2023-03-23 16:16:02 +00:00
baldurk 129cb33266 Tweak selection of memory types for GPU readback on Vulkan 2023-03-23 16:16:02 +00:00
baldurk 0851a9f1ad Fix S8 testing in GL_Discard_Zoo 2023-03-23 16:16:02 +00:00
郝华青(Huaqing.H) 58f0e7bc42 fixing a documentation example
Fix the following errors in the sample code:
AttributeError: 'renderdoc.ActionDescription' object has no attribute 'name'
NameError: name 'window_callback' is not defined
2023-03-17 08:30:09 +00:00
baldurk 54aa110862 Return after detecting an error instead of continuing in lz4 decode 2023-03-16 16:55:21 +00:00
baldurk 7a088ac898 Handle some errors better without stalling in replay proxy networking 2023-03-16 16:55:21 +00:00
baldurk 3ba61e20a6 Fix handling of proxying S8 textures 2023-03-16 16:55:21 +00:00
baldurk 38afb7c8ad Fix handling of S8 multisampled textures. Closes #2883 2023-03-14 16:32:06 +00:00
baldurk 31d5fa9eb3 Fix non-coherent atom alignment issues 2023-03-14 15:11:58 +00:00
baldurk b3035d280e Add a couple of fixes for single flush validate 2023-03-14 14:05:42 +00:00
baldurk bc789ba535 Fix D3D12 RTV formats not being set for float case on MSAA conversion 2023-03-13 17:39:16 +00:00