Commit Graph

2887 Commits

Author SHA1 Message Date
Joshua Ashton a9fab2a64d HACK: Implement singleton devices 2020-11-15 21:48:51 +00:00
Joshua Ashton b514f03906 vkd3d: Fix validation spam for null descriptor buffers
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-11-15 21:48:15 +00:00
Joshua Ashton 92f18842d7 vkd3d: Handle reserved resources in host barrier code
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-11-15 16:57:11 +00:00
Joshua Ashton 08545e210b Merge branch 'master' of https://github.com/HansKristian-Work/vkd3d-proton into master 2020-11-13 17:53:56 +00:00
Hans-Kristian Arntzen 412ec7ac2f vkd3d: Enable root descriptor BDA support.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-11-13 17:10:48 +01:00
Hans-Kristian Arntzen a1d851e717 vkd3d-shader: Do not require Int64 to use root descriptors.
Can just use uvec2. Also improves performance on ACO since ACO cannot
promote uint64_t to SGPR yet, u32x2 however, works fine and can be
bitcast to pointer as well.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-11-13 17:10:48 +01:00
Hans-Kristian Arntzen 009b3a69e0 vkd3d-shader: Update dxil-spirv with BDA root descriptor support.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-11-13 17:10:48 +01:00
Hans-Kristian Arntzen 74a654e273 vkd3d: Disable waveops for time being.
The fix which enabled waveops detection broke HZD, since we never tested
with that feature enabled.

Keep it disabled until we can figure out what is going on.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-11-13 12:58:22 +01:00
Philip Rebohle 3da44beb5d vkd3d: Change USE_PUSH_DESCRIPTORS to USE_ROOT_DESCRIPTOR_SET for clarity.
USE_PUSH_DESCRIPTORS may be misleading since it would be set even when
we're not using push descriptors at all due to root descriptors being
passed in via VAs. Instead, make the flag represent whether or not we
use a regular descriptor set for root parameters.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-11-12 15:21:56 +01:00
Philip Rebohle baf265c666 vkd3d: Update root descriptor VAs as necessary.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-11-12 15:21:56 +01:00
Philip Rebohle 8999093c54 vkd3d: Add new field to store root descriptor VA.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-11-12 15:21:56 +01:00
Philip Rebohle 677422993e vkd3d: Add root descriptor VAs to push constant range.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-11-12 15:21:56 +01:00
Philip Rebohle cd01371756 vkd3d: Always enable BUFFER_DEVICE_ADDRESS usage for buffers.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-11-12 15:21:56 +01:00
Philip Rebohle c11b58418a vkd3d-shader: Support physical storage buffer root SRVs/UAVs.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-11-12 15:21:56 +01:00
Philip Rebohle 4313eaa59c vkd3d-shader: Support physical storage buffer root CBVs.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-11-12 15:21:56 +01:00
Philip Rebohle 5d2b0e6632 vkd3d-shader: Add loadv/storev helpers for aligned memory access.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-11-12 15:21:56 +01:00
Philip Rebohle 6c9d0cea69 vkd3d-shader: Rename descriptor_table_var_id -> root_parameter_var_id.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-11-12 15:21:56 +01:00
Philip Rebohle 4b3cec53fc vkd3d-shader: Declare push constants for root descriptor VAs.
We'll always place them at the beginning of the push constant
buffer in order to avoid potential alignment issues.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-11-12 15:21:56 +01:00
Philip Rebohle 2689c9e0a3 vkd3d-shader: Enable Int64 capability as necessary.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-11-12 15:21:56 +01:00
Philip Rebohle f69564c6c1 vkd3d-shader: Implement buffer reference type declarations.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-11-12 15:21:56 +01:00
Philip Rebohle b536723f5a vkd3d: Fix shader model-related feature detection.
We need to know the supported shader model to detect support
for certain features like wave ops correctly.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-11-11 10:41:11 +01:00
Joshua Ashton d4d14dfca0 vkd3d: Ignore DXGI_PRESENT_ALLOW_TEARING
Fixes warning spam in Horizon Zero Dawn.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-11-09 15:34:08 +01:00
Joshua Ashton 536ed0427a vkd3d: Create user buffers for degenerate surfaces
Previously this would make the user buffer count == 0, which obviously makes apps and assertions not happy.

Fixes a crash in Horizon Zero Dawn when minimized (therefore having a degenerate surface region)

Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-11-09 15:34:08 +01:00
Joshua Ashton c77428ba44 vkd3d: Implement DXGI_PRESENT_TEST
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-11-09 15:34:08 +01:00
Alexander Gabello da4a96a25b vkd3d: Free string after PIX decoding
Signed-off-by: Alexander Gabello <alexandergabello@mail.weber.edu>
2020-11-09 10:55:05 +01:00
Joshua Ashton b69dbcea0e vkd3d: Implement D3D12_HEAP_TYPE_WRITE_WATCH
Needed for D3D12 APITrace.

Closes: #373
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-11-08 18:47:53 +00:00
Joshua Ashton 236308b69e include: Add missing heap flags
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-11-08 16:35:49 +00:00
Hans-Kristian Arntzen 60ac9b4d51 Mark version 2.0.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-11-06 17:13:19 +01:00
Philip Rebohle 432ba00e3c vkd3d: Only care about DSV mismatch if pipeline actually uses it.
Avoids some unnecessary late compiles in Monster Hunter World.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-11-06 16:36:27 +01:00
Philip Rebohle 58548a3db2 vkd3d: Fix image memory barrier after fragment shader-based copy.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-11-06 16:07:47 +01:00
Philip Rebohle 408fed0910 vkd3d: Fix root descriptor indexing.
The packed descriptor index is no longer needed, and causes issues in
case a game sets a root signature, then binds a root descriptor, and
then sets a different root signature which maps the given root parameter
index to a different descriptor since we may now read undefined data
when updating push descriptors.

Fixes #366.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-11-06 16:07:47 +01:00
Hans-Kristian Arntzen 6b37d36de4 meta: Update COPYING year/name.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-11-06 16:03:39 +01:00
Hans-Kristian Arntzen 5a666c5f70 meta: Take a pass over the README.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-11-06 16:03:39 +01:00
Hans-Kristian Arntzen 210ce3b1e2 meta: Update AUTHORS.
Add the main contributors to vkd3d-proton.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-11-06 16:03:39 +01:00
Hans-Kristian Arntzen 9425dceace meta: Remove old vkd3d 1.1 ANNOUNCE.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-11-06 16:03:39 +01:00
Joshua Ashton c5e3779257 build: Replace build_linux32 with env vars
This is much distro-agnostic.

(Only sane distros [Arch] use /usr/lib32 and not /usr/lib/i386-linux-gnu)

Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-11-05 16:46:22 +00:00
Juuso Alasuutari 6bfead391d build: fix build_arch() in package-release.sh so that quoted input arguments behave normally
Signed-off-by: Juuso Alasuutari <juuso.alasuutari@gmail.com>
2020-11-05 16:35:40 +00:00
Joshua Ashton 8dea487861 meta: Add missing newlines to end of files
Remove trailing whitespace also

Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-11-05 17:16:57 +01:00
Joshua Ashton a18da4560d build: Fix pkgconfig and install target
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-11-05 17:16:57 +01:00
Hans-Kristian Arntzen 490d803581 vkd3d-shader: Add OpSource support to DXIL.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-11-05 15:57:16 +01:00
Hans-Kristian Arntzen 7e14f80e2a vkd3d-shader: Emit OpSource with DXBC hash.
Makes it possible to backtrace which shader we're working with
when we get raw SPIR-V from unrelated sources (Fossilize or RADV crash
dumps for example).

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-11-05 15:57:16 +01:00
Philip Rebohle a8f9cc15b3 vkd3d: Create root signature from shader blobs as necessary.
MSDN states that root signatures across multiple stages in a graphics
pipeline must be identical, but the D3D12 runtime does not validate
this and mixing different root signatures results in undefined
behaviour, so just taking this from the VS should be safe.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-11-05 15:21:16 +01:00
Philip Rebohle 1d823f8659 vkd3d: Do not store root signature in graphics pipeline state.
We only need to know the pipeline layout for pipeline variant
creation. We are not holding a strong reference to the root
signature anyway, which may be problematic, but this should
not introduce a regression.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-11-05 15:21:16 +01:00
Philip Rebohle a1198f2af8 tésts: Add test for creating pipeline states with a null root signature.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-11-05 15:21:16 +01:00
Georg Lehmann 8c93ebc83a build: Fix quotes in package-release.sh.
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
2020-11-05 11:33:37 +01:00
Georg Lehmann 98f005116b build: Replace enable_standalone_d3d12 with tristate enable_d3d12.
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
2020-11-04 23:38:02 +00:00
Hans-Kristian Arntzen f37254e6b6 tests: Add test for many typed buffers.
Verifies that can we can spam unique typed views without problems ...

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-11-04 19:05:28 +01:00
Hans-Kristian Arntzen e4600edb03 vkd3d: Always enable typed offset buffer.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-11-04 19:05:28 +01:00
Hans-Kristian Arntzen f1991d4458 vkd3d: Init descriptor heap offset buffer if we're only using typed.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-11-04 19:05:28 +01:00
Hans-Kristian Arntzen 670fba6c6f vkd3d: Enable typed offset buffer in root signature.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-11-04 19:05:28 +01:00