1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-11-29 19:24:10 +01:00

[dxvk] Add structure for transform feedback stream queries

This commit is contained in:
Philip Rebohle 2018-08-31 15:51:40 +02:00
parent 3435702719
commit 4bdf6daa39
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
2 changed files with 20 additions and 1 deletions

View File

@ -19,7 +19,7 @@ namespace dxvk {
bool DxvkQuery::isIndexed() const {
return false;
return m_type == VK_QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT;
}
@ -112,6 +112,11 @@ namespace dxvk {
m_data.statistic.csInvocations += data.statistic.csInvocations;
break;
case VK_QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT:
m_data.xfbStream.primitivesWritten += data.xfbStream.primitivesWritten;
m_data.xfbStream.primitivesNeeded += data.xfbStream.primitivesNeeded;
break;
default:
Logger::err(str::format("DxvkQuery: Unhandled query type: ", m_type));
}

View File

@ -58,6 +58,19 @@ namespace dxvk {
uint64_t tesInvocations;
uint64_t csInvocations;
};
/**
* \brief Transform feedback stream query
*
* Stores the number of primitives written to the
* buffer, as well as the number of primitives
* generated. The latter can be used to check for
* overflow.
*/
struct DxvkQueryXfbStreamData {
uint64_t primitivesWritten;
uint64_t primitivesNeeded;
};
/**
* \brief Query data
@ -69,6 +82,7 @@ namespace dxvk {
DxvkQueryOcclusionData occlusion;
DxvkQueryTimestampData timestamp;
DxvkQueryStatisticData statistic;
DxvkQueryXfbStreamData xfbStream;
};
/**