Skip to content

Commit 654278c

Browse files
committed
BindingDecorationOffset not needed
if NOT VULKAN_SUPPORTED OR NOT TARGET glslang, skip SPIRVShaderResourcesTest
1 parent a473ef8 commit 654278c

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed

Tests/DiligentCoreTest/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ if(NOT WEBGPU_SUPPORTED)
2020
)
2121
endif()
2222

23-
if(NOT VULKAN_SUPPORTED)
23+
if(NOT VULKAN_SUPPORTED OR NOT TARGET glslang)
2424
list(REMOVE_ITEM SOURCE
2525
${CMAKE_CURRENT_SOURCE_DIR}/src/ShaderTools/SPIRVShaderResourcesTest.cpp
2626
)

Tests/DiligentCoreTest/src/ShaderTools/SPIRVShaderResourcesTest.cpp

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,8 @@ struct SPIRVShaderResourceRefAttribs
5050
const SPIRVShaderResourceAttribs::ResourceType Type;
5151
const Uint8 ResourceDim; // RESOURCE_DIMENSION
5252
const Uint8 IsMS;
53-
54-
// Offset in SPIRV words (uint32_t) of binding & descriptor set decorations in SPIRV binary
55-
const uint32_t BindingDecorationOffset;
56-
const uint32_t DescriptorSetDecorationOffset;
57-
58-
const Uint32 BufferStaticSize;
59-
const Uint32 BufferStride;
53+
const Uint32 BufferStaticSize;
54+
const Uint32 BufferStride;
6055
};
6156

6257
std::vector<unsigned int> LoadSPIRVFromHLSL(const char* FilePath, SHADER_TYPE ShaderType = SHADER_TYPE_PIXEL)
@@ -92,7 +87,7 @@ std::vector<unsigned int> LoadSPIRVFromGLSL(const char* FilePath, SHADER_TYPE Sh
9287
std::vector<unsigned int> SPIRV;
9388

9489
#if !DILIGENT_NO_GLSLANG
95-
90+
9691
RefCntAutoPtr<IShaderSourceInputStreamFactory> pShaderSourceStreamFactory;
9792
CreateDefaultShaderSourceStreamFactory("shaders/SPIRV", &pShaderSourceStreamFactory);
9893
if (!pShaderSourceStreamFactory)
@@ -145,7 +140,7 @@ void TestSPIRVResources(const char* FilePa
145140
bool IsGLSL = false)
146141
{
147142
#if DILIGENT_NO_GLSLANG || DILIGENT_NO_HLSL
148-
GTEST_SKIP();
143+
GTEST_SKIP();
149144
#endif
150145

151146
const auto SPIRV = IsGLSL ? LoadSPIRVFromGLSL(FilePath, ShaderType) : LoadSPIRVFromHLSL(FilePath, ShaderType);

0 commit comments

Comments
 (0)