Commit Graph
57 Commits
Author SHA1 Message Date
baldurk 6f90abb6ab Fix sourcevar declarations for private variables 2020-05-05 17:53:14 +01:00
baldurk 85bd67829c Compile fix for apple, unused lambda capture 2020-04-30 20:28:03 +01:00
baldurk 943515fcbf Fix OpPhi breaking if function call stomped last known block 2020-04-30 18:15:29 +01:00
baldurk 4b45c6be96 Handle naming structs properly 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 a28f77ab7d Support debugging fetching input attachments 2020-04-30 18:15:29 +01:00
baldurk 26aa7fbb1e Fix handling of pointers into matrix columns 2020-04-29 18:48:51 +01:00
baldurk 1da60805e0 Allow source variable mappings to point to the root of a complex type
* For vulkan debugging where high-level variables are not scattered amongst
  vectors, there's no point in having the whole tree expanded for source mapping
  struct-to-struct or array-to-array.
2020-04-29 18:48:50 +01:00
baldurk ff07c88a65 Simplify tracking & allocation of pointers 2020-04-29 18:48:50 +01:00
baldurk 75befa30d8 Support workgroup private variables in debugging
* We don't simulate other threads so this will be similar to groupshared on
  D3D11 which doesn't have accurate contents.
2020-04-29 18:48:50 +01:00
baldurk d8835126a5 Implement image & buffer atomic operations 2020-04-28 18:15:33 +01:00
baldurk 80e7e27a9e Fix data type access when accessing scalars in vectors in SSBOs 2020-04-28 18:15:33 +01:00
baldurk 67c3f4fe25 Add support for accessing arrays of resources 2020-04-27 15:41:12 +01:00
baldurk 70256217fe Handle diverging/converging control flow in pixel shader 2020-04-24 20:14:48 +01:00
baldurk 068660bb1d Give variables names based on their types
* This is common for constant buffers where the struct type may be named if the
  variable isn't
2020-04-24 20:14:47 +01:00
baldurk 83bbcc5b51 Add support for matrix, struct, component and array pixel inputs 2020-04-24 20:14:47 +01:00
baldurk 94e34534db Fix loading from matrix column pointer 2020-04-24 20:14:47 +01:00
baldurk 92e04417d5 Add support for storage image load/store 2020-04-23 19:14:09 +01:00
baldurk 76b21f7d8c Check that SPIR-V version and extensions are supported before tracing 2020-04-23 19:14:08 +01:00
baldurk 31593f4373 Support SPIR-V 1.4 pointer comparison opcodes 2020-04-23 19:14:08 +01:00
baldurk f506dcf395 Add support for storage buffer access 2020-04-23 19:14:08 +01:00
baldurk 222f28d953 Add support for glsl pack/unpack functions 2020-04-22 20:40:14 +01:00
baldurk 621b9dfd1e Move some shader debug pipeline parameters out of spec constants
* While convenient, passing uv parameters that will probably be different every
  time via spec constants is not the best idea and will lead to many redundant
  pipelines. Instead we keep things that must be constant as spec constants as
  well as a few rarely varying things (texture dimension, operation) while
  moving more varying things to uniforms passed in a constant buffer.
* This means we require the imageGatherExtended feature to promote constant
  offsets to dynamic offsets, but this is a reasonable requirement.
2020-04-22 20:40:14 +01:00
baldurk 83c7350e4a Implement remaining image sampling operations 2020-04-16 18:42:03 +01:00
baldurk 143f2bf054 Fix access to texel buffers 2020-04-16 18:41:59 +01:00
baldurk 7082f4eb44 Implement image dimension query opcodes 2020-04-16 18:41:59 +01:00
baldurk 60258bd57b Implement private variable storage 2020-04-16 18:41:58 +01:00
baldurk 6ebd752a9d Hold onto ShaderDebugState pointer inside ThreadState during SetDst
* This avoids needing to pass it down to all possible child functions that might
  need it.
2020-04-16 18:19:08 +01:00
baldurk c91414782a Implement some easy to support extensions 2020-04-15 20:33:57 +01:00
baldurk 39ed21c12f Process lifetime of Id params to GLSL ExtInsts 2020-04-15 20:33:57 +01:00
baldurk eeef227923 Properly process which capabilities are supported and which aren't 2020-04-15 20:33:56 +01:00
baldurk ca7c1bbba9 Support push constants the same as constant buffer data 2020-04-15 20:33:56 +01:00
baldurk 59688bfc4e Give better default names to unnamed global variables 2020-04-14 18:25:55 +01:00
baldurk 80e1cbfba4 Don't duplicate workgroup for derivatives
* Because SPIR-V is SSA, we can use the current workgroup for all cross-group
  operations, knowing that the output ID of any such opcode can't also be the
  input (so doing workgroup operations one-at-a-time is still fine, we won't
  corrupt results of later threads by updating earlier ones.
2020-04-14 15:11:41 +01:00
baldurk 4b830d4a66 Pass the texture type to CalculateSampleGather 2020-04-10 18:15:54 +01:00
baldurk 4ebdf806c9 Add SPIR-V side of handling images and samples
* This is still stubbed out on the vulkan API side to actually perform the
  sample operation
2020-04-09 19:34:36 +01:00
baldurk 73c05536e0 Make Pointer a full VarType instead of a ShaderVariable member 2020-04-09 18:36:12 +01:00
baldurk 57400e1bf8 Add support for extended instruction sets
* Implement a few instructions in GLSL.std.450
2020-04-08 18:39:02 +01:00
baldurk d8fa0b624d Implement derivatives 2020-04-07 18:37:13 +01:00
baldurk 38abf04909 Set up python script to run VK shader debug tests
* Since we expect many more tests it also runs the test texture in a 2D grid
  with N drawcalls
2020-04-07 17:43:30 +01:00
baldurk ad79bf7cc5 Support applying derivatives on builtins 2020-04-07 17:13:49 +01:00
baldurk fc2181d625 Fetch and apply pixel inputs and derivatives to quad 2020-04-03 17:17:46 +01:00
baldurk 48a24a31e4 Implement location assignment for struct members on I/O variables 2020-03-20 16:16:52 +00:00
baldurk 6c0aa42ff1 Propagate thread initial state to whole workgroup properly 2020-03-20 16:16:51 +00:00
baldurk 914dc88cd0 Pass signature index in source variable mapping, not builtin
* The builtin is more directly useful but the signature index allows us to match
  up inputs and outputs that don't have a builtin meaning (pure interpolators).
2020-02-25 18:19:52 +00:00
baldurk 4673f29da1 Add an error if an unknown global is processed 2020-02-24 18:10:56 +00:00
baldurk d034c91686 Check for supported capability/extensions when debugging 2020-02-24 18:10:56 +00:00
baldurk 0a309f04c2 Handle block-level flow control 2020-02-24 18:10:56 +00:00
baldurk 0ff541caca Handle scope changes between function calls properly 2020-02-24 18:10:56 +00:00
baldurk 6b28d14089 Add source variables for named IDs where possible 2020-02-20 19:07:30 +00:00