Commit 41c645f2 authored by Laszlo Agocs's avatar Laszlo Agocs

mtl: make buf/rb/tex/smp shareable

parent 7fa0a9bc
......@@ -563,6 +563,8 @@ int main(int argc, char **argv)
windowA.setPosition(windowA.position() - QPoint(200, 200));
windowB.setPosition(windowB.position() + QPoint(200, 200));
windowA.raise();
windowB.raise();
result = app.exec();
}
......
This diff is collapsed.
......@@ -57,6 +57,7 @@ struct QMetalBuffer : public QRhiBuffer
{
QMetalBuffer(QRhiImplementation *rhi, Type type, UsageFlags usage, int size);
~QMetalBuffer();
bool isShareable() const override;
void release() override;
bool build() override;
......@@ -73,6 +74,7 @@ struct QMetalRenderBuffer : public QRhiRenderBuffer
QMetalRenderBuffer(QRhiImplementation *rhi, Type type, const QSize &pixelSize,
int sampleCount, QRhiRenderBuffer::Flags flags);
~QMetalRenderBuffer();
bool isShareable() const override;
void release() override;
bool build() override;
QRhiTexture::Format backingFormat() const override;
......@@ -91,6 +93,7 @@ struct QMetalTexture : public QRhiTexture
QMetalTexture(QRhiImplementation *rhi, Format format, const QSize &pixelSize,
int sampleCount, Flags flags);
~QMetalTexture();
bool isShareable() const override;
void release() override;
bool build() override;
bool buildFrom(const QRhiNativeHandles *src) override;
......@@ -114,6 +117,7 @@ struct QMetalSampler : public QRhiSampler
QMetalSampler(QRhiImplementation *rhi, Filter magFilter, Filter minFilter, Filter mipmapMode,
AddressMode u, AddressMode v, AddressMode w);
~QMetalSampler();
bool isShareable() const override;
void release() override;
bool build() override;
......
......@@ -91,6 +91,7 @@ public:
#ifdef Q_OS_DARWIN
struct {
void *dev = nullptr;
void *releaseQueue = nullptr;
} d_metal;
#endif
};
......
res.sh.: mtl
event
res.sh.: example to show read/write same texture
threading with rsh with resource - more external sync needed
threading with rsh with resource - more external sync needed?
advanced blend modes
gl: tex formats (texture, readback)
gl: srgb
gl: srgb? (glEnable and co.)
should istexformatsupported should check srgb combinations
vk: image in wrong layout when beginFrame-endFrame without a pass in it
cbuffer alignment rules - some things fail to translate (to hlsl e.g. with structs), which is fine but how to mitigate
......@@ -48,6 +48,7 @@ dxc for d3d as an alternative to fxc?
hlsl -> dxc -> spirv -> spirv-cross hmmm...
+++ done
res.sh.: mtl
res.sh.: gl
res.sh.: exercise it in multiwindow_threaded too
res.sh.: vk, d3d
......
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