KhronosGroup / VK-GL-CTS

Khronos Vulkan, OpenGL, and OpenGL ES Conformance Tests
https://www.khronos.org/
Apache License 2.0
521 stars 290 forks source link

stringification not allowed in GLSL spec but in CTS #448

Open chaocNV opened 7 months ago

chaocNV commented 7 months ago

I notice there are tests in CTS that specifically test the stringification in GLSL language. For example:

KHR-GL33.shaders.preprocessor.basic.stringification_vertex
KHR-GL33.shaders.preprocessor.basic.stringification_fragement 

There are other variants for this test for other GL version.

However, this seems to be disallowed according to all GLSL specs. For instance, according to page 7 of GLSL3.3 : There are no other number sign based operators (e.g., no # or #@), nor is there a sizeof operator

This issue becomes apparent when this glslang commit starts to enforce the spec.

AlexGalazin-IMG commented 7 months ago

As far as I see, these are negative tests, ie the implementation is expected to report an error.