Commit Graph

7811 Commits

Author SHA1 Message Date
Kanglai Qian 2ad52d4009 improve glCopyImageSubData 2023-06-15 19:28:47 +01:00
Kanglai Qian a70ea20253 support glCopyImageSubData from uncompressed texture 2023-06-15 19:28:47 +01:00
baldurk c4d4a4c19f Fix separate android layer exports 2023-06-15 17:08:21 +01:00
baldurk 81a2da7877 Fix linux build with removed VK_LAYER_EXPORT 2023-06-15 16:55:21 +01:00
baldurk 5118f08e23 Update Vulkan & SPIR-V headers to latest 2023-06-15 13:56:10 +01:00
baldurk 082402ed66 Delete AMD action callbacks if multiple passes happen. Closes #2958 2023-06-15 11:25:57 +01:00
baldurk ea77ec746f Don't generate BGRA8 internal format for DX interop textures in GL
* Proper GL doesn't seem to support this internal format, and fortunately the
  contents save/load work fine with GL's built-in swizzling if we treat the
  texture as RGBA8 instead.
2023-06-12 14:28:24 +01:00
baldurk 763cfbe2b8 Fix blend factor in driver bug workaround 2023-06-09 12:18:28 +01:00
baldurk 722191184b Handle degenerate case on D3D12 of indexed draw with no index buffer 2023-06-08 17:09:50 +01:00
baldurk a1f56d01c5 Add handling of HALF_FLOAT for glClear type data passing. Closes #2956 2023-06-08 15:44:27 +01:00
baldurk eb4938e2a3 Fix D3D12 highlighted vertex/triangle not being rendered correctly
* The input data comes directly from the mesh output so does have homogenous co-
  ordinates.
2023-06-07 13:39:11 +01:00
baldurk 86a6d5051b Add debug regions to D3D12 mesh rendering 2023-06-07 13:38:43 +01:00
baldurk 60493a2465 Disable use of new barriers on D3D12 on older SDKs
* This avoids a crash that has been fixed in newer SDKs.
2023-06-07 12:25:38 +01:00
baldurk b90c19c388 Fix counting of EIDs for partial multidraws on GL 2023-06-07 12:21:03 +01:00
baldurk 96ff47433c Clear any GL errors generated in interop register. Closes #2952 2023-06-07 10:49:44 +01:00
baldurk f87aa7a7fe Handle subset indirect draws for GL pixel history replay
* This is not needed on Vulkan because Vulkan uses a per-draw callback system
  that automatically splits up multidraws into single draws for replay. On D3D11
  there is no multidraw so it doesn't come up there.
* On GL we can e.g. have one draw touching the pixel half-way through a
  multidraw, and then want to replay from that draw through to the next touching
  draw which could be much later or in the same multidraw. It assumes we can
  always replay from one draw to the next.
2023-06-05 16:07:01 +01:00
baldurk 587e4f6795 Sanitise image layouts in implicit renderpass transitions 2023-06-05 15:01:41 +01:00
baldurk f5916e0268 Handle GL programs recreating textures mid-capture. Closes #2941 2023-06-05 12:34:59 +01:00
baldurk 0f851df6c2 Batch prepare and allow limited buffering for vulkan initial states
* We add a capture option that defines a soft limit we aim to keep under for
  memory overhead during capture, excess initial states after that will be
  stored temporarily on disk.
2023-06-02 18:53:45 +01:00
baldurk 35b13a8e8f Remove UAV flag from BCn textures for calling GetCopyableFootprints
* This can happen when using the new format casting functionality, if the base
  type is BCn but UAV is allowed for an RGBA32_UINT cast.
2023-06-01 13:00:03 +01:00
baldurk 00dc732f10 Ensure we create a sufficient heap for oversized resources
* This heap will only have one resource, but the code handles that and bumps the
  next resource to a new heap.
2023-05-26 18:59:53 +01:00
baldurk d132b57582 Disable fpsmon vulkan layer 2023-05-26 13:08:40 +01:00
baldurk 780ea478b1 Implement support for new barriers & resource creation functions 2023-05-22 16:24:34 +01:00
baldurk 2777a25345 Refactor resource creation functions to use common path
* This does require some awkward dispatching as the functions are almost but not
  entirely the same.
2023-05-22 16:24:34 +01:00
baldurk 14bd9f8182 Convert state tracking to handle new barrier resource layouts 2023-05-22 16:24:34 +01:00
baldurk 7de3fb54ee Implement new D3D12 state & state setting commands 2023-05-19 14:54:39 +01:00
baldurk 28dcc80892 Implement D3D12's CreateSampler2 and new sampler parameters 2023-05-19 14:54:39 +01:00
baldurk d3edbc5dd1 Stub out new D3D12 device and command buffer interfaces
* These are currently non-functional but will be implemented in follow-up
  commits so they're not committed disabled (inaccessible via QueryInterface
  etc).
2023-05-19 13:28:05 +01:00
baldurk 81ac9f9117 Support small added features in new D3D12 headers
* Triangle fans
* 16-bit types in shader declarations
* Trivial/non-wrapped new interface versions
* New mostly-ignorable enums: D3D12_COMMAND_LIST_TYPE_NONE,
  D3D12_COMPARISON_FUNC_NONE
* Alpha constant blend factors
* New sampler filtering with anisotropic min/mag and point mip
* New ABGR4 format
* MSAA UAVs
* Allow SM6.7
2023-05-19 13:28:05 +01:00
baldurk 91b084a2df Update D3D12 headers to verison 1.610.1 2023-05-19 13:28:04 +01:00
baldurk e33629cac8 Add GPU syncs between potential moves across different queues 2023-05-18 17:27:18 +01:00
baldurk 1d199ead7e Fix a potential crash if a map fails during replay 2023-05-17 11:18:22 +01:00
baldurk 1a2db41fa8 Work around further broken Intel occlusion queries. Closes #2925 2023-05-16 17:53:16 +01:00
nikplu d57c1068bd Fix mapping GL_INT_2_10_10_10_REV and GL_UNSIGNED_INT_2_10_10_10_REV 2023-05-15 14:12:20 +01:00
baldurk 5b81eff759 Try to avoid timeouts on draws with huge number of instances with GS 2023-05-08 14:23:03 +01:00
baldurk 279a827c73 Add a function to reset memory blocks without freeing them
* This can be used only when all resources are safely freed, but means the
  memory can be re-used.
2023-05-05 12:28:35 +01:00
baldurk 3e21a26f84 Delete frame capture chunks once capture has been written 2023-05-05 12:28:35 +01:00
baldurk 1a9f49776a Use placed resources and batched heaps for D3D12 initial contents 2023-05-05 12:28:35 +01:00
baldurk f413d4d084 Defer memory frees onto a thread 2023-05-05 12:28:35 +01:00
thisisjimmyfb 8f23e3c8f2 fix gles pixelhistory crash 2023-05-05 11:25:00 +01:00
baldurk 8b8067b224 Flush mapped non-coherent memory. Closes #2931 2023-05-04 18:08:48 +01:00
baldurk b115a6750b Pass instance to GetInstanceProcAddr fetching vkCreateDevice 2023-05-01 16:28:42 +01:00
baldurk a1422df961 Force use of getenv/setenv directly from libc to avoid bash override
* Bash overrides getenv/setenv to look up its own variable set, but breaks since
  we need to modify the environment before main() when it initialises its
  variable set. Instead what happens is the first setenv initialises that
  variable in a blank set and so all subsequent environment variables are NULL.
  Then in main() the variable set gets initialised from environ, removing any
  changes that were made.
2023-04-26 14:01:54 +01:00
baldurk 9998714b50 Unwrap vulkan fences in present fence information struct 2023-04-26 13:09:30 +01:00
baldurk 0e55a9c0e5 Detect structures with all-NULL members, and display as NULL
* This is an implicit transformation that llvm makes normally at constant load
  time, we do it only for disassembly.
2023-04-25 17:14:57 +01:00
baldurk 644157be56 0 is not a forward reference in DXIL phi nodes 2023-04-25 17:14:57 +01:00
baldurk 527caea7a8 Handle pointer types being missing from DXIL shaders
* Pointer types implicitly referenced by objects but not directly (like global
  variable or alloc/gep pointers) are not guaranteed to be present, so we need
  to add them ourselves to parse correctly and identically to LLVM.
2023-04-25 17:14:57 +01:00
baldurk 12a963056e Fix wrong operand being used to look up resources in gather4 opcodes 2023-04-25 17:14:57 +01:00
Jake Turner e11130580a Update comments about RDMTL structs
Wrong name in comment:
MTLVertexBufferLayoutDescriptor is now MTLVertexDescriptor

Added comments for
FunctionGroup
MTLRenderPassDescriptor
2023-04-25 14:09:01 +01:00
Jake Turner 6dbb7a3a86 Serialisation for MTL::IndexType 2023-04-25 14:09:01 +01:00