Skip to content

Commit dd8bd8a

Browse files
Merge remote-tracking branch 'upstream/master' into pr/2760
2 parents 1eff69a + ddfa1ee commit dd8bd8a

File tree

552 files changed

+27915
-13244
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

552 files changed

+27915
-13244
lines changed

CHANGELOG.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,58 @@
11
# Change Log
22

3+
## 2.12
4+
5+
### Features
6+
7+
- Implement support for NVIDIA Reflex through `VK_NV_low_latency2`. Thanks to NVIDIA for contributing implementation
8+
- Implement D3D12 render pass API (tier 0)
9+
- Implement ID3D12DeviceRemovedExtendedDataSettings stubs. Fixes some games that rely on this existing
10+
- Implement `VK_EXT_device_fault`. Makes it possible to grab fault information and vendor binary if supported
11+
- Implement `VK_EXT_swapchain_maintenance1`
12+
- Allows seamless transition between V-Sync and tearing present modes without stutter
13+
- Implemented on both Mesa and NV drivers
14+
- Expose Shader Model 6.7 by default if
15+
`VK_KHR_shader_maximal_reconvergence` and `VK_KHR_shader_quad_control` are supported
16+
- Add optimized descriptor copy path on Intel Arc GPUs that support `VK_EXT_descriptor_buffer`
17+
- Implement fallback for compute shader derivatives on NVIDIA Pascal and older GPUs.
18+
Allows exposing Shader Model 6.7 by default on Pascal as well (albeit with some known cases where it does not work).
19+
The workaround is expected to work with any known use of SM 6.6 compute derivatives in the wild
20+
21+
### Fixes
22+
23+
- Fix Atlas Fallen black screen due to edge case with MinLODClamp
24+
- Correctly disable alpha-to-coverage if sampler mask is exported
25+
- Fix format feature reports for `DXGI_FORMAT_UNKNOWN`
26+
- Relax root signature compatibility rules when compiling Ray Tracing pipelines.
27+
Fixes GPU hang on NV in Warhammer: Darktide
28+
- Fix GPU hang on NV in UE5 Lyra demo
29+
- Explicitly validate stage IO signatures in PSO creation similar to native D3D12 runtime.
30+
Fixes some scenarios where a game attempts to create an invalid pipeline that should have failed creation
31+
on native D3D12
32+
33+
### Workarounds
34+
35+
- Workaround crash in Resident Evil 4 RT mode when tessellation is enabled
36+
- Workaround mesh shader glitches on NVIDIA in several UE5 titles
37+
- Workaround GPU hang on NVIDIA in World of Warcraft when MSAA is enabled
38+
- Disable RT by default in Persona 3 Reload on Deck
39+
40+
### Performance
41+
42+
- Implement `VK_NV_raw_access_chains`. Significantly improves GPU performance on NV GPUs in some games.
43+
Games using DXBC instead of DXIL are expected to see more improvements.
44+
Not all games are expected to see an uplift
45+
- Fix extremely poor GPU performance in some locations in Persona 3 Reload
46+
47+
### Debug
48+
49+
- Add support for `VKD3D_QUEUE_PROFILE`, a simple system profiling method
50+
- Includes `VK_NV_low_latency2` support to debug NVIDIA Reflex sleeps
51+
- Root signature blobs are also dumped when dumping shaders
52+
- A simple CLI tool to inspect the root-sig blobs is included in `programs/`
53+
- Misc improvements to breadcrumbs, debug ring, etc
54+
- Pipeline creation failure now dumps PSO creation commands in log
55+
356
## 2.11.1
457

558
This release is a minor bug-fix release before the holidays.

VP_D3D12_VKD3D_PROTON_profile.json

Lines changed: 40 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "https://schema.khronos.org/vulkan/profiles-0.8.1-250.json#",
2+
"$schema": "https://schema.khronos.org/vulkan/profiles-0.8-latest.json#",
33
"capabilities": {
44
"baseline_features": {
55
"extensions": {
@@ -176,7 +176,8 @@
176176
"VK_KHR_fragment_shading_rate": 1,
177177
"VK_EXT_pipeline_library_group_handles": 1,
178178
"VK_KHR_ray_tracing_maintenance1": 1,
179-
"VK_EXT_mesh_shader": 1
179+
"VK_EXT_mesh_shader": 1,
180+
"VK_EXT_conservative_rasterization": 1
180181
},
181182
"formats": {
182183
"VK_FORMAT_R32G32_SFLOAT": {
@@ -447,6 +448,20 @@
447448
}
448449
}
449450
},
451+
"shader_model_67": {
452+
"extensions": {
453+
"VK_KHR_shader_maximal_reconvergence": 1,
454+
"VK_KHR_shader_quad_control": 1
455+
},
456+
"features": {
457+
"VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR": {
458+
"shaderMaximalReconvergence": true
459+
},
460+
"VkPhysicalDeviceShaderQuadControlFeaturesKHR": {
461+
"shaderQuadControl": true
462+
}
463+
}
464+
},
450465
"optimal_performance": {
451466
"extensions": {
452467
"VK_EXT_descriptor_buffer": 1,
@@ -458,7 +473,8 @@
458473
"VK_EXT_graphics_pipeline_library": 1,
459474
"VK_KHR_pipeline_library": 1,
460475
"VK_AMD_buffer_marker": 1,
461-
"VK_EXT_scalar_block_layout": 1
476+
"VK_EXT_scalar_block_layout": 1,
477+
"VK_EXT_swapchain_maintenance1" : 1
462478
},
463479
"features": {
464480
"VkPhysicalDeviceDescriptorBufferFeaturesEXT": {
@@ -489,6 +505,9 @@
489505
},
490506
"VkPhysicalDeviceScalarBlockLayoutFeaturesEXT": {
491507
"scalarBlockLayout": true
508+
},
509+
"VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT": {
510+
"swapchainMaintenance1": true
492511
}
493512
},
494513
"properties": {
@@ -551,14 +570,18 @@
551570
"VK_AMD_device_coherent_memory": 1,
552571
"VK_AMD_shader_core_properties": 1,
553572
"VK_AMD_shader_core_properties2": 1,
554-
"VK_EXT_dynamic_rendering_unused_attachments": 1
573+
"VK_EXT_dynamic_rendering_unused_attachments": 1,
574+
"VK_EXT_image_compression_control": 1
555575
},
556576
"features": {
557577
"VkPhysicalDeviceCoherentMemoryFeaturesAMD": {
558578
"deviceCoherentMemory": true
559579
},
560580
"VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT": {
561581
"dynamicRenderingUnusedAttachments": true
582+
},
583+
"VkPhysicalDeviceImageCompressionControlFeaturesEXT": {
584+
"imageCompressionControl": true
562585
}
563586
},
564587
"properties": {
@@ -580,11 +603,15 @@
580603
"VK_NV_shader_sm_builtins": 1,
581604
"VK_NVX_binary_import": 1,
582605
"VK_NVX_image_view_handle": 1,
583-
"VK_NV_device_diagnostic_checkpoints": 1
606+
"VK_NV_device_diagnostic_checkpoints": 1,
607+
"VK_NV_raw_access_chains": 1
584608
},
585609
"features": {
586610
"VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT": {
587611
"pageableDeviceLocalMemory": true
612+
},
613+
"VkPhysicalDeviceRawAccessChainsFeaturesNV": {
614+
"shaderRawAccessChains": true
588615
}
589616
},
590617
"properties": {
@@ -724,6 +751,7 @@
724751
"fl_12_2_properties",
725752
"shader_model_60",
726753
"shader_model_66",
754+
"shader_model_67",
727755
"optimal_performance",
728756
"optional",
729757
"optional_amd"
@@ -745,6 +773,7 @@
745773
"fl_12_2_properties",
746774
"shader_model_60",
747775
"shader_model_66",
776+
"shader_model_67",
748777
"optimal_performance",
749778
"optional",
750779
"optional_nv"
@@ -756,6 +785,12 @@
756785
"Hans-Kristian Arntzen": { "company": "Valve" }
757786
},
758787
"history": [
788+
{
789+
"revision": 2,
790+
"date": "2024-02-09",
791+
"author": "Hans-Kristian Arntzen",
792+
"comment": "Add SM 6.7"
793+
},
759794
{
760795
"revision": 1,
761796
"date": "2023-05-23",

include/meson.build

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ vkd3d_idl = [
1313
'vkd3d_dxgitype.idl',
1414
'vkd3d_swapchain_factory.idl',
1515
'vkd3d_command_list_vkd3d_ext.idl',
16+
'vkd3d_command_queue_vkd3d_ext.idl',
1617
'vkd3d_device_vkd3d_ext.idl',
1718
'vkd3d_core_interface.idl',
1819
]

include/private/vkd3d_common.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ static inline uint64_t vkd3d_get_current_time_ticks(void)
332332
{
333333
#ifdef _MSC_VER
334334
return __rdtsc();
335-
#elif defined(__i386__) || defined(__x86_64__)
335+
#elif defined(__i386__) || (defined(__x86_64__) && !defined(__arm64ec__))
336336
return __builtin_ia32_rdtsc();
337337
#else
338338
return vkd3d_get_current_time_ns();

include/private/vkd3d_debug.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ enum vkd3d_dbg_level vkd3d_dbg_get_level(enum vkd3d_dbg_channel channel);
6969

7070
void vkd3d_dbg_printf(enum vkd3d_dbg_channel channel, enum vkd3d_dbg_level level, const char *function,
7171
const char *fmt, ...) VKD3D_PRINTF_FUNC(4, 5);
72+
void vkd3d_dbg_flush(void);
7273

7374
const char *vkd3d_dbg_sprintf(const char *fmt, ...) VKD3D_PRINTF_FUNC(1, 2);
7475
const char *vkd3d_dbg_vsprintf(const char *fmt, va_list args);

include/private/vkd3d_string.h

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,17 +88,31 @@ static inline void vkd3d_strlcpy(char *dst, size_t dst_size, const char *src)
8888
{
8989
if (dst_size > 0)
9090
{
91-
strncpy(dst, src, dst_size - 1);
92-
dst[dst_size - 1] = '\0';
91+
if (strlen(src) < dst_size)
92+
{
93+
strcpy(dst, src);
94+
}
95+
else
96+
{
97+
memcpy(dst, src, dst_size - 1);
98+
dst[dst_size - 1] = '\0';
99+
}
93100
}
94101
}
95102

96103
static inline void vkd3d_strlcat(char *dst, size_t dst_size, const char *src)
97104
{
105+
char *dst_begin;
106+
size_t dst_len;
107+
char *dst_end;
108+
98109
if (dst_size > 0)
99110
{
100-
strncat(dst, src, dst_size - 1);
101-
dst[dst_size - 1] = '\0';
111+
dst_begin = dst + strlen(dst);
112+
dst_end = dst + dst_size;
113+
assert(dst_end >= dst_begin);
114+
dst_len = dst_end - dst_begin;
115+
vkd3d_strlcpy(dst_begin, dst_len, src);
102116
}
103117
}
104118

include/shader-debug/debug_channel.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,72 +267,84 @@ void DEBUG_CHANNEL_MSG_UNIFORM(uint v0)
267267
{
268268
if (DEBUG_CHANNEL_ELECT())
269269
DEBUG_CHANNEL_MSG(v0);
270+
subgroupBarrier();
270271
}
271272

272273
void DEBUG_CHANNEL_MSG_UNIFORM(uint v0, uint v1)
273274
{
274275
if (DEBUG_CHANNEL_ELECT())
275276
DEBUG_CHANNEL_MSG(v0, v1);
277+
subgroupBarrier();
276278
}
277279

278280
void DEBUG_CHANNEL_MSG_UNIFORM(uint v0, uint v1, uint v2)
279281
{
280282
if (DEBUG_CHANNEL_ELECT())
281283
DEBUG_CHANNEL_MSG(v0, v1, v2);
284+
subgroupBarrier();
282285
}
283286

284287
void DEBUG_CHANNEL_MSG_UNIFORM(uint v0, uint v1, uint v2, uint v3)
285288
{
286289
if (DEBUG_CHANNEL_ELECT())
287290
DEBUG_CHANNEL_MSG(v0, v1, v2, v3);
291+
subgroupBarrier();
288292
}
289293

290294
void DEBUG_CHANNEL_MSG_UNIFORM(int v0)
291295
{
292296
if (DEBUG_CHANNEL_ELECT())
293297
DEBUG_CHANNEL_MSG(v0);
298+
subgroupBarrier();
294299
}
295300

296301
void DEBUG_CHANNEL_MSG_UNIFORM(int v0, int v1)
297302
{
298303
if (DEBUG_CHANNEL_ELECT())
299304
DEBUG_CHANNEL_MSG(v0, v1);
305+
subgroupBarrier();
300306
}
301307

302308
void DEBUG_CHANNEL_MSG_UNIFORM(int v0, int v1, int v2)
303309
{
304310
if (DEBUG_CHANNEL_ELECT())
305311
DEBUG_CHANNEL_MSG(v0, v1, v2);
312+
subgroupBarrier();
306313
}
307314

308315
void DEBUG_CHANNEL_MSG_UNIFORM(int v0, int v1, int v2, int v3)
309316
{
310317
if (DEBUG_CHANNEL_ELECT())
311318
DEBUG_CHANNEL_MSG(v0, v1, v2, v3);
319+
subgroupBarrier();
312320
}
313321

314322
void DEBUG_CHANNEL_MSG_UNIFORM(float v0)
315323
{
316324
if (DEBUG_CHANNEL_ELECT())
317325
DEBUG_CHANNEL_MSG(v0);
326+
subgroupBarrier();
318327
}
319328

320329
void DEBUG_CHANNEL_MSG_UNIFORM(float v0, float v1)
321330
{
322331
if (DEBUG_CHANNEL_ELECT())
323332
DEBUG_CHANNEL_MSG(v0, v1);
333+
subgroupBarrier();
324334
}
325335

326336
void DEBUG_CHANNEL_MSG_UNIFORM(float v0, float v1, float v2)
327337
{
328338
if (DEBUG_CHANNEL_ELECT())
329339
DEBUG_CHANNEL_MSG(v0, v1, v2);
340+
subgroupBarrier();
330341
}
331342

332343
void DEBUG_CHANNEL_MSG_UNIFORM(float v0, float v1, float v2, float v3)
333344
{
334345
if (DEBUG_CHANNEL_ELECT())
335346
DEBUG_CHANNEL_MSG(v0, v1, v2, v3);
347+
subgroupBarrier();
336348
}
337349

338350
#endif

include/vkd3d.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,13 @@ extern "C" {
6363
#define VKD3D_CONFIG_FLAG_SINGLE_QUEUE (1ull << 5)
6464
#define VKD3D_CONFIG_FLAG_DESCRIPTOR_QA_CHECKS (1ull << 6)
6565
#define VKD3D_CONFIG_FLAG_NO_DXR (1ull << 7)
66-
/* Bit 8 is vacant */
66+
#define VKD3D_CONFIG_FLAG_FAULT (1ull << 8)
6767
#define VKD3D_CONFIG_FLAG_FORCE_MINIMUM_SUBGROUP_SIZE (1ull << 9)
6868
#define VKD3D_CONFIG_FLAG_NO_UPLOAD_HVV (1ull << 10)
6969
#define VKD3D_CONFIG_FLAG_LOG_MEMORY_BUDGET (1ull << 11)
70-
/* Bit 12 is vacant */
70+
#define VKD3D_CONFIG_FLAG_BREADCRUMBS_SYNC (1ull << 12)
7171
#define VKD3D_CONFIG_FLAG_FORCE_HOST_CACHED (1ull << 13)
72-
/* Bit 14 is vacant */
72+
#define VKD3D_CONFIG_FLAG_APP_DEBUG_MARKER_ONLY (1ull << 14)
7373
#define VKD3D_CONFIG_FLAG_FORCE_NO_INVARIANT_POSITION (1ull << 15)
7474
#define VKD3D_CONFIG_FLAG_GLOBAL_PIPELINE_CACHE (1ull << 16)
7575
#define VKD3D_CONFIG_FLAG_PIPELINE_LIBRARY_NO_SERIALIZE_SPIRV (1ull << 17)
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/*
2+
* * Copyright 2023 NVIDIA Corporation
3+
*
4+
* This library is free software; you can redistribute it and/or
5+
* modify it under the terms of the GNU Lesser General Public
6+
* License as published by the Free Software Foundation; either
7+
* version 2.1 of the License, or (at your option) any later version.
8+
*
9+
* This library is distributed in the hope that it will be useful,
10+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12+
* Lesser General Public License for more details.
13+
*
14+
* You should have received a copy of the GNU Lesser General Public
15+
* License along with this library; if not, write to the Free Software
16+
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17+
*/
18+
import "vkd3d_d3d12.idl";
19+
import "vkd3d_vk_includes.h";
20+
21+
[
22+
uuid(40ed3f96-e773-e9bc-fc0c-e95560c99ad6),
23+
object,
24+
local,
25+
pointer_default(unique)
26+
]
27+
interface ID3D12CommandQueueExt : IUnknown
28+
{
29+
HRESULT NotifyOutOfBandCommandQueue(D3D12_OUT_OF_BAND_CQ_TYPE type);
30+
}

include/vkd3d_device_vkd3d_ext.idl

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,18 @@ interface ID3D12DXVKInteropDevice : IUnknown
5454
HRESULT LockCommandQueue(ID3D12CommandQueue *queue);
5555
HRESULT UnlockCommandQueue(ID3D12CommandQueue *queue);
5656
}
57+
58+
[
59+
uuid(f3112584-41f9-348d-a59b-00b7e1d285d6),
60+
object,
61+
local,
62+
pointer_default(unique)
63+
]
64+
interface ID3DLowLatencyDevice : IUnknown
65+
{
66+
BOOL SupportsLowLatency();
67+
HRESULT LatencySleep();
68+
HRESULT SetLatencySleepMode(BOOL low_latency_mode, BOOL low_latency_boost, UINT32 minimum_interval_us);
69+
HRESULT SetLatencyMarker(UINT64 frameID, UINT32 markerType);
70+
HRESULT GetLatencyInfo(D3D12_LATENCY_RESULTS *latency_results);
71+
}

0 commit comments

Comments
 (0)