[dxgi] Added missing view type definition

This commit is contained in:
Philip Rebohle 2018-01-10 13:43:23 +01:00
parent b22d56ac06
commit 39b5d84d6a
2 changed files with 19 additions and 2 deletions

View File

@ -150,6 +150,18 @@ namespace dxvk {
void DxgiPresenter::presentImage() {
auto newTime = std::chrono::high_resolution_clock::now();
auto us = std::chrono::duration_cast<std::chrono::microseconds>(newTime - m_oldTime).count();
m_frames += 1;
if (us >= 1'000'000) {
std::cout << "FPS: " << (static_cast<double>(m_frames * 1'000'000)
/ static_cast<double>(us)) << std::endl;
m_frames = 0;
m_oldTime = newTime;
}
const bool fitSize =
m_backBuffer->info().extent.width == m_options.preferredBufferSize.width
&& m_backBuffer->info().extent.height == m_options.preferredBufferSize.height;
@ -503,8 +515,8 @@ namespace dxvk {
// Shader resource slots
std::array<DxvkResourceSlot, 2> resourceSlots = {{
{ BindingIds::Sampler, VK_DESCRIPTOR_TYPE_SAMPLER },
{ BindingIds::Texture, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE },
{ BindingIds::Sampler, VK_DESCRIPTOR_TYPE_SAMPLER, VK_IMAGE_VIEW_TYPE_MAX_ENUM },
{ BindingIds::Texture, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, VK_IMAGE_VIEW_TYPE_2D },
}};
// Create the actual shader module

View File

@ -1,5 +1,7 @@
#pragma once
#include <chrono>
#include <dxvk_device.h>
#include <dxvk_surface.h>
#include <dxvk_swapchain.h>
@ -103,6 +105,9 @@ namespace dxvk {
Rc<DxvkShader> createVertexShader();
Rc<DxvkShader> createFragmentShader();
std::chrono::high_resolution_clock::time_point m_oldTime;
uint32_t m_frames = 0;
};
}