Skip to content

Conversation

@hzqst
Copy link
Contributor

@hzqst hzqst commented Dec 27, 2025

No description provided.

Comment on lines +154 to +168
# Add SPIRV-Tools include directories if needed for SPIRVTools.hpp
# Test files that include SPIRVTools.hpp need access to spirv-tools headers
# SPIRVTools.hpp includes "spirv-tools/libspirv.h", so we need the include directory
if (TARGET SPIRV-Tools-opt)
get_target_property(SPIRV_TOOLS_SOURCE_DIR SPIRV-Tools-opt SOURCE_DIR)
get_target_property(SPIRV_TOOLS_BINARY_DIR SPIRV-Tools-opt BINARY_DIR)
get_filename_component(SPIRV_TOOLS_ROOT_DIR "${SPIRV_TOOLS_SOURCE_DIR}/../.." ABSOLUTE)
get_filename_component(SPIRV_TOOLS_ROOT_BINARY_DIR "${SPIRV_TOOLS_BINARY_DIR}/../.." ABSOLUTE)
# Add include subdirectory for public headers like spirv-tools/libspirv.h
target_include_directories(DiligentCoreAPITest PRIVATE
${SPIRV_TOOLS_ROOT_DIR}/include
${SPIRV_TOOLS_ROOT_DIR}
${SPIRV_TOOLS_ROOT_BINARY_DIR}
)
endif()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is annoying.
I pushed a change that removes dependency on libspirv.h, so SPIRVTools.hpp can be included without issues.

Copy link
Contributor

@TheMostDiligent TheMostDiligent left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Boy is Vulkan verbose

Comment on lines +141 to +146
void main()
{
// Access deeply nested member to generate multiple OpAccessChain instructions
// This tests PropagateStorageClass with multiple levels of pointer indirection
out_Color = vec4(in_Color, 1.0) * cb.Data.Nested.Inner.Factor;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest making the use of push constants a bit more sophisticated: at a minimum, read colors from push constants instead of getting them from the VS.
Maybe also pass structs to a function.

Comment on lines +289 to +298
GLSLangUtils::SpirvVersion Version = GLSLangUtils::SpirvVersion::Vk100;
if (ShaderType == SHADER_TYPE_RAY_GEN ||
ShaderType == SHADER_TYPE_RAY_MISS ||
ShaderType == SHADER_TYPE_RAY_CLOSEST_HIT ||
ShaderType == SHADER_TYPE_RAY_ANY_HIT ||
ShaderType == SHADER_TYPE_RAY_INTERSECTION ||
ShaderType == SHADER_TYPE_CALLABLE)
{
Version = GLSLangUtils::SpirvVersion::Vk110_Spirv14;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are not planning to test ray tracing here, so this is not needed.

@hzqst hzqst closed this Dec 27, 2025
@hzqst hzqst deleted the inline_constants_vktests3 branch December 27, 2025 09:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants