You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[SPIR-V] [outputcontrolpoints(0)] or missing outputcontrolpoints Hull stage attribute crash the compiler (works with DXIL backend) #3733
[SPIR-V] [outputcontrolpoints(0)] or missing outputcontrolpoints Hull stage attribute crash the compiler (works with DXIL backend)
Functional impact
Cannot produce hull shaders that don't have any control point output (e.g. when only patch data is needed for the domain stage)
Minimal repro steps
Compile the following shader with dxc.exe -T hs_6_0 -E Hull -spirv repro_shader.txt: repro_shader.txt
or do dxc.exe -T hs_6_0 -E Hull -spirv repro_shader_no_attribute.txt repro_shader_no_attribute.txt
Expected result
Compilation succeeds with control point output count being zero
Actual result
Compiler crashes with output: Internal compiler error: access violation. Attempted to read from address 0x0000000000000020
changed the title [-][SPIR-V] [outputcontrolpoints(0)] Hull stage attribute crashes the compiler (works with DXIL backend)[/-][+][SPIR-V] [outputcontrolpoints(0)] or missing outputcontrolpoints Hull stage attribute crash the compiler (works with DXIL backend)[/+]on May 3, 2021
Lukas Taparauskas (@Dredhog) Do you happen to have any additional context on how you intend to use zero control points in hull shaders, or is this simply an issue to report a crash (never correct) and mismatch with the DXIL backend (undesirable)?
Activity
[-][SPIR-V] [outputcontrolpoints(0)] Hull stage attribute crashes the compiler (works with DXIL backend)[/-][+][SPIR-V] [outputcontrolpoints(0)] or missing outputcontrolpoints Hull stage attribute crash the compiler (works with DXIL backend)[/+]jaebaek commentedon May 3, 2021
Lukas Taparauskas (@Dredhog), Thank you for reporting this issue. We will take a look.
[SPIR-V] Allow zero outputcontrolpoints
sudonatalie commentedon Jan 23, 2024
Lukas Taparauskas (@Dredhog) Do you happen to have any additional context on how you intend to use zero control points in hull shaders, or is this simply an issue to report a crash (never correct) and mismatch with the DXIL backend (undesirable)?
Given that Vulkan doesn't allow zero as the number of output vertices (https://docs.vulkan.org/spec/latest/chapters/pipelines.html#VUID-VkPipelineShaderStageCreateInfo-stage-00713) and it looks like the D3D docs might also suggest it's invalid (https://learn.microsoft.com/en-us/windows/win32/direct3d11/direct3d-11-advanced-stages-tessellation#hull-shader-stage) I'm thinking the correct solution might be to fail gracefully for both backends.
Require valid outputcontrolpoints on Hull shader
Require valid outputcontrolpoints on Hull shader
[SPIR-V] Allow zero outputcontrolpoints
Require valid outputcontrolpoints on Hull shader
Require valid outputcontrolpoints on Hull shader (#6196)