Commit Graph

14039 Commits

Author SHA1 Message Date
baldurk 92f4aeacde Fix compile error on some clangs with non-const string literals 2023-09-13 16:25:09 +01:00
baldurk 02272f98ac Garbage collect D3D state objects before creation
* If we only garbage collect after a successful create, applications which
  deliberately leak state objects and only free them when they see a failed
  create will not have a change to garbage collect.
2023-09-12 21:53:23 +01:00
baldurk 1bfe6d1492 Add dedicated test for VK_Counters so GPU duration isn't degenerate
* Some cards run it so fast that the triangle takes "0" microseconds
2023-09-12 21:53:23 +01:00
baldurk 832bb4fb74 Add an early-out for DXBC chunks with the wrong size 2023-09-12 21:53:22 +01:00
Jake Turner c72a79988d Only do the overlay mip subresource tests once 2023-09-10 09:39:19 +01:00
Jake Turner 93506245c4 Add format name to overlay test python logging 2023-09-10 09:39:19 +01:00
Jake Turner 78a64f8640 Extend Overlay tests to handle more depth stencil formats : D3D12
D32_S8, D24_S8, D32, D24, D16
2023-09-08 22:38:01 +01:00
Jake Turner cfdb349cdb Extend Overlay tests to handle more depth stencil formats : D3D11
D32_S8, D24_S8, D32, D16
2023-09-08 22:38:01 +01:00
Jake Turner 8459229441 Extend Overlay tests to handle more depth stencil formats : Vk
D32_S8, D24_S8, D32, D24, D16
2023-09-08 22:38:01 +01:00
Jake Turner 40090fb779 Extend Overlay tests to handle more depth stencil formats : GL
D32_S8, D24_S8, D32, D24, D16
2023-09-08 22:38:01 +01:00
Jake Turner 163f2ff747 Fix validation error in Vk_Overlay_Test 2023-09-07 09:48:57 +01:00
baldurk ae8e923a7c Fix calculation of resource use EIDs on D3D12 2023-09-06 10:18:47 +01:00
Dan Hawson a7a4521b63 Fix 'alignas' use
I think the correct syntax is to have this at start, otherwise it
upsets more strict compilers (like clang).
2023-09-05 15:21:10 +01:00
Dan Hawson 401c6617dc Fix typo in front/back face stencil mask check 2023-09-05 15:21:10 +01:00
baldurk 18d75ff493 Don't source clang_format script, run via bash 2023-09-05 11:10:06 +01:00
baldurk 9d39b8e1a8 Reformat code for clang-format 15 2023-09-05 11:02:08 +01:00
baldurk 4d94209ec1 Change fixed clang-format version to 15
* We commit statically linked x64 binaries for clang-format-15 for windows and
  linux to make the transition easier for anyone running a linux distro that
  doesn't yet support llvm 15, or in future for distros that drop support for
  it.
2023-09-05 11:02:08 +01:00
Jake Turner 5e7b25efca GL: Fallback for uniform lookup for arrays of dimension 1 Closes #3047
ie.

struct A {
		vec3 m1;
		vec3 m2;
		vec3 m2;
	};

uniform A a[1];

with a[0] being passed to a function.

Previously it would look for "a.m1", if that is not found then it looks for "a[0].m1" etc.
2023-09-05 09:36:11 +01:00
Jake Turner bfe89e4c17 Extended test to include a test for GL uniform array of size 1
ie.
uniform float2_struct M[1];
2023-09-05 09:36:11 +01:00
Jake Turner df3b17a265 Fix handling of specialization Op::LogicalNot Closes #3046 2023-09-04 21:37:25 +01:00
Jake Turner 0b669b61e9 Improve GIT versiion retrieval code to work with worktrees 2023-09-04 21:37:25 +01:00
Jake Turner 08a9c1dac2 minimal change to fix Mac CI 2023-09-04 20:50:50 +01:00
Jake Turner e32a9b1784 D3D11: Improve pixel history discarded fragments Closes #3040
Include the discarded offset when indexing to get the post mod data per fragment
Do not include the discarded offset when indexing to get the primitive ID per fragment (primitive ID uses a replacement shader which is not affected by discards in the original shader)
Store the post mod depth data in slot 1 of the depth output to make the indexing simpler to keep track of discarded fragments
Set the post mod data for discarded fragments (excluding the final fragment) to be the known texture after (which starts as the pre mod data and is updated for non-discarded fragments).
2023-09-01 20:02:06 +01:00
Jake Turner 0fed9d5741 Fix memory overwrite when saving a single slice of texture 2023-09-01 20:02:06 +01:00
Jake Turner df1a7cec50 Use max of mips and slices to test for invalid dimensions
The assert was incorrectly triggering on a texture with depth of 128 and mipcount of 6
2023-09-01 20:02:06 +01:00
baldurk 1850ccfee1 Make explicit cast to uint32 after truncation 2023-09-01 14:22:38 +01:00
baldurk 5b852c8573 Check compat with mip tail only for opaque sparse images. Closes #3044
* These images don't have a direct page table.
2023-09-01 13:26:33 +01:00
Sidney Just a56aa9ed21 Fixed incorrect sType assertion
This affects serialization of vkImportMemoryWin32HandleInfoKHR
2023-09-01 12:07:52 +01:00
baldurk 52801a99a6 Close automatically opened command buffer. Closes #3042 2023-08-31 10:23:26 +01:00
baldurk 1d1295b17e Work around NV issue with dynamic state setting & rebinding pipeline 2023-08-31 10:22:46 +01:00
baldurk 2d41648d4d Remove references to no longer used android files 2023-08-29 10:44:53 +01:00
Jake Turner 788a0ca98f Zero initialize read_dds_data before loading DDS file 2023-08-25 10:20:28 +01:00
Jake Turner 7d8586cdd8 Use VkDriverInfo to get the vendor ID
Instead of GPUVendorFromPCIVendor() which returns Unknown for the llvm_pipe driver.

This then prevents being able to force replay to run on llvm_pipe when opening a capture.
2023-08-24 10:09:55 +01:00
baldurk 7c2b68390e Ignore a glslang warning on clang 2023-08-22 16:11:49 +01:00
baldurk c80e5a40ef Remove problematic annotation when building glslang in C++11 2023-08-22 16:09:35 +01:00
baldurk 69fc6f8abe Fix unit test for new built-in compile flag 2023-08-22 16:03:27 +01:00
baldurk e7430226e9 Match SPIR-V version as much as possible when rebuilding shaders 2023-08-22 13:41:39 +01:00
baldurk 02933fb6a6 Update glslang to 12.3.1 2023-08-22 13:37:53 +01:00
memchr 2752368168 Update gitignore
- .cache/: generated by clangd
- compile_commands.json: usually generated by vscode or build system
- .vsocde: generated by vscode

`compile_commands.json` and `.vscode` are usually specific to a person's
environment, not configurable in any way, so there is no reason to put
them in the git repository at all.
2023-08-22 10:23:27 +01:00
Jake Turner 39f6296f3a Use existing Files entry for empty shader source file "unnamed_shader"
Fixes source shader stepping when the main shader source file contains #line entries with blank filenames ie.
2023-08-22 05:14:06 +01:00
Jake Turner f0b9aabb5e Change empty shader source file name to "unnamed_shader" from "shader" 2023-08-22 05:14:06 +01:00
Jake Turner 46a236b5ba Use replay ID to look up GL layered depth buffer texture
Previously the code was using the original ID to look for the texture in m_pDriver->m_Textures which would create a default entry if the ID was not found leading to numSlices = 0 and then the pipeline state resource tooltip would show "covers slices 0-4294967294"
2023-08-21 18:50:17 +01:00
Jake Turner d68a8e9dc4 Added "\n" to the Resource Preview tooltips
GL was missing them
The other APIs adding them as a precaution for the future
2023-08-21 18:50:17 +01:00
baldurk d6898e428c Ensure GL calls go through normal GL dispatch not to global functions 2023-08-18 12:25:38 +01:00
baldurk 0ec7d54bbd Add some naming of internal renderdoc objects in GL 2023-08-18 11:40:29 +01:00
Jake Turner b2c97f2cf3 Use QPointer to track live capture windows during Shutdown
The save capture modal message box could process messages which could delete a LiveCapture, the pointer had already been copied into a local list, then try to use deleted memory.
2023-08-18 08:19:36 +01:00
Jake Turner d0388f1f20 Fix bug in y-flipping code in ResamplePixels() Closes #3025
In GL captures causes the generated thumbnail image to be incorrect for the middle two rows of the image.
2023-08-18 07:03:53 +01:00
Jake Turner 2d53aa2a32 Add unit tests to ResamplePixels()
Tests:
y-flipping: true/false
BGRA: true/false
Downsample from 4x4 to 2x2
2023-08-18 07:03:53 +01:00
William Pearson a214ffcaf3 Fix debug pixel at primitive and event message mixing parameter order up 2023-08-15 10:09:40 +01:00
baldurk cd897063e3 Make error message more explicit when proxy texture fails to create 2023-08-14 16:37:04 +01:00