Commit Graph
2705 Commits
Author SHA1 Message Date
James Fulop ceeba57c12 vk handles unproject sign more robustly
vk format

vk handles unproject sign more robustly
2016-09-30 10:58:29 +02:00
James Fulop d71e7340e1 d3d11 handles unproject sign flip more robustly
float2 to vec2f

d3d11 handles unproject sign flip more robustly
2016-09-30 10:58:28 +02:00
James Fulop 5f178bd765 gl handles unproject sign flip more robustly
gl format

gl handles unrpoject sign flip more robustly
2016-09-30 10:58:28 +02:00
James Fulop bfd1d96f8f ignoring w component on VS_In 2016-09-30 10:58:27 +02:00
James Fulop d306f27c72 minor tidying 2016-09-30 10:58:13 +02:00
James Fulop 67246868f5 vs_out tri picking works from all angles 2016-09-30 10:55:01 +02:00
James Fulop 15978532e3 updated vertex picking for d3d11 2016-09-30 10:55:00 +02:00
James Fulop a8b2be5643 minor comment/logic changes 2016-09-30 10:55:00 +02:00
James Fulop 770843554d triangle picking for Vulkan
Essentially a straight copypaste from the GL version.

VS_Out picking isn't working correctly in the triangle path.
2016-09-30 10:54:59 +02:00
James Fulop 11563d770f fixed bug were index buffers with a width less than 4 were truncated
indexes with a size less than uint32 were being ugpraded to uint32,
but the buffer range size was still dependent on the original width.
Before this change, when doing selection on indexed meshes with a
width of 2, the second half of the mesh would be unpickable.
2016-09-30 10:54:26 +02:00
James Fulop f630e4a7d6 all mesh types functioning in opengl 2016-09-30 10:51:59 +02:00
James Fulop becf01701f triangle fan support 2016-09-30 10:51:59 +02:00
James Fulop 8851da66af added original picking back in as a fallback. 2016-09-30 10:51:57 +02:00
James Fulop bdfd44ebc9 triangle lists pick correctly 2016-09-30 10:51:57 +02:00
James Fulop ef185bca34 improved vertex picking, only Opengl VS Input
The new vertex picking solution raycasts from the mouse's position,
picking vertices based on
1. The triangle it has intersected (take the nearest triangle)
2. The nearest vertex to the intersection point on the triangle

This is replacing a solution that was based on how close the vertex was
to the mouse in screen space and its depth.

This commit only supports the OpenGL path in the VS Input window.

I have disabled vertex picking in Vulkan for now, as there are some
cross dependencies (debuguniforms.h).
2016-09-30 10:51:56 +02:00
baldurk e55f92cf67 Fix an off-by-one error in runtime warning reporting. Refs #380
* Pixel shader debugging was right by coincidence because it replayed
  the drawcall, but technically that could produce incorrect results as
  we would then pick up UAV contents from after the draw, not before.
2016-09-30 10:50:29 +02:00
baldurk 2b9b152f1d return DXGI_FORMAT_UNKNOWN for all unsupported/unmappable formats
* This means that when creating a proxy texture, all non-native formats
  will be remapped by the proxy to a safe linear format.
2016-09-28 16:28:12 +02:00
Michael Rennie 5d23e39994 Remap texture formats across different APIs.
For example ASTC/ETC2 textures in Vulkan need to be forced to RGBA8 to be
displayed by D3D11.

IReplayDriver has virtual method IsTextureFormatSupported(ResourceFormat)
so each API can decide if a format should be converted.

Parameters to GetTextureData() are moved to a struct, to save any
non-default behaviour needed for fetching texture data into the proxy.

MakeDXGIFormat now returns DXGI_FORMAT_UNKNOWN for unsupported formats
instead of asserting. We use this to determine whether to remap.
2016-09-28 16:24:34 +02:00
baldurk 4ccfe298f3 Force initial states for 'viewed' resources in GL
* If a buffer is used as a texbuffer, or a texture as a view, then any
  time the underlying data is dirty and needs to be saved as initial
  contents but the data object is never referenced directly (only the
  view), we need to force the underlying data object to have initial
  contents.
2016-09-28 15:09:02 +02:00
baldurk c47f4f8e07 Implement proper buffer initial contents, don't save into record data
* This fixes a couple of cases - the case where a buffer is modified
  mid frame would not properly have its contents reset each frame
* Also any buffer that isn't modified during the frame would have its
  initial contents overwritten by some partially recorded updates before
  a buffer was marked as high traffic/dirty.
2016-09-28 13:18:21 +02:00
baldurk 31a271b1f7 Don't create debug GL contexts in release builds 2016-09-28 13:15:15 +02:00
baldurk 1f4813887b Implement DebugOutputMute properly on GL - hide debug msgs from program 2016-09-28 13:14:00 +02:00
baldurk aeb0f3a005 For libraries opened with RTLD_DEEPBIND, use plthook to hook dlopen
* Split out the hook functions into linux and apple/android (which are
  currently unimplemented).
2016-09-26 17:33:51 +02:00
baldurk 76cf599d31 Don't include official header first - it breaks on something with VS2015 2016-09-25 14:40:09 +02:00
baldurk 02e29bbbf6 Move D3D9 hooks to a separate new project, commit official DX9 headers
* Headers come from the 10.0.14393.0 windows SDK
2016-09-25 14:05:53 +02:00
baldurk c6b31ef477 Follow-up fixes to avoid warnings on x64 2016-09-23 21:36:21 +02:00
baldurk e22e813049 32-bit compile fixes with 64-bit buffer lengths and offsets 2016-09-23 16:33:44 +02:00
baldurk a88e0067b4 Add hacks to skip non-2D textures, or depth textures, and display MSAA 2016-09-23 16:00:12 +02:00
baldurk f0c6786ade No need for Serialise_CreateCommandList anymore
* This removes use of D3DLock which is a super-temporary ugly hack to
  avoid a deadlock in some cases
2016-09-23 15:59:48 +02:00
baldurk 6bb6d7da57 Use the right number to resize array, handling SingleRT mode 2016-09-23 15:58:34 +02:00
baldurk d104a887f1 Fix calls that were unwrapping an unwrapped list 2016-09-23 15:18:33 +02:00
baldurk e06c08d6bf Temporarily add a hack to skip serialising multisampled init states 2016-09-23 15:08:00 +02:00
baldurk dbe82f31e6 Bring across FillCBufferVariables from D3D11
* These implementations are identical and really only depend on DXBC -
  they should be shared.
2016-09-23 14:08:26 +02:00
baldurk aa7b5558af Allow GetBufferData from readback and upload heap buffers 2016-09-23 14:05:27 +02:00
baldurk d0fe1fb56f Implement GetBufferData() for D3D12 2016-09-23 13:28:54 +02:00
baldurk 004a3a1cc1 Make sure to apply barriers while executing - wrong state check 2016-09-23 13:14:05 +02:00
baldurk 131d3cedd2 Don't warn, silently drop unknown/undefined signature elements 2016-09-23 13:13:50 +02:00
baldurk 62a9052cdc Mute some more debug messages that are more trouble than they're worth
* The descriptor ones show up regularly in MS's MiniEngine sample
  project, so it hides possible real problems.
2016-09-23 13:04:33 +02:00
baldurk ed6b1a738c Don't set a 0 structure byte size for element size (unstructured buffer) 2016-09-23 13:03:56 +02:00
baldurk 05eb9d7efd Create pipeline state from blank slate, not over the top of previous 2016-09-23 12:07:30 +02:00
baldurk a1ff033d82 Although it overlaps, use the right union's members to lookup 2016-09-23 12:07:16 +02:00
baldurk 6810ec8e50 Fix wrong indexing building reflection data 2016-09-23 12:06:58 +02:00
baldurk 06e6677616 Divide up register spaces by shader stage (namespacing same as DX11) 2016-09-23 11:41:16 +02:00
baldurk f883ea0648 Apply descriptor offset from table binding 2016-09-22 17:51:40 +02:00
baldurk acb5e5ecd8 Fix crash due to unallocated compute descriptor 2016-09-22 17:09:25 +02:00
baldurk 5951ed723b Pass resource state data per-resource through for D3D12 2016-09-22 17:05:28 +02:00
baldurk db3181e7bb Implement D3D12 pipeline state, with shader resources 2016-09-22 16:55:41 +02:00
baldurk b9b419c86a Process root signature elements into pipeline state 2016-09-22 12:05:47 +02:00
baldurk 2e8b758fef Don't create a full empty array of viewports/scissors, just those set 2016-09-22 12:05:47 +02:00
baldurk e0c183c2df Compress string representations of a few common enums for display 2016-09-22 12:05:47 +02:00