Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vkquake doesn't launch but triggers interesting errors/limitations.. #4

Open
oscarbg opened this issue Mar 3, 2018 · 7 comments
Open
Labels
bug Something isn't working

Comments

@oscarbg
Copy link

oscarbg commented Mar 3, 2018

Hi just testing vkquake..
maybe interesting in the kind of errors it triggers..

D3D12 ERROR: ID3D12GraphicsCommandList::{Create,Reset}CommandList: The command allocator is currently in-use by another command list or is being reset in another thread. [ EXECUTION ERROR #540: COMMAND_ALLOCATOR_CONTENTION]

[2018-03-03 19:45:59.369] [rostkatze] [warning] Unhandled descriptor type: 8
[2018-03-03 19:45:59.371] [rostkatze] [error] Unsupported descriptor type: 8
[2018-03-03 19:45:59.373] [rostkatze] [error] Unsupported descriptor type: 10

D3D12 ERROR: ID3D12Device::CreateSampler: Filter unrecognized. [ STATE_CREATION ERROR #742: CREATE_SAMPLER_INVALID]

I run and see:

Command line: C:\vulkan\vkquake-0.97.3_win64\vkquake -condebug
Found SDL version 2.0.7
Detected 4 CPUs.
Quake 1.09 (c) id Software
GLQuake 1.00 (c) id Software
FitzQuake 0.85 (c) John Fitzgibbons
FitzQuake SDL port (c) SleepwalkR, Baker
QuakeSpasm 0.93.0 (c) Ozkan Sezer, Eric Wasylishen & others
vkQuake 0.97.3 (c) Axel Gneiting & others
Host_Init
Playing shareware version.
Console initialized.
UDP Initialized
WIPX_OpenSocket: Address family not supported by protocol family
WIPX_Init: Unable to open control socket, IPX disabled
Server using protocol 666 (FitzQuake)
Exe: 23:10:26 Dec 30 2017
256.0 megabyte heap

Vulkan Initialization
Vendor: AMD
Device: Radeon RX Vega
Using D32 depth buffer format
Creating command buffers
Initializing staging
D3D12 ERROR: ID3D12GraphicsCommandList::{Create,Reset}CommandList: The command allocator is currently in-use by another command list or is being reset in another thread. [ EXECUTION ERROR #540: COMMAND_ALLOCATOR_CONTENTION]
Creating descriptor set layouts

but code really continues up to hitting an assert in this code and see( num was 2049) so made a dirty hack I replaced with allocator.alloc(num-1); and continues further see below:

/// Allocate a slice of the descriptor heap.
   auto alloc(size_t num) -> descriptor_cpu_gpu_handle_t {
       const auto range = this->allocator.alloc(num-1);
       if (range) {
           return std::make_tuple(
               D3D12_CPU_DESCRIPTOR_HANDLE { this->start_cpu.ptr + this->_handle_size * range->_start },
               D3D12_GPU_DESCRIPTOR_HANDLE { this->start_gpu.ptr + this->_handle_size * range->_start }
           );
       } else {
           // TODO
           assert(!"Not enough free descriptors in the allocator");
           return std::make_tuple(
               D3D12_CPU_DESCRIPTOR_HANDLE { 0 },
               D3D12_GPU_DESCRIPTOR_HANDLE { 0 }
           );
       }
   }

Creating descriptor set layouts
Initializing dynamic vertex buffers
Initializing dynamic index buffers
Initializing dynamic uniform buffers
[2018-03-03 19:45:59.369] [rostkatze] [warning] Unhandled descriptor type: 8
[2018-03-03 19:45:59.369] [rostkatze] [warning] Unhandled descriptor type: 8
Initializing samplers
D3D12 ERROR: ID3D12Device::CreateSampler: Filter unrecognized. [ STATE_CREATION ERROR #742: CREATE_SAMPLER_INVALID]
D3D12: Removing Device.
D3D12 ERROR: ID3D12Device::RemoveDevice: Device removal has been triggered for the following reason (DXGI_ERROR_INVALID_CALL: There is strong evidence that the application has performed an illegal or undefined operation, and such a condition could not be returned to the application cleanly through a return code). [ EXECUTION ERROR #232: DEVICE_REMOVAL_PROCESS_AT_FAULT]
Creating pipeline layouts
Excepción producida en 0x00007FFE1B866908 en vkQuake.exe: excepción de Microsoft C++: _com_error en la ubicación de la memoria 0x0000008237EFE0E8.
Excepción producida en 0x00007FFE1B866908 en vkQuake.exe: excepción de Microsoft C++: _com_error en la ubicación de la memoria 0x0000008237EFE670.
Excepción producida en 0x00007FFE1B866908 en vkQuake.exe: excepción de Microsoft C++: _com_error en la ubicación de la memoria 0x0000008237EFE0E8.
Excepción producida en 0x00007FFE1B866908 en vkQuake.exe: excepción de Microsoft C++: _com_error en la ubicación de la memoria 0x0000008237EFE670.
[2018-03-03 19:45:59.371] [rostkatze] [error] Unsupported descriptor type: 8
Excepción producida en 0x00007FFE1B866908 en vkQuake.exe: excepción de Microsoft C++: _com_error en la ubicación de la memoria 0x0000008237EFE0E8.
Excepción producida en 0x00007FFE1B866908 en vkQuake.exe: excepción de Microsoft C++: _com_error en la ubicación de la memoria 0x0000008237EFE670.
Excepción producida en 0x00007FFE1B866908 en vkQuake.exe: excepción de Microsoft C++: _com_error en la ubicación de la memoria 0x0000008237EFE0E8.
Excepción producida en 0x00007FFE1B866908 en vkQuake.exe: excepción de Microsoft C++: _com_error en la ubicación de la memoria 0x0000008237EFE670.
[2018-03-03 19:45:59.373] [rostkatze] [error] Unsupported descriptor type: 10
Excepción producida en 0x00007FFE1B866908 en vkQuake.exe: excepción de Microsoft C++: _com_error en la ubicación de la memoria 0x0000008237EFE0E8.
Excepción producida en 0x00007FFE1B866908 en vkQuake.exe: excepción de Microsoft C++: _com_error en la ubicación de la memoria 0x0000008237EFE670.
Excepción producida en 0x00007FFE1B866908 en vkQuake.exe: excepción de Microsoft C++: _com_error en la ubicación de la memoria 0x0000008237EFE0E8.
Excepción producida en 0x00007FFE1B866908 en vkQuake.exe: excepción de Microsoft C++: _com_error en la ubicación de la memoria 0x0000008237EFE670.
Using FIFO present mode
fpCreateSwapchainKHR
Excepción producida en 0x00007FFE1B866908 en vkQuake.exe: excepción de Microsoft C++: _com_error en la ubicación de la memoria 0x0000008237EFE198.
Excepción producida en 0x00007FFE1B866908 en vkQuake.exe: excepción de Microsoft C++: _com_error en la ubicación de la memoria 0x0000008237EFE358.
Excepción producida en 0x00007FFE1B866908 en vkQuake.exe: excepción de Microsoft C++: _com_error en la ubicación de la memoria 0x0000008237EFE480.
Assertion failed!

Program: c:\rostkatzeout\Debug\rostkatze.dll
File: C:\rostkatze\src\impl.cpp
Line: 6888

@msiglreith msiglreith added the bug Something isn't working label Mar 6, 2018
@msiglreith
Copy link
Owner

Thanks for testing. The limited number of sampler descriptors per heap is difficult to handle for D3D12 and it will probably be a roadblock for all/most commercial applications. I'm not really sure how to fix it, still hoping to find some 'loophole' inside the vulkan spec to implement descriptor heaps better. There certainly is the possibility of emulating command buffers and calculating the required numbers of descriptors at the end with corresponding copies but that's something I would like to avoid.

@oscarbg
Copy link
Author

oscarbg commented Apr 5, 2018

Perhaps something to be improved in some future D3D12 version/revision with new samplers per heap tiers with upgraded required minimums.. maybe you should post this issue you are facing on directxtech forums which Microsoft DirectX engineers monitor..

@msiglreith
Copy link
Owner

Kind of but still would need to support hardware with only a limited number of sampler (looking at nvidia). I personally prefer descriptor heaps (dx12) over descriptor pools (vulkan) as it reflects the hardware better afaik. I'm working on descriptor pool handling for samplers atm, it won't be optimal but that's not priority for now, but rather be target of extensions.

@msiglreith
Copy link
Owner

Fixed on latest master, vkQuake currently blocked on recording command buffers in parallel (software commands buffers in work) and missing dynamic descriptors.

@msiglreith
Copy link
Owner

Can run the menu at least (hearing some sound), but lacking input attachment support (among other stuff). So only a black screen for now

@oscarbg
Copy link
Author

oscarbg commented Apr 21, 2018

Hi @msiglreith,
will try to reproduce your vkquake results soon..
just now I remembered that until last week commit (Novum/vkQuake@77f3caf)
vkquake was using triangle fans which is not supported by Direct3D12
(https://gamedev.stackexchange.com/questions/35547/why-are-triangle-fans-not-supported-in-direct3d-10-or-later)
In fact I found this issue while trying to run under MoltenVK (aka Vulkan Macos driver) as seems also triangle fans aren't supported on Metal
see: Novum/vkQuake#132
can you confirm if in your testing from 3-4 days ago used Vkquake from master branch?
if no could be good to try testing again.. perhaps now can progress further..
just a question do you plan to support (by emulation) triangle fans that are supported on Vulkan but not on D3D12? or like MoltenVK see as perhaps low priority..

unrelated but also note I tested last week UWP and is working well.. thanks..
also can you merge DXIL support in someway relatively soon? I don't want to work with my old branch..

thanks..

@msiglreith
Copy link
Owner

can you confirm if in your testing from 3-4 days ago used Vkquake from master branch?

yes, my local copy includes the fix. Currently trying to get any debugger working with this example.

just a question do you plan to support (by emulation) triangle fans that are supported on Vulkan but not on D3D12? or like MoltenVK see as perhaps low priority..

Not planned, doesn't seem very high priority to me. I don't think it's used very often.

unrelated but also note I tested last week UWP and is working well.. thanks..

thanks for testing!

also can you merge DXIL support in someway relatively soon? I don't want to work with my old branch..

Will try to look into it again, but can't promise anything atm /:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants