Better GLSL version handling. Now specify the latest version supported by the device.

Correct the version check for our own implementations of packUnorm4x8 etc.
This commit is contained in:
Henrik Rydgård committed 2020-11-16 23:30:07 +01:00
1 parent cf092eb534
commit 29b2f2c4ef
8 files changed
+44 -47

No files matched your search

+4 -1
View File
@@ -434,7 +434,6 @@ void VulkanRenderManager::BeginFrame(bool enableProfiling) {
int curFrame = vulkan_->GetCurFrame();
FrameData &frameData = frameData_[curFrame];
frameData.profilingEnabled_ = enableProfiling;
// Make sure the very last command buffer from the frame before the previous has been fully executed.
if (useThread_) {
@@ -447,9 +446,12 @@ void VulkanRenderManager::BeginFrame(bool enableProfiling) {
}
VLOG("PUSH: Fencing %d", curFrame);
vkWaitForFences(device, 1, &frameData.fence, true, UINT64_MAX);
vkResetFences(device, 1, &frameData.fence);
// Can't set this until after the fence.
frameData.profilingEnabled_ = enableProfiling;
frameData.readbackFenceUsed = false;
uint64_t queryResults[MAX_TIMESTAMP_QUERIES];
@@ -502,6 +504,7 @@ void VulkanRenderManager::BeginFrame(bool enableProfiling) {
if (frameData.profilingEnabled_) {
// For various reasons, we need to always use an init cmd buffer in this case to perform the vkCmdResetQueryPool,
// unless we want to limit ourselves to only measure the main cmd buffer.
// Later versions of Vulkan have support for clearing queries on the CPU timeline, but we don't want to rely on that.
// Reserve the first two queries for initCmd.
frameData.profile.timestampDescriptions.push_back("initCmd Begin");
frameData.profile.timestampDescriptions.push_back("initCmd");