Re: [PATCH 1/2] dxgi: Partially implement dxgi_adapter_CheckInterfaceSupport().
On 12 October 2015 at 03:17, Józef Kucia <jkucia(a)codeweavers.com> wrote:
@@ -200,9 +200,39 @@ static HRESULT STDMETHODCALLTYPE dxgi_adapter_GetDesc(IDXGIAdapter1 *iface, DXGI static HRESULT STDMETHODCALLTYPE dxgi_adapter_CheckInterfaceSupport(IDXGIAdapter1 *iface, REFGUID guid, LARGE_INTEGER *umd_version) { - FIXME("iface %p, guid %s, umd_version %p stub!\n", iface, debugstr_guid(guid), umd_version); + struct dxgi_adapter *adapter = impl_from_IDXGIAdapter1(iface); + struct wined3d_adapter_identifier adapter_id; + HRESULT hr; + + TRACE("iface %p, guid %s, umd_version %p.\n", iface, debugstr_guid(guid), umd_version); + + /* This method works only for D3D10 interfaces. */ + if (!(IsEqualGUID(guid, &IID_ID3D10Device) + || IsEqualGUID(guid, &IID_ID3D10Device1))) + { + WARN("Returning DXGI_ERROR_UNSUPPORTED for %s.\n", debugstr_guid(guid)); + return DXGI_ERROR_UNSUPPORTED; + } + + FIXME("Determine actual capabilities of adapter.\n"); Do you know what this does for hardware that doesn't support Direct3D10? Getting the capabilities isn't that hard, we already do that in dxgi_device_init(). (The wined3d_get_device_caps() call in particular.)
#include "dxgi.h" +#include "d3d10_1.h" If you include d3d10_1.h you should be able to drop dxgi.h.
On Mon, Oct 12, 2015 at 12:16 PM, Henri Verbeet <hverbeet(a)gmail.com> wrote:
+ FIXME("Determine actual capabilities of adapter.\n"); Do you know what this does for hardware that doesn't support Direct3D10? Getting the capabilities isn't that hard, we already do that in dxgi_device_init(). (The wined3d_get_device_caps() call in particular.)
A simple check based on the supported shader version is indeed easy. However, implementing a proper feature level detection requires more work. I expect that determining which D3D10_FEATURE_LEVEL_9_* we can support on a given hardware will be more involved. Would you accept a restrictive implementation which returns S_OK just for hardware that supports D3D10?
On 12 October 2015 at 17:37, Józef Kucia <joseph.kucia(a)gmail.com> wrote:
On Mon, Oct 12, 2015 at 12:16 PM, Henri Verbeet <hverbeet(a)gmail.com> wrote:
+ FIXME("Determine actual capabilities of adapter.\n"); Do you know what this does for hardware that doesn't support Direct3D10? Getting the capabilities isn't that hard, we already do that in dxgi_device_init(). (The wined3d_get_device_caps() call in particular.)
A simple check based on the supported shader version is indeed easy. However, implementing a proper feature level detection requires more work. I expect that determining which D3D10_FEATURE_LEVEL_9_* we can support on a given hardware will be more involved. Would you accept a restrictive implementation which returns S_OK just for hardware that supports D3D10?
Sure. At this point I think we mainly care that it's consistent with dxgi_device_init(). As far as dxgi is concerned though, I think it's mostly a matter of making the result of d3d_level_from_caps() from wined3d/directx.c available somewhere. Perhaps as a separate call, perhaps just as part of the wined3d_caps structure.
participants (2)
-
Henri Verbeet -
Józef Kucia