Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package shaderc for openSUSE:Factory checked 
in at 2026-09-17 15:15:29
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/shaderc (Old)
 and      /work/SRC/openSUSE:Factory/.shaderc.new.383539 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "shaderc"

Thu Sep 17 15:15:29 2026 rev:41 rq:1378163 version:2026.4

Changes:
--------
--- /work/SRC/openSUSE:Factory/shaderc/shaderc.changes  2026-07-20 
10:00:06.773690599 +0200
+++ /work/SRC/openSUSE:Factory/.shaderc.new.383539/shaderc.changes      
2026-09-17 15:15:38.591462368 +0200
@@ -1,0 +2,9 @@
+Tue Sep 15 11:33:41 UTC 2026 - Jan Engelhardt <[email protected]>
+
+- Update to release 2026.4
+  * Incorporate fixes for SPV_KHR_abort abortEXT(...)
+  * glslc: option -fshader-stage now accepts all shader stage names
+    as allowed in #pragma shader_stage(<stage>)> This includes ray
+    tracing, task, and mesh shader stages.
+
+-------------------------------------------------------------------

Old:
----
  v2026.3.tar.gz

New:
----
  v2026.4.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ shaderc.spec ++++++
--- /var/tmp/diff_new_pack.5bTZwW/_old  2026-09-17 15:15:39.670507615 +0200
+++ /var/tmp/diff_new_pack.5bTZwW/_new  2026-09-17 15:15:39.672507699 +0200
@@ -23,7 +23,7 @@
 %endif
 
 Name:           shaderc
-Version:        2026.3
+Version:        2026.4
 Release:        0
 Summary:        A collection of tools, libraries and tests for shader 
compilation
 License:        Apache-2.0
@@ -36,11 +36,11 @@
 BuildRequires:  cmake >= 2.8.12
 BuildRequires:  gcc%{?gcc_version} >= 13
 BuildRequires:  gcc%{?gcc_version}-c++ >= 13
-BuildRequires:  glslang-devel >= 16
+BuildRequires:  glslang-devel >= 16.6
 BuildRequires:  glslang-nonstd-devel
 BuildRequires:  python3-base
-BuildRequires:  spirv-headers >= 1.6.4+sdk350.1+g26
-BuildRequires:  spirv-tools-devel >= 2026.3~rc1
+BuildRequires:  spirv-headers >= 1.202609.0
+BuildRequires:  spirv-tools-devel >= 2026.4~rc2
 
 %description
 A collection of tools, libraries and tests for shader compilation.

++++++ _scmsync.obsinfo ++++++
--- /var/tmp/diff_new_pack.5bTZwW/_old  2026-09-17 15:15:39.722509795 +0200
+++ /var/tmp/diff_new_pack.5bTZwW/_new  2026-09-17 15:15:39.726509963 +0200
@@ -1,5 +1,5 @@
-mtime: 1784288623
-commit: fb64b0bd3bfe8d1f1a91f9d3c43eb3dfa908f21938168b4f83de30ec31d95bc1
+mtime: 1789473280
+commit: 22b80ca2a6e6ac2e1cc86b7be3853f01a5bcd703ed03aabffb6799ebd94a718d
 url: https://src.opensuse.org/jengelh/shaderc
 revision: master
 

++++++ build.specials.obscpio ++++++

++++++ build.specials.obscpio ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/.gitignore new/.gitignore
--- old/.gitignore      1970-01-01 01:00:00.000000000 +0100
+++ new/.gitignore      2026-09-15 13:54:40.000000000 +0200
@@ -0,0 +1 @@
+.osc

++++++ v2026.3.tar.gz -> v2026.4.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/shaderc-2026.3/CHANGES new/shaderc-2026.4/CHANGES
--- old/shaderc-2026.3/CHANGES  2026-07-16 17:11:57.000000000 +0200
+++ new/shaderc-2026.4/CHANGES  2026-09-11 20:56:39.000000000 +0200
@@ -1,5 +1,15 @@
 Revision history for Shaderc
 
+v2026.4 2026-09-11
+ - Use Glslang 16.6.0, SPIRV-Tools v2026.4.rc2
+ - Incorporate fixes for SPV_KHR_abort abortEXT(...)
+ - glslc:
+     option -fshader-stage now accepts all shader
+     stage names as allowed in #pragma shader_stage(<stage>)>
+     This includes ray tracing, task, and mesh shader
+     stages.
+ - Fixes an assert
+
 v2026.3 2026-07-15
  - Deprecate HLSL compilation.
      - Add build option SHADERC_ENABLE_HLSL to build Shaderc without
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/shaderc-2026.3/DEPS new/shaderc-2026.4/DEPS
--- old/shaderc-2026.3/DEPS     2026-07-16 17:11:57.000000000 +0200
+++ new/shaderc-2026.4/DEPS     2026-09-11 20:56:39.000000000 +0200
@@ -6,12 +6,12 @@
   'khronos_git': 'https://github.com/KhronosGroup',
 
   'abseil_revision': 'dbf88f932096c7f7714356e919f04749eb87c3e9',
-  'effcee_revision': '910ed15722d5d05c9d71ecf36c1a22243cb79b02',
-  'glslang_revision': '168d452a4f460d24b588fed08477a81c44ee27a1',
+  'effcee_revision': 'f8e8a164822d4f65e757bff66bc00e1567959aa0',
+  'glslang_revision': 'e1b562a8bed273a02f30b59b66a5d499793cede5',
   'googletest_revision': '52eb8108c5bdec04579160ae17225d66034bd723',
-  're2_revision': '927f5d53caf8111721e734cf24724686bb745f55',
-  'spirv_headers_revision': '29981f65241605e08b0ede4cfeb999fe3b723c6a',
-  'spirv_tools_revision': 'b707790a898e44038547df54580022fc1cf89c3d',
+  're2_revision': '972a15cedd008d846f1a39b2e88ce48d7f166cbd',
+  'spirv_headers_revision': '04fd3caa1e8267e4d95c806cad901181728e1006',
+  'spirv_tools_revision': 'ef96ed763b43b59b33b31b362f09a02b729fa1c9',
 }
 deps = {
   'third_party/abseil_cpp':
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/shaderc-2026.3/glslc/src/main.cc 
new/shaderc-2026.4/glslc/src/main.cc
--- old/shaderc-2026.3/glslc/src/main.cc        2026-07-16 17:11:57.000000000 
+0200
+++ new/shaderc-2026.4/glslc/src/main.cc        2026-09-11 20:56:39.000000000 
+0200
@@ -130,7 +130,9 @@
   -fshader-stage=<stage>
                     Treat subsequent input files as having stage <stage>.
                     Valid stages are vertex, vert, fragment, frag, tesscontrol,
-                    tesc, tesseval, tese, geometry, geom, compute, and comp.
+                    tesc, tesseval, tese, geometry, geom, compute, comp, 
raygen,
+                    rgen, anyhit, rahit, closest, rchit, miss, rmiss, 
intersect,
+                    rint, callable, rcall, task, and mesh.
   -g                Generate source-level debug information.
   -h                Display available options.
   --help            Display available options.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/shaderc-2026.3/glslc/src/shader_stage.cc 
new/shaderc-2026.4/glslc/src/shader_stage.cc
--- old/shaderc-2026.3/glslc/src/shader_stage.cc        2026-07-16 
17:11:57.000000000 +0200
+++ new/shaderc-2026.4/glslc/src/shader_stage.cc        2026-09-11 
20:56:39.000000000 +0200
@@ -44,11 +44,17 @@
       {"geom", shaderc_glsl_geometry_shader},
       {"compute", shaderc_glsl_compute_shader},
       {"comp", shaderc_glsl_compute_shader},
+      {"raygen", shaderc_glsl_raygen_shader},
       {"rgen", shaderc_glsl_raygen_shader },
+      {"anyhit", shaderc_glsl_anyhit_shader},
       {"rahit", shaderc_glsl_anyhit_shader },
+      {"closest", shaderc_glsl_closesthit_shader},
       {"rchit", shaderc_glsl_closesthit_shader },
+      {"miss", shaderc_glsl_miss_shader},
       {"rmiss", shaderc_glsl_miss_shader },
+      {"intersect", shaderc_glsl_intersection_shader},
       {"rint", shaderc_glsl_intersection_shader },
+      {"callable", shaderc_glsl_callable_shader},
       {"rcall", shaderc_glsl_callable_shader },
       {"task", shaderc_glsl_task_shader },
       {"mesh", shaderc_glsl_mesh_shader },
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/shaderc-2026.3/glslc/test/option_shader_stage.py 
new/shaderc-2026.4/glslc/test/option_shader_stage.py
--- old/shaderc-2026.3/glslc/test/option_shader_stage.py        2026-07-16 
17:11:57.000000000 +0200
+++ new/shaderc-2026.4/glslc/test/option_shader_stage.py        2026-09-11 
20:56:39.000000000 +0200
@@ -61,6 +61,266 @@
         uvec3 temp = gl_WorkGroupID;
     }"""
 
+def simple_raygen_shader():
+    return """#version 460
+    #extension GL_EXT_ray_tracing : enable
+
+    // 1. Top-Level Acceleration Structure (TLAS) containing your scene 
geometry
+    layout(binding = 0, set = 0) uniform accelerationStructureEXT topLevelAS;
+
+    // 2. Storage image to write the output colors to
+    layout(binding = 1, set = 0, rgba8) uniform writeonly image2D imageOutput;
+
+    // 3. Payload layout to receive ray tracing result (matches hit/miss 
shaders)
+    layout(location = 0) rayPayloadEXT vec3 hitColor;
+
+    void main()
+    {
+        // Compute pixel coordinates based on launch ID
+        ivec2 pixel = ivec2(gl_LaunchIDEXT.xy);
+        vec2  uv    = vec2(gl_LaunchIDEXT.xy) / vec2(gl_LaunchSizeEXT.xy);
+
+        // Simple orthographic/normalized ray setup
+        vec3 origin    = vec3(uv * 2.0 - 1.0, -1.0); // Normalized Screen 
Space to World [-1, 1]
+        vec3 direction = vec3(0.0, 0.0, 1.0);        // Ray pointing forward 
into screen
+
+        uint  rayFlags = gl_RayFlagsOpaqueEXT;
+        uint  cullMask = 0xFF; // Trace all geometries
+        float tMin     = 0.001;
+        float tMax     = 1000.0;
+
+        // Trace the ray into the acceleration structure
+        traceRayEXT(
+            topLevelAS,  // TLAS handle
+            rayFlags,    // Ray behavior flags
+            cullMask,    // Visibility mask
+            0, 0, 0,     // SBT offset, stride, miss index
+            origin,      // Ray Origin (vec3)
+            tMin,        // Minimum intersection distance
+            direction,   // Ray Direction (vec3)
+            tMax,        // Maximum intersection distance
+            0            // Payload location index
+        );
+
+        // Store the resulting color into the output image
+        imageStore(imageOutput, pixel, vec4(hitColor, 1.0));
+    }
+    """
+
+def simple_intersection_shader():
+    return """#version 460
+    #extension GL_EXT_ray_tracing : enable
+
+    // Intersection payload/attribute sent to Closest Hit shader
+    hitAttributeEXT vec3 normal;
+
+    void main()
+    {
+        // Built-in ray parameters supplied by Vulkan API
+        vec3 rayOrigin    = gl_WorldRayOriginEXT;
+        vec3 rayDirection = gl_WorldRayDirectionEXT;
+        float tMin        = gl_RayTminEXT;
+        float tMax        = gl_RayTmaxEXT;
+
+        // Define a sphere centered at (0,0,0) with radius 1.0
+        float radius = 1.0;
+
+        // Ray-Sphere Intersection Math (Quadratic Equation: a*t^2 + b*t + c = 
0)
+        float a = dot(rayDirection, rayDirection);
+        float b = 2.0 * dot(rayOrigin, rayDirection);
+        float c = dot(rayOrigin, rayOrigin) - (radius * radius);
+
+        float discriminant = b * b - 4.0 * a * c;
+
+        if (discriminant >= 0.0)
+        {
+            // Calculate nearest intersection point distance (t)
+            float t = (-b - sqrt(discriminant)) / (2.0 * a);
+
+            // Check if the intersection point lies within the valid ray range 
[tMin, tMax]
+            if (t >= tMin && t <= tMax)
+            {
+                // Compute hit normal to pass along to Closest Hit Shader
+                normal = normalize(rayOrigin + t * rayDirection);
+
+                // Report the intersection to Vulkan (0 is a user-defined hit 
type)
+                reportIntersectionEXT(t, 0);
+            }
+        }
+    }
+    """
+
+def simple_anyhit_shader():
+    return """#version 460
+    #extension GL_EXT_ray_tracing : enable
+    #extension GL_EXT_nonuniform_qualifier : enable
+
+    // Texture sampler layout (e.g., alpha mask)
+    layout(binding = 2, set = 0) uniform sampler2D alphaTextures[];
+
+    // Attributes received from Intersection Shader or Built-in Triangle 
barycentrics
+    hitAttributeEXT vec2 hitAttribs;
+
+    void main()
+    {
+        // Compute UVs using barycentric coordinates (for triangle geometry)
+        vec3 barycentrics = vec3(1.0 - hitAttribs.x - hitAttribs.y, 
hitAttribs.x, hitAttribs.y);
+
+        // Fetch UV coordinates or material ID for this instance/primitive
+        // (Assuming simple UV mapping from vertex attribute data)
+        vec2 uv = hitAttribs;
+
+        // Sample the alpha channel from texture
+        float alpha = texture(alphaTextures[gl_InstanceCustomIndexEXT], uv).a;
+
+        // Alpha cutoff threshold
+        if (alpha < 0.5)
+        {
+            // Reject this intersection candidate; traversal continues along 
the ray
+            ignoreIntersectionEXT;
+        }
+
+        // If not ignored, Vulkan accepts this candidate hit by default.
+    }
+    """
+
+def simple_miss_shader():
+    return """#version 460
+    #extension GL_EXT_ray_tracing : enable
+
+    // Payload output sent back to the Ray Generation Shader
+    // (Location index MUST match the payload location index passed to 
traceRayEXT)
+    layout(location = 0) rayPayloadInEXT vec3 hitColor;
+
+    void main()
+    {
+        // Get the normalized direction vector of the ray that missed
+        vec3 rayDir = normalize(gl_WorldRayDirectionEXT);
+
+        // Create a simple vertical sky gradient (blue to white) based on Y 
direction
+        float t = 0.5 * (rayDir.y + 1.0);
+        vec3 skyColor = mix(vec3(1.0, 1.0, 1.0), vec3(0.5, 0.7, 1.0), t);
+
+        // Write output color into payload
+        hitColor = skyColor;
+    }
+    """
+
+def simple_closest_shader():
+    return """#version 460
+    #extension GL_EXT_ray_tracing : enable
+
+    // Payload received from Raygen (location MUST match traceRayEXT call)
+    layout(location = 0) rayPayloadInEXT vec3 hitColor;
+
+    // Attributes passed from hardware ray-triangle intersection (Barycentric 
coordinates)
+    hitAttributeEXT vec2 hitAttribs;
+
+    void main()
+    {
+        // 1. Calculate barycentric coordinates for the hit point on the 
triangle
+        vec3 barycentrics = vec3(1.0 - hitAttribs.x - hitAttribs.y, 
hitAttribs.x, hitAttribs.y);
+
+        // 2. Derive surface normal (For demo purposes: using flat normal from 
triangle hit)
+        // In a production setup, you would fetch vertex normals using 
gl_PrimitiveID / SSBOs
+        vec3 objectNormal = vec3(0.0, 1.0, 0.0);
+        vec3 worldNormal  = normalize(gl_ObjectToWorldEXT * vec4(objectNormal, 
0.0));
+
+        // 3. Define a simple directional light source
+        vec3 lightDir = normalize(vec3(0.5, 1.0, 0.3));
+        vec3 baseColor = vec3(0.8, 0.2, 0.2); // Red material
+
+        // 4. Compute diffuse lighting (N dot L)
+        float diffuse = max(dot(worldNormal, lightDir), 0.1); // 0.1 ambient 
floor
+
+        // 5. Output shaded color to payload
+        hitColor = baseColor * diffuse;
+    }
+    """
+
+def simple_callable_shader():
+    return """#version 460
+    #extension GL_EXT_ray_tracing : enable
+
+    layout(location = 0) callableDataInEXT struct Params {
+        float foo;
+    } params;
+
+    void main()
+    {
+        params.foo *= 2;
+    }
+    """
+
+def simple_mesh_shader():
+    return """#version 460
+    #extension GL_EXT_mesh_shader : enable
+
+    layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+
+    // Output configuration: primitive type, max vertex count, max primitive 
count
+    layout(triangles, max_vertices = 3, max_primitives = 1) out;
+
+    // Custom per-vertex outputs to the fragment shader
+    layout(location = 0) out vec3 outColor[];
+
+    void main()
+    {
+        // Set total vertices and primitives emitted by this meshlet thread 
group
+        SetMeshOutputsEXT(3, 1);
+
+        // 1. Define Vertex Positions (in Normalized Device Coordinates [-1, 
1])
+        gl_MeshVerticesEXT[0].gl_Position = vec4(-0.5, -0.5, 0.0, 1.0);
+        gl_MeshVerticesEXT[1].gl_Position = vec4( 0.5, -0.5, 0.0, 1.0);
+        gl_MeshVerticesEXT[2].gl_Position = vec4( 0.0,  0.5, 0.0, 1.0);
+
+        // 2. Pass Per-Vertex Attributes
+        outColor[0] = vec3(1.0, 0.0, 0.0); // Red
+        outColor[1] = vec3(0.0, 1.0, 0.0); // Green
+        outColor[2] = vec3(0.0, 0.0, 1.0); // Blue
+
+        // 3. Define Primitive Index Topologies (1 triangle using 3 vertex 
indices)
+        gl_PrimitiveTriangleIndicesEXT[0] = uvec3(0, 1, 2);
+    }
+    """
+
+def simple_task_shader():
+    return """#version 460
+    #extension GL_EXT_mesh_shader : enable
+
+    // Define workgroup dimensions for task shader evaluation
+    layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+
+    // Payload structure passed from Task Shader to Mesh Shader
+    struct TaskPayload {
+        uint meshletID;
+    };
+    taskPayloadSharedEXT TaskPayload payload;
+
+    void main()
+    {
+        // Local meshlet index to test
+        uint meshletIndex = gl_GlobalInvocationID.x;
+
+        // 1. Perform Culling Test (Frustum, Occlusion, or Backface)
+        bool isVisible = true; // Placeholder for actual culling logic
+
+        if (isVisible)
+        {
+            // 2. Populate payload data shared with spawned Mesh Shaders
+            payload.meshletID = meshletIndex;
+
+            // 3. Emit task count: Launch 1 Mesh Shader workgroup (X=1, Y=1, 
Z=1)
+            EmitMeshTasksEXT(1, 1, 1);
+        }
+        else
+        {
+            // Cull completely: Do not spawn any Mesh Shader workgroups
+            EmitMeshTasksEXT(0, 0, 0);
+        }
+    }
+    """
+
 
 @inside_glslc_testsuite('OptionShaderStage')
 class TestShaderStageWithGlslExtension(expect.ValidObjectFile):
@@ -104,8 +364,8 @@
 
 
 @inside_glslc_testsuite('OptionShaderStage')
-class TestAllShaderStages(expect.ValidObjectFile):
-    """Tests all possible -fshader-stage values."""
+class TestAllShaderStagesForSpv1p0(expect.ValidObjectFile):
+    """Tests all possible -fshader-stage values for SPIR-V 1.0."""
 
     shader1 = FileShader(simple_vertex_shader(), '.glsl')
     shader2 = FileShader(simple_fragment_shader(), '.glsl')
@@ -124,6 +384,53 @@
 
 
 @inside_glslc_testsuite('OptionShaderStage')
+class TestAllShaderStagesForSpv1p4(expect.ValidObjectFile1_4):
+    """Tests all possible -fshader-stage values that only target at least 
SPIR-V 1.4"""
+
+    raygen = FileShader(simple_raygen_shader(), '.glsl')
+    intersection = FileShader(simple_intersection_shader(), '.glsl')
+    anyhit = FileShader(simple_anyhit_shader(), '.glsl')
+    miss = FileShader(simple_miss_shader(), '.glsl')
+    closest = FileShader(simple_closest_shader(), '.glsl')
+    miss = FileShader(simple_miss_shader(), '.glsl')
+    callable_ = FileShader(simple_callable_shader(), '.glsl')
+    mesh = FileShader(simple_mesh_shader(), '.glsl')
+    task = FileShader(simple_task_shader(), '.glsl')
+    glslc_args = [
+        '-c',
+        '--target-spv=spv1.4',
+        '-fshader-stage=raygen', raygen,
+        '-fshader-stage=intersect', intersection,
+        '-fshader-stage=anyhit', anyhit,
+        '-fshader-stage=closest', closest,
+        '-fshader-stage=miss', miss,
+        '-fshader-stage=callable', callable_,
+        '-fshader-stage=mesh', mesh,
+        '-fshader-stage=task', task]
+
+
+@inside_glslc_testsuite('OptionShaderStage')
+class TestAllShaderStagesForSpv1p4ShortNames(expect.ValidObjectFile1_4):
+    """Tests all possible -fshader-stage values that only target at least 
SPIR-V 1.4"""
+
+    raygen = FileShader(simple_raygen_shader(), '.glsl')
+    intersection = FileShader(simple_intersection_shader(), '.glsl')
+    anyhit = FileShader(simple_anyhit_shader(), '.glsl')
+    miss = FileShader(simple_miss_shader(), '.glsl')
+    closest = FileShader(simple_closest_shader(), '.glsl')
+    callable_ = FileShader(simple_callable_shader(), '.glsl')
+    glslc_args = [
+        '-c',
+        '--target-spv=spv1.4',
+        '-fshader-stage=rgen', raygen,
+        '-fshader-stage=rint', intersection,
+        '-fshader-stage=rahit', anyhit,
+        '-fshader-stage=rchit', closest,
+        '-fshader-stage=rmiss', miss,
+        '-fshader-stage=rcall', callable_]
+
+
+@inside_glslc_testsuite('OptionShaderStage')
 class TestShaderStageOverwriteFileExtension(expect.ValidObjectFile):
     """Tests -fshader-stage has precedence over file extension."""
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/shaderc-2026.3/glslc/test/parameter_tests.py 
new/shaderc-2026.4/glslc/test/parameter_tests.py
--- old/shaderc-2026.3/glslc/test/parameter_tests.py    2026-07-16 
17:11:57.000000000 +0200
+++ new/shaderc-2026.4/glslc/test/parameter_tests.py    2026-09-11 
20:56:39.000000000 +0200
@@ -134,7 +134,9 @@
   -fshader-stage=<stage>
                     Treat subsequent input files as having stage <stage>.
                     Valid stages are vertex, vert, fragment, frag, tesscontrol,
-                    tesc, tesseval, tese, geometry, geom, compute, and comp.
+                    tesc, tesseval, tese, geometry, geom, compute, comp, 
raygen,
+                    rgen, anyhit, rahit, closest, rchit, miss, rmiss, 
intersect,
+                    rint, callable, rcall, task, and mesh.
   -g                Generate source-level debug information.
   -h                Display available options.
   --help            Display available options.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/shaderc-2026.3/glslc/test/pragma_shader_stage.py 
new/shaderc-2026.4/glslc/test/pragma_shader_stage.py
--- old/shaderc-2026.3/glslc/test/pragma_shader_stage.py        2026-07-16 
17:11:57.000000000 +0200
+++ new/shaderc-2026.4/glslc/test/pragma_shader_stage.py        2026-09-11 
20:56:39.000000000 +0200
@@ -17,6 +17,7 @@
 from glslc_test_framework import inside_glslc_testsuite
 from placeholder import FileShader, StdinShader
 
+
 VERTEX_ONLY_SHADER_WITH_PRAGMA = \
     """#version 310 es
     #pragma shader_stage(vertex)
@@ -61,6 +62,277 @@
         uvec3 temp = gl_WorkGroupID;
     }"""
 
+
+RAYGEN_ONLY_SHADER_WITH_PRAGMA = \
+    """#version 460
+    #pragma shader_stage(raygen)
+    #extension GL_EXT_ray_tracing : enable
+
+    // 1. Top-Level Acceleration Structure (TLAS) containing your scene 
geometry
+    layout(binding = 0, set = 0) uniform accelerationStructureEXT topLevelAS;
+
+    // 2. Storage image to write the output colors to
+    layout(binding = 1, set = 0, rgba8) uniform writeonly image2D imageOutput;
+
+    // 3. Payload layout to receive ray tracing result (matches hit/miss 
shaders)
+    layout(location = 0) rayPayloadEXT vec3 hitColor;
+
+    void main()
+    {
+        // Compute pixel coordinates based on launch ID
+        ivec2 pixel = ivec2(gl_LaunchIDEXT.xy);
+        vec2  uv    = vec2(gl_LaunchIDEXT.xy) / vec2(gl_LaunchSizeEXT.xy);
+
+        // Simple orthographic/normalized ray setup
+        vec3 origin    = vec3(uv * 2.0 - 1.0, -1.0); // Normalized Screen 
Space to World [-1, 1]
+        vec3 direction = vec3(0.0, 0.0, 1.0);        // Ray pointing forward 
into screen
+
+        uint  rayFlags = gl_RayFlagsOpaqueEXT;
+        uint  cullMask = 0xFF; // Trace all geometries
+        float tMin     = 0.001;
+        float tMax     = 1000.0;
+
+        // Trace the ray into the acceleration structure
+        traceRayEXT(
+            topLevelAS,  // TLAS handle
+            rayFlags,    // Ray behavior flags
+            cullMask,    // Visibility mask
+            0, 0, 0,     // SBT offset, stride, miss index
+            origin,      // Ray Origin (vec3)
+            tMin,        // Minimum intersection distance
+            direction,   // Ray Direction (vec3)
+            tMax,        // Maximum intersection distance
+            0            // Payload location index
+        );
+
+        // Store the resulting color into the output image
+        imageStore(imageOutput, pixel, vec4(hitColor, 1.0));
+    }
+    """
+
+INTERSECTION_ONLY_SHADER_WITH_PRAGMA = \
+    """#version 460
+    #pragma shader_stage(intersect)
+    #extension GL_EXT_ray_tracing : enable
+
+    // Intersection payload/attribute sent to Closest Hit shader
+    hitAttributeEXT vec3 normal;
+
+    void main()
+    {
+        // Built-in ray parameters supplied by Vulkan API
+        vec3 rayOrigin    = gl_WorldRayOriginEXT;
+        vec3 rayDirection = gl_WorldRayDirectionEXT;
+        float tMin        = gl_RayTminEXT;
+        float tMax        = gl_RayTmaxEXT;
+
+        // Define a sphere centered at (0,0,0) with radius 1.0
+        float radius = 1.0;
+
+        // Ray-Sphere Intersection Math (Quadratic Equation: a*t^2 + b*t + c = 
0)
+        float a = dot(rayDirection, rayDirection);
+        float b = 2.0 * dot(rayOrigin, rayDirection);
+        float c = dot(rayOrigin, rayOrigin) - (radius * radius);
+
+        float discriminant = b * b - 4.0 * a * c;
+
+        if (discriminant >= 0.0)
+        {
+            // Calculate nearest intersection point distance (t)
+            float t = (-b - sqrt(discriminant)) / (2.0 * a);
+
+            // Check if the intersection point lies within the valid ray range 
[tMin, tMax]
+            if (t >= tMin && t <= tMax)
+            {
+                // Compute hit normal to pass along to Closest Hit Shader
+                normal = normalize(rayOrigin + t * rayDirection);
+
+                // Report the intersection to Vulkan (0 is a user-defined hit 
type)
+                reportIntersectionEXT(t, 0);
+            }
+        }
+    }
+    """
+
+ANYHIT_ONLY_SHADER_WITH_PRAGMA = \
+    """#version 460
+    #pragma shader_stage(anyhit)
+    #extension GL_EXT_ray_tracing : enable
+    #extension GL_EXT_nonuniform_qualifier : enable
+
+    // Texture sampler layout (e.g., alpha mask)
+    layout(binding = 2, set = 0) uniform sampler2D alphaTextures[];
+
+    // Attributes received from Intersection Shader or Built-in Triangle 
barycentrics
+    hitAttributeEXT vec2 hitAttribs;
+
+    void main()
+    {
+        // Compute UVs using barycentric coordinates (for triangle geometry)
+        vec3 barycentrics = vec3(1.0 - hitAttribs.x - hitAttribs.y, 
hitAttribs.x, hitAttribs.y);
+
+        // Fetch UV coordinates or material ID for this instance/primitive
+        // (Assuming simple UV mapping from vertex attribute data)
+        vec2 uv = hitAttribs;
+
+        // Sample the alpha channel from texture
+        float alpha = texture(alphaTextures[gl_InstanceCustomIndexEXT], uv).a;
+
+        // Alpha cutoff threshold
+        if (alpha < 0.5)
+        {
+            // Reject this intersection candidate; traversal continues along 
the ray
+            ignoreIntersectionEXT;
+        }
+
+        // If not ignored, Vulkan accepts this candidate hit by default.
+    }
+    """
+
+MISS_ONLY_SHADER_WITH_PRAGMA = \
+    """#version 460
+    #pragma shader_stage(miss)
+    #extension GL_EXT_ray_tracing : enable
+
+    // Payload output sent back to the Ray Generation Shader
+    // (Location index MUST match the payload location index passed to 
traceRayEXT)
+    layout(location = 0) rayPayloadInEXT vec3 hitColor;
+
+    void main()
+    {
+        // Get the normalized direction vector of the ray that missed
+        vec3 rayDir = normalize(gl_WorldRayDirectionEXT);
+
+        // Create a simple vertical sky gradient (blue to white) based on Y 
direction
+        float t = 0.5 * (rayDir.y + 1.0);
+        vec3 skyColor = mix(vec3(1.0, 1.0, 1.0), vec3(0.5, 0.7, 1.0), t);
+
+        // Write output color into payload
+        hitColor = skyColor;
+    }
+    """
+
+CLOSEST_ONLY_SHADER_WITH_PRAGMA = \
+    """#version 460
+    #pragma shader_stage(closest)
+    #extension GL_EXT_ray_tracing : enable
+
+    // Payload received from Raygen (location MUST match traceRayEXT call)
+    layout(location = 0) rayPayloadInEXT vec3 hitColor;
+
+    // Attributes passed from hardware ray-triangle intersection (Barycentric 
coordinates)
+    hitAttributeEXT vec2 hitAttribs;
+
+    void main()
+    {
+        // 1. Calculate barycentric coordinates for the hit point on the 
triangle
+        vec3 barycentrics = vec3(1.0 - hitAttribs.x - hitAttribs.y, 
hitAttribs.x, hitAttribs.y);
+
+        // 2. Derive surface normal (For demo purposes: using flat normal from 
triangle hit)
+        // In a production setup, you would fetch vertex normals using 
gl_PrimitiveID / SSBOs
+        vec3 objectNormal = vec3(0.0, 1.0, 0.0);
+        vec3 worldNormal  = normalize(gl_ObjectToWorldEXT * vec4(objectNormal, 
0.0));
+
+        // 3. Define a simple directional light source
+        vec3 lightDir = normalize(vec3(0.5, 1.0, 0.3));
+        vec3 baseColor = vec3(0.8, 0.2, 0.2); // Red material
+
+        // 4. Compute diffuse lighting (N dot L)
+        float diffuse = max(dot(worldNormal, lightDir), 0.1); // 0.1 ambient 
floor
+
+        // 5. Output shaded color to payload
+        hitColor = baseColor * diffuse;
+    }
+    """
+
+
+CALLABLE_ONLY_SHADER_WITH_PRAGMA = \
+    """#version 460
+    #pragma shader_stage(callable)
+    #extension GL_EXT_ray_tracing : enable
+
+    layout(location = 0) callableDataInEXT struct Params {
+        float foo;
+    } params;
+
+    void main()
+    {
+        params.foo *= 2;
+    }
+    """
+
+MESH_ONLY_SHADER_WITH_PRAGMA = \
+    """#version 460
+    #pragma shader_stage(mesh)
+    #extension GL_EXT_mesh_shader : enable
+
+    layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+
+    // Output configuration: primitive type, max vertex count, max primitive 
count
+    layout(triangles, max_vertices = 3, max_primitives = 1) out;
+
+    // Custom per-vertex outputs to the fragment shader
+    layout(location = 0) out vec3 outColor[];
+
+    void main()
+    {
+        // Set total vertices and primitives emitted by this meshlet thread 
group
+        SetMeshOutputsEXT(3, 1);
+
+        // 1. Define Vertex Positions (in Normalized Device Coordinates [-1, 
1])
+        gl_MeshVerticesEXT[0].gl_Position = vec4(-0.5, -0.5, 0.0, 1.0);
+        gl_MeshVerticesEXT[1].gl_Position = vec4( 0.5, -0.5, 0.0, 1.0);
+        gl_MeshVerticesEXT[2].gl_Position = vec4( 0.0,  0.5, 0.0, 1.0);
+
+        // 2. Pass Per-Vertex Attributes
+        outColor[0] = vec3(1.0, 0.0, 0.0); // Red
+        outColor[1] = vec3(0.0, 1.0, 0.0); // Green
+        outColor[2] = vec3(0.0, 0.0, 1.0); // Blue
+
+        // 3. Define Primitive Index Topologies (1 triangle using 3 vertex 
indices)
+        gl_PrimitiveTriangleIndicesEXT[0] = uvec3(0, 1, 2);
+    }
+    """
+
+
+TASK_ONLY_SHADER_WITH_PRAGMA = \
+    """#version 460
+    #pragma shader_stage(task)
+    #extension GL_EXT_mesh_shader : enable
+
+    // Define workgroup dimensions for task shader evaluation
+    layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+
+    // Payload structure passed from Task Shader to Mesh Shader
+    struct TaskPayload {
+        uint meshletID;
+    };
+    taskPayloadSharedEXT TaskPayload payload;
+
+    void main()
+    {
+        // Local meshlet index to test
+        uint meshletIndex = gl_GlobalInvocationID.x;
+
+        // 1. Perform Culling Test (Frustum, Occlusion, or Backface)
+        bool isVisible = true; // Placeholder for actual culling logic
+
+        if (isVisible)
+        {
+            // 2. Populate payload data shared with spawned Mesh Shaders
+            payload.meshletID = meshletIndex;
+
+            // 3. Emit task count: Launch 1 Mesh Shader workgroup (X=1, Y=1, 
Z=1)
+            EmitMeshTasksEXT(1, 1, 1);
+        }
+        else
+        {
+            // Cull completely: Do not spawn any Mesh Shader workgroups
+            EmitMeshTasksEXT(0, 0, 0);
+        }
+    }
+    """
+
 # In the following tests,
 # PSS stands for PragmaShaderStage, and OSS stands for OptionShaderStage.
 
@@ -159,8 +431,9 @@
 
 
 @inside_glslc_testsuite('PragmaShaderStage')
-class TestAllPSSValues(expect.ValidObjectFile):
-    """Tests all possible #pragma shader_stage() values."""
+class TestAllPSSValueForSpv1p0(expect.ValidObjectFile):
+    """Tests all possible #pragma shader_stage() values that can
+    target SPIR-V 1.0."""
 
     shader1 = FileShader(VERTEX_ONLY_SHADER_WITH_PRAGMA, '.glsl')
     shader2 = FileShader(FRAGMENT_ONLY_SHADER_WITH_PRAGMA, '.glsl')
@@ -170,6 +443,23 @@
     shader6 = FileShader(COMPUTE_ONLY_SHADER_WITH_PRAGMA, '.glsl')
     glslc_args = ['-c', shader1, shader2, shader3, shader4, shader5, shader6]
 
+@inside_glslc_testsuite('PragmaShaderStage')
+class TestAllPSSValueForSpv1p4(expect.ValidObjectFile1_4):
+    """Tests all possible #pragma shader_stage() values that can only
+    target SPIR-V 1.4 or later."""
+
+    shader1 = FileShader(RAYGEN_ONLY_SHADER_WITH_PRAGMA, '.glsl')
+    shader2 = FileShader(INTERSECTION_ONLY_SHADER_WITH_PRAGMA, '.glsl')
+    shader3 = FileShader(ANYHIT_ONLY_SHADER_WITH_PRAGMA, '.glsl')
+    shader4 = FileShader(MISS_ONLY_SHADER_WITH_PRAGMA, '.glsl')
+    shader5 = FileShader(CLOSEST_ONLY_SHADER_WITH_PRAGMA, '.glsl')
+    shader6 = FileShader(CALLABLE_ONLY_SHADER_WITH_PRAGMA, '.glsl')
+    shader7 = FileShader(MESH_ONLY_SHADER_WITH_PRAGMA, '.glsl')
+    shader8 = FileShader(TASK_ONLY_SHADER_WITH_PRAGMA, '.glsl')
+    glslc_args = ['-c', '--target-spv=spv1.4', \
+                  shader1, shader2, shader3, shader4, \
+                  shader5, shader6, shader7, shader8]
+
 
 @inside_glslc_testsuite('PragmaShaderStage')
 class TestWrongPSSValue(expect.ErrorMessage):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/shaderc-2026.3/libshaderc/src/shaderc_private.h 
new/shaderc-2026.4/libshaderc/src/shaderc_private.h
--- old/shaderc-2026.3/libshaderc/src/shaderc_private.h 2026-07-16 
17:11:57.000000000 +0200
+++ new/shaderc-2026.4/libshaderc/src/shaderc_private.h 2026-09-11 
20:56:39.000000000 +0200
@@ -19,6 +19,7 @@
 #include <cstdint>
 #include <string>
 #include <vector>
+#include <memory>
 
 #include "shaderc/shaderc.h"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/shaderc-2026.3/libshaderc_util/include/libshaderc_util/string_piece.h 
new/shaderc-2026.4/libshaderc_util/include/libshaderc_util/string_piece.h
--- old/shaderc-2026.3/libshaderc_util/include/libshaderc_util/string_piece.h   
2026-07-16 17:11:57.000000000 +0200
+++ new/shaderc-2026.4/libshaderc_util/include/libshaderc_util/string_piece.h   
2026-09-11 20:56:39.000000000 +0200
@@ -75,6 +75,7 @@
 
   // Returns a string_piece that points to a substring in the original string.
   string_piece substr(size_t pos, size_t len = npos) const {
+    assert(pos <= size());
     assert(len == npos || pos + len <= size());
     return string_piece(begin_ + pos, len == npos ? end_ : begin_ + pos + len);
   }

Reply via email to