Commit Graph

13035 Commits

Author SHA1 Message Date
Tatsuyuki Ishi b0ff54fbcf foz: Reconstruct specialization constants with correct layout 2022-04-25 14:17:12 +01:00
Tatsuyuki Ishi a2d77f58db foz: Rename dynamic rendering colorAttachmentFormats 2022-04-25 14:17:12 +01:00
Jake Turner aef7fc698b Add header files to demos CMakeLists.txt
Helpful for source browsing when using an IDE project generated by CMake

Potential list of header files found using:

find util/test/demos -name '*.h' \! -path "*3rdparty*" \! -path "*official*"
2022-04-25 12:08:51 +01:00
Aurelien Chanot b173e85a1f Fix crash when application is using unsupported function.
It fixes this crash:
https://gist.github.com/achanot/7e0d25d1e5a619a61b688ec895c7a349
2022-04-22 18:27:06 +01:00
Bertrand Guay-Paquet cb0dc39bf3 Add link to the contrib repository for custom visualisation 2022-04-22 13:49:56 +01:00
baldurk 1ae2afc05a Apply shader prefix even if encoding is directly accepted. Closes #2561
* The prefix, if available, must always be applied for custom shaders to compile
  correctly.
2022-04-22 12:55:40 +01:00
Jake Turner 8a95818b74 Move __MAC_12_0 define to a header file 2022-04-21 10:08:01 +01:00
Jake Turner ea5cfa6e95 Change serialized name for wrapped Metal Objects
Change WrappedMTL<TYPE>* -> MTL<TYPE>

Before

<ResourceId name="Device" typename="WrappedMTLDevice *" width="8">4</ResourceId>
<ResourceId name="Library" typename="WrappedMTLLibrary *" width="8">9</ResourceId>
<ResourceId name="vertexFunction" typename="WrappedMTLFunction *" width="8">10</ResourceId>

After
<ResourceId name="Device" typename="MTLDevice" width="8">4</ResourceId>
<ResourceId name="Library" typename="MTLLibrary" width="8">9</ResourceId>
<ResourceId name="vertexFunction" typename="MTLFunction" width="8">10</ResourceId>
2022-04-21 10:08:01 +01:00
Jake Turner 823ecdbbf7 MTLDevice wrapping for feature supported APIs
These APIs are not serialized and pass through to real device
One exception is ray tracing related support APIs return false ie.
supportsRaytracing
supportsRaytracingFromRender
2022-04-21 10:08:01 +01:00
Jake Turner 4e240a4153 WrappedMTLObject rename member variables
objcBridge -> m_ObjcBridge
real -> m_Real
id -> m_ID
record -> m_Record

MetalResourceRecord rename member variable
Resource -> m_Resource
resType -> m_Type
2022-04-21 10:08:01 +01:00
baldurk 1201d47db4 Fix tooltips for sampler variables in shader debugger 2022-04-21 00:58:15 +01:00
baldurk 0c672aff22 Set the conservative raster state display properly on vulkan 2022-04-19 12:51:26 +01:00
baldurk dee3c37d90 Fix some edge cases when handling unsaved captures. Closes #2554
* The 'no to all' option should always be present if there are multiple unsaved
  captures across the connections, even if the current connection only has one
  capture and so otherwise wouldn't have a 'no to all' option.
* The 'no to all' option will always discard all unsaved captures in all
  connections when closing the window, if the user clicks no on the confirmation
  of this, abort the close operation entirely and let them decide how to handle
  it (e.g. discarding/saving captures in connections individually).
2022-04-18 17:06:44 +01:00
baldurk 26585e9a1b Fix arrayed resource bindings shader debug variables. Closes #2550 2022-04-18 17:06:44 +01:00
Oschowa 0b1c6b8d56 vk_postvs: Fix crash with dynamic rendering
Similar to b215fbe306, this fixes crashes with dynamic rendering
when GS is used and viewMask is 0.
2022-04-18 12:00:57 +01:00
baldurk cd0118ee9e Set stencil reference for non-stencil path, even if not needed
* We're not doing any stencil work, but we should still set the dynamic state
  properly as needed by the pipeline.
2022-04-15 11:47:49 +01:00
baldurk a4360c628e Handle some edge cases when naming objects on replay 2022-04-15 11:47:49 +01:00
baldurk 9668cc9a4c Align up the page count when applying single page mappings on D3D12 2022-04-15 11:47:49 +01:00
Le Philousophe 75a7f66280 Don't run hooks multiple times when shared objects are symlinked
When two shared objects are symlinked and if one is loaded,
CheckLoadedLibraries detects the other one as loaded too and run hooks a
second time.
Prevent this as it leads to recursive blocking calls in libEGL.
2022-04-15 10:58:03 +01:00
Le Philousophe e0f5d68aec Prefer loading of libEGL.so.1 before libEGL.so
On most platforms libEGL.so is a symlink to libEGL.so.1 used for
development
2022-04-15 10:58:03 +01:00
baldurk 9e17c2b699 After discard patterns rebind state properly even without pipeline
* Previously our state rebinding expected to be 'at' a draw so it used a
  pipeline to determine which push constants and descriptor sets to rebind. Now
  we track which was the last descriptor set to be rebound and use it as
  reference, even if a pipeline isn't available, to properly rebind descriptors.
2022-04-14 16:37:45 +01:00
baldurk 20c986fc06 Add support for EXT_graphics_pipeline_library 2022-04-13 13:57:48 +01:00
baldurk a6301ef6d8 Add support for VK_KHR_pipeline_library
* On its own this extension doesn't really do anything
2022-04-13 12:19:37 +01:00
baldurk da08c10c41 Update vulkan & SPIR-V headers to latest 2022-04-13 12:19:15 +01:00
Jake Turner f8c792d84e PR Feedback MTLCommandBuffer::commit record tweak
MarkResourceFrameReferenced() on the buffer record instead of the resource manager
Transfer the frame references on the buffer record to the resource manager when the buffer is committed.
2022-04-13 11:33:03 +01:00
Jake Turner 149540139a MTLCommandBuffer::commit record/chunk tweak
Do not set the MTLCommandQueue record as a parent of the MTLCommandBuffer record.
Only mark the MTLComamndQueue record as frame referenced when active capturing.
2022-04-13 11:33:03 +01:00
Jake Turner 6931c4d93b PR Feedback for WrappedMTLCommandBuffer
Moved small inline methods to be inside the class declaration instead of outside
2022-04-13 11:33:03 +01:00
Jake Turner 12d9d347c2 PR feedback for CmdBufferRecordingInfo
Removed namespace MetalResources scope
Rename it to MetalCmdBufferRecordingInfo to remove conflict with Vulkan struct of the same name.
Mark MetalCmdBufferRecordingInfo default constructor as deleted
Added MetalCmdBufferRecordingInfo constructor which takes WrappedMTLCommandQueue* and initializes member variables to sensible defaults.
Removed "WrappedMTLDevice *device;" member variable.
2022-04-13 11:33:03 +01:00
Jake Turner 9271e44e23 De-serialise ResourceId default resource to NULL
Used during structured exporting
2022-04-13 11:33:03 +01:00
Jake Turner ecb75feddb Added wrapped MTLCommandBuffer
Implemented capture serialisation for 
MTLCommandQueue::commandBuffer
MTLCommandBuffer::presentDrawable
MTLCommandBuffer::commit
2022-04-13 11:33:03 +01:00
Le Philousophe c3ed881b9f Delete render buffer only after finish using it 2022-04-11 13:23:53 +01:00
Le Philousophe 3b8ac99a40 Unbind textures before deleting them
Without this valgrind complains about use-after-free
2022-04-11 13:23:53 +01:00
baldurk 4c7d59c008 Update toolwindowmanager to 299471d 2022-04-11 13:13:21 +01:00
baldurk be38f45171 Fix handling of split-register matrix source variables. Closes #2536 2022-04-11 12:57:10 +01:00
baldurk 8c57a14bed Serialise encoded color in obfuscated-style D3D12 markers. Closes #2537 2022-04-08 17:45:25 +01:00
baldurk 9ceff0a91b Fix handling of sub-page-sized mip tails with D3D-style wrapped set 2022-04-08 17:45:24 +01:00
baldurk 3e5d912767 Ensure injected DLL doesn't run out of stack space
* GL hooks registration was using an obscene amount of stack because MSVC
  doesn't share stack for mutually exclusive locals (all the temporary
  FunctionHooks) so an executable that reduces the default thread stack size
  enough would fail to start.
* We also explicitly allocate 1MB of stack for injecting our DLL in future to
  avoid this issue.
2022-04-08 17:45:24 +01:00
Shahbaz Youssefi 74178e8aeb Support VK_QCOM_render_pass_store_ops
This extension is the origin of STORE_OP_NONE, which found its way to
VK_EXT_load_store_op_none and VK_KHR_dynamic_rendering.  RenderDoc
supports STORE_OP_NONE just fine, this change simply adds this extension
to RenderDoc's allowlist.
2022-04-08 13:09:46 +01:00
Tatsuyuki Ishi b215fbe306 vk_shader_feedback: Fix crash with dynamic rendering
RenderPass can be null handle when dynamic rendering is used. Retrieve the
respective information from pipeline info instead.
2022-04-08 13:04:21 +01:00
baldurk 4a43325693 Bump version to 1.20 2022-03-31 17:48:39 +01:00
baldurk eb1e625b96 Add better documentation for how to specify separate shader debug info v1.19 2022-03-30 14:53:20 +01:00
baldurk cd10efb693 Fix some abstraction defines for custom shaders 2022-03-30 13:05:46 +01:00
baldurk 9c1eeed29b Fix copy-paste error with GLSL unsigned integer texture declarations 2022-03-30 12:51:36 +01:00
baldurk 378cad24bd Fix some missing comments in custom shader snippet generation 2022-03-30 12:48:38 +01:00
baldurk 4dcdd6dbd6 Register hooks for unsupported functions
* This is necessary on e.g. Windows where some legacy functions are only
  exported via the dll and need to be 'properly' hooked and not just intercepted
  via GL's GetProcAddr
2022-03-30 11:49:35 +01:00
baldurk 1c265bd1df Fix calculation of temp memory for pRenderingInfo 2022-03-25 18:17:24 +00:00
baldurk 2d518a5d90 Re-fetch device after fatal error check 2022-03-25 17:50:50 +00:00
baldurk b9d18690bb Treat surfaces with no capabilities as swap failure
* This can sometimes happen when shutting down
2022-03-25 17:50:44 +00:00
baldurk e660fc85dd Ensure custom shader output is updated before fetching histogram
* The custom shader output is updated when displaying, but this can lag by a
  call or two (a 'frame' if you like) when the display is only triggered by a
  window repaint and the histogram can be fetched first. Since the custom shader
  apply is only expensive when we need to recreate the output texture, we can do
  it on-demand similar to what we do with the overlay texture.
2022-03-25 12:12:39 +00:00
Jake Turner 0173671fde Fix compile error when building on SDK 11.1
SDK 11.1 and SDK 12 have different declaration for MTLDevice::supportsBCTextureCompression. 
On SDK 11.1 it is marked as API_AVAILABLE for ios and on SDK 12 is marked as API_UNAVAILABLE ios. 
Guard the API_UNAVAILABLE(ios) declaration to only be included when compiling for SDK 12.0 or above.

The compile error message before the fix:

renderdoc/driver/metal/metal_device_bridge.mm:158:64: error: method cannot be unavailable on iOS when the protocol method it implements is available [-Werror,-Wavailability]
69
- (BOOL)supportsBCTextureCompression API_AVAILABLE(macos(11.0))API_UNAVAILABLE(ios)
2022-03-25 12:01:29 +00:00