Commit Graph
105 Commits
Author SHA1 Message Date
baldurk a73b9214a5 Prefer using spirv-as for assembly SPIR-V assembly if possible
* Since we no longer can link shaderc we have external dependencies anyway, most
  likely from the vulkan SDK. shaderc has never fixed the inability to apply
  target env to shader assembly so this means we can specifically target some
  SPIR-V versions.
2026-11-10 12:02:46 +00:00
baldurk 96ef1ae5f3 Remove Block declaration from BDA structs in asm shader test 2026-10-22 19:00:01 +01:00
Jake Turner 6599a0d363 Extend VK_Shader_Debug_Zoo tests for arrayed resources
- bounded Uniform array
- unbounded array of Uniform, Buffer, Sampler and Tex2D
2026-10-19 10:33:10 +01:00
Jake Turner e2b85b4622 Update the VK_Shader_Debug_Zoo tests for arrayed resources
- Access queryTests, queryTestsMS element one instead of zero
- add tests for texBuffers, storeTexBuffers
- initialize arrayed resources descriptors to bad values
- set the accessed array indices to good values
2026-10-06 08:44:43 +01:00
Jake Turner 6653194e69 Add a test to load through a bda pointer array to a member of a struct
OuterStruct { float4 a; float4 b; InnerStruct* pInner; }
InnerStruct { float x; float y; float z; }

OuterStruct is BDA in push constants
Code Access is OuterStruct->pInner[1].x
2026-09-28 09:11:14 +01:00
Jake Turner 97149601da VK_Shader_Debug_Zoo changes for compute derivative tests
For compute quad derivatives tests use specific derivative i.e. fine or coarse.
It isn't specified which derivative mode is used, drivers differ on behaviour.
2026-05-06 18:33:03 +01:00
baldurk dc82c117f5 Fix edge case of bitfield extract with count == numbits. Closes #3813
* This is only legal if offset is 0 and so degenerate, but it is valid and needs
  to be handled.
2026-03-11 22:43:24 +00:00
Jake Turner 1dad34a8ef VK_Shader_Debug_Zoo fix bad spirv on packed integer dot product tests
spirv-val and spirv-as identified the problem

Add missing PackedVectorFormat4x8BitKHR packed format tests
2026-02-23 11:02:42 +00:00
Jake Turner e351910071 VK Shader Debug Zoo tests for SPV_KHR_integer_dot_product
OpSDot
OpUDot
OpSUDot
OpSDotAccSat
OpUDotAccSat
OpSUDotAccSat

for 8, 16, 32, 64 bit types (signed & unsigned) and packed 32-bit vectors (4x8-bit)
2026-01-27 16:16:29 +13:00
baldurk 856c838def Update copyright years to 2026 and fix copyright ranges
* In a previous update in 2021 many copyright ranges were truncated
  accidentally, and some files have been copy-pasted with wrong years. These
  dates have been fixed based on git history and original copyright messages.
2026-01-05 14:17:28 +00:00
Jake Turner 97755b5ebb Test cases for VK_KHR_compute_shader_derivatives
dFdx, dFdy, dFdxFine, dFdyFine, dFdxCoarse, dFdyCoarse

OpImageQueryLod (textureQueryLod)
OpImageSampleProjImplicitLod (textureProj)
OpImageSampleImplicitLod (texture)
OpImageSampleDrefImplicitLod (textureProj)
2025-11-26 11:40:22 +13:00
Jake Turner f5e63aa838 VK Shader Debug Test for function modifying inputs 2025-11-25 16:20:38 +13:00
Jake Turner 2f057a78d4 VK Shader Debug Zoo test for OpImageSampleProjDrefExplicitLod 2025-11-24 15:27:20 +13:00
Jake Turner 64b9e517e0 VK_Shader_Debug_Zoo test of overlapped GPU math and sampling operations 2025-09-24 14:01:47 +01:00
baldurk 4f5c51bc01 Adjust values used in texel buffer test to have safer rounding 2025-06-25 12:15:55 +01:00
baldurk d7236e0d91 Fix reads & writes to storage texel buffers in vulkan shader debugging 2025-05-26 14:59:46 +01:00
baldurk 2322e165de Update copyright years to 2025 2025-03-14 18:54:37 +00:00
baldurk 9f4f0e6aa1 Update copyright years to 2024 2024-02-12 11:04:52 +00:00
Jake Turner 3150a1028e Mac compile warning/errors in tests project 2024-01-29 18:13:26 +00:00
Jake Turner 7b1527e3ac Fix release compile error in tests project 2024-01-23 15:28:39 +00:00
Jake Turner b23e9f6b37 SPIRV KHR BDA Tests added to vk_shader_debug_zoo
Load buffer address from push constants as a uvec2 and bitcast to a pointer
Load vec4 from the buffer address pointer
Bitcast uint2 address to a pointer and load from the pointer
OpPtrAccessChain : float[] : ArrayStride 4
OpPtrAccessChain : float[] : ArrayStride 8
OpPtrAccessChain : float[] : ArrayStride 12
Convert u64 address to a pointer and load from the pointer
Convert u64 address to a pointer and back to a u64 address, load from the address
Arithmetic on a u64 address then convert u64 address to a pointer and load from the pointer
Generate a u64 address using arithmetic on two u32 values and load from the address
2024-01-17 08:24:51 +00:00
Jake Turner 8b3cfc59eb Tests: SPIR-V Debugger Bitcast tests vector to/from scalar 2024-01-09 12:44:14 +00:00
Jake Turner 5eb3778b9d Basic test for shader debugger out of bounds matrix lookup 2023-12-19 16:09:31 +00:00
Jake Turner 18a28eb8dc SPIR-V shader debug OpSwitch tests
Test with selector and literal of different types "int", "uint", "long", "ulong"
2023-12-13 10:24:47 +00:00
baldurk 9d39b8e1a8 Reformat code for clang-format 15 2023-09-05 11:02:08 +01:00
baldurk d47e79ae07 Update copyright years to 2023 2023-02-01 12:23:32 +00:00
baldurk fcdea67879 Update copyright years to 2022 2022-02-17 17:38:32 +00:00
baldurk f37516bfc3 Use depth image specifically for depth-compare tests in shader debug zoo
* The spec doesn't guarantee that non-depth formats support comparisons like
  this.
2022-02-08 18:07:38 +00:00
baldurk e4fd52c367 Fix generation of NaNs in vulkan shader debug zoo test 2022-02-02 15:00:44 +00:00
baldurk eb96e8007c Fix validation error in VK_Shader_Debug_Zoo 2021-11-11 15:15:50 +00:00
baldurk d0d809f43e Add a test using ~0U for OpVectorShuffle inputs 2021-11-11 15:15:42 +00:00
baldurk 026da176bb Update copyright years to 2021 2021-01-13 13:56:10 +00:00
baldurk abf7e3bd90 Only declare half type if shaderFloat16 is supported
* Without this, the 16-bit storage only refers to ints (if that feature is
  available).
2020-11-24 16:44:08 +00:00
baldurk 063131d288 Enable and expand float64 tests in VK_Shader_Debug_Zoo 2020-11-09 16:02:48 +00:00
baldurk 64f98f286e Add test of heavy descriptor reallocation and reuse 2020-08-20 13:48:17 +01:00
baldurk e147a5a6d1 Test OpLine/OpNoLine being intermingled with function header 2020-07-24 16:33:34 +01:00
baldurk ff62ab501c Add helpers for creating samplers 2020-05-27 22:38:04 +01:00
baldurk c8c5eca0a9 Fix typo in shader debug zoo test 2020-05-08 20:43:25 +01:00
baldurk 90c10ea1fc Handle boolean inputs in vulkan shader parameters
* We change to use VarType instead of CompType for signature parameters which
  allows us to represent different types of variables beyond just
  unsigned/signed integer and float.
2020-05-07 22:46:41 +01:00
baldurk a04e2d3517 Try to improve scoping of variable source mappings with no scope info 2020-05-05 19:36:45 +01:00
baldurk bc3b6b9d6c Improve disassembly of continue/break in loops and switches 2020-05-05 17:36:16 +01:00
baldurk 646bb736fa Fix problem if the uninitialised variable value is NaN 2020-05-05 16:24:27 +01:00
baldurk 84fc7f7950 Fix handling of dynamic buffer offsets in non-debugged stages 2020-05-05 16:24:12 +01:00
baldurk d7a4475c9c OpConvertFToU for negative input is undefined, don't test it 2020-04-30 19:41:52 +01:00
baldurk 38058fadac Add some OpPhi tests 2020-04-30 18:15:29 +01:00
baldurk 4b45c6be96 Handle naming structs properly 2020-04-30 18:15:29 +01:00
baldurk 98f0a926b8 Make sections of SPIR-V asm global so tests can append to them 2020-04-30 18:15:29 +01:00
baldurk e1a7349b9c Support variable initialisers
* We also set uninitialized variables to 0xcccccccc to make it clearer that they
  are invalid.
2020-04-30 18:15:29 +01:00
baldurk fb72ecc97d Add fallback to disable descriptor-heavy parts of shader debug test 2020-04-30 18:15:28 +01:00
baldurk 811d6323b0 Fail early if required extension/feature isn't available 2020-04-30 18:12:34 +01:00