question

zaki-3360 avatar image
0 Votes"
zaki-3360 asked

Accessing hardware GPU/DirectX device from a windows service

Hi,

I am trying to add DirectX support to an existing windows service to distribute shader compilation on top of an existing task distribution service used in a game development project.

The service is running as a system service account on developers' computers to allow sharing resources across a team. Now I need to add a new module that requires access to the GPU from within this service, however all attempts at CreateDevice fails with a status code 0x887A0004 DXGI_ERROR_UNSUPPORTED. It is possible to fall back to a software renderer, however performance constraints make that unfeasible.

  • I have tried turning on "Allow service to interact with desktop", with no difference in outcome. Turning off NoInteractiveServices in registry has no effect.

  • I have tried running the service as an authenticated user, which also didn't work.

  • Within the service, I have set up an impersonation flow and using CreateProcessAsUser to have access to the attached console, but that also didn't fix the issue.

I'd appreciate any pointers as to whether this is possible in the first place and if yes, how I can set it up correcty - and if not feasible if there's any workarounds I could try.

Thanks.

windows-apic++
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

0 Answers