Hans-Kristian Arntzen
ea088ceecf
vkd3d: Use UINT64* instead of uint64_t* in 64-bit CAS.
...
Avoids alignment warnings on 32-bit.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-02-16 16:14:14 +00:00
Joshua Ashton
9b2841b50f
tests: Fix -Wsign-compare warnings
...
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-02-15 17:54:54 +01:00
Georg Lehmann
eaab2388b1
vkd3d: Fix warning with vkd3d_atomic_ptr*.
...
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
2021-02-15 15:47:17 +01:00
Philip Rebohle
7549d70fbf
vkd3d: Fix compiler errors when using vkd3d_atomic_ptr_store_explicit.
...
Atomic stores do not return anything, so we cannot cast to void* here.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-02-11 15:15:59 +00:00
Joshua Ashton
fccbd3b5e2
vkd3d: Eliminate wchar_size, use UTF-16 string literals
...
Achieves this with C standard stuff alone, and no compiler hacks.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-02-09 11:26:28 +01:00
Hans-Kristian Arntzen
13af141e84
common: Add truncated wide export strcmp.
...
Needed for GetShaderStackSize().
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-02-05 10:05:07 +01:00
Hans-Kristian Arntzen
859066cd9b
vkd3d-shader: Add ray-tracing pipeline support to DXIL.
...
Also updates relevant submodules.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-02-05 10:05:07 +01:00
Hans-Kristian Arntzen
1784351dcf
vkd3d-shader: Move root parameter structs to vkd3d-shader.
...
Need it here since local root signatures need to know
the physical layout of the record buffer up front.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-02-05 10:05:07 +01:00
Hans-Kristian Arntzen
fdcf583cbc
vkd3d: Rename COUNTER buffer to AUX_BUFFER.
...
We will use the same pointer buffer to handle acceleration structures,
so unify this buffer under a new name. Simplifies some of the binding
code since SRV path and UAV path looks more similar now.
Only difference is that UAV path uses BDA -> uint32_t,
and SRV uses BDA -> RTAccelerationStructure.
RT requires BDA, so the fallback descriptor set (storage texel buffer) is never used for RT.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-02-05 10:05:07 +01:00
Hans-Kristian Arntzen
86da5d9bad
common: Add string utilities for dealing with entry point conventions.
...
Used across both vkd3d-shader and vkd3d, so makes sense to move this to
common code.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-02-05 10:05:07 +01:00
Hans-Kristian Arntzen
dd2a963ae7
idl: Add D3D_FEATURE_LEVEL_12_2.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-01-26 15:00:15 +01:00
Hans-Kristian Arntzen
326d1cde60
vkd3d-shader: Remove DXIL being optional.
...
We always build with DXIL, not using autotools anymore.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-01-25 14:03:37 +01:00
Hans-Kristian Arntzen
6b363e53d2
vkd3d: Actually compare against hashmap entry and not against itself.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-12-05 15:09:39 +01:00
Hans-Kristian Arntzen
e6961afca6
vkd3d-shader: Emit typed format for UAVs which use atomics.
...
Mesa will assert if not, and the format must be known here.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-12-04 16:08:26 +01:00
Hans-Kristian Arntzen
f67f55827e
vkd3d: Parse patch version of PACKAGE_NAME as well.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-12-03 15:05:13 +01:00
Hans-Kristian Arntzen
adf0be5bf1
vkd3d: Lower contention when spinlocking writers.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-12-02 13:12:56 +01:00
Hans-Kristian Arntzen
b3024365d0
vkd3d: Add a reader-writer spinlock.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-12-02 13:12:56 +01:00
Hans-Kristian Arntzen
c2c674194d
vkd3d: Add Add/Sub/And atomic u32 intrinsics.
...
Will be used for reader-writer spinlocks.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-12-02 13:12:56 +01:00
Hans-Kristian Arntzen
f96e60b6ac
vkd3d: Make hashmap compatible with reader-writer locks.
...
Yield insertion when there is a match.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-12-02 13:12:56 +01:00
Joshua Ashton
22794c67a4
include: Add missing enum flag operator definitions
...
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-11-25 15:58:45 +01:00
Joshua Ashton
3e5a3c835a
include: Fix definition of D3D12_RESOURCE_ALIASING_BARRIER
...
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-11-25 15:58:45 +01:00
Joshua Ashton
6b9f7b7339
include: Fix typo in d3d12 header
...
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-11-25 15:58:45 +01:00
Joshua Ashton
fcb4764228
include: Update D3D12 headers
...
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-11-25 15:58:45 +01:00
Georg Lehmann
24100cac07
vkd3d: Add Win32 PTHREAD_MUTEX_INITIALIZER.
...
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
2020-11-18 18:29:48 +00:00
Philip Rebohle
1563b80852
include: Fix various issues with atomic CAS.
...
- fail/success memory orders exist for a reason, we can't
e.g. do release on fail since it's a read-only operation
- silence some warnings about pointer->integer casts
- fix linker errors on mingw by marking functions as static
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-11-18 12:39:14 +01:00
Joshua Ashton
4d95cafe10
vkd3d: Implement compare exchange atomics
...
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-11-16 09:33:26 +01:00
Joshua Ashton
1e810e8f9e
vkd3d: Use consistent comment style in atomic header
...
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-11-16 09:33:26 +01:00
Joshua Ashton
093f0eb053
vkd3d: Implement 64-bit and pointer atomics
...
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-11-16 09:33:26 +01: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
Hans-Kristian Arntzen
572ea9da7f
common: Enable popcount and clz paths based on compiler.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-11-04 19:05:28 +01:00
Hans-Kristian Arntzen
2158ed716b
vkd3d-shader: Add a TYPED_OFFSET_BUFFER to shader interface as well.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-11-04 19:05:28 +01:00
Joshua Ashton
f50c897868
build: Merge vkd3d_headers into vkd3d_common
...
Fixes MSVC build.
Closes : #343
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-11-03 09:37:24 +01:00
Joshua Ashton
7325a49bd6
vkd3d: Include correct memory header in hashmap
...
Fixes warnings about implicit declaration of these functions
when building demos/programs which could be very bad on x64 if used.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-11-03 09:35:44 +01:00
Hans-Kristian Arntzen
f991dea51a
tests: Report successful TODOs separately from failures.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-10-30 08:16:16 +01:00
Philip Rebohle
1abae6eb06
vkd3d-shader: Remove unused sampler comparison mask.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-10-29 15:39:40 +01:00
Philip Rebohle
a2d85f6040
vkd3d-shader: Use new register map to store UAV flags.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-10-29 15:39:40 +01:00
Philip Rebohle
0d82bf67aa
vkd3d-shader: Add hash map for register flags to scan info.
...
This way we won't have arbitrary register count limitations.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-10-29 15:39:40 +01:00
Philip Rebohle
9832d1639d
vkd3d-shader: Remove pNext chain from vkd3d_shader_scan_info.
...
Unused.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-10-29 15:39:40 +01:00
Philip Rebohle
c53a0d6365
include: Fix hashmap constness issues.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-10-29 15:39:40 +01:00
Joshua Ashton
c72fb12353
build: Only generate headers once
...
This makes headers a dependency rather than a generator target.
This also means we get proper dependency tracking of them between projects.
Supercedes: #225
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-10-29 10:02:48 +01:00
Joshua Ashton
a1a6840fb5
vkd3d-utils: Move to .def exports
...
Otherwise this won't work in MSVC because it'd technically be re-defining the D3D12 function prototypes with the decltypes.
There is no other nice way around this.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-10-28 17:05:13 +01:00
Hans-Kristian Arntzen
cd9c1fb9f3
vkd3d: Add an INFO debug level.
...
Useful for cases where we want to communicate important information to
the log by default, but not consider it an error.
Requested information which would only be logged when explicitly asked
for should also be considered INFO.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-10-28 17:03:54 +01:00
Hans-Kristian Arntzen
4d961f96ea
vkd3d: Fix some nits with declaration-after-statement.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-10-28 11:04:06 +01:00
Philip Rebohle
36bdc02a05
include: Introduce void_ptr_offset.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-10-28 10:30:12 +01:00
Philip Rebohle
bea196e449
vkd3d-shader: Declare offset buffer.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-10-28 10:30:12 +01:00
Joshua Ashton
ac2456b01f
vkd3d-shader: Implement double data type
...
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-10-23 12:40:38 +02:00
Joshua Ashton
4fb3e277f1
vkd3d: Remove VKD3D_RESOURCE_PRESENT_STATE_TRANSITION
...
All this flag does is make resource creation fail.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-10-22 09:30:24 +02:00
Hans-Kristian Arntzen
d7e9713c4c
vkd3d: Add external API to perform initial transition.
...
Relevant for swapchain since a swapchain resource can be presented right
away without ever having been touched by an API call.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-10-16 13:25:59 +01:00
Philip Rebohle
367cda017f
vkd3d-shader: Implement resource declarations with raw SSBOs.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-10-16 14:24:36 +02:00
Philip Rebohle
b82bbe265e
vkd3d: Pass storage buffer alignment to shader compiler.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-10-16 14:24:36 +02:00