mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-11-29 10:24:10 +01:00
[d3d9] Delegate VCACHE check to QuerySupported
Fixes a failing Wine test
This commit is contained in:
parent
3332bb2844
commit
c07f8c941c
@ -3159,7 +3159,7 @@ namespace dxvk {
|
||||
HRESULT STDMETHODCALLTYPE D3D9DeviceEx::CreateQuery(D3DQUERYTYPE Type, IDirect3DQuery9** ppQuery) {
|
||||
InitReturnPtr(ppQuery);
|
||||
|
||||
HRESULT hr = D3D9Query::QuerySupported(Type);
|
||||
HRESULT hr = D3D9Query::QuerySupported(this, Type);
|
||||
|
||||
if (ppQuery == nullptr || hr != D3D_OK)
|
||||
return hr;
|
||||
|
@ -14,8 +14,6 @@ namespace dxvk {
|
||||
|
||||
switch (m_queryType) {
|
||||
case D3DQUERYTYPE_VCACHE:
|
||||
if (!pDevice->GetOptions()->supportVCache)
|
||||
throw DxvkError(str::format("D3D9Query: Unsupported query type ", m_queryType, " (from d3d9.supportVCache)"));
|
||||
break;
|
||||
|
||||
case D3DQUERYTYPE_EVENT:
|
||||
@ -293,9 +291,13 @@ namespace dxvk {
|
||||
}
|
||||
|
||||
|
||||
HRESULT D3D9Query::QuerySupported(D3DQUERYTYPE QueryType) {
|
||||
HRESULT D3D9Query::QuerySupported(D3D9DeviceEx* pDevice, D3DQUERYTYPE QueryType) {
|
||||
switch (QueryType) {
|
||||
case D3DQUERYTYPE_VCACHE:
|
||||
if (!pDevice->GetOptions()->supportVCache)
|
||||
return D3DERR_NOTAVAILABLE;
|
||||
|
||||
return D3D_OK;
|
||||
case D3DQUERYTYPE_EVENT:
|
||||
case D3DQUERYTYPE_OCCLUSION:
|
||||
case D3DQUERYTYPE_TIMESTAMP:
|
||||
|
@ -48,7 +48,7 @@ namespace dxvk {
|
||||
static bool QueryBeginnable(D3DQUERYTYPE QueryType);
|
||||
static bool QueryEndable(D3DQUERYTYPE QueryType);
|
||||
|
||||
static HRESULT QuerySupported(D3DQUERYTYPE QueryType);
|
||||
static HRESULT QuerySupported(D3D9DeviceEx* pDevice, D3DQUERYTYPE QueryType);
|
||||
|
||||
bool IsEvent() const {
|
||||
return m_queryType == D3DQUERYTYPE_EVENT;
|
||||
|
Loading…
Reference in New Issue
Block a user