Skip to content

SPIR-V spec constant tests for separate compilation and linking - #2774

Open
bashbaug wants to merge 13 commits into
KhronosGroup:mainfrom
bashbaug:compile-link-spec-const
Open

SPIR-V spec constant tests for separate compilation and linking#2774
bashbaug wants to merge 13 commits into
KhronosGroup:mainfrom
bashbaug:compile-link-spec-const

Conversation

@bashbaug

@bashbaug bashbaug commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Tests for SPIR-V specialization constants with separate compilation and linking.

These tests check for two conditiona:

  1. The specialization constant value that is used is the value that was set when the program was not compiled, not when the program was linked.
  2. If two programs are compiled and linked with the same specialization constant ID, a different specialization constant may be set for each program object.

This is the new test:

[run-test: test_spirv_new op_spec_constant_compile_link]

These tests were refactored slightly:

[run-test: test_spirv_new op_spec_constant* linkage*]

Also added new tests that set a specialization constant and either build the program object twice or compile the program object twice, ensuring that the updated specialization constant is used for the second compile.

[run-test: test_spirv_new op_spec_constant_build_twice]
[run-test: test_spirv_new op_spec_constant_compile_twice]

@bashbaug

Copy link
Copy Markdown
Contributor Author

I'll keep this a draft while we determine the exact spec changes, see: KhronosGroup/OpenCL-Docs#553

@bashbaug

Copy link
Copy Markdown
Contributor Author

Related spec change: KhronosGroup/OpenCL-Docs#1602

@bashbaug
bashbaug marked this pull request as ready for review August 21, 2026 00:02
Comment thread test_conformance/spirv_new/test_op_spec_constant.cpp Outdated
Comment thread test_conformance/spirv_new/test_op_spec_constant.cpp Outdated
Comment thread test_conformance/spirv_new/test_op_spec_constant.cpp Outdated
Comment thread test_conformance/spirv_new/test_op_spec_constant.cpp
bashbaug and others added 3 commits August 21, 2026 11:34
fix typo
output the build log when compiling a program fails

Co-authored-by: Romaric Jodin <rjodin@chromium.org>
Comment thread test_conformance/spirv_new/spirv_asm/op_spec_constant_compile_twice.spvasm32 Outdated
Comment thread test_conformance/spirv_new/spirv_asm/op_spec_constant_compile_twice.spvasm64 Outdated
Comment thread test_conformance/spirv_new/test_op_spec_constant.cpp Outdated
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.

3 participants