Comments (3)
Sorry for the silence, we saw this, but haven't had a chance to put together samples. Hopefully we'll get to it eventually but I don't have a timeframe I can promise.
from d3d12translationlayer.
Sorry for the silence, we saw this, but haven't had a chance to put together samples. Hopefully we'll get to it eventually but I don't have a timeframe I can promise.
I can't even get Direct3DCreate9On12 to make a 9on12 device. It ALWAYS creates a D3D9 one. I have no idea why.
I have some test code like so...
IDXGIAdapter1* TryD3D12()
{
HRESULT hr;
// -- Create the Device -- //
IDXGIFactory4* dxgiFactory;
hr = CreateDXGIFactory1(IID_PPV_ARGS(&dxgiFactory));
if (FAILED(hr))
{
return NULL;
}
IDXGIAdapter1* adapter; // adapters are the graphics card (this includes the embedded graphics on the motherboard)
int adapterIndex = 0; // we'll start looking for directx 12 compatible graphics devices starting at index 0
// find first hardware gpu that supports d3d 12
while (dxgiFactory->EnumAdapters1(adapterIndex, &adapter) != DXGI_ERROR_NOT_FOUND)
{
DXGI_ADAPTER_DESC1 desc;
adapter->GetDesc1(&desc);
if (desc.Flags & DXGI_ADAPTER_FLAG_SOFTWARE)
{
// we dont want a software device
adapterIndex++; // add this line here. Its not currently in the downloadable project
continue;
}
// we want a device that is compatible with direct3d 12 (feature level 11 or higher)
hr = D3D12CreateDevice(adapter, D3D_FEATURE_LEVEL_11_0, _uuidof(ID3D12Device), nullptr);
if (SUCCEEDED(hr))
{
debug(L"Adapter description: %s", desc.Description);
debug(L"Adapter LUID: %llx", desc.AdapterLuid);
return adapter;
}
adapterIndex++;
}
return NULL;
}
IDirect3D9* d3d = nullptr;
{
IDirect3DDevice9On12* d3dtest = NULL;
D3D9ON12_ARGS dArgs;
ID3D12Device* d3d12 = NULL;
IDXGIAdapter1* adapter;
if ((adapter = TryD3D12()) != NULL)
{
D3D12CreateDevice(adapter, D3D_FEATURE_LEVEL_11_0, IID_PPV_ARGS(&d3d12));
LUID adapter_LUID = d3d12->GetAdapterLuid();
ZeroMemory(&dArgs, sizeof(D3D9ON12_ARGS));
dArgs.Enable9On12 = TRUE;
dArgs.pD3D12Device = d3d12;
d3d = Direct3DCreate9On12(D3D_SDK_VERSION, &dArgs, 1);
debug(L"D3D12 memory address: %08X", d3d12);
debug(L"D3D12 device LUID: %llx", adapter_LUID);
debug(L"D3D9 memory address: %08X", d3d);
debug(L"Query interface returned %08X", d3d->QueryInterface(IID_PPV_ARGS(&d3dtest)));
debug(L"IDirect3DDevice9On12 interface memory address: %08X", d3dtest);
}
}
Log output is:
[08-16-2022, 06:49:19] Adapter description: NVIDIA GeForce RTX 3090
[08-16-2022, 06:49:19] Adapter LUID: 9fa8
[08-16-2022, 06:49:19] D3D12 memory address: 034B0348
[08-16-2022, 06:49:19] D3D12 device LUID: 9fa8
[08-16-2022, 06:49:19] D3D9 memory address: 054222E0
[08-16-2022, 06:49:19] Query interface returned 80004002
[08-16-2022, 06:49:19] IDirect3DDevice9On12 interface memory address: 00000000
I've even tried simplifying it like so:
ZeroMemory(&dArgs, sizeof(D3D9ON12_ARGS));
dArgs.Enable9On12 = TRUE;
d3d = Direct3DCreate9On12(D3D_SDK_VERSION, &dArgs, 1);
d3d->QueryInterface(IID_PPV_ARGS(&d3dtest))
.. But I still get E_NOINTERFACE. :(
Any ideas why this doesn't work?
Do you HAVE to be running a Windows insider build for it to function? I'm just trying to see performance on Windows 11.
from d3d12translationlayer.
Do you HAVE to be running a Windows insider build for it to function? I'm just trying to see performance on Windows 11.
Woops, I'm dumb, I needed to call QueryInterface on the IDirect3DDevice9 device and NOT the Direct3D9 interface. HA!
from d3d12translationlayer.
Related Issues (17)
- SharedFenceSignal should only be called if the fence is actually shared
- Circular dependency in include files HOT 4
- ProcessBatchWork crash. HOT 3
- Update to use DirectX-Headers
- D3D9: Picture is very bright, FPS is very poor HOT 3
- The transition from exclusive state to shared state must be accompanied by copying of actual state values. HOT 1
- D3D11 Dependency HOT 1
- Creating a query heap per query might be too expensive
- D3D11Transition lack of documentation
- This repo is missing important files
- Accessing command list on D3D9On12 HOT 8
- Dirty bit handling can cause binding of stale descriptors
- Lacking documentation on 9on12 Interop API HOT 2
- UnwrapUnderlyingResource crashes on calling it from different thread than where Dx9 resource texture created HOT 1
- Missing d3d9.lib exports HOT 1
- Build failure with MSVC 2022 v17.7.x and up HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from d3d12translationlayer.