upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorIAmNotSiob <273832158+IAmNotSiob@users.noreply.github.com>2026-11-22 12:29:31 +0100
committerIAmNotSiob <273832158+IAmNotSiob@users.noreply.github.com>2026-11-22 12:29:31 +0100
commitaa2190bacbbedb6a00a962981f35e1eef309dc30 (patch)
treec83c1cb49b25b61f43743ffd045caf556585f370 /runtime
parent09ba78556a1d5bebd7f9f9ec27a877f266665768 (diff)
Trim comments
Diffstat (limited to 'runtime')
-rw-r--r--runtime/shims/d3d12_vulkan_device.cpp17
-rw-r--r--runtime/test/d3d12_vulkan_device_test.cpp3
2 files changed, 4 insertions, 16 deletions
diff --git a/runtime/shims/d3d12_vulkan_device.cpp b/runtime/shims/d3d12_vulkan_device.cpp
index c3385de90..67f263751 100644
--- a/runtime/shims/d3d12_vulkan_device.cpp
+++ b/runtime/shims/d3d12_vulkan_device.cpp
@@ -1957,12 +1957,7 @@ public:
1957 return S_OK; 1957 return S_OK;
1958 } 1958 }
1959 1959
1960 // Device5 methods the game is not expected to need (docs/d3d12_vulkan.md, "not planned until the game's trace 1960 // STUB
1961 // shows them"). They answer as D3D12 does on a device without the feature, as vkd3d-proton does, rather than
1962 // with the generated E_NOTIMPL stub, so a caller that probes them takes its normal "unsupported" path.
1963 //
1964 // Meta commands are vendor extensions (DirectML, upscalers); the layer offers none, so the list is empty and
1965 // every command GUID is unknown.
1966 HRESULT STDMETHODCALLTYPE EnumerateMetaCommands(UINT* count, D3D12_META_COMMAND_DESC*) override { 1961 HRESULT STDMETHODCALLTYPE EnumerateMetaCommands(UINT* count, D3D12_META_COMMAND_DESC*) override {
1967 if (!count) return E_INVALIDARG; 1962 if (!count) return E_INVALIDARG;
1968 *count = 0; 1963 *count = 0;
@@ -1979,8 +1974,7 @@ public:
1979 return E_INVALIDARG; 1974 return E_INVALIDARG;
1980 } 1975 }
1981 1976
1982 // Serialized acceleration structures (CopyRaytracingAccelerationStructure SERIALIZE) are not produced by this 1977 // STUB
1983 // layer, so no identifier is one it made. Any other data type is one D3D12 itself does not define.
1984 D3D12_DRIVER_MATCHING_IDENTIFIER_STATUS STDMETHODCALLTYPE CheckDriverMatchingIdentifier( 1978 D3D12_DRIVER_MATCHING_IDENTIFIER_STATUS STDMETHODCALLTYPE CheckDriverMatchingIdentifier(
1985 D3D12_SERIALIZED_DATA_TYPE type, const D3D12_SERIALIZED_DATA_DRIVER_MATCHING_IDENTIFIER*) override { 1979 D3D12_SERIALIZED_DATA_TYPE type, const D3D12_SERIALIZED_DATA_DRIVER_MATCHING_IDENTIFIER*) override {
1986 return type == D3D12_SERIALIZED_DATA_RAYTRACING_ACCELERATION_STRUCTURE 1980 return type == D3D12_SERIALIZED_DATA_RAYTRACING_ACCELERATION_STRUCTURE
@@ -1988,10 +1982,7 @@ public:
1988 : D3D12_DRIVER_MATCHING_IDENTIFIER_UNSUPPORTED_TYPE; 1982 : D3D12_DRIVER_MATCHING_IDENTIFIER_UNSUPPORTED_TYPE;
1989 } 1983 }
1990 1984
1991 // RemoveDevice puts the device in the removed state, which an application uses to test its device-lost path. 1985 // STUB
1992 // Only the reported state is modelled: GetDeviceRemovedReason returns DXGI_ERROR_DEVICE_REMOVED from then on.
1993 // The Vulkan device keeps working, so work already queued still completes (D3D12 would stop it and complete
1994 // fences to UINT64_MAX).
1995 void STDMETHODCALLTYPE RemoveDevice() override { removed_.store(true, std::memory_order_release); } 1986 void STDMETHODCALLTYPE RemoveDevice() override { removed_.store(true, std::memory_order_release); }
1996 1987
1997 HRESULT STDMETHODCALLTYPE CreateCommandQueue(const D3D12_COMMAND_QUEUE_DESC* desc, REFIID riid, 1988 HRESULT STDMETHODCALLTYPE CreateCommandQueue(const D3D12_COMMAND_QUEUE_DESC* desc, REFIID riid,
@@ -3591,7 +3582,7 @@ private:
3591 } 3582 }
3592 3583
3593 DeviceState state_; 3584 DeviceState state_;
3594 std::atomic<bool> removed_{false}; // set by RemoveDevice 3585 std::atomic<bool> removed_{false};
3595 OwnedRuntime owned_; 3586 OwnedRuntime owned_;
3596 IUnknown* outer_ = nullptr; // the Xbox-ABI proxy, which owns a reference to this device 3587 IUnknown* outer_ = nullptr; // the Xbox-ABI proxy, which owns a reference to this device
3597}; 3588};
diff --git a/runtime/test/d3d12_vulkan_device_test.cpp b/runtime/test/d3d12_vulkan_device_test.cpp
index a2c82c75c..b843f3953 100644
--- a/runtime/test/d3d12_vulkan_device_test.cpp
+++ b/runtime/test/d3d12_vulkan_device_test.cpp
@@ -2252,8 +2252,6 @@ int main() {
2252 E_INVALIDARG); 2252 E_INVALIDARG);
2253 } 2253 }
2254 { 2254 {
2255 // Device5 methods answered as on a device without the feature (no meta commands, no serialized
2256 // acceleration structures of ours).
2257 Ref<ID3D12Device5> device5; 2255 Ref<ID3D12Device5> device5;
2258 EXPECT(SUCCEEDED(device->QueryInterface(IID_PPV_ARGS(&device5.p)))); 2256 EXPECT(SUCCEEDED(device->QueryInterface(IID_PPV_ARGS(&device5.p))));
2259 UINT meta_count = 7; 2257 UINT meta_count = 7;
@@ -3381,7 +3379,6 @@ int main() {
3381 EXPECT(cpu_copies(device.p, d.bc, host ? "host image copy" : "staging copy") == 0); 3379 EXPECT(cpu_copies(device.p, d.bc, host ? "host image copy" : "staging copy") == 0);
3382 } 3380 }
3383 3381
3384 // RemoveDevice on a device of its own, since a removed device stays removed.
3385 { 3382 {
3386 Ref<ID3D12Device> removable; 3383 Ref<ID3D12Device> removable;
3387 EXPECT(SUCCEEDED(rt::d3d12::create_vulkan_device_standalone(IID_PPV_ARGS(&removable.p)))); 3384 EXPECT(SUCCEEDED(rt::d3d12::create_vulkan_device_standalone(IID_PPV_ARGS(&removable.p))));