MCPcopy Create free account
hub / github.com/KhronosGroup/glslang / TEST_F

Function TEST_F

gtests/SpvDebugInfoTest.cpp:84–104  ·  view source on GitHub ↗

DebugTypeVectorIdEXT (opcode 109) must be emitted for OpTypeCooperativeVectorNV when NonSemantic debug info is enabled.

Source from the content-addressed store, hash-verified

82// DebugTypeVectorIdEXT (opcode 109) must be emitted for OpTypeCooperativeVectorNV
83// when NonSemantic debug info is enabled.
84TEST_F(SpvDebugInfoTest, CooperativeVectorNVEmitsDebugTypeVectorIdEXT)
85{
86 const std::string source = R"(
87#version 450 core
88#extension GL_KHR_memory_scope_semantics : enable
89#extension GL_NV_cooperative_vector : enable
90#extension GL_EXT_shader_explicit_arithmetic_types : enable
91layout(local_size_x = 64) in;
92layout(set = 0, binding = 0) buffer B { float data[]; } buf;
93void main() {
94 coopvecNV<float, 8> v = coopvecNV<float, 8>(0.0);
95 v = v + v;
96 buf.data[gl_GlobalInvocationID.x] = v[0];
97}
98)";
99 std::string spirv = compileWithDebugInfo(source);
100 EXPECT_NE(spirv.find("DebugTypeVectorIdEXT"), std::string::npos)
101 << "Expected DebugTypeVectorIdEXT in disassembly.\nSPIR-V:\n" << spirv;
102 EXPECT_NE(spirv.find("TypeCooperativeVectorNV"), std::string::npos)
103 << "Expected TypeCooperativeVectorNV in disassembly.\nSPIR-V:\n" << spirv;
104}
105
106// DebugTypeVectorIdEXT must also be emitted when the component count is a
107// specialization constant (OpSpecConstant), since the spec allows any constant

Callers

nothing calls this directly

Calls 1

findMethod · 0.45

Tested by

no test coverage detected