mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-12 13:08:50 +01:00
[d3d11] mock D3D11_QUERY_TIMESTAMP
Trackmania was freezing on this query when clicking on "Connect".
This commit is contained in:
parent
0900dfd0e3
commit
781ebc4732
@ -10,6 +10,8 @@ namespace dxvk {
|
|||||||
switch (desc.Query) {
|
switch (desc.Query) {
|
||||||
// Other query types are currently unsupported
|
// Other query types are currently unsupported
|
||||||
case D3D11_QUERY_OCCLUSION:
|
case D3D11_QUERY_OCCLUSION:
|
||||||
|
case D3D11_QUERY_TIMESTAMP:
|
||||||
|
case D3D11_QUERY_TIMESTAMP_DISJOINT:
|
||||||
case D3D11_QUERY_OCCLUSION_PREDICATE:
|
case D3D11_QUERY_OCCLUSION_PREDICATE:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -89,6 +91,7 @@ namespace dxvk {
|
|||||||
void* pData,
|
void* pData,
|
||||||
UINT GetDataFlags) {
|
UINT GetDataFlags) {
|
||||||
static bool errorShown = false;
|
static bool errorShown = false;
|
||||||
|
static UINT64 fakeTimestamp = 0;
|
||||||
|
|
||||||
if (!std::exchange(errorShown, true))
|
if (!std::exchange(errorShown, true))
|
||||||
Logger::warn("D3D11Query::GetData: Stub");
|
Logger::warn("D3D11Query::GetData: Stub");
|
||||||
@ -101,6 +104,15 @@ namespace dxvk {
|
|||||||
*static_cast<UINT64*>(pData) = 1;
|
*static_cast<UINT64*>(pData) = 1;
|
||||||
return S_OK;
|
return S_OK;
|
||||||
|
|
||||||
|
case D3D11_QUERY_TIMESTAMP:
|
||||||
|
*static_cast<UINT64*>(pData) = fakeTimestamp++;
|
||||||
|
return S_OK;
|
||||||
|
|
||||||
|
case D3D11_QUERY_TIMESTAMP_DISJOINT:
|
||||||
|
static_cast<D3D11_QUERY_DATA_TIMESTAMP_DISJOINT*>(pData)->Frequency = 1000;
|
||||||
|
static_cast<D3D11_QUERY_DATA_TIMESTAMP_DISJOINT*>(pData)->Disjoint = FALSE;
|
||||||
|
return S_OK;
|
||||||
|
|
||||||
case D3D11_QUERY_OCCLUSION_PREDICATE:
|
case D3D11_QUERY_OCCLUSION_PREDICATE:
|
||||||
*static_cast<BOOL*>(pData) = TRUE;
|
*static_cast<BOOL*>(pData) = TRUE;
|
||||||
return S_OK;
|
return S_OK;
|
||||||
|
Loading…
Reference in New Issue
Block a user