Commit 2d26d5d0 authored by Laszlo Agocs's avatar Laszlo Agocs
Browse files

metal: fix build

parent 9b18d1b8
......@@ -1240,7 +1240,7 @@ QRhiRenderTarget *QMetalSwapChain::currentFrameRenderTarget()
QSize QMetalSwapChain::effectivePixelSize() const
{
return effectivePixelSize;
return pixelSize;
}
QRhiRenderPassDescriptor *QMetalSwapChain::newCompatibleRenderPassDescriptor()
......@@ -1264,7 +1264,7 @@ bool QMetalSwapChain::buildOrResize()
Q_ASSERT(d->layer);
CGSize size = [d->layer drawableSize];
effectivePixelSize = QSize(size.width, size.height);
pixelSize = QSize(size.width, size.height);
QRHI_RES_RHI(QRhiMetal);
[d->layer setDevice: rhiD->d->dev];
......@@ -1274,10 +1274,10 @@ bool QMetalSwapChain::buildOrResize()
ds = m_depthStencil ? QRHI_RES(QMetalRenderBuffer, m_depthStencil) : nullptr;
rtWrapper.d.pixelSize = effectivePixelSize;
rtWrapper.d.pixelSize = pixelSize;
rtWrapper.d.attCount = 1;
qDebug("got CAMetalLayer, size %dx%d", effectivePixelSize.width(), effectivePixelSize.height());
qDebug("got CAMetalLayer, size %dx%d", pixelSize.width(), pixelSize.height());
return true;
}
......
......@@ -211,7 +211,7 @@ struct QMetalSwapChain : public QRhiSwapChain
bool buildOrResize() override;
QSize effectivePixelSize;
QSize pixelSize;
int currentFrame = 0; // 0..QMTL_FRAMES_IN_FLIGHT-1
QMetalReferenceRenderTarget rtWrapper;
QMetalCommandBuffer cbWrapper;
......
......@@ -23,8 +23,8 @@ gl: reduce state, reduce texparam
gl: tex size stuff (npot etc.)
d3d: msaa (onscreen)
d3d, gl, mtl: cache shader sources?
advanced blend modes?
resize to 0 width or height fails (vk)
upgrade vkmemalloc
gl: ubuf structs, arrays
gl: target QOpenGLWindow ...
msaa offscreen (msaa texture? renderbuffer?)
......@@ -40,6 +40,7 @@ bytecode (fxc/dxc) for d3d?
bytecode for metal?
+++ done
upgrade vkmemalloc
mtl: shader lang. version
rename res pattern to new-build-release (from create-build-release)?
make rp dep in ps less invasive (rethink how QRhiRenderPass is handled)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment