Skip to content

Commit 663583e

Browse files
Enable shader creation test from byte code on Metal
1 parent 88f1fff commit 663583e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Tests/DiligentCoreAPITest/src/ShaderCreationTest.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ TEST(ShaderCreationTest, FromBytecode)
106106
IRenderDevice* pDevice = pEnv->GetDevice();
107107
const RenderDeviceInfo& DeviceInfo = pDevice->GetDeviceInfo();
108108

109-
if (!(DeviceInfo.IsD3DDevice() || DeviceInfo.IsVulkanDevice()))
109+
if (!(DeviceInfo.IsD3DDevice() || DeviceInfo.IsVulkanDevice() || DeviceInfo.IsMetalDevice()))
110110
{
111111
GTEST_SKIP() << "Creating shader from bytecode is not supported on this device type";
112112
}
@@ -119,6 +119,10 @@ TEST(ShaderCreationTest, FromBytecode)
119119
ShaderCI.Desc = {"ShaderCreationTest.FromBytecode - Src", SHADER_TYPE_PIXEL, true};
120120
ShaderCI.ByteCode = Bytecode.data();
121121
ShaderCI.ByteCodeSize = Bytecode.size();
122+
if (DeviceInfo.IsMetalDevice())
123+
{
124+
ShaderCI.SourceLanguage = SHADER_SOURCE_LANGUAGE_MSL_VERBATIM;
125+
}
122126

123127
RefCntAutoPtr<IShader> pShader;
124128
pDevice->CreateShader(ShaderCI, &pShader);

0 commit comments

Comments
 (0)