Commit Graph

10542 Commits

Author SHA1 Message Date
baldurk 7d0bbbda93 Patch all shader stages when using reserved binding
* If we're not using buffer device address, we need to patch the other stages
  since we're offsetting all bindings by 1.
2020-04-14 17:16:17 +01:00
baldurk 72d7e828b0 Add OpNot to bitwise tests 2020-04-14 17:16:17 +01:00
baldurk b8f18534e2 Test OpConvertFToU/S and OpConvertU/SToF 2020-04-14 17:16:17 +01:00
baldurk 97fb6b38ae Test OpCompositeExtract on vectors 2020-04-14 16:05:50 +01:00
baldurk e78aec6d36 Don't add extra prefix on constant buffer array variables. Closes #1828 2020-04-14 15:59:34 +01:00
baldurk b7bfbe3dba Refactor assembly tests to need less manual work
* We auto generate test cases, unique-ify identifiers, and add constants as
  needed
2020-04-14 15:45:45 +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 b17b6e7c4f Optimise rdcspv::Editor destruction
* If we erase each nop individually it's O(n^2) in all the shifting needed.
  Since we can't iterate backwards we take advantage of the swap into external
  SPIR-V and instead just push-back every non-nop opcode.
2020-04-14 15:06:22 +01:00
baldurk ba1c719179 Add fmtlib to demos for string formatting 2020-04-14 14:25:49 +01:00
baldurk 5693c39fca Initialise gradCoords variable 2020-04-13 19:30:49 +01:00
baldurk e138fea5ce Ignore needing to create initial state for buffers on vulkan 2020-04-13 18:24:47 +01:00
baldurk 7bfee85edc Treat OpInBoundsAccessChain the same as OpAccessChain 2020-04-13 18:24:47 +01:00
baldurk 2318305c96 Implement OpVectorExtract/InsertDynamic 2020-04-13 18:24:47 +01:00
baldurk a9f7819bf7 Handle implicit lod samples by pushing in calculated derivatives 2020-04-13 18:24:47 +01:00
baldurk 8192dab204 Set result number of rows from texture sample 2020-04-13 18:24:47 +01:00
baldurk 97e3d0ba98 Handle bias operand by pushing it into the sampler 2020-04-13 18:24:47 +01:00
baldurk ee7c0ba4b2 Add handling for image operands 2020-04-13 18:24:46 +01:00
baldurk 419519b114 Fix declaration of bool constants 2020-04-13 18:24:46 +01:00
baldurk ee5074f4fc Read the proper number of co-ordinates based on image dimension 2020-04-13 18:24:46 +01:00
baldurk d857ba8ae8 Create new image view for sampling, to ensure it's array-sized 2020-04-13 18:24:46 +01:00
baldurk da1f117886 Replace default framebuffer only attachments in glInvalidateFramebuffer 2020-04-13 15:13:03 +01:00
baldurk a4ccf9ab3c Fix wrong index being printed in debug message 2020-04-13 13:55:48 +01:00
baldurk 36f16b9998 Add --build-id link parameters on GGP 2020-04-13 13:55:37 +01:00
baldurk 410df92bd7 Add function to connect to a remote host from python 2020-04-13 13:19:09 +01:00
baldurk 8675bef94e Fix ggp compilation 2020-04-13 13:10:36 +01:00
baldurk cc9d91e976 Fix compilation 2020-04-11 00:02:24 +01:00
baldurk 9a6696a191 Fix implementation of OpSelect 2020-04-10 20:52:18 +01:00
baldurk a61822cfe1 Generate SPIR-V shader to implement some image samples on 2D image 2020-04-10 20:52:09 +01:00
baldurk 5af5f847a0 Hide accidental double-serialise of constantIDs 2020-04-10 19:48:56 +01:00
baldurk 98a967c5c1 Add a SPIR-V editor helper for declaring spec constants 2020-04-10 19:48:52 +01:00
baldurk 50abb444dd Add code to create specialised pipeline, run it, readback results
* The shader is just a dummy right now to prove the results are coming back
2020-04-10 18:15:54 +01:00
baldurk 4b830d4a66 Pass the texture type to CalculateSampleGather 2020-04-10 18:15:54 +01:00
baldurk 39b28a7780 Snapshot descriptor set contents in VulkanAPIWrapper
* We use this to fetch the cbuffers on demand (which right now will be
  immediately up front anyway), but it will be used to fetch images for sampling
  as needed as well.
2020-04-10 18:15:54 +01:00
baldurk 1a4b9cd69b Create ancilliary resources for shader debugging
* This is mostly for doing any GPU work and reading it back.
2020-04-10 18:15:33 +01:00
baldurk afe0208d69 Add accessor for getting current descriptor set bindings 2020-04-10 17:36:19 +01:00
baldurk 7d0d492a66 Add missing copyright statement in shader 2020-04-10 16:58:52 +01:00
baldurk 9cf265284e Pass ThreadState to CalculateSampleGather
* This is needed to fetch the values of Id parameters in
  ImageOperandsAndParamDatas
2020-04-10 12:57:13 +01:00
baldurk fc452b7586 Add helpers to create an empty SPIR-V module in an editor 2020-04-10 12:56:10 +01:00
baldurk ead9463711 Fix structure stride generated for PSInput fetch shader 2020-04-10 12:55:08 +01:00
baldurk 2d111516d0 Fix test regression from D3D12Pipe refactor 2020-04-10 09:12:42 +01:00
baldurk 81ee4e18a8 Reset stream-out buffer size after failed allocation 2020-04-09 21:08:34 +01:00
baldurk 350da5caf7 Add missing override specifier 2020-04-09 20:10:04 +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 97c7dd681f Add global samplers array to shader debug trace 2020-04-09 18:36:12 +01:00
baldurk b47e13beaa Test cbuffer access 2020-04-09 18:36:12 +01:00
baldurk 47dedaf8c5 Support shader variables that refer to resource bindings 2020-04-09 18:36:12 +01:00
baldurk 70f409588c Add type to refer to a specific Bindpoint's element
* This is very similar to Bindpoint but where that *declares* a binding with a
  given array size, this refers to a specific element within a (possibly
  arrayed) bindpoint.
2020-04-09 18:36:12 +01:00
baldurk 73c05536e0 Make Pointer a full VarType instead of a ShaderVariable member 2020-04-09 18:36:12 +01:00
baldurk c3d53237f7 Fix handling of OpUndef and improve disassembly of NULL/Undef values 2020-04-09 18:36:12 +01:00
baldurk 6676f83671 Set up descriptors and push constants for use in future tests 2020-04-09 18:36:12 +01:00