From 3f1cbceae33d346f939b76a18b91c45abe038051 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Thu, 20 Feb 2020 17:03:03 +0200 Subject: Shader caching improvements MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added shader cache load error generation to some cases where it was missing. Properly pass the error to surface viewer. If there was a cache load error, allow exporting the generated cache. Added overloads to generate shader cache with specified compression level. Change-Id: I06d56114918ada23d46474e9466f6031ad8037e2 Fixes: QT3DS-4071 Reviewed-by: Tomi Korpipää Reviewed-by: Janne Kangas Reviewed-by: Antti Määttä --- src/api/studio3d/q3dspresentation.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/api/studio3d/q3dspresentation.h') diff --git a/src/api/studio3d/q3dspresentation.h b/src/api/studio3d/q3dspresentation.h index 44bcad5..6d25a74 100644 --- a/src/api/studio3d/q3dspresentation.h +++ b/src/api/studio3d/q3dspresentation.h @@ -97,6 +97,10 @@ public: bool binaryShaders); Q_REVISION(1) Q_INVOKABLE void exportShaderCache(bool binaryShaders); void exportShaderCache(QByteArray &cacheData, bool binaryShaders); + Q_REVISION(2) Q_INVOKABLE void exportShaderCache(const QUrl &shaderCacheFile, + bool binaryShaders, int compressionLevel); + Q_REVISION(2) Q_INVOKABLE void exportShaderCache(bool binaryShaders, int compressionLevel); + void exportShaderCache(QByteArray &cacheData, bool binaryShaders, int compressionLevel); void setShaderCacheData(const QByteArray &shaderCache); QUrl shaderCacheFile() const; -- cgit v1.2.3