summaryrefslogtreecommitdiffstats
path: root/src/gui/rhi/qrhimetal_p_p.h
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2019-10-22 12:37:34 +0200
committerLaszlo Agocs <laszlo.agocs@qt.io>2019-10-24 10:03:20 +0200
commitcc631c15a00f26fa8f6aa703fd7cf9e715be8f3c (patch)
treeb8b41ae361cc753451239a2c3c5d2192706e93cd /src/gui/rhi/qrhimetal_p_p.h
parent6326d1df39fc68e47d1cd34d6cd8b021bdd66045 (diff)
rhi: metal: Remap resource bindings based on the QShader table
...when available. Fall back to the QRhi (i.e. SPIR-V) binding point otherwise (which becomes unsafe once shadertools bumps its SPIRV-Cross snapshot, but is fine for existing .qsb files) Task-number: QTBUG-79368 Change-Id: I2d452fdd4efb484867732c358171a800d3261dcd Reviewed-by: Christian Strømme <christian.stromme@qt.io>
Diffstat (limited to 'src/gui/rhi/qrhimetal_p_p.h')
-rw-r--r--src/gui/rhi/qrhimetal_p_p.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gui/rhi/qrhimetal_p_p.h b/src/gui/rhi/qrhimetal_p_p.h
index 688fec8147..2be86db5c8 100644
--- a/src/gui/rhi/qrhimetal_p_p.h
+++ b/src/gui/rhi/qrhimetal_p_p.h
@@ -433,10 +433,13 @@ public:
qsizetype *curOfs);
void enqueueResourceUpdates(QRhiCommandBuffer *cb, QRhiResourceUpdateBatch *resourceUpdates);
void executeBufferHostWritesForCurrentFrame(QMetalBuffer *bufD);
- void enqueueShaderResourceBindings(QMetalShaderResourceBindings *srbD, QMetalCommandBuffer *cbD,
+ static const int SUPPORTED_STAGES = 3;
+ void enqueueShaderResourceBindings(QMetalShaderResourceBindings *srbD,
+ QMetalCommandBuffer *cbD,
int dynamicOffsetCount,
const QRhiCommandBuffer::DynamicOffset *dynamicOffsets,
- bool offsetOnlyChange);
+ bool offsetOnlyChange,
+ const QShader::NativeResourceBindingMap *nativeResourceBindingMaps[SUPPORTED_STAGES]);
int effectiveSampleCount(int sampleCount) const;
bool importedDevice = false;