diff options
author | Määttä Antti <antti.maatta@qt.io> | 2018-02-01 14:46:56 +0200 |
---|---|---|
committer | Antti Määttä <antti.maatta@qt.io> | 2018-02-02 11:36:24 +0000 |
commit | 3bbd40bc8c01af7f6fc9ad25dcb8cbce465961ce (patch) | |
tree | 89482d5a633bebbd6b0f11ffd7ce08905f609e5e /tests | |
parent | d5f9a6c604c89e946539c63ec34d32d331470c57 (diff) |
Fix custom material autotests with light probes
QT3DS_ENABLE_LIGHT_PROBE needs to be set even when it is disabled
Change-Id: I5ccbcf6863ed71ad46af8d765e228f5c81d19cb4
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/runtime/shadergenerator/Qt3DSRenderTestCustomMaterialGenerator.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/auto/runtime/shadergenerator/Qt3DSRenderTestCustomMaterialGenerator.cpp b/tests/auto/runtime/shadergenerator/Qt3DSRenderTestCustomMaterialGenerator.cpp index c4115377..a071fb82 100644 --- a/tests/auto/runtime/shadergenerator/Qt3DSRenderTestCustomMaterialGenerator.cpp +++ b/tests/auto/runtime/shadergenerator/Qt3DSRenderTestCustomMaterialGenerator.cpp @@ -327,6 +327,10 @@ CustomTestParams *generateTest(qt3ds::render::Qt3DSRendererImpl *renderImpl, NVDataRef<QT3DSU8> buffer = toU8DataRef<unsigned int>(data); params->texture->SetTextureData(buffer, 0, 1, 1, format); params->iblLightProbe.m_TextureData.m_Texture = params->texture; + } else { + CRegisteredString str(renderImpl->GetQt3DSContext().GetStringTable() + .RegisterStr("QT3DS_ENABLE_LIGHT_PROBE")); + params->features.push_back(SShaderPreprocessorFeature(str, false)); } // these requires calculateGlass function in material |