qt 6.6.0 clean

This commit is contained in:
kleuter
2023-11-01 22:23:55 +01:00
parent 7b5ada15e7
commit 5d8194efa7
1449 changed files with 134276 additions and 31391 deletions

View File

@ -3,7 +3,7 @@
#include "quadrenderer.h"
#include <QFile>
#include <QtGui/private/qshader_p.h>
#include <rhi/qshader.h>
// Renders a quad using indexed drawing. No QRhiGraphicsPipeline is created, it
// expects to reuse the one created by TriangleRenderer. A separate

View File

@ -4,7 +4,7 @@
#ifndef QUADRENDERER_H
#define QUADRENDERER_H
#include <QtGui/private/qrhi_p.h>
#include <rhi/qrhi.h>
class QuadRenderer
{

View File

@ -3,7 +3,7 @@
#include "texturedcuberenderer.h"
#include <QFile>
#include <QtGui/private/qshader_p.h>
#include <rhi/qshader.h>
#include "../shared/cube.h"

View File

@ -4,7 +4,7 @@
#ifndef TEXTUREDCUBERENDERER_H
#define TEXTUREDCUBERENDERER_H
#include <QtGui/private/qrhi_p.h>
#include <rhi/qrhi.h>
class TexturedCubeRenderer
{

View File

@ -3,7 +3,7 @@
#include "triangleoncuberenderer.h"
#include <QFile>
#include <QtGui/private/qshader_p.h>
#include <rhi/qshader.h>
// toggle to test the preserved content (no clear) path
const bool IMAGE_UNDER_OFFSCREEN_RENDERING = false;

View File

@ -3,7 +3,7 @@
#include "trianglerenderer.h"
#include <QFile>
#include <QtGui/private/qshader_p.h>
#include <rhi/qshader.h>
//#define VBUF_IS_DYNAMIC

View File

@ -4,7 +4,7 @@
#ifndef TRIANGLERENDERER_H
#define TRIANGLERENDERER_H
#include <QtGui/private/qrhi_p.h>
#include <rhi/qrhi.h>
class TriangleRenderer
{

View File

@ -35,7 +35,6 @@ struct {
QSize lastOutputSize;
int frameCount = 0;
QFile profOut;
QVarLengthArray<float, 64> gpuFrameTimes;
QElapsedTimer gpuFrameTimePrintTimer;
} d;
@ -136,20 +135,8 @@ void Window::customInit()
// With Vulkan at least we should see some details from the memory allocator.
qDebug() << m_r->statistics();
// Every two seconds try printing an average of the gpu frame times.
// Every two seconds try printing last known gpu frame time.
d.gpuFrameTimePrintTimer.start();
m_r->addGpuFrameTimeCallback([](float elapsedMs) {
d.gpuFrameTimes.append(elapsedMs);
if (d.gpuFrameTimePrintTimer.elapsed() > 2000) {
float at = 0.0f;
for (float t : d.gpuFrameTimes)
at += t;
at /= d.gpuFrameTimes.count();
qDebug() << "Average GPU frame time" << at;
d.gpuFrameTimes.clear();
d.gpuFrameTimePrintTimer.restart();
}
});
}
void Window::customRelease()
@ -170,6 +157,11 @@ void Window::customRender()
const QSize outputSize = m_sc->currentPixelSize();
QRhiCommandBuffer *cb = m_sc->currentFrameCommandBuffer();
if (d.gpuFrameTimePrintTimer.elapsed() > 2000) {
qDebug() << "Last completed GPU frame time" << cb->lastCompletedGpuTime() << "seconds";
d.gpuFrameTimePrintTimer.restart();
}
if (outputSize != d.lastOutputSize) {
d.triRenderer.resize(outputSize);
if (!d.triangleOnly) {